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 <[email protected]> > On Tue, Dec 25, 2012 at 11:08 AM, Brian Chi <[email protected]> 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 > [email protected] > http://ffmpeg.org/mailman/listinfo/libav-user > -- Best Regards, Chi
_______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
