I see, but the function "av_write_frame->mov_write_packet->ff_mov_write_packet->ff_avc_parse_nal_units->ff_avc_find_startcode" find the start code 0x000001, how can i resolve this problem to make it works? The first 4 bytes in the AVPacket is the size of this NALU, should i replace the first 4 bytes with 0x000001 or 0x00000001? Is that ok? Thanks a lot for your help.
2012/12/26 Alex Cohn <[email protected]> > On Wed, Dec 26, 2012 at 6:35 AM, Brian Chi <[email protected]> wrote: > > 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. > > Packets in mp4 are not stored in annex B format, you will never see > 0x000001 start codes there. See > > http://msdn.microsoft.com/en-us/library/windows/desktop/dd757808(v=vs.85).aspx > _______________________________________________ > 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
