GNOME Bugzilla – Bug 793829
vaapih264enc: keyframe-perdiod incongruence between declaration and description
Last modified: 2018-05-02 19:19:13 UTC
vaapih264enc and other encoder elements declare: keyframe-period : Maximal distance between two keyframes (0: auto-calculate) flags: readable, writable Unsigned Integer. Range: 1 - 300 Default: 30 But the valid ranges is 1 - 300 when the comment include the 0 case.
Created attachment 368915 [details] [review] Patch for include to zero the periodic key frame. Added a patch for extend to zero the valid range of keyframe-period. Tested with this script: ~~~ #!/bin/bash KEYFRAME_PERIOD=0 # generate a test stream. gst-launch-1.0 videotestsrc pattern=18 num-buffers=300 ! \ video/x-raw,framerate=15/1 ! \ vaapih264enc keyframe-period=$KEYFRAME_PERIOD ! \ video/x-h264,profile=baseline ! \ filesink location=test.h264 ffprobe -select_streams v -show_frames -show_entries frame=pict_type test.h264 | grep pict_type > report.log echo "I-frame $(cat report.log | grep I | wc -l)" echo "P-frame $(cat report.log | grep P | wc -l)" ~~~ Changing the value of frame rate the ratio of I-frame/P-frame was the expected (1 frame each second).
Attachment 368915 [details] pushed as 02c7c1bc - libs: encoder: add zero as valid value for periodic keyframe.
backported to branch 1.12 * 08e95320 libs: encoder: add zero as valid value for periodic keyframe.