GNOME Bugzilla – Bug 753085
omxh264enc: Add support for forcing keyframes on the RPi
Last modified: 2016-07-06 09:14:28 UTC
While encoding video using omxh264enc on a Raspberry Pi 2 using gstreamer v1.2.4, encoding works successfully. While performing the exact same encoding on gstreamer git master, the following error is logged every few seconds: 0:04:30.148693826 19123 0x1be0830 ERROR omxvideoenc gstomxvideoenc.c:1553:gst_omx_video_enc_handle_frame:<omxh264enc-omxh264enc0> Failed to force a keyframe: Unsupported index (0x8000101a) The encoded and HLS muxed video still renders in VLC (but refuses to render in Safari/iOS), it is not clear what this error message refers to.
As confirmed by the RPi people, OMX_IndexConfigVideoIntraVOPRefresh isn't supported on the Rpi, thus the error: https://github.com/raspberrypi/firmware/issues/462 Use of OMX_IndexConfigBrcmVideoRequestIFrame targeted for the RPi instead. The attached patch makes this so.
Created attachment 309865 [details] [review] 0001-Add-keyframe-support-for-the-Rpi-using-OMX_IndexConf.patch Add patch to fix the issue.
Comment on attachment 309865 [details] [review] 0001-Add-keyframe-support-for-the-Rpi-using-OMX_IndexConf.patch Looks good, but how is this a regression? I mean, how could this have ever worked before if RPi did not support the keyframe request API from the OpenMAX IL standard?
As indicated in the original comment: "While encoding video using omxh264enc on a Raspberry Pi 2 using gstreamer v1.2.4, encoding works successfully.".
So you're saying that OMX_IndexConfigVideoIntraVOPRefresh worked before, but not anymore?
commit 703bab688566c6fe4de934dbb2b93300bc2aa4ff Author: Graham Leggett <minfrin@sharp.fm> Date: Sat Aug 22 15:54:55 2015 +0000 omxvideoenc: Add keyframe support for the Rpi, using OMX_IndexConfigBrcmVideoRequestIFrame https://bugzilla.gnome.org/show_bug.cgi?id=753085