[FFmpeg-devel] [PATCH] h264 bitstream filter
Thu Aug 30 11:17:35 CEST 2007
M?ns Rullg?rd wrote:
> Benoit Fouet wrote:
>> here is a patch to convert from avc in mp4 container to elementary stream.
>> be fair, this is my first try :-P
>> things i don't really know:
>> - whether sps and pps have to be written for each elementary stream
>> NALU or not
> That question doesn't really make sense, SPS and PPS being NAL units of
> their own. I guess what you meant to ask was at which points the SPS and
> PPS should be inserted into the stream.
> They should be present before
> any IDR picture (NAL unit type 5), after any optional AUD or SEI NAL units.
is there a function accessible to the bitstream filter than can get me
the NALU type ? or do i have to do it on my own in the filter ?
>> - whether bistream filter is fed with NALU or not (that's to say: do we
>> have to parse input buffer)
> The mp4 container already has the data split as NAL units, so there's
> nothing to parse.
> In fact, you can't in general find the NAL unit
> boundaries in raw RBSP data, hence the need for Annex B format or a
> container like mp4 to provide framing.
thanks for the explanation
i also think that i can "construct" the sps/pps NALU only once, instead
of doing it every time, but i don't know how to do it, as bsfs don't
have a cleanup function...
Purple Labs S.A.
More information about the ffmpeg-devel