[FFmpeg-devel] [PATCH]lavc: Allow forcing work-around for x264 cabac 8x8 4:4:4 bug

Mark Thompson sw at jkqxz.net
Tue Dec 5 01:54:27 EET 2017

On 04/12/17 21:45, wm4 wrote:
> On Mon, 4 Dec 2017 00:56:36 +0000
> Mark Thompson <sw at jkqxz.net> wrote:
>> On 04/12/17 00:09, Carl Eugen Hoyos wrote:
>>> Hi!
>>> Attached patch fixes ticket #6717, files without sei can be produced
>>> with remuxing and seeking, even if this is a (separate) bug, such
>>> files exist in the wild.
>>> Please comment, Carl Eugen  
>> File are currently fixable by remuxing with:
>> -bsf:v 'h264_metadata=sei_user_data=dc45e9bde6d948b7962cd820d923eeef+x264 - core 150'
> Is that only in the first packet? Then it doesn't work if you start
> playback at a later frame, unless you somehow decode the first packet
> anyway.

It adds it to every access unit containing an SPS, which will cover this in most cases.  (Though not all, I admit - SEI not being allowed in AVCC extradata means that if the parameter sets are only there then you are stuck.)

> IMO libavcodec should detect buggy files without relying on version
> info.
Unfortunately that is rather difficult in this case - pretty much the only method to have it happen automatically would be to try decoding the whole frame again in the other mode if there is a failure during entropy decoding, which doesn't sound very fun to write.

- Mark

More information about the ffmpeg-devel mailing list