<p>If your h264 encoder produces "annex B" style packets (with 00000001 prefix), you must replace them for packing into mp4.</p>
<div class="gmail_quote">On Sep 20, 2011 3:45 PM, "psychesnet" <<a href="mailto:psychesnet@gmail.com">psychesnet@gmail.com</a>> wrote:<br type="attribution">> Dear All,<br>> <br>> I have some question about ffmpeg. In my code, I do not use encode and<br>
> decode function.<br>> My data source has been encoded by hardware.<br>> 1. If I use ffmpeg to output mp4 file. Audio is AAC, 8000Hz, 1 channel,<br>> 16kbps.<br>> -> Do I need to insert extradata{0x15, 0x88} for AAC ?<br>
> <br>> 2. If I use ffmpeg to output mp4 file. Video is H264, the h264 frame have<br>> nal header(SPS+PPS).<br>> -> Do I need to remove the nal header and insert 4 bytes(frame length<br>> description) before h264 frame ?<br>
> -> Do I need to insert extradata{avcc} for H264 ?<br>> <br>> Anyone has ideal !!! Please help me, thanks a lot.<br>> <br>> --<br>> View this message in context: <a href="http://libav-users.943685.n4.nabble.com/H264-AAC-output-mp4-file-tp3826859p3826859.html">http://libav-users.943685.n4.nabble.com/H264-AAC-output-mp4-file-tp3826859p3826859.html</a><br>
> Sent from the libav-users mailing list archive at Nabble.com.<br>> _______________________________________________<br>> Libav-user mailing list<br>> <a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
> <a href="http://ffmpeg.org/mailman/listinfo/libav-user">http://ffmpeg.org/mailman/listinfo/libav-user</a><br></div>