<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>I worked out my window application ( in the form of exe ) based on example remixing.c to concat a series of identical mp4 files. So far so good.</div><div><br></div><div>Since my project only caters to MP4 file with AAC and H.264 , I replace the original av_register_all() with the following functions to minimize the generated binary :</div><div><br></div><div>// this function is located in allcodecs.c </div><div>void  my_avcodec_register_all(void)<br>{<br>    static int initialized;</div><div>    if (initialized)<br>        return;<br>    initialized = 1;<br>    <br>    <br>      REGISTER_DECODER (H264, h264);<br>      REGISTER_ENCDEC  (MPEG4, mpeg4);<br>      REGISTER_ENCDEC  (AAC, aac);<br>      REGISTER_PARSER  (AAC, aac);<br>   REGISTER_PARSER  (H264, h264);<br>     <br>        REGISTER_PARSER(MPEG4VIDEO,         mpeg4video);<br>      REGISTER_BSF     (H264_MP4TOANNEXB, h264_mp4toannexb);<br>      REGISTER_BSF(MPEG4_UNPACK_BFRAMES,  mpeg4_unpack_bframes);</div><div>      <br>}</div><div><br></div><div>// this function is located in allformats.c<br>void my_av_register_all(void)<br>{<br>    static int initialized;</div><div>    if (initialized)<br>        return;<br>    initialized = 1;<br> </div><div>        my_avcodec_register_all() ;        <br>      <br>      REGISTER_MUXER    (MP4, mp4);<br>       REGISTER_MUXDEMUX (H264, h264);<br>       REGISTER_DEMUXER  (AAC, aac) ;<br>     <br>       <br>       <br>       REGISTER_PROTOCOL (CONCAT, concat);</div><div>       REGISTER_PROTOCOL (FILE, file);<br>    REGISTER_PROTOCOL (CACHE, cache);</div><div>}</div><div><br></div><div>Unfortunately , the following avformat_open_input returns with an error message : </div><div>Invalid data found when processing input</div><div><br></div><div>Of course , if I use the original av_register_all()  then anything is fine. For your information , my targeted mp4 files have the following av_dump_format :</div><div><br></div><div><br>[h264 @ 01C37000] Warning: not compiled with thread support, using thread emulation<br>[aac @ 01C2E2E0] Warning: not compiled with thread support, using thread emulation<br>Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'h264_aac.mp4':<br>  Metadata:<br>    major_brand     : isom<br>    minor_version   : 512<br>    compatible_brands: isomiso2avc1mp41<br>    encoder         : Lavf55.45.100<br>  Duration: 00:01:00.04, start: 0.036281, bitrate: 1005 kb/s<br>    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720,<br> 865 kb/s, 60 fps, 60 tbr, 15360 tbn, 120 tbc (default)<br>    Metadata:<br>      handler_name    : VideoHandler<br>    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)<br>    Metadata:<br>      handler_name    : SoundHandler</div><div><br></div><div><br></div><div>Is there sth. I missed when I modified the function ?</div><div><br></div><div>Regards !</div><div><br></div><div>Guofu Hang<br></div></div><br><br><span title="neteasefooter"><p> </p></span>