[FFmpeg-devel] [PATCH] Only output necessary NAL units in H.264 extradata in SDP
Martin Storsjö
martin
Fri Apr 3 18:25:06 CEST 2009
Hi,
As noted by another user a month ago
(https://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2009-March/064219.html),
the SDP data generated by ffmpeg for H.264 streams doesn't work with
QuickTime Player. I'm not sure if this is a change in recent versions of
QuickTime or a regression in ffmpeg, though.
QuickTime seems to dislike that the sprop-parameter-sets contains the
version and identification output from x264 (which is a quite large chunk
of data compared to the SPS and PPS parts). I also tested to shrink the
amount of info output by x264 into this nal unit, but even with a minimal
amount of data, it wouldn't play the content. Reordering the nal units (in
x264), putting this unit as the last one, didn't help either.
The attached patch solves this in two possible ways, please comment on
which one you find more reasonable.
One way is to output only the SPS and PPS nal types, which is the same as
ff_isom_write_avcc does in libavformat/avc.c. The other way is to check
the nri field, where a zero AFAIK indicates that the nal unit can be
discarded.
// Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg-sdp-h264.patch
Type: text/x-diff
Size: 876 bytes
Desc:
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090403/504ec037/attachment.patch>
More information about the ffmpeg-devel
mailing list