[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
https://github.com/FFmpeg/FFmpeg/commit/289b149cecb381522cc9ccdf382825330169c655#diff-0e332ff3db7b093bfee7dda7ed82ce19
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:
http://www.semperpax.be/owncloud/public.php?service=files&t=a28e4f3e2305ba08837c45f42c4a3662


More information about the ffmpeg-devel mailing list