GNOME Bugzilla – Bug 794623
x265enc: add property to control gop size / keyframe interval
Last modified: 2018-03-28 20:06:13 UTC
x265enc is missing the property to contorl gop size like h264enc key-int-max
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
Created attachment 370055 [details] [review] Updated patch Changed patch 0 - Value uses library default Removed maximum restriction. Added "Since:" document tag
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.)
Should we also set x265param.bRepeatHeaders ?