<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><p>Hi, Carl : </p><p>Thanks for your prompt response. In fact , your suggestion was the first idea came to my mind. And I did tried in linux , the generated ffmpeg binary does work as below:</p><p>ffmpeg version 2.8 Copyright (c) 2000-2015 the FFmpeg developers<br>  built with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)<br>  configuration: --disable-everything --enable-ffmpeg --enable-bsf=h264_mp4toannexb --disable-debug --enable-protocol='concat,file' --enable-demuxer=concat --enable-muxer=mp4 --disable-yasm --disable-runtime-cpudetect<br>  libavutil      54. 31.100 / 54. 31.100<br>  libavcodec     56. 60.100 / 56. 60.100<br>  libavformat    56. 40.101 / 56. 40.101<br>  libavdevice    56.  4.100 / 56.  4.100<br>  libavfilter     5. 40.101 /  5. 40.101<br>  libswscale      3.  1.101 /  3.  1.101<br>  libswresample   1.  2.101 /  1.  2.101<br>[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1f91640] Auto-inserting h264_mp4toannexb bitstream filter<br>Guessed Channel Layout for  Input Stream #0.1 : stereo<br>Input #0, concat, from 'lists.txt':<br>  Duration: N/A, start: 0.036281, bitrate: 993 kb/s<br>    Stream #0:0(und): Video: h264 (avc1 / 0x31637661), none, 1280x720, 865 kb/s, 60 fps, 60 tbr, 15360 tbn, 15360 tbc<br>    Metadata:<br>      handler_name    : VideoHandler<br>    Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, 2 channels, 128 kb/s<br>    Metadata:<br>      handler_name    : SoundHandler<br>[mp4 @ 0x1fc7340] Codec for stream 0 does not use global headers but container format requires global headers<br>[mp4 @ 0x1fc7340] Codec for stream 1 does not use global headers but container format requires global headers<br>[mp4 @ 0x1fc7340] track 1: codec frame size is not set<br>Output #0, mp4, to 'h264_aac_concat.mp4':<br>  Metadata:<br>    encoder         : Lavf56.40.101<br>    Stream #0:0(und): Video: h264 ([33][0][0][0] / 0x0021), none, 1280x720, q=2-31, 865 kb/s, 60 fps, 60 tbr, 15360 tbn, 15360 tbc<br>    Metadata:<br>      handler_name    : VideoHandler<br>    Stream #0:1(und): Audio: aac ([64][0][0][0] / 0x0040), 44100 Hz, stereo, 128 kb/s<br>    Metadata:<br>      handler_name    : SoundHandler<br>Stream mapping:<br>  Stream #0:0 -> #0:0 (copy)<br>  Stream #0:1 -> #0:1 (copy)<br>Press [q] to stop, [?] for help<br>[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1f928a0] Auto-inserting h264_mp4toannexb bitstream filter<br>frame= 7198 fps=0.0 q=-1.0 Lsize=   14609kB time=00:02:00.09 bitrate= 996.5kbits/s    <br>video:12539kB audio:1877kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.344435%</p><p>-------------------------------------------------------------------------</p><p>However , this configuration does not work in the MinGW for windows :</p><p><br>C:\MinGW\msys\1.0\home\win32\source\ffmpeg28>.\ffmpeg_g.exe -loglevel "deb<br>ug" -i h264_aac.mp4<br>ffmpeg version 2.8 Copyright (c) 2000-2015 the FFmpeg developers<br>  built with gcc 4.9.3 (GCC)<br>  configuration: --prefix=/home/win32/install --disable-everything --enable-ffmp<br>eg --enable-bsf=h264_mp4toannexb --enable-debug --enable-protocol='concat,file'<br>--enable-demuxer='m4v,aac,h264' --enable-muxer=mp4 --enable-runtime-cpudetect --<br>enable-memalign-hack --extra-cflags=-I/home/win32/source/ffmpeg28 --extra-ldflag<br>s=-L/home/win32/source/ffmpeg28 --enable-parser='aac,h264,mpeg4video' --enable-g<br>pl --enable-libx264 --disable-doc --enable-decoder='aac,h264,mpeg4' --enable-enc<br>oder='aac,mpeg4,libx264' --enable-yasm --enable-w32threads --enable-static<br>  libavutil      54. 31.100 / 54. 31.100<br>  libavcodec     56. 60.100 / 56. 60.100<br>  libavformat    56. 40.101 / 56. 40.101<br>  libavdevice    56.  4.100 / 56.  4.100<br>  libavfilter     5. 40.101 /  5. 40.101<br>  libswscale      3.  1.101 /  3.  1.101<br>  libswresample   1.  2.101 /  1.  2.101<br>  libpostproc    53.  3.100 / 53.  3.100<br>Splitting the commandline.<br>Reading option '-loglevel' ... matched as option 'loglevel' (set logging level)<br>with argument 'debug'.<br>Reading option '-i' ... matched as input file with argument 'h264_aac.mp4'.<br>Finished splitting the commandline.<br>Parsing a group of options: global .<br>Applying option loglevel (set logging level) with argument debug.<br>Successfully parsed a group of options.<br>Parsing a group of options: input file h264_aac.mp4.<br>Successfully parsed a group of options.<br>Opening an input file: h264_aac.mp4.<br>[AVIOContext @ 02b813e0] Statistics: 1048576 bytes read, 0 seeks<br>h264_aac.mp4: Invalid data found when processing input</p><p>C:\MinGW\msys\1.0\home\win32\source\ffmpeg28>.\ffmpeg_g.exe -formats<br>ffmpeg version 2.8 Copyright (c) 2000-2015 the FFmpeg developers<br>  built with gcc 4.9.3 (GCC)<br>  configuration: --prefix=/home/win32/install --disable-everything --enable-ffmp<br>eg --enable-bsf=h264_mp4toannexb --enable-debug --enable-protocol='concat,file'<br>--enable-demuxer='m4v,aac,h264' --enable-muxer=mp4 --enable-runtime-cpudetect --<br>enable-memalign-hack --extra-cflags=-I/home/win32/source/ffmpeg28 --extra-ldflag<br>s=-L/home/win32/source/ffmpeg28 --enable-parser='aac,h264,mpeg4video' --enable-g<br>pl --enable-libx264 --disable-doc --enable-decoder='aac,h264,mpeg4' --enable-enc<br>oder='aac,mpeg4,libx264' --enable-yasm --enable-w32threads --enable-static<br>  libavutil      54. 31.100 / 54. 31.100<br>  libavcodec     56. 60.100 / 56. 60.100<br>  libavformat    56. 40.101 / 56. 40.101<br>  libavdevice    56.  4.100 / 56.  4.100<br>  libavfilter     5. 40.101 /  5. 40.101<br>  libswscale      3.  1.101 /  3.  1.101<br>  libswresample   1.  2.101 /  1.  2.101<br>  libpostproc    53.  3.100 / 53.  3.100<br>File formats:<br> D. = Demuxing supported<br> .E = Muxing supported<br> --<br> D  aac             raw ADTS AAC (Advanced Audio Coding)<br> D  h264            raw H.264 video<br> D  m4v             raw MPEG-4 video<br>  E mov             QuickTime / MOV<br>  E mp4             MP4 (MPEG-4 Part 14)</p><p>C:\MinGW\msys\1.0\home\win32\source\ffmpeg28></p><p>( With this configuration , I tried both the gcc compiler and vs2013 compiler ( with one more config : --toolchain=msvs and introduction of vcvars32.bat) . Both of <br>them has the same problem : the generated ffmpeg.exe cannot open my MP4 files. )<br>----------------------------------------------------------------------</p><p>So , finally I had to use the following configuration to build a good ffmpeg.exe , as well as the related libav* libraries for my vs2013 project :</p><p> ./configure   --prefix='/home/win32/install'   --enable-bsf=h264_mp4toannexb  --disable-debug --enable-protocol='concat,file' --enable-demuxer=m4v,aac,h264 --enable-muxer=mp4   --enable-memalign-hack    --disable-doc  --enable-yasm --disable-manpages --disable-w32threads  --enable-static  --toolchain=msvc<br> </p><p>The generated ffmpeg.exe and the libav* libraries do work as expected. As for the libav* libraries , if I use the original av_register_all() function , everything is fine. But if I use my own function my_av_register_all() , then I ran into the prorblem I mentioned in my previous email : Invalid data found when processing input</p><p><br></p><p>If you or everybody need more info. , please feel free to let me know. </p><p>Regards !</p><p><br>Guofu Han</p><p><br></p><p><br></p><div><br><br><br><br><br></div><div style="position: relative; -ms-zoom: 1;"></div><div id="divNeteaseMailCard"></div><div><br></div><pre><br>At 2016-05-19 16:18:12, "Carl Eugen Hoyos" <cehoyos@ag.or.at> wrote:
>hanguofu <hanguofu@...> writes:
>
>> 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 :
>
>Use the configure option --disable-all with the necessary 
>enable options instead and leave the register function 
>untouched.
>
>Carl Eugen
>
>_______________________________________________
>Libav-user mailing list
>Libav-user@ffmpeg.org
>http://ffmpeg.org/mailman/listinfo/libav-user
</pre></div><br><br><span title="neteasefooter"><p> </p></span>