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

Jacky 690271929 at qq.com
Sat Oct 12 06:53:47 CEST 2013


hi:
   I have a m2ts file,the 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
H264 encode type: Frame
@@type: 0
[mpegts @ 0x317e860] Stream #6: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x317e860] Stream #7: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x317e860] Stream #8: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x317e860] Stream #9: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x317e860] Stream #10: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x317e860] Stream #11: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x317e860] Stream #12: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x317e860] Stream #13: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x317e860] Stream #14: not enough frames to estimate rate; consider increasing probesize
[NULL @ 0x3185fe0] start time is not set in estimate_timings_from_pts
[NULL @ 0x31869e0] start time is not set in estimate_timings_from_pts
[NULL @ 0x31a1500] start time is not set in estimate_timings_from_pts
[NULL @ 0x31a1ec0] start time is not set in estimate_timings_from_pts
[NULL @ 0x31a27c0] start time is not set in estimate_timings_from_pts
[NULL @ 0x31a31e0] start time is not set in estimate_timings_from_pts
[NULL @ 0x31a3ae0] start time is not set in estimate_timings_from_pts
[NULL @ 0x31a44c0] start time is not set in estimate_timings_from_pts
[NULL @ 0x31a4da0] start time is not set in estimate_timings_from_pts
[mpegts @ 0x317e860] 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 @ 0x317e860] 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 @ 0x317e860] 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 @ 0x317e860] 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 @ 0x317e860] 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 @ 0x317e860] 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 @ 0x317e860] 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 @ 0x317e860] 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 @ 0x317e860] 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 @ 0x31a64c0] frame size not set
Output #0, mpegts, to 'audio.ts':
  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=   29036kB time=00:01:28.63 bitrate=2683.6kbits/s    
size=   65622kB time=00:02:53.32 bitrate=3101.5kbits/s    
size=  102779kB time=00:04:17.11 bitrate=3274.6kbits/s    
size=  130506kB time=00:05:57.78 bitrate=2988.1kbits/s    
size=  143709kB time=00:06:51.52 bitrate=2860.8kbits/s    
size=  158099kB time=00:07:41.40 bitrate=2806.9kbits/s    
size=  183188kB time=00:08:45.08 bitrate=2858.0kbits/s    
size=  201836kB time=00:09:47.06 bitrate=2816.5kbits/s    
size=  217184kB time=00:10:32.65 bitrate=2812.3kbits/s    
size=  231522kB time=00:11:10.94 bitrate=2826.8kbits/s    
size=  245563kB time=00:11:49.28 bitrate=2836.2kbits/s    
size=  262711kB time=00:12:39.26 bitrate=2834.5kbits/s    
size=  272760kB time=00:13:15.27 bitrate=2809.7kbits/s    
size=  286700kB time=00:14:08.80 bitrate=2767.0kbits/s    
size=  304315kB time=00:15:21.15 bitrate=2706.3kbits/s    
size=  325577kB time=00:16:25.98 bitrate=2705.0kbits/s    
size=  340834kB time=00:17:31.23 bitrate=2656.0kbits/s    
size=  369857kB time=00:18:51.52 bitrate=2677.7kbits/s    
size=  400261kB time=00:20:03.23 bitrate=2725.1kbits/s    
size=  411097kB time=00:20:27.93 bitrate=2742.6kbits/s    
size=  420947kB time=00:21:04.28 bitrate=2727.5kbits/s    
size=  440434kB time=00:21:54.75 bitrate=2744.3kbits/s    
size=  461979kB time=00:22:45.89 bitrate=2770.7kbits/s    
size=  485006kB time=00:23:47.64 bitrate=2783.0kbits/s    
size=  502782kB time=00:24:56.64 bitrate=2752.0kbits/s    
size=  517697kB time=00:26:05.50 bitrate=2709.0kbits/s    
size=  538650kB time=00:27:29.48 bitrate=2675.2kbits/s    
size=  562143kB time=00:28:42.18 bitrate=2674.0kbits/s    
size=  589098kB time=00:29:47.87 bitrate=2699.2kbits/s    
size=  601802kB time=00:30:18.20 bitrate=2711.4kbits/s    
size=  612701kB time=00:31:02.81 bitrate=2694.4kbits/s    
size=  626849kB time=00:32:07.20 bitrate=2664.6kbits/s    
size=  645453kB time=00:33:16.76 bitrate=2648.1kbits/s    
size=  665176kB time=00:34:21.45 bitrate=2643.3kbits/s    
size=  685750kB time=00:35:21.63 bitrate=2647.8kbits/s    
size=  709688kB time=00:36:29.79 bitrate=2654.9kbits/s    
size=  728084kB time=00:37:33.30 bitrate=2647.0kbits/s    
size=  749517kB time=00:38:28.62 bitrate=2659.6kbits/s    
size=  773498kB time=00:39:27.77 bitrate=2676.1kbits/s    
size=  799351kB time=00:40:31.41 bitrate=2693.2kbits/s    
size=  823039kB time=00:41:35.29 bitrate=2702.0kbits/s    
size=  837203kB time=00:42:25.81 bitrate=2694.0kbits/s    
size=  859126kB time=00:43:21.31 bitrate=2705.5kbits/s    
size=  888626kB time=00:44:36.64 bitrate=2719.7kbits/s    
size=  908233kB time=00:45:45.20 bitrate=2710.3kbits/s    
size=  919846kB time=00:46:27.78 bitrate=2703.0kbits/s    
size=  933270kB time=00:47:13.21 bitrate=2698.5kbits/s    
size=  945426kB time=00:47:51.13 bitrate=2697.5kbits/s    
size=  955306kB time=00:48:21.24 bitrate=2697.4kbits/s    
size=  968168kB time=00:49:06.33 bitrate=2691.9kbits/s    
size=  987251kB time=00:50:04.99 bitrate=2691.4kbits/s    
size= 1006855kB time=00:51:09.53 bitrate=2687.1kbits/s    
size= 1032854kB time=00:52:33.02 bitrate=2683.5kbits/s    
size= 1055804kB time=00:53:43.61 bitrate=2683.1kbits/s    
size= 1083188kB time=00:54:44.18 bitrate=2701.9kbits/s    
size= 1107507kB time=00:55:36.38 bitrate=2719.3kbits/s    
size= 1132957kB time=00:56:43.86 bitrate=2726.7kbits/s    
size= 1145117kB time=00:57:20.44 bitrate=2726.6kbits/s    
size= 1158918kB time=00:58:13.72 bitrate=2717.4kbits/s    
size= 1184437kB time=00:59:25.69 bitrate=2721.2kbits/s    
size= 1212273kB time=01:00:28.85 bitrate=2736.7kbits/s    
size= 1232305kB time=01:01:25.08 bitrate=2739.4kbits/s    
size= 1246631kB time=01:02:20.80 bitrate=2730.0kbits/s    
size= 1260744kB time=01:03:07.64 bitrate=2726.8kbits/s    
size= 1265837kB time=01:03:22.27 bitrate=2727.2kbits/s    
size= 1266410kB time=01:03:24.03 bitrate=2727.2kbits/s    
size= 1268324kB time=01:03:29.98 bitrate=2727.1kbits/s    
size= 1278935kB time=01:04:04.57 bitrate=2725.1kbits/s    
size= 1291253kB time=01:04:44.80 bitrate=2722.9kbits/s    
size= 1304270kB time=01:05:20.79 bitrate=2725.1kbits/s    
size= 1327996kB time=01:06:13.63 bitrate=2737.8kbits/s    
size= 1355447kB time=01:07:10.62 bitrate=2754.9kbits/s    
size= 1377053kB time=01:08:03.68 bitrate=2762.4kbits/s    
size= 1397095kB time=01:09:11.00 bitrate=2757.2kbits/s    
size= 1417907kB time=01:10:13.66 bitrate=2756.6kbits/s    
size= 1442252kB time=01:11:16.15 bitrate=2763.0kbits/s    
size= 1468647kB time=01:12:24.55 bitrate=2769.2kbits/s    
size= 1489018kB time=01:13:25.38 bitrate=2768.9kbits/s    
size= 1490379kB time=01:13:29.50 bitrate=2768.8kbits/s    
size= 1508269kB time=01:14:22.56 bitrate=2768.8kbits/s    
size= 1535204kB time=01:15:36.77 bitrate=2772.1kbits/s    
size= 1559398kB time=01:16:46.78 bitrate=2773.0kbits/s    
size= 1575418kB time=01:17:49.60 bitrate=2763.8kbits/s    
size= 1596503kB time=01:19:01.76 bitrate=2758.2kbits/s    
size= 1614959kB time=01:20:06.72 bitrate=2752.3kbits/s    
size= 1632625kB time=01:20:58.46 bitrate=2752.8kbits/s    
size= 1659674kB time=01:22:01.72 bitrate=2762.5kbits/s    
size= 1683620kB time=01:23:00.12 bitrate=2769.4kbits/s    
size= 1706544kB time=01:23:58.17 bitrate=2774.8kbits/s    
size= 1722191kB time=01:25:00.28 bitrate=2766.2kbits/s    
size= 1739554kB time=01:26:21.18 bitrate=2750.4kbits/s    
size= 1761930kB time=01:27:22.52 bitrate=2753.2kbits/s    
size= 1787518kB time=01:28:21.82 bitrate=2761.9kbits/s    
size= 1812308kB time=01:29:13.55 bitrate=2773.2kbits/s    
size= 1835432kB time=01:30:26.02 bitrate=2771.1kbits/s    
size= 1848247kB time=01:31:18.41 bitrate=2763.7kbits/s    
size= 1870552kB time=01:32:26.30 bitrate=2762.8kbits/s    
size= 1894665kB time=01:33:31.34 bitrate=2766.0kbits/s    
size= 1914840kB time=01:34:43.38 bitrate=2760.0kbits/s    
size= 1937360kB time=01:35:53.24 bitrate=2758.6kbits/s    
size= 1962925kB time=01:37:01.92 bitrate=2762.0kbits/s    
size= 1989550kB time=01:38:09.68 bitrate=2767.3kbits/s    
size= 2005340kB time=01:39:03.55 bitrate=2764.0kbits/s    
size= 2027040kB time=01:39:56.25 bitrate=2769.3kbits/s    
size= 2048703kB time=01:40:49.18 bitrate=2774.4kbits/s    
size= 2070285kB time=01:41:36.22 bitrate=2782.0kbits/s    
size= 2096063kB time=01:42:32.67 bitrate=2790.8kbits/s    
size= 2115441kB time=01:43:24.16 bitrate=2793.2kbits/s    
size= 2130383kB time=01:44:13.89 bitrate=2790.6kbits/s    
size= 2143276kB time=01:45:11.10 bitrate=2782.0kbits/s    
size= 2159125kB time=01:46:13.47 bitrate=2775.2kbits/s    
size= 2180030kB time=01:47:23.71 bitrate=2771.5kbits/s    
size= 2204543kB time=01:48:27.36 bitrate=2775.3kbits/s    
size= 2232982kB time=01:49:36.51 bitrate=2781.5kbits/s    
size= 2249450kB time=01:50:24.80 bitrate=2781.6kbits/s    
size= 2267357kB time=01:51:14.72 bitrate=2782.8kbits/s    
size= 2286033kB time=01:52:18.97 bitrate=2778.9kbits/s    
size= 2302163kB time=01:53:06.04 bitrate=2779.1kbits/s    
size= 2321230kB time=01:54:05.28 bitrate=2777.9kbits/s    
size= 2337307kB time=01:54:58.38 bitrate=2775.6kbits/s    
size= 2350190kB time=01:55:51.13 bitrate=2769.7kbits/s    
size= 2371482kB time=01:57:03.20 bitrate=2766.1kbits/s    
size= 2396044kB time=01:58:05.66 bitrate=2770.2kbits/s    
size= 2422638kB time=01:59:04.81 bitrate=2777.7kbits/s    
size= 2436868kB time=01:59:49.69 bitrate=2776.6kbits/s    
size= 2448027kB time=02:00:19.29 bitrate=2777.9kbits/s    
size= 2449953kB time=02:00:23.77 bitrate=2778.3kbits/s    
size= 2452549kB time=02:00:29.79 bitrate=2779.0kbits/s    
size= 2463361kB time=02:00:55.07 bitrate=2781.5kbits/s    
size= 2475274kB time=02:01:21.28 bitrate=2784.9kbits/s    
size= 2484788kB time=02:01:42.75 bitrate=2787.4kbits/s    
size= 2495388kB time=02:02:13.53 bitrate=2787.5kbits/s    
size= 2502169kB time=02:02:41.37 bitrate=2784.5kbits/s    
size= 2511370kB time=02:03:13.12 bitrate=2782.7kbits/s    
size= 2515862kB time=02:03:25.72 bitrate=2783.0kbits/s    
size= 2525416kB time=02:03:50.75 bitrate=2784.1kbits/s    
size= 2528206kB time=02:03:58.56 bitrate=2784.3kbits/s    


video:0kB audio:2259932kB subtitle:0 global headers:0kB muxing overhead 11.870920%


frame=1366679008



































but when i do this:
./ffmpeg-0 -y  -i audio.ts


 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 @ 0x22d6020] probed stream 0 failed
[mpegts @ 0x22d6020] 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.ts: could not find codec parameters






I have serveral this file。what can i do?




                                                                                                                                     thank you


More information about the ffmpeg-user mailing list