[Libav-user] h264_mp4toannexb_filter

Alex Cohn alexcohn at netvision.net.il
Wed Apr 11 23:55:09 CEST 2012

On Apr 11, 2012 10:37 PM, "Wagner Patriota" <wagner.patriota at gmail.com>
> YES, I got the same conclusion! but how do I convert the frames?
> that's what I still don't understand. I was expecting the filter do it
for me... any idea? :-(
> On Wed, Apr 11, 2012 at 4:19 PM, Alex Cohn <alexcohn at netvision.net.il>
>> On Apr 11, 2012 9:37 PM, "Wagner Patriota" <wagner.patriota at gmail.com>
>> >
>> > ExtraData:
>> > So what is wrong?
>> >
>> > 1. If I don't use the filter, I get this message:
>> > "H.264 bitstream malformed, no startcode found, use the
h264_mp4toannexb bitstream filter (-bsf h264_mp4toannexb)""
>> > Because "AV_RB32(pkt->data) != 0x0000001" (in fact, AV_RB32(pkt->data)
= 0x1B13)
>> Could it be that while your extradata is in annex b format, the frames
still need conversion?  0x1B13 looks like a start of a regular packet.

You can try to convert extradata (SPS/PPS) to Nal format, attach it to the
first frame (before the frame data), and pass the resulting stream through
the annex b filter.

Or you could prepend each frame with 0x00000001 without the filter.

Note that you should not give SPS/PPS data to the decode function
separately, but only with the IDR frame data.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20120412/5d889407/attachment.html>

More information about the Libav-user mailing list