[FFmpeg-devel] Remaining issue in h264_mp4toannexb

Chris Browet cbro at semperpax.com
Sat Jul 26 09:30:39 CEST 2014

Hi list,

I'm Chris, aka koying, from the XBMC team.
Bear with me, I'm not a ffmpeg guru in any way ;)

I've created a PR on github (https://github.com/FFmpeg/FFmpeg/pull/79)
regarding a remaining issue in h264 AnnexB conversion where "hiccups" are
still to be seen if sps/pps are already in the stream.

Pretty sure github PR's are not the proper way, but out of ignorance...

It's a follow-up to
http://ffmpeg.org/pipermail/ffmpeg-devel/2014-March/155911.html , which
solved most of the issues but not all.
See https://github.com/xbmc/xbmc/pull/5042 for the XBMC discussion.

My best guess is that
is flawed if non-idr pics have sps/pps of their own. Then ffmpeg adds
extradata to non-idr pics, too.

If the stream already has sps/pps of their own, I don't think there is an
added value to re-add those from extradata, so this patch just don't
prepend if they're already present.

A sample of the issue can be seen here:

More information about the ffmpeg-devel mailing list