[FFmpeg-trac] #1056(undetermined:new): FFMPEG unable to select or copy multiple audio tracks in a TS file

FFmpeg trac at avcodec.org
Sun Mar 11 18:38:16 CET 2012


#1056: FFMPEG unable to select or copy multiple audio tracks in a TS file
-------------------------------------+-------------------------------------
             Reporter:  ramitbhalla  |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:
  undetermined                       |  unspecified
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 I have a TS file with multiple Audio tracks in it (which FFMPEG can
 recognize). Howeven when I try to copy the audio track (either by
 specifying which audio track or requesting a copy all FFMPEG ALWAYS uses
 the first audio track only AND also converts it to mp2?? instead of
 copying it).

 This sample TS file was created by FFMPEG and it was able to copy all
 audio tracks into the TS container perfectly but is unable to extract more
 than 1.


 FIRST TEST: Copy 2nd audio track into a TS file

 COMMAND:
 D:\Test Videos>ffmpeg -threads 0 -async 1 -y -i "video.ts" -vcodec copy
 -c:a:1 copy output.ts

 OUTPUT:
 ffmpeg version N-37915-g6cb2085 Copyright (c) 2000-2012 the FFmpeg
 developers
   built on Feb 15 2012 20:47:20 with gcc 4.6.2
   configuration: --enable-gpl --enable-version3 --disable-w32threads
 --enable-runtime-cpudetect --enable-avisynth --enab
 le-bzlib --enable-frei0r --enable-libopencore-amrnb --enable-libopencore-
 amrwb --enable-libfreetype --enable-libgsm --en
 able-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-
 libschroedinger --enable-libspeex --enable-libtheora --en
 able-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-
 libvpx --enable-libx264 --enable-libxavs --enable-
 libxvid --enable-zlib
   libavutil      51. 39.100 / 51. 39.100
   libavcodec     54.  3.100 / 54.  3.100
   libavformat    54.  1.100 / 54.  1.100
   libavdevice    53.  4.100 / 53.  4.100
   libavfilter     2. 62.100 /  2. 62.100
   libswscale      2.  1.100 /  2.  1.100
   libswresample   0.  6.100 /  0.  6.100
   libpostproc    52.  0.100 / 52.  0.100
 Input #0, mpegts, from 'video.ts':
   Duration: 00:00:01.76, start: 1.400000, bitrate: 9903 kb/s
   Program 1
     Metadata:
       service_name    : Canal+ Accion HD
       service_provider: Canal+ Accion HD
     Stream #0:0[0x100](spa): Audio: ac3 ([129][0][0][0] / 0x0081), 48000
 Hz, stereo, s16, 192 kb/s
     Stream #0:1[0x101](qaa): Audio: ac3 ([129][0][0][0] / 0x0081), 48000
 Hz, stereo, s16, 192 kb/s
     Stream #0:2[0x102]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002),
 yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 104857
 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
 [mpegts @ 01C9F940] muxrate VBR, pcr every 2 pkts, sdt every 200, pat/pmt
 every 40 pkts
 Output #0, mpegts, to 'output.ts':
   Metadata:
     encoder         : Lavf54.1.100
     Stream #0:0: Video: mpeg2video ([2][0][0][0] / 0x0002), yuv420p,
 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 104857 kb/s,
 25 fps, 90k tbn, 25 tbc
     Stream #0:1(spa): Audio: mp2, 48000 Hz, stereo, s16, 128 kb/s
 Stream mapping:
   Stream #0:2 -> #0:0 (copy)
   Stream #0:0 -> #0:1 (ac3 -> mp2)
 Press [q] to stop, [?] for help
 frame=   45 fps=  0 q=-1.0 Lsize=    2065kB time=00:00:01.76
 bitrate=9609.4kbits/s
 video:1880kB audio:29kB global headers:0kB muxing overhead 8.196496%


 SECOND TEST: Copy ALL Audio tracks into a TS file

 COMMAND:
 D:\Test Videos>ffmpeg -threads 0 -async 1 -y -i "video.ts" -vcodec copy
 -c:a copy output.ts

 OUTPUT:
 ffmpeg version N-37915-g6cb2085 Copyright (c) 2000-2012 the FFmpeg
 developers
   built on Feb 15 2012 20:47:20 with gcc 4.6.2
   configuration: --enable-gpl --enable-version3 --disable-w32threads
 --enable-runtime-cpudetect --enable-avisynth --enab
 le-bzlib --enable-frei0r --enable-libopencore-amrnb --enable-libopencore-
 amrwb --enable-libfreetype --enable-libgsm --en
 able-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-
 libschroedinger --enable-libspeex --enable-libtheora --en
 able-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-
 libvpx --enable-libx264 --enable-libxavs --enable-
 libxvid --enable-zlib
   libavutil      51. 39.100 / 51. 39.100
   libavcodec     54.  3.100 / 54.  3.100
   libavformat    54.  1.100 / 54.  1.100
   libavdevice    53.  4.100 / 53.  4.100
   libavfilter     2. 62.100 /  2. 62.100
   libswscale      2.  1.100 /  2.  1.100
   libswresample   0.  6.100 /  0.  6.100
   libpostproc    52.  0.100 / 52.  0.100
 Input #0, mpegts, from 'video.ts':
   Duration: 00:00:01.76, start: 1.400000, bitrate: 9903 kb/s
   Program 1
     Metadata:
       service_name    : Canal+ Accion HD
       service_provider: Canal+ Accion HD
     Stream #0:0[0x100](spa): Audio: ac3 ([129][0][0][0] / 0x0081), 48000
 Hz, stereo, s16, 192 kb/s
     Stream #0:1[0x101](qaa): Audio: ac3 ([129][0][0][0] / 0x0081), 48000
 Hz, stereo, s16, 192 kb/s
     Stream #0:2[0x102]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002),
 yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 104857
 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
 [mpegts @ 035DC020] muxrate VBR, pcr every 2 pkts, sdt every 200, pat/pmt
 every 40 pkts
 Output #0, mpegts, to 'output.ts':
   Metadata:
     encoder         : Lavf54.1.100
     Stream #0:0: Video: mpeg2video ([2][0][0][0] / 0x0002), yuv420p,
 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 104857 kb/s,
 25 fps, 90k tbn, 25 tbc
     Stream #0:1(spa): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz,
 stereo, 192 kb/s
 Stream mapping:
   Stream #0:2 -> #0:0 (copy)
   Stream #0:0 -> #0:1 (copy)
 Press [q] to stop, [?] for help
 frame=   45 fps=  0 q=-1.0 Lsize=    2080kB time=00:00:01.76
 bitrate=9681.1kbits/s
 video:1880kB audio:42kB global headers:0kB muxing overhead 8.238927%


 THIRD TEST: Copy all audio tracks into a AVI file

 COMMAND:
 D:\Test Videos>ffmpeg -threads 0 -async 1 -y -i "video.ts" -vcodec copy
 -c:a copy output.avi

 OUTPUT:
 ffmpeg version N-37915-g6cb2085 Copyright (c) 2000-2012 the FFmpeg
 developers
   built on Feb 15 2012 20:47:20 with gcc 4.6.2
   configuration: --enable-gpl --enable-version3 --disable-w32threads
 --enable-runtime-cpudetect --enable-avisynth --enab
 le-bzlib --enable-frei0r --enable-libopencore-amrnb --enable-libopencore-
 amrwb --enable-libfreetype --enable-libgsm --en
 able-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-
 libschroedinger --enable-libspeex --enable-libtheora --en
 able-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-
 libvpx --enable-libx264 --enable-libxavs --enable-
 libxvid --enable-zlib
   libavutil      51. 39.100 / 51. 39.100
   libavcodec     54.  3.100 / 54.  3.100
   libavformat    54.  1.100 / 54.  1.100
   libavdevice    53.  4.100 / 53.  4.100
   libavfilter     2. 62.100 /  2. 62.100
   libswscale      2.  1.100 /  2.  1.100
   libswresample   0.  6.100 /  0.  6.100
   libpostproc    52.  0.100 / 52.  0.100
 Input #0, mpegts, from 'video.ts':
   Duration: 00:00:01.76, start: 1.400000, bitrate: 9903 kb/s
   Program 1
     Metadata:
       service_name    : Canal+ Accion HD
       service_provider: Canal+ Accion HD
     Stream #0:0[0x100](spa): Audio: ac3 ([129][0][0][0] / 0x0081), 48000
 Hz, stereo, s16, 192 kb/s
     Stream #0:1[0x101](qaa): Audio: ac3 ([129][0][0][0] / 0x0081), 48000
 Hz, stereo, s16, 192 kb/s
     Stream #0:2[0x102]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002),
 yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 104857
 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
 Output #0, avi, to 'output.avi':
   Metadata:
     ISFT            : Lavf54.1.100
     Stream #0:0: Video: mpeg2video (mpg2 / 0x3267706D), yuv420p, 1920x1080
 [SAR 1:1 DAR 16:9], q=2-31, 104857 kb/s, 25 f
 ps, 50 tbn, 50 tbc
     Stream #0:1(spa): Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo,
 192 kb/s
 Stream mapping:
   Stream #0:2 -> #0:0 (copy)
   Stream #0:0 -> #0:1 (copy)
 Press [q] to stop, [?] for help
 frame=   45 fps=  0 q=-1.0 Lsize=    1935kB time=00:00:01.74
 bitrate=9109.0kbits/s
 video:1880kB audio:42kB global headers:0kB muxing overhead 0.685256%

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1056>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list