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

Alex Cohn alexcohn at netvision.net.il
Tue Dec 25 16:55:19 CET 2012


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


More information about the Libav-user mailing list