[FFmpeg-trac] #8629(undetermined:new): Allow additional stream specifier when mapping by stream id

FFmpeg trac at avcodec.org
Thu Apr 23 17:50:13 EEST 2020


#8629: Allow additional stream specifier when mapping by stream id
-------------------------------------+-------------------------------------
             Reporter:               |                     Type:
  Rapper_skull                       |  enhancement
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:  git-
  undetermined                       |  master
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 '''Summary of the bug:'''
 Many Blu-ray titles include an AC3 compatibility track in addition to a
 TrueHD/Atmos one. The problem is that they are identified by the same
 MPEG-TS PID and there's no way to select one or the other, as you can see
 below. In fact when using {{{ -map i:0x1100 }}} ffmpeg tries to map both
 of them, while {{{ -map i:0x1100:0 }}} gives the following error:
 {{{Stream map 'i:0x1100:0' matches no streams.}}}. I think a good idea
 could be to add the ability to specify an ''additional stream specifier''.


 '''How to reproduce:'''
 {{{
 % ffmpeg -y -i sample.m2ts -map i:0x1100 -c copy ffmpeg version
 N-97450-g64b80cb Copyright (c) 2000-2020 the FFmpeg developers
   built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
   configuration: --prefix=/home/rapperskull/ffmpeg_build --pkg-config-
 flags=--static --extra-cflags=-I/home/rapperskull/ffmpeg_build/include
 --extra-ldflags=-L/home/rapperskull/ffmpeg_build/lib --extra-
 libs='-lpthread -lm' --bindir=/home/rapperskull/bin --enable-gpl --enable-
 libaom --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-
 libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-
 libx264 --enable-libx265 --enable-nonfree
   libavutil      56. 42.102 / 56. 42.102
   libavcodec     58. 80.100 / 58. 80.100
   libavformat    58. 42.101 / 58. 42.101
   libavdevice    58.  9.103 / 58.  9.103
   libavfilter     7. 79.100 /  7. 79.100
   libswscale      5.  6.101 /  5.  6.101
   libswresample   3.  6.100 /  3.  6.100
   libpostproc    55.  6.100 / 55.  6.100
 [mpegts @ 0x5592f8b6fdc0] start time for stream 7 is not set in
 estimate_timings_from_pts
 [mpegts @ 0x5592f8b6fdc0] start time for stream 8 is not set in
 estimate_timings_from_pts
 [mpegts @ 0x5592f8b6fdc0] start time for stream 9 is not set in
 estimate_timings_from_pts
 [mpegts @ 0x5592f8b6fdc0] start time for stream 10 is not set in
 estimate_timings_from_pts
 [mpegts @ 0x5592f8b6fdc0] PES packet size mismatch
 [mpegts @ 0x5592f8b6fdc0] Packet corrupt (stream = 2, dts = 2903280).
 [mpegts @ 0x5592f8b6fdc0] PES packet size mismatch
 [mpegts @ 0x5592f8b6fdc0] Packet corrupt (stream = 3, dts = 2924985).
 [mpegts @ 0x5592f8b6fdc0] PES packet size mismatch
 [mpegts @ 0x5592f8b6fdc0] Packet corrupt (stream = 2, dts = 2903280).
 [mpegts @ 0x5592f8b6fdc0] PES packet size mismatch
 [mpegts @ 0x5592f8b6fdc0] Packet corrupt (stream = 3, dts = 2924985).
 [mpegts @ 0x5592f8b6fdc0] PES packet size mismatch
 [mpegts @ 0x5592f8b6fdc0] Packet corrupt (stream = 4, dts = 2906160).
 [mpegts @ 0x5592f8b6fdc0] PES packet size mismatch
 [mpegts @ 0x5592f8b6fdc0] Packet corrupt (stream = 5, dts = 2906160).
 [mpegts @ 0x5592f8b6fdc0] PES packet size mismatch
 [mpegts @ 0x5592f8b6fdc0] Packet corrupt (stream = 6, dts = 2906160).
 [mpegts @ 0x5592f8b6fdc0] stream 0 : no PTS found at end of file, duration
 not set
 [mpegts @ 0x5592f8b6fdc0] Could not find codec parameters for stream 7
 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)):
 unspecified size
 Consider increasing the value for the 'analyzeduration' and 'probesize'
 options
 [mpegts @ 0x5592f8b6fdc0] Could not find codec parameters for stream 8
 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)):
 unspecified size
 Consider increasing the value for the 'analyzeduration' and 'probesize'
 options
 [mpegts @ 0x5592f8b6fdc0] Could not find codec parameters for stream 9
 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)):
 unspecified size
 Consider increasing the value for the 'analyzeduration' and 'probesize'
 options
 [mpegts @ 0x5592f8b6fdc0] Could not find codec parameters for stream 10
 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)):
 unspecified size
 Consider increasing the value for the 'analyzeduration' and 'probesize'
 options
 Input #0, mpegts, from 'sample.m2ts':
   Duration: 00:00:20.90, start: 11.635833, bitrate: 20072 kb/s
   Program 1
     Stream #0:0[0x1011]: Video: hevc (Main 10) (HDMV / 0x564D4448),
 yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x2160 [SAR 1:1 DAR 16:9],
 23.98 fps, 23.98 tbr, 90k tbn, 23.98 tbc
     Stream #0:1[0x1100]: Audio: truehd (AC-3 / 0x332D4341), 48000 Hz, 7.1,
 s32 (24 bit)
     Stream #0:2[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz,
 5.1(side), fltp, 640 kb/s
     Stream #0:3[0x1101]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo,
 fltp, 320 kb/s
     Stream #0:4[0x1102]: Audio: eac3 (AC-3 / 0x332D4341), 48000 Hz, 7.1,
 fltp, 896 kb/s
     Stream #0:5[0x1103]: Audio: eac3 (AC-3 / 0x332D4341), 48000 Hz, 7.1,
 fltp, 896 kb/s
     Stream #0:6[0x1104]: Audio: eac3 (AC-3 / 0x332D4341), 48000 Hz, 7.1,
 fltp, 896 kb/s
     Stream #0:7[0x12a0]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] /
 0x0090)
     Stream #0:8[0x12a1]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] /
 0x0090)
     Stream #0:9[0x12a2]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] /
 0x0090)
     Stream #0:10[0x12a3]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] /
 0x0090)
     Stream #0:11[0x12a4]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] /
 0x0090), 1920x1080
     Stream #0:12[0x12a5]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] /
 0x0090), 1920x1080
     Stream #0:13[0x12a6]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] /
 0x0090), 1920x1080
     Stream #0:14[0x12a7]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] /
 0x0090), 1920x1080
 [truehd @ 0x5592f92ba840] truehd files have exactly one stream
 Could not write header for output file #0 (incorrect codec parameters ?):
 Invalid argument
 Stream mapping:
   Stream #0:1 -> #0:0 (copy)
   Stream #0:2 -> #0:1 (copy)
     Last message repeated 1 times
 }}}

 {{{
 % ffmpeg -y -i sample.m2ts -map i:0x1100:0 -c copy sample_out.thd
 ffmpeg version N-97450-g64b80cb Copyright (c) 2000-2020 the FFmpeg
 developers
   built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
   configuration: --prefix=/home/rapperskull/ffmpeg_build --pkg-config-
 flags=--static --extra-cflags=-I/home/rapperskull/ffmpeg_build/include
 --extra-ldflags=-L/home/rapperskull/ffmpeg_build/lib --extra-
 libs='-lpthread -lm' --bindir=/home/rapperskull/bin --enable-gpl --enable-
 libaom --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-
 libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-
 libx264 --enable-libx265 --enable-nonfree
   libavutil      56. 42.102 / 56. 42.102
   libavcodec     58. 80.100 / 58. 80.100
   libavformat    58. 42.101 / 58. 42.101
   libavdevice    58.  9.103 / 58.  9.103
   libavfilter     7. 79.100 /  7. 79.100
   libswscale      5.  6.101 /  5.  6.101
   libswresample   3.  6.100 /  3.  6.100
   libpostproc    55.  6.100 / 55.  6.100
 [mpegts @ 0x563c5ce58dc0] start time for stream 7 is not set in
 estimate_timings_from_pts
 [mpegts @ 0x563c5ce58dc0] start time for stream 8 is not set in
 estimate_timings_from_pts
 [mpegts @ 0x563c5ce58dc0] start time for stream 9 is not set in
 estimate_timings_from_pts
 [mpegts @ 0x563c5ce58dc0] start time for stream 10 is not set in
 estimate_timings_from_pts
 [mpegts @ 0x563c5ce58dc0] PES packet size mismatch
 [mpegts @ 0x563c5ce58dc0] Packet corrupt (stream = 2, dts = 2903280).
 [mpegts @ 0x563c5ce58dc0] PES packet size mismatch
 [mpegts @ 0x563c5ce58dc0] Packet corrupt (stream = 3, dts = 2924985).
 [mpegts @ 0x563c5ce58dc0] PES packet size mismatch
 [mpegts @ 0x563c5ce58dc0] Packet corrupt (stream = 2, dts = 2903280).
 [mpegts @ 0x563c5ce58dc0] PES packet size mismatch
 [mpegts @ 0x563c5ce58dc0] Packet corrupt (stream = 3, dts = 2924985).
 [mpegts @ 0x563c5ce58dc0] PES packet size mismatch
 [mpegts @ 0x563c5ce58dc0] Packet corrupt (stream = 4, dts = 2906160).
 [mpegts @ 0x563c5ce58dc0] PES packet size mismatch
 [mpegts @ 0x563c5ce58dc0] Packet corrupt (stream = 5, dts = 2906160).
 [mpegts @ 0x563c5ce58dc0] PES packet size mismatch
 [mpegts @ 0x563c5ce58dc0] Packet corrupt (stream = 6, dts = 2906160).
 [mpegts @ 0x563c5ce58dc0] stream 0 : no PTS found at end of file, duration
 not set
 [mpegts @ 0x563c5ce58dc0] Could not find codec parameters for stream 7
 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)):
 unspecified size
 Consider increasing the value for the 'analyzeduration' and 'probesize'
 options
 [mpegts @ 0x563c5ce58dc0] Could not find codec parameters for stream 8
 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)):
 unspecified size
 Consider increasing the value for the 'analyzeduration' and 'probesize'
 options
 [mpegts @ 0x563c5ce58dc0] Could not find codec parameters for stream 9
 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)):
 unspecified size
 Consider increasing the value for the 'analyzeduration' and 'probesize'
 options
 [mpegts @ 0x563c5ce58dc0] Could not find codec parameters for stream 10
 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)):
 unspecified size
 Consider increasing the value for the 'analyzeduration' and 'probesize'
 options
 Input #0, mpegts, from 'sample.m2ts':
   Duration: 00:00:20.90, start: 11.635833, bitrate: 20072 kb/s
   Program 1
     Stream #0:0[0x1011]: Video: hevc (Main 10) (HDMV / 0x564D4448),
 yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x2160 [SAR 1:1 DAR 16:9],
 23.98 fps, 23.98 tbr, 90k tbn, 23.98 tbc
     Stream #0:1[0x1100]: Audio: truehd (AC-3 / 0x332D4341), 48000 Hz, 7.1,
 s32 (24 bit)
     Stream #0:2[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz,
 5.1(side), fltp, 640 kb/s
     Stream #0:3[0x1101]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo,
 fltp, 320 kb/s
     Stream #0:4[0x1102]: Audio: eac3 (AC-3 / 0x332D4341), 48000 Hz, 7.1,
 fltp, 896 kb/s
     Stream #0:5[0x1103]: Audio: eac3 (AC-3 / 0x332D4341), 48000 Hz, 7.1,
 fltp, 896 kb/s
     Stream #0:6[0x1104]: Audio: eac3 (AC-3 / 0x332D4341), 48000 Hz, 7.1,
 fltp, 896 kb/s
     Stream #0:7[0x12a0]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] /
 0x0090)
     Stream #0:8[0x12a1]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] /
 0x0090)
     Stream #0:9[0x12a2]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] /
 0x0090)
     Stream #0:10[0x12a3]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] /
 0x0090)
     Stream #0:11[0x12a4]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] /
 0x0090), 1920x1080
     Stream #0:12[0x12a5]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] /
 0x0090), 1920x1080
     Stream #0:13[0x12a6]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] /
 0x0090), 1920x1080
     Stream #0:14[0x12a7]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] /
 0x0090), 1920x1080
 [mpegts @ 0x563c5ce58dc0] Invalid stream specifier: i:0x1100:0.
     Last message repeated 29 times
 Stream map 'i:0x1100:0' matches no streams.
 To ignore this, add a trailing '?' to the map.
 }}}

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


More information about the FFmpeg-trac mailing list