[Libav-user] There is no picture in the output file while encoding with libx264 as codec.

Brian Chi beyond702 at gmail.com
Wed Dec 26 05:35:21 CET 2012

Yes, I read all frames, most return value of function
"ff_avc_parse_nal_units" is 0.
i think maybe the problem is about NAL, will the NAL layer of H264 frame be
detached in the function "av_read_frame".
So in the "ff_avc_parse_nal_units", it can't find start code(0x000001), and
discard the frame.
Is that right?

2012/12/25 Alex Cohn <alexcohn at netvision.net.il>

> On Tue, Dec 25, 2012 at 11:08 AM, Brian Chi <beyond702 at gmail.com> wrote:
> > I tracked the ffmpeg code and found that in the function
> > "av_write_frame->mov_write_packet->ff_mov_write_packet", it will call
> > function "ff_avc_parse_nal_units" to obtain the size of nal unit, but the
> > return value is very small(such as 208 bytes).
> It's very natural for the first NAL unit to be small. An h264 stream
> begins with configuration SPS/PPS untis that don't contain video data,
> but let the decoder initialization to work. Did you continue reading
> more video packets after the first one?
> Alex
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user

Best Regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20121226/851a3be1/attachment.html>

More information about the Libav-user mailing list