[FFmpeg-user] Extract Audio from Video file using ffmpeg

刘 岐 lingjiujianke at gmail.com
Tue Oct 15 01:50:03 CEST 2013


在 2013-10-14,上午9:06,"Jacky" <690271929 at qq.com> 写道:

> hi Carl :
>   I use the command:
>    ffmpeg-0 -i /data/test/media/2270059.m2ts -vn -acodec copy audio.m2ts to extract Audio from Video file,i get the info,
> 
> 
> [root at cdn 2269968]# ./ffmpeg-0 -i /data/test/media/2270059.m2ts -vn -acodec copy audio.m2ts
> ffmpeg version 2.0 Copyright (c) 2000-2013 the FFmpeg developers
>  built on Jul 31 2013 10:34:48 with gcc 4.4.6 (GCC) 20110731 (Red Hat 4.4.6-3)
>  configuration: --prefix=/data/test/jh/ffmpeg --extra-cflags=-I/data/test/jh/src/ffmpeg/include --extra-ldflags=-L/data/test/jh/src/ffmpeg/lib --enable-gpl --enable-version3 --enable-nonfree --enable-debug --enable-memalign-hack --enable-libfaac --enable-libaacplus --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid
>  libavutil      52. 38.100 / 52. 38.100
>  libavcodec     55. 18.102 / 55. 18.102
>  libavformat    55. 12.100 / 55. 12.100
>  libavdevice    55.  3.100 / 55.  3.100
>  libavfilter     3. 79.101 /  3. 79.101
>  libswscale      2.  3.100 /  2.  3.100
>  libswresample   0. 17.102 /  0. 17.102
>  libpostproc    52.  3.100 / 52.  3.100
> H264 encode type: Frame
> @@type: 0
> [mpegts @ 0x254a820] Stream #6: not enough frames to estimate rate; consider increasing probesize
> [mpegts @ 0x254a820] Stream #7: not enough frames to estimate rate; consider increasing probesize
> [mpegts @ 0x254a820] Stream #8: not enough frames to estimate rate; consider increasing probesize
> [mpegts @ 0x254a820] Stream #9: not enough frames to estimate rate; consider increasing probesize
> [mpegts @ 0x254a820] Stream #10: not enough frames to estimate rate; consider increasing probesize
> [mpegts @ 0x254a820] Stream #11: not enough frames to estimate rate; consider increasing probesize
> [mpegts @ 0x254a820] Stream #12: not enough frames to estimate rate; consider increasing probesize
> [mpegts @ 0x254a820] Stream #13: not enough frames to estimate rate; consider increasing probesize
> [mpegts @ 0x254a820] Stream #14: not enough frames to estimate rate; consider increasing probesize
> [NULL @ 0x2551fa0] start time is not set in estimate_timings_from_pts
> [NULL @ 0x25529a0] start time is not set in estimate_timings_from_pts
> [NULL @ 0x256d4c0] start time is not set in estimate_timings_from_pts
> [NULL @ 0x256de80] start time is not set in estimate_timings_from_pts
> [NULL @ 0x256e780] start time is not set in estimate_timings_from_pts
> [NULL @ 0x256f1a0] start time is not set in estimate_timings_from_pts
> [NULL @ 0x256faa0] start time is not set in estimate_timings_from_pts
> [NULL @ 0x2570480] start time is not set in estimate_timings_from_pts
> [NULL @ 0x2570d60] start time is not set in estimate_timings_from_pts
> [mpegts @ 0x254a820] Could not find codec parameters for stream 6 (Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)): unspecified size
> Consider increasing the value for the 'analyzeduration' and 'probesize' options
> [mpegts @ 0x254a820] Could not find codec parameters for stream 7 (Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)): unspecified size
> Consider increasing the value for the 'analyzeduration' and 'probesize' options
> [mpegts @ 0x254a820] Could not find codec parameters for stream 8 (Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)): unspecified size
> Consider increasing the value for the 'analyzeduration' and 'probesize' options
> [mpegts @ 0x254a820] Could not find codec parameters for stream 9 (Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)): unspecified size
> Consider increasing the value for the 'analyzeduration' and 'probesize' options
> [mpegts @ 0x254a820] Could not find codec parameters for stream 10 (Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)): unspecified size
> Consider increasing the value for the 'analyzeduration' and 'probesize' options
> [mpegts @ 0x254a820] Could not find codec parameters for stream 11 (Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)): unspecified size
> Consider increasing the value for the 'analyzeduration' and 'probesize' options
> [mpegts @ 0x254a820] Could not find codec parameters for stream 12 (Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)): unspecified size
> Consider increasing the value for the 'analyzeduration' and 'probesize' options
> [mpegts @ 0x254a820] Could not find codec parameters for stream 13 (Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)): unspecified size
> Consider increasing the value for the 'analyzeduration' and 'probesize' options
> [mpegts @ 0x254a820] Could not find codec parameters for stream 14 (Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)): unspecified size
> Consider increasing the value for the 'analyzeduration' and 'probesize' options
> Input #0, mpegts, from '/data/test/media/2270059.m2ts':
>  Duration: 02:13:18.03, start: 11.608967, bitrate: 30389 kb/s
>  Program 1 
>    Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc
>    Stream #0:1[0x1100]: Audio: truehd (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), s32
>    Stream #0:2[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 448 kb/s
>    Stream #0:3[0x1101]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 448 kb/s
>    Stream #0:4[0x1102]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 448 kb/s
>    Stream #0:5[0x1103]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 192 kb/s
>    Stream #0:6[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
>    Stream #0:7[0x1201]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
>    Stream #0:8[0x1202]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
>    Stream #0:9[0x1203]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
>    Stream #0:10[0x1204]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
>    Stream #0:11[0x1205]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
>    Stream #0:12[0x1206]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
>    Stream #0:13[0x1207]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
>    Stream #0:14[0x1208]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
> [mpegts @ 0x25f2b20] frame size not set
> Output #0, mpegts, to 'audio.m2ts':
>  Metadata:
>    encoder         : Lavf55.12.100
>    Stream #0:0: Audio: truehd (AC-3 / 0x332D4341), 48000 Hz, 5.1(side)
> Stream mapping:
>  Stream #0:1 -> #0:0 (copy)
> Press [q] to stop, [?] for help
> size= 2828405kB time=02:13:17.98 bitrate=2897.0kbits/s    
> video:0kB audio:2475415kB subtitle:0 global headers:0kB muxing overhead 14.259822%
> 
> 
> and i do this:
> [root at cdn 2269968]# ./ffmpeg-0 -i audio.m2ts
> 
> i get info:
> ffmpeg version 2.0 Copyright (c) 2000-2013 the FFmpeg developers
>  built on Jul 31 2013 10:34:48 with gcc 4.4.6 (GCC) 20110731 (Red Hat 4.4.6-3)
>  configuration: --prefix=/data/test/jh/ffmpeg --extra-cflags=-I/data/test/jh/src/ffmpeg/include --extra-ldflags=-L/data/test/jh/src/ffmpeg/lib --enable-gpl --enable-version3 --enable-nonfree --enable-debug --enable-memalign-hack --enable-libfaac --enable-libaacplus --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid
>  libavutil      52. 38.100 / 52. 38.100
>  libavcodec     55. 18.102 / 55. 18.102
>  libavformat    55. 12.100 / 55. 12.100
>  libavdevice    55.  3.100 / 55.  3.100
>  libavfilter     3. 79.101 /  3. 79.101
>  libswscale      2.  3.100 /  2.  3.100
>  libswresample   0. 17.102 /  0. 17.102
>  libpostproc    52.  3.100 / 52.  3.100
> [mpegts @ 0x2b95fe0] probed stream 0 failed
> [mpegts @ 0x2b95fe0] Could not find codec parameters for stream 0 (Unknown: none ([6][0][0][0] / 0x0006)): unknown codec
> Consider increasing the value for the 'analyzeduration' and 'probesize' options
> audio.m2ts: could not find codec parameters
> 
> 
> 
> 
> 
> Muxing truehd in m2ts is not supported too? if it is, then how can the source file 2270059.m2ts is created? this wiki said m2ts and mpegts is support ac-3.http://en.wikipedia.org/wiki/Comparison_of_container_formats


Jacky,

	Please upload your test file to ftp://upload.ffmpeg.org/incoming/




More information about the ffmpeg-user mailing list