Hi Jorge,

On Mon, 7 Aug 2017, Jorge Ramirez wrote:

On 08/03/2017 01:53 AM, Mark Thompson wrote:
+    default:
+        return 0;
+    }
+ SET_V4L_EXT_CTRL(value, qmin, avctx->qmin, "minimum video quantizer
+ SET_V4L_EXT_CTRL(value, qmax, avctx->qmax, "maximum video quantizer
+    return 0;
This doesn't set extradata - you need to extract the codec global headers
(such as H.264 SPS and PPS) at init time to be able to write correct files for some codecs (such as H.264) with muxers requiring global headers (such as MP4). It kindof works without it, but the files created will not conform and will not be usable on some players.

ah that might explain some things (when I play back the encoded video the quality is pretty lousy) is there already some code I can use as a reference? I might be out of my depth here so any help will be more than welcome

This is exactly the thing I was trying to tell you about, off list, before.

In the OMX driver used on android, this is requested on startup, via an ioctl with the following private ioctl value:

See this code here:

This is a qcom specific, private ioctl. In the android kernel for qualcomm, this is handled correctly here:


In the dragonboard kernel snapshot I had been testing, that I referred to you before, there are incomplete stubs of handling of this. In the debian-qcom-dragonboard410c-16.04 tag in the linaro kernel tree:

This increments seq_hdr_reqs, just like in the android kernel tree (where this is working). However in this kernel tree, nothing actually ever reads the seq_hdr_reqs, so it's a non-functional stub.

Now in the kernel tree you referred me to, in the release/db820c/qcomlt-4.11 branch, I don't see anything similar to V4L2_CID_MPEG_VIDC_VIDEO_REQUEST_SEQ_HEADER. I can't help you from there, you need to figure that out what alternative codepath there is, intended to replace it - if any. If there aren't any, you first need to fix the v4l2 driver before userspace apps can get what they need.

There is a clear need for this, as you witness in the android version of the kernel. It just seems to have been removed in the vanilla linux version of the driver.

// Martin
ffmpeg-devel mailing list

Reply via email to