After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 794623 - x265enc: add property to control gop size / keyframe interval
x265enc: add property to control gop size / keyframe interval
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 1.15.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-03-23 14:17 UTC by James Stevenson
Modified: 2018-03-28 20:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to add key-int-max (3.45 KB, patch)
2018-03-23 14:20 UTC, James Stevenson
none Details | Review
Updated patch (3.57 KB, patch)
2018-03-23 14:51 UTC, James Stevenson
committed Details | Review

Description James Stevenson 2018-03-23 14:17:13 UTC
x265enc is missing the property to contorl gop size like h264enc key-int-max
Comment 1 James Stevenson 2018-03-23 14:20:41 UTC
Created attachment 370054 [details] [review]
Patch to add key-int-max

Adds key-int-max property to gstreamer element

Tested with without property to make sure default element behaviour doesnt change.

Also tested with


gst-launch-1.0 -v videotestsrc is-live=true ! x265enc tune=4 key-int-max=5 ! fakesink silent=false

And confirmed we get keyframes every 5 frames.

/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain   ******* (fakesink0:sink) (10196 bytes, dts: 0:00:03.500000000, pts: 0:00:03.500000000, duration: 0:00:00.033333333, offset: -1, offset_end: -1, flags: 00000000 , meta: none) 0x7f244c10f380
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain   ******* (fakesink0:sink) (6596 bytes, dts: 0:00:03.533333333, pts: 0:00:03.533333333, duration: 0:00:00.033333333, offset: -1, offset_end: -1, flags: 00002000 delta-unit , meta: none) 0x7f244c10f5a0
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain   ******* (fakesink0:sink) (6570 bytes, dts: 0:00:03.566666666, pts: 0:00:03.566666666, duration: 0:00:00.033333334, offset: -1, offset_end: -1, flags: 00002000 delta-unit , meta: none) 0x7f244c10f490
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain   ******* (fakesink0:sink) (6560 bytes, dts: 0:00:03.600000000, pts: 0:00:03.600000000, duration: 0:00:00.033333333, offset: -1, offset_end: -1, flags: 00002000 delta-unit , meta: none) 0x7f244c10f270
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain   ******* (fakesink0:sink) (6568 bytes, dts: 0:00:03.633333333, pts: 0:00:03.633333333, duration: 0:00:00.033333333, offset: -1, offset_end: -1, flags: 00002000 delta-unit , meta: none) 0x7f244c10f160
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain   ******* (fakesink0:sink) (10203 bytes, dts: 0:00:03.666666666, pts: 0:00:03.666666666, duration: 0:00:00.033333334, offset: -1, offset_end: -1, flags: 00000000 , meta: none) 0x7f244c10f380
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain   ******* (fakesink0:sink) (6590 bytes, dts: 0:00:03.700000000, pts: 0:00:03.700000000, duration: 0:00:00.033333333, offset: -1, offset_end: -1, flags: 00002000 delta-unit , meta: none) 0x7f244c10f5a0
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain   ******* (fakesink0:sink) (6565 bytes, dts: 0:00:03.733333333, pts: 0:00:03.733333333, duration: 0:00:00.033333333, offset: -1, offset_end: -1, flags: 00002000 delta-unit , meta: none) 0x7f244c10f490
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain   ******* (fakesink0:sink) (6573 bytes, dts: 0:00:03.766666666, pts: 0:00:03.766666666, duration: 0:00:00.033333334, offset: -1, offset_end: -1, flags: 00002000 delta-unit , meta: none) 0x7f244c10f270
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain   ******* (fakesink0:sink) (6534 bytes, dts: 0:00:03.800000000, pts: 0:00:03.800000000, duration: 0:00:00.033333333, offset: -1, offset_end: -1, flags: 00002000 delta-unit , meta: none) 0x7f244c10f160
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain   ******* (fakesink0:sink) (10204 bytes, dts: 0:00:03.833333333, pts: 0:00:03.833333333, duration: 0:00:00.033333333, offset: -1, offset_end: -1, flags: 00000000 , meta: none) 0x7f244c10f380
Comment 2 James Stevenson 2018-03-23 14:51:05 UTC
Created attachment 370055 [details] [review]
Updated patch

Changed patch

0 - Value uses library default
Removed maximum restriction.

Added "Since:" document tag
Comment 3 Tim-Philipp Müller 2018-03-26 18:54:51 UTC
Thanks a lot for the patch!

commit 0670befbaf466dd45ef0d78382b0fdcc4b05b1aa
Author: James Stevenson <james@stev.org>
Date:   Fri Mar 23 14:14:12 2018 +0000

    x265enc: Add "key-int-max" property
    
    https://bugzilla.gnome.org/show_bug.cgi?id=794623

(Fixed up the description a bit to clarify that default means 'x265 default' and mention the current default value.)
Comment 4 Nicolas Dufresne (ndufresne) 2018-03-28 20:06:13 UTC
Should we also set x265param.bRepeatHeaders ?