Opened 10 years ago

Closed 10 years ago

#3819 closed defect (fixed)

ffmpeg automatically maps subtitles even if the decoder and encoder are not compatible

Reported by: Selur Owned by:
Priority: normal Component: ffmpeg
Version: git-master Keywords: mkv
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Summary:
When trying to extract the tracks with ID 0, 2, 5 and 7 into different files,
ffmpeg seems to mess up the 'Stream mapping' and tries to extract an unwanted track. (ID 8)

Here's my call:

ffmpeg -y -threads 8 -analyzeduration 1000M -probesize 1000M -playlist 1 -i bluray:"H:\bd_probs\test" -acodec copy -vcodec copy "H:\Temp\test_videoOnly_00_25_53_3810_04.mkv" -map 0:2 -y -acodec copy "H:\Temp\iId_4_aid_4353_lang_en_00_25_53_3810_01.dts" -map 0:5 -y -acodec copy "H:\Temp\iId_5_aid_4356_lang_de_00_25_53_3810_02.dts" -map 0:7 -y -acodec copy "H:\Temp\iId_6_aid_4358_lang_en_00_25_53_3810_03.ac3"

which should extract:
Stream #0:0 to "H:\Temp\test_videoOnly_00_25_53_3810_04.mkv"
Stream #0:2 to "H:\Temp\iId_4_aid_4353_lang_en_00_25_53_3810_01.dts"
Stream #0:5 to "H:\Temp\iId_5_aid_4356_lang_de_00_25_53_3810_02.dts"
Stream #0:7 to "H:\Temp\iId_6_aid_4358_lang_en_00_25_53_3810_03.ac3"

but here's the output I get:

ffmpeg version git-2014-07-30-ff9a154 Copyright (c) 2000-2014 the FFmpeg developers
  built on Jul 30 2014 13:45:30 with gcc 4.9.1 (Rev1, Built by MSYS2 project)
  configuration: --arch=x86_64 --disable-debug --disable-shared --disable-doc --enable-gpl --enable-version3 --enable-runtime-cpudetect --enable-avfilter --enable-bzlib --enable-zlib --enable-librtmp --enable-gnutls --enable-avisynth --enable-frei0r --enable-filter=frei0r --enable-libbluray --enable-libcaca --enable-libopenjpeg --enable-fontconfig --enable-libfreetype --enable-libass --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-libschroedinger --enable-libsoxr --enable-libtwolame --enable-libutvideo --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvo-aacenc --enable-openal --enable-libopus --enable-libvidstab --enable-libvpx --enable-libwavpack --enable-libxavs --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzvbi
  libavutil      52. 93.100 / 52. 93.100
  libavcodec     55. 71.100 / 55. 71.100
  libavformat    55. 50.100 / 55. 50.100
  libavdevice    55. 13.102 / 55. 13.102
  libavfilter     4. 11.102 /  4. 11.102
  libswscale      2.  6.100 /  2.  6.100
  libswresample   0. 19.100 /  0. 19.100
  libpostproc    52.  3.100 / 52.  3.100
[bluray @ 000000000045d200] 10 usable playlists:
[mpegts @ 000000000045d360] Failed to open codec in av_find_stream_info
    Last message repeated 1 times
[NULL @ 00000000052cf3e0] ignoring invalid SAR: 10/11
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 138 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 22: packet 20 with DTS 2067548, packet 21 with DTS 2178389
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 29 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 22: packet 28 with DTS 2221492, packet 29 with DTS 2411082
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 73 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 22: packet 36 with DTS 2473110, packet 37 with DTS 2974027
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 66 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 22: packet 44 with DTS 3066206, packet 45 with DTS 3492043
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 44 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 22: packet 52 with DTS 3494061, packet 53 with DTS 3837459
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 58 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 22: packet 60 with DTS 3839466, packet 61 with DTS 4287849
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 9 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 8: packet 4 with DTS 3970817, packet 5 with DTS 4370462
[mpegts @ 000000000045d360] DTS discontinuity in stream 34: packet 4 with DTS 3974570, packet 5 with DTS 4370462
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 2 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 21: packet 4 with DTS 3978275, packet 5 with DTS 4385526
[mpegts @ 000000000045d360] DTS discontinuity in stream 15: packet 4 with DTS 3978272, packet 5 with DTS 4385529
[mpegts @ 000000000045d360] DTS discontinuity in stream 14: packet 4 with DTS 3982014, packet 5 with DTS 4389295
[mpegts @ 000000000045d360] DTS discontinuity in stream 10: packet 4 with DTS 3981999, packet 5 with DTS 4389311
[mpegts @ 000000000045d360] DTS discontinuity in stream 36: packet 4 with DTS 3981999, packet 5 with DTS 4389311
[mpegts @ 000000000045d360] DTS discontinuity in stream 12: packet 4 with DTS 3981996, packet 5 with DTS 4389313
[mpegts @ 000000000045d360] DTS discontinuity in stream 38: packet 4 with DTS 3981996, packet 5 with DTS 4389313
[mpegts @ 000000000045d360] DTS discontinuity in stream 17: packet 4 with DTS 3981992, packet 5 with DTS 4389317
[mpegts @ 000000000045d360] DTS discontinuity in stream 19: packet 4 with DTS 3981991, packet 5 with DTS 4389319
[mpegts @ 000000000045d360] DTS discontinuity in stream 20: packet 4 with DTS 3981984, packet 5 with DTS 4389325
[mpegts @ 000000000045d360] DTS discontinuity in stream 13: packet 4 with DTS 3981983, packet 5 with DTS 4389326
[mpegts @ 000000000045d360] DTS discontinuity in stream 39: packet 4 with DTS 3981983, packet 5 with DTS 4389326
[mpegts @ 000000000045d360] DTS discontinuity in stream 16: packet 4 with DTS 3981981, packet 5 with DTS 4389329
[mpegts @ 000000000045d360] DTS discontinuity in stream 18: packet 4 with DTS 3981980, packet 5 with DTS 4389330
[mpegts @ 000000000045d360] DTS discontinuity in stream 11: packet 4 with DTS 3981978, packet 5 with DTS 4389332
[mpegts @ 000000000045d360] DTS discontinuity in stream 37: packet 4 with DTS 3981978, packet 5 with DTS 4389332
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 31 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 15: packet 12 with DTS 4477455, packet 13 with DTS 4637098
[mpegts @ 000000000045d360] DTS discontinuity in stream 21: packet 12 with DTS 4477447, packet 13 with DTS 4637105
[dca @ 00000000052cef40] Not a valid DCA frame
[mpegts @ 000000000045d360] DTS discontinuity in stream 13: packet 12 with DTS 4484993, packet 13 with DTS 4644573
[mpegts @ 000000000045d360] DTS discontinuity in stream 20: packet 12 with DTS 4484990, packet 13 with DTS 4644577
[mpegts @ 000000000045d360] DTS discontinuity in stream 19: packet 12 with DTS 4484987, packet 13 with DTS 4644579
[mpegts @ 000000000045d360] DTS discontinuity in stream 12: packet 12 with DTS 4484974, packet 13 with DTS 4644592
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 16 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 22: packet 68 with DTS 4289926, packet 69 with DTS 4772073
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 20 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 21: packet 20 with DTS 4638957, packet 21 with DTS 4933553
[mpegts @ 000000000045d360] DTS discontinuity in stream 14: packet 20 with DTS 4646459, packet 21 with DTS 4937313
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 24 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 15: packet 28 with DTS 4935433, packet 29 with DTS 5125064
[mpegts @ 000000000045d360] DTS discontinuity in stream 21: packet 28 with DTS 4935424, packet 29 with DTS 5125072
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 25 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 15: packet 36 with DTS 5126902, packet 37 with DTS 5323986
[mpegts @ 000000000045d360] DTS discontinuity in stream 21: packet 36 with DTS 5126846, packet 37 with DTS 5324041
[dca @ 00000000052cef40] Not a valid DCA frame
[mpegts @ 000000000045d360] DTS discontinuity in stream 14: packet 36 with DTS 5134410, packet 37 with DTS 5331491
[mpegts @ 000000000045d360] DTS discontinuity in stream 16: packet 36 with DTS 5134390, packet 37 with DTS 5331512
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 97 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 23: packet 4 with DTS 5982709, packet 5 with DTS 6089799
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 12 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 23: packet 12 with DTS 6095312, packet 13 with DTS 6187405
[dca @ 00000000052cef40] Not a valid DCA frame
[mpegts @ 000000000045d360] DTS discontinuity in stream 31: packet 4 with DTS 5960253, packet 5 with DTS 6191082
[mpegts @ 000000000045d360] DTS discontinuity in stream 30: packet 4 with DTS 5964002, packet 5 with DTS 6191087
[mpegts @ 000000000045d360] DTS discontinuity in stream 29: packet 4 with DTS 5960246, packet 5 with DTS 6191090
[mpegts @ 000000000045d360] DTS discontinuity in stream 25: packet 4 with DTS 5963998, packet 5 with DTS 6191091
[mpegts @ 000000000045d360] DTS discontinuity in stream 24: packet 4 with DTS 5960244, packet 5 with DTS 6191092
[mpegts @ 000000000045d360] DTS discontinuity in stream 28: packet 4 with DTS 5960238, packet 5 with DTS 6191097
[mpegts @ 000000000045d360] DTS discontinuity in stream 32: packet 4 with DTS 5963990, packet 5 with DTS 6191100
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 90 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 22: packet 108 with DTS 6444581, packet 109 with DTS 6892940
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 63 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 30: packet 44 with DTS 7101410, packet 45 with DTS 7381004
[mpegts @ 000000000045d360] DTS discontinuity in stream 32: packet 52 with DTS 7101392, packet 53 with DTS 7381023
[mpegts @ 000000000045d360] DTS discontinuity in stream 29: packet 52 with DTS 7101388, packet 53 with DTS 7381026
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 12 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 24: packet 52 with DTS 7382859, packet 53 with DTS 7482438
[mpegts @ 000000000045d360] DTS discontinuity in stream 30: packet 52 with DTS 7382832, packet 53 with DTS 7482464
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 3 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 29: packet 60 with DTS 7382876, packet 61 with DTS 7516205
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 1 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 33: packet 60 with DTS 7382866, packet 61 with DTS 7527476
[mpegts @ 000000000045d360] DTS discontinuity in stream 26: packet 60 with DTS 7382837, packet 61 with DTS 7531258
[dca @ 00000000052cef40] Not a valid DCA frame
[mpegts @ 000000000045d360] DTS discontinuity in stream 32: packet 60 with DTS 7382885, packet 61 with DTS 7534964
[mpegts @ 000000000045d360] DTS discontinuity in stream 25: packet 60 with DTS 7382856, packet 61 with DTS 7534993
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 5 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 28: packet 60 with DTS 7382845, packet 61 with DTS 7583803
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 1 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 27: packet 60 with DTS 7382855, packet 61 with DTS 7598807
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 18 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 30: packet 60 with DTS 7484270, packet 61 with DTS 7745142
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 81 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 32: packet 92 with DTS 8144937, packet 93 with DTS 8375764
[mpegts @ 000000000045d360] DTS discontinuity in stream 29: packet 92 with DTS 8144902, packet 93 with DTS 8375799
[dca @ 00000000052cef40] Not a valid DCA frame
[mpegts @ 000000000045d360] DTS discontinuity in stream 23: packet 79 with DTS 7938572, packet 80 with DTS 8383180
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 3 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 28: packet 92 with DTS 8144953, packet 93 with DTS 8409532
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 37 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 23: packet 87 with DTS 8392684, packet 88 with DTS 8702340
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 38 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 23: packet 95 with DTS 8715501, packet 96 with DTS 8995139
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 19 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 22: packet 140 with DTS 8621794, packet 141 with DTS 9156413
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 26 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 30: packet 116 with DTS 9222214, packet 117 with DTS 9366803
[mpegts @ 000000000045d360] DTS discontinuity in stream 29: packet 124 with DTS 9222206, packet 125 with DTS 9366812
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 11 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 22: packet 148 with DTS 9312308, packet 149 with DTS 9456890
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 23 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 22: packet 156 with DTS 9469953, packet 157 with DTS 9637081
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 5 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 23: packet 111 with DTS 9582559, packet 112 with DTS 9685886
[mpegts @ 000000000045d360] DTS discontinuity in stream 25: packet 132 with DTS 9578803, packet 133 with DTS 9689643
[mpegts @ 000000000045d360] DTS discontinuity in stream 31: packet 132 with DTS 9578792, packet 133 with DTS 9689653
[mpegts @ 000000000045d360] DTS discontinuity in stream 28: packet 132 with DTS 9578789, packet 133 with DTS 9689656
[mpegts @ 000000000045d360] DTS discontinuity in stream 26: packet 132 with DTS 9578782, packet 133 with DTS 9689663
[mpegts @ 000000000045d360] DTS discontinuity in stream 24: packet 124 with DTS 9578780, packet 125 with DTS 9689666
[mpegts @ 000000000045d360] DTS discontinuity in stream 27: packet 132 with DTS 9578780, packet 133 with DTS 9689666
[mpegts @ 000000000045d360] DTS discontinuity in stream 30: packet 124 with DTS 9578780, packet 125 with DTS 9689666
[mpegts @ 000000000045d360] DTS discontinuity in stream 33: packet 132 with DTS 9578780, packet 133 with DTS 9689666
[mpegts @ 000000000045d360] DTS discontinuity in stream 29: packet 132 with DTS 9578775, packet 133 with DTS 9689670
[mpegts @ 000000000045d360] DTS discontinuity in stream 32: packet 132 with DTS 9578774, packet 133 with DTS 9689672
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 67 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 32: packet 148 with DTS 10074313, packet 149 with DTS 10207646
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 9 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 22: packet 164 with DTS 9729161, packet 165 with DTS 10286280
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 14 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 25: packet 156 with DTS 10194465, packet 157 with DTS 10402808
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 1 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 33: packet 156 with DTS 10194467, packet 157 with DTS 10414068
[mpegts @ 000000000045d360] DTS discontinuity in stream 32: packet 156 with DTS 10209480, packet 157 with DTS 10414070
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 27 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 22: packet 172 with DTS 10340890, packet 173 with DTS 10635512
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 49 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 23: packet 147 with DTS 10603696, packet 148 with DTS 11018352
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 93 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 32: packet 212 with DTS 11485773, packet 213 with DTS 11739126
[mpegts @ 000000000045d360] DTS discontinuity in stream 29: packet 212 with DTS 11485767, packet 213 with DTS 11739131
[mpegts @ 000000000045d360] DTS discontinuity in stream 33: packet 212 with DTS 11485759, packet 213 with DTS 11739140
[mpegts @ 000000000045d360] DTS discontinuity in stream 30: packet 196 with DTS 11485748, packet 197 with DTS 11739150
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 1 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 23: packet 178 with DTS 11497041, packet 179 with DTS 11742872
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 19 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 22: packet 196 with DTS 11444554, packet 197 with DTS 11907971
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 8 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 33: packet 220 with DTS 11741029, packet 221 with DTS 11979364
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 15 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 22: packet 204 with DTS 11913677, packet 205 with DTS 12099510
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 9 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 32: packet 228 with DTS 11981230, packet 229 with DTS 12174599
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 46 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 28: packet 236 with DTS 12176513, packet 237 with DTS 12534870
[mpegts @ 000000000045d360] DTS discontinuity in stream 30: packet 220 with DTS 12176510, packet 221 with DTS 12534873
[mpegts @ 000000000045d360] DTS discontinuity in stream 25: packet 236 with DTS 12176505, packet 237 with DTS 12534878
[mpegts @ 000000000045d360] DTS discontinuity in stream 32: packet 236 with DTS 12176477, packet 237 with DTS 12534906
[mpegts @ 000000000045d360] DTS discontinuity in stream 23: packet 194 with DTS 12195239, packet 195 with DTS 12534913
[mpegts @ 000000000045d360] DTS discontinuity in stream 33: packet 236 with DTS 12176455, packet 237 with DTS 12534929
[mpegts @ 000000000045d360] DTS discontinuity in stream 29: packet 236 with DTS 12176452, packet 237 with DTS 12534931
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 26 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 22: packet 212 with DTS 12112780, packet 213 with DTS 12744999
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 38 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 8: packet 28 with DTS 12619468, packet 29 with DTS 13045368
[dca @ 00000000052cef40] Not a valid DCA frame
[mpegts @ 000000000045d360] DTS discontinuity in stream 15: packet 44 with DTS 12626981, packet 45 with DTS 13056623
[mpegts @ 000000000045d360] DTS discontinuity in stream 21: packet 44 with DTS 12626896, packet 45 with DTS 13056708
[dca @ 00000000052cef40] Not a valid DCA frame
[mpegts @ 000000000045d360] DTS discontinuity in stream 17: packet 44 with DTS 12630706, packet 45 with DTS 13060406
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 35 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 28: packet 268 with DTS 13002330, packet 269 with DTS 13338180
[mpegts @ 000000000045d360] DTS discontinuity in stream 33: packet 268 with DTS 13002329, packet 269 with DTS 13338181
[mpegts @ 000000000045d360] DTS discontinuity in stream 31: packet 260 with DTS 13002321, packet 261 with DTS 13338189
[mpegts @ 000000000045d360] DTS discontinuity in stream 27: packet 260 with DTS 13002300, packet 261 with DTS 13338211
[mpegts @ 000000000045d360] DTS discontinuity in stream 25: packet 268 with DTS 13002282, packet 269 with DTS 13338228
[mpegts @ 000000000045d360] DTS discontinuity in stream 32: packet 268 with DTS 13002280, packet 269 with DTS 13338231
[mpegts @ 000000000045d360] DTS discontinuity in stream 24: packet 244 with DTS 13002266, packet 245 with DTS 13338244
[mpegts @ 000000000045d360] DTS discontinuity in stream 21: packet 52 with DTS 13058568, packet 53 with DTS 13338249
[mpegts @ 000000000045d360] DTS discontinuity in stream 26: packet 268 with DTS 13002254, packet 269 with DTS 13338257
[mpegts @ 000000000045d360] DTS discontinuity in stream 29: packet 268 with DTS 13002244, packet 269 with DTS 13338267
[mpegts @ 000000000045d360] DTS discontinuity in stream 30: packet 252 with DTS 13002235, packet 253 with DTS 13338276
[dca @ 00000000052cef40] Not a valid DCA frame
[mpegts @ 000000000045d360] DTS discontinuity in stream 14: packet 52 with DTS 13062353, packet 53 with DTS 13341972
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 31 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 23: packet 223 with DTS 13355097, packet 224 with DTS 13589767
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 8 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 22: packet 228 with DTS 13006176, packet 229 with DTS 13657157
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 1 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 21: packet 60 with DTS 13340150, packet 61 with DTS 13676036
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 52 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 22: packet 236 with DTS 13674281, packet 237 with DTS 14081393
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 8 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 32: packet 284 with DTS 13798118, packet 285 with DTS 14148998
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 26 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 22: packet 244 with DTS 14094624, packet 245 with DTS 14355493
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 73 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 33: packet 300 with DTS 14496343, packet 301 with DTS 14922243
[mpegts @ 000000000045d360] DTS discontinuity in stream 23: packet 259 with DTS 14515103, packet 260 with DTS 14922252
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 38 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 23: packet 267 with DTS 14935460, packet 268 with DTS 15230122
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 59 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 30: packet 300 with DTS 15232103, packet 301 with DTS 15687984
[mpegts @ 000000000045d360] DTS discontinuity in stream 29: packet 316 with DTS 15232096, packet 317 with DTS 15687991
[mpegts @ 000000000045d360] DTS discontinuity in stream 33: packet 316 with DTS 15232084, packet 317 with DTS 15688003
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 47 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 23: packet 283 with DTS 15686282, packet 284 with DTS 16055874
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 1 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 33: packet 324 with DTS 15690034, packet 325 with DTS 16074646
[dca @ 00000000052cef40] Not a valid DCA frame
[mpegts @ 000000000045d360] DTS discontinuity in stream 21: packet 68 with DTS 15693768, packet 69 with DTS 16082173
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 71 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 21: packet 76 with DTS 16294312, packet 77 with DTS 16630277
[mpegts @ 000000000045d360] DTS discontinuity in stream 18: packet 76 with DTS 16298123, packet 77 with DTS 16633973
[mpegts @ 000000000045d360] DTS discontinuity in stream 17: packet 76 with DTS 16298092, packet 77 with DTS 16634005
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 27 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 22: packet 284 with DTS 16515818, packet 285 with DTS 16844206
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 67 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 22: packet 292 with DTS 16846242, packet 293 with DTS 17369637
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 7 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 15: packet 84 with DTS 17266511, packet 85 with DTS 17429848
[mpegts @ 000000000045d360] DTS discontinuity in stream 18: packet 84 with DTS 17270264, packet 85 with DTS 17429848
[mpegts @ 000000000045d360] DTS discontinuity in stream 13: packet 84 with DTS 17270263, packet 85 with DTS 17429849
[mpegts @ 000000000045d360] DTS discontinuity in stream 11: packet 84 with DTS 17270262, packet 85 with DTS 17429851
[mpegts @ 000000000045d360] DTS discontinuity in stream 20: packet 84 with DTS 17270251, packet 85 with DTS 17429862
[mpegts @ 000000000045d360] DTS discontinuity in stream 12: packet 84 with DTS 17270246, packet 85 with DTS 17429866
[mpegts @ 000000000045d360] DTS discontinuity in stream 9: packet 100 with DTS 17270236, packet 101 with DTS 17429877
[mpegts @ 000000000045d360] DTS discontinuity in stream 21: packet 84 with DTS 17266473, packet 85 with DTS 17429885
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 27 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 22: packet 300 with DTS 17371658, packet 301 with DTS 17647523
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 18 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 8: packet 68 with DTS 17270437, packet 69 with DTS 17793789
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 1 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 21: packet 92 with DTS 17431727, packet 93 with DTS 17805171
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 21 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 22: packet 308 with DTS 17653198, packet 309 with DTS 17977843
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 9 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 15: packet 100 with DTS 17855841, packet 101 with DTS 18052978
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 26 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 8: packet 76 with DTS 17848462, packet 77 with DTS 18255552
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 1 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 15: packet 108 with DTS 18054810, packet 109 with DTS 18274429
[mpegts @ 000000000045d360] DTS discontinuity in stream 21: packet 108 with DTS 18054782, packet 109 with DTS 18274458
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 26 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 8: packet 84 with DTS 18298785, packet 85 with DTS 18484658
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 2 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 18: packet 116 with DTS 18306312, packet 117 with DTS 18503407
[mpegts @ 000000000045d360] DTS discontinuity in stream 21: packet 116 with DTS 18302557, packet 117 with DTS 18503409
[mpegts @ 000000000045d360] DTS discontinuity in stream 20: packet 116 with DTS 18306310, packet 117 with DTS 18503410
[mpegts @ 000000000045d360] DTS discontinuity in stream 10: packet 116 with DTS 18306299, packet 117 with DTS 18503421
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 69 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 22: packet 332 with DTS 18546709, packet 333 with DTS 19043791
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 42 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 22: packet 340 with DTS 19064609, packet 341 with DTS 19370484
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 25 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 10: packet 124 with DTS 19211041, packet 125 with DTS 19569397
[mpegts @ 000000000045d360] DTS discontinuity in stream 21: packet 124 with DTS 19207273, packet 125 with DTS 19569412
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 153 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 22: packet 364 with DTS 20596075, packet 365 with DTS 20755682
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 95 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 9: packet 148 with DTS 21365578, packet 149 with DTS 21491433
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 12 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 22: packet 380 with DTS 21166745, packet 381 with DTS 21596421
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 14 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 15: packet 132 with DTS 21489483, packet 133 with DTS 21705366
[mpegts @ 000000000045d360] DTS discontinuity in stream 21: packet 132 with DTS 21489452, packet 133 with DTS 21705397
[mpegts @ 000000000045d360] DTS discontinuity in stream 13: packet 132 with DTS 21493247, packet 133 with DTS 21709109
[mpegts @ 000000000045d360] DTS discontinuity in stream 39: packet 12 with DTS 21493247, packet 13 with DTS 21709109
[mpegts @ 000000000045d360] DTS discontinuity in stream 14: packet 132 with DTS 21493246, packet 133 with DTS 21709110
[mpegts @ 000000000045d360] DTS discontinuity in stream 18: packet 132 with DTS 21493245, packet 133 with DTS 21709111
[mpegts @ 000000000045d360] DTS discontinuity in stream 11: packet 132 with DTS 21493244, packet 133 with DTS 21709112
[mpegts @ 000000000045d360] DTS discontinuity in stream 37: packet 12 with DTS 21493244, packet 13 with DTS 21709112
[mpegts @ 000000000045d360] DTS discontinuity in stream 16: packet 132 with DTS 21493242, packet 133 with DTS 21709115
[mpegts @ 000000000045d360] DTS discontinuity in stream 17: packet 132 with DTS 21493238, packet 133 with DTS 21709118
[mpegts @ 000000000045d360] DTS discontinuity in stream 19: packet 132 with DTS 21493238, packet 133 with DTS 21709118
[mpegts @ 000000000045d360] DTS discontinuity in stream 10: packet 132 with DTS 21493232, packet 133 with DTS 21709125
[mpegts @ 000000000045d360] DTS discontinuity in stream 36: packet 12 with DTS 21493232, packet 13 with DTS 21709125
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 84 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 21: packet 140 with DTS 22037579, packet 141 with DTS 22358469
[mpegts @ 000000000045d360] DTS discontinuity in stream 14: packet 140 with DTS 22041347, packet 141 with DTS 22362208
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 5 times
[mpegts @ 000000000045d360] DTS discontinuity in stream 22: packet 388 with DTS 21966321, packet 389 with DTS 22403451
[dca @ 00000000052cef40] Not a valid DCA frame
    Last message repeated 1 times
[mpegts @ 000000000045d360] decoding for stream 40 failed
[NULL @ 00000000052cd880] start time for stream 35 is not set in estimate_timings_from_pts
[mpegts @ 000000000045d360] Could not find codec parameters for stream 35 (Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 000000000045d360] Could not find codec parameters for stream 40 (Audio: dts ([162][0][0][0] / 0x00A2), 0 channels, fltp): unspecified sample rate
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mpegts, from 'bluray:H:\bd_probs\test':
  Duration: 02:09:31.14, start: 11.650667, bitrate: 33726 kb/s
  Program 1 
    Stream #0:0[0x1011]: Video: vc1 (Advanced) (VC-1 / 0x312D4356), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc
    Stream #0:1[0x1100]: Audio: dts (DTS) ([130][0][0][0] / 0x0082), 48000 Hz, 5.1(side), fltp, 768 kb/s
    Stream #0:2[0x1101]: Audio: dts (DTS-HD MA) ([134][0][0][0] / 0x0086), 48000 Hz, 5.1(side), fltp, 1536 kb/s
    Stream #0:3[0x1102]: Audio: dts (DTS) ([130][0][0][0] / 0x0082), 48000 Hz, 5.1(side), fltp, 768 kb/s
    Stream #0:4[0x1103]: Audio: dts (DTS) ([130][0][0][0] / 0x0082), 48000 Hz, 5.1(side), fltp, 768 kb/s
    Stream #0:5[0x1104]: Audio: dts (DTS) ([130][0][0][0] / 0x0082), 48000 Hz, 5.1(side), fltp, 768 kb/s
    Stream #0:6[0x1105]: Audio: dts (DTS) ([130][0][0][0] / 0x0082), 48000 Hz, 5.1(side), fltp, 768 kb/s
    Stream #0:7[0x1106]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 192 kb/s
    Stream #0:8[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    Stream #0:9[0x1201]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    Stream #0:10[0x1202]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    Stream #0:11[0x1203]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    Stream #0:12[0x1204]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    Stream #0:13[0x1205]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    Stream #0:14[0x1206]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    Stream #0:15[0x1207]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    Stream #0:16[0x1208]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    Stream #0:17[0x1209]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    Stream #0:18[0x120a]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    Stream #0:19[0x120b]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    Stream #0:20[0x120c]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    Stream #0:21[0x120d]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    Stream #0:22[0x120e]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    Stream #0:23[0x120f]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    Stream #0:24[0x1210]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    Stream #0:25[0x1211]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    Stream #0:26[0x1212]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    Stream #0:27[0x1213]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    Stream #0:28[0x1214]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    Stream #0:29[0x1215]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    Stream #0:30[0x1216]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    Stream #0:31[0x1217]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    Stream #0:32[0x1218]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    Stream #0:33[0x1219]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    Stream #0:34[0x121a]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    Stream #0:35[0x121b]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:36[0x121c]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    Stream #0:37[0x121d]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    Stream #0:38[0x121e]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    Stream #0:39[0x121f]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    Stream #0:40[0x1a00]: Audio: dts ([162][0][0][0] / 0x00A2), 0 channels, fltp
    Stream #0:41[0x1b00]: Video: vc1 (Advanced) (VC-1 / 0x312D4356), yuv420p, 720x480 [SAR 10:11 DAR 15:11], 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc
Output #0, matroska, to 'H:\Temp\test_videoOnly_00_25_53_3810_04.mkv':
  Metadata:
    handler_name    : Hybrid 2014.07.30.1
    encoder         : Lavf55.50.100
    Stream #0:0: Video: vc1 (WVC1 / 0x31435657), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 23.98 fps, 1k tbn, 90k tbc
    Stream #0:1: Audio: dts ([1] [0][0] / 0x2001), 48000 Hz, 5.1(side), 768 kb/s
    Stream #0:2: Subtitle: ssa, 1920x1080
    Metadata:
      encoder         : Lavc55.71.100 ssa
Output #1, dts, to 'H:\Temp\iId_4_aid_4353_lang_en_00_25_53_3810_01.dts':
  Metadata:
    encoder         : Lavf55.50.100
    Stream #1:0: Audio: dts ([134][0][0][0] / 0x0086), 48000 Hz, 5.1(side), 1536 kb/s
Output #2, dts, to 'H:\Temp\iId_5_aid_4356_lang_de_00_25_53_3810_02.dts':
  Metadata:
    encoder         : Lavf55.50.100
    Stream #2:0: Audio: dts ([130][0][0][0] / 0x0082), 48000 Hz, 5.1(side), 768 kb/s
Output #3, ac3, to 'H:\Temp\iId_6_aid_4358_lang_en_00_25_53_3810_03.ac3':
  Metadata:
    encoder         : Lavf55.50.100
    Stream #3:0: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, 192 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
  Stream #0:8 -> #0:2 (hdmv_pgs_subtitle (pgssub) -> ssa (native))
  Stream #0:2 -> #1:0 (copy)
  Stream #0:5 -> #2:0 (copy)
  Stream #0:7 -> #3:0 (copy)
Press [q] to stop, [?] for help
[ssa @ 00000000055deac0] Only SUBTITLE_ASS type supported.
Subtitle encoding failed
Conversion failed!

For some unknown reason ffmpeg tries to extract the first subtitlestream.


As a workaround: -sn can be added beforce the -vcodec copy, but normally ffmpeg shouldn't try to extract the subtitle stream to begin with!

Change History (17)

comment:1 by Carl Eugen Hoyos, 10 years ago

Component: ffmpegundetermined
Keywords: mkv added; blu-ray extract streams removed
Version: unspecifiedgit-master

in reply to:  description comment:2 by Carl Eugen Hoyos, 10 years ago

Replying to Selur:

ffmpeg -playlist 1 -i bluray:"H:\bd_probs\test" -acodec copy -vcodec copy "H:\Temp\test_videoOnly_00_25_53_3810_04.mkv"

which should extract:
Stream #0:0 to "H:\Temp\test_videoOnly_00_25_53_3810_04.mkv"

This is not what your command line specifies.

comment:3 by Selur, 10 years ago

  1. if you add -map 0:0 to it the result doesn't change
  2. iirc. when map is not specified the first video stream is used
Version 0, edited 10 years ago by Selur (next)

in reply to:  3 comment:4 by Carl Eugen Hoyos, 10 years ago

Replying to Selur:

  1. if you add -map 0:0 to it the result doesn't change

Please provide the (simplified!) command line together with the complete, uncut console output.

  1. iirc. when map is not specified the first video stream is used

I don't think this is true.

Last edited 10 years ago by Carl Eugen Hoyos (previous) (diff)

comment:5 by Selur, 10 years ago

I provided the command line which gave me the problem, with the complete output it
produced.

ffmpeg -playlist 1 -i bluray:"H:\bd_probs\test" -acodec copy -vcodec copy "H:\Temp\test_videoOnly_00_25_53_3810_04.mkv"

itself should copy the audio and video streams to and mkv output and ffmpeg shouldn't touch and extract the subtitle streams at all.

-> I will do some tests and try to come up with the shortest command line for you whoch produces the problem for me and like before I will output the complete (uncut) console output.

comment:6 by Carl Eugen Hoyos, 10 years ago

You claimed that the problem is also reproducible with -map 0:0, if this is not correct please say so. If it is correct, please provide a command line that shows this issue (with one output file, no matter the input).

Please do not add another sample line with Bluray input to describe your original problem without using -map 0:0.
(If there is an issue, it is well known and not Bluray-related.)

comment:7 by Selur, 10 years ago

You are right and I was wrong (must have mistyped somewhere during testing), specifying -map 0:0 does also help.

My mistake was that I assumed that when no processing was explicitly defined for a stream type, the stream type would be ignored.

But that is not the case.

If the output is not a raw file, but a container like mkv/mp4/... ffmpeg tries to convert the first stream of each type to something that is compatible with the output container.

Since I didn't specify -sn ffmpeg tried to convert the first pgs-subtitle stream to something which is mkv compatiple. Problem is ffmpeg can't handle pgs subtitles.

-> So the problem was that I assumed something that was wrong (ffmpeg by default ignoring streams when nothing is specified for their type).

Thanks.

Last edited 10 years ago by Selur (previous) (diff)

in reply to:  7 comment:8 by Carl Eugen Hoyos, 10 years ago

Replying to Selur:

Problem is ffmpeg can't handle pgs subtitles.

Could you elaborate?
I believe that FFmpeg handles pgs subtitles very well (it does not support OCR though but this is not pgs-related).

in reply to:  7 comment:9 by Carl Eugen Hoyos, 10 years ago

Replying to Selur:

ffmpeg tries to convert the first stream of each type

As said, I don't think this is correct (and you should definitely not rely on it), I also believe the actual behaviour is documented.

comment:10 by Selur, 10 years ago

As said, I don't think this is correct (and you should definitely not rely on it), I also believe the actual behaviour is documented.

It is:

By default, ffmpeg includes only one stream of each type (video, audio, subtitle) present in the input files and adds them to each output file. It picks the "best" of each based upon the following criteria: for video, it is the stream with the highest resolution, for audio, it is the stream with the most channels, for subtitles, it is the first subtitle stream. In the case where several streams of the same type rate equally, the stream with the lowest index is chosen.

You can disable some of those defaults by using the -vn/-an/-sn options. For full manual control, use the -map option, which disables the defaults just described. 

source: https://www.ffmpeg.org/ffmpeg-all.html#Stream-selection

Problem is for some reason ffmpeg seems to think that:

  1. mkv doesn't support pgs subtitles(since it tries to convert them to ass/ssa)
    Stream #0:8 -> #0:2 (hdmv_pgs_subtitle (pgssub) -> ssa (native))
    

from the calls above.

  1. mkv doesn't support dts (DTS-HD HRA) audio (since it tries to convert to vorbis)
    ffmpeg -y -threads 8 -analyzeduration 1000M -probesize 1000M -playlist 20 -i bluray:"H:\bd_probs\PIRANHA" -sn -vcodec copy "H:\Temp\test_videoOnly_00_25_53_3810_04.mkv"
    
    ffmpeg version git-2014-07-30-ff9a154 Copyright (c) 2000-2014 the FFmpeg developers
      built on Jul 30 2014 13:45:30 with gcc 4.9.1 (Rev1, Built by MSYS2 project)
      configuration: --arch=x86_64 --disable-debug --disable-shared --disable-doc --enable-gpl --enable-version3 --enable-runtime-cpudetect --enable-avfilter --enable-bzlib --enable-zlib --enable-librtmp --enable-gnutls --enable-avisynth --enable-frei0r --enable-filter=frei0r --enable-libbluray --enable-libcaca --enable-libopenjpeg --enable-fontconfig --enable-libfreetype --enable-libass --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-libschroedinger --enable-libsoxr --enable-libtwolame --enable-libutvideo --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvo-aacenc --enable-openal --enable-libopus --enable-libvidstab --enable-libvpx --enable-libwavpack --enable-libxavs --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzvbi
      libavutil      52. 93.100 / 52. 93.100
      libavcodec     55. 71.100 / 55. 71.100
      libavformat    55. 50.100 / 55. 50.100
      libavdevice    55. 13.102 / 55. 13.102
      libavfilter     4. 11.102 /  4. 11.102
      libswscale      2.  6.100 /  2.  6.100
      libswresample   0. 19.100 /  0. 19.100
      libpostproc    52.  3.100 / 52.  3.100
    Failed to open H:\bd_probs\PIRANHA\BDMV\PLAYLIST\linux, audio nicht auslesbar, bricht immer ab
    Failed to open H:\bd_probs\PIRANHA\BDMV\PLAYLIST\linux, audio nicht auslesbBACKUP/ar, bricht immer ab
    [bluray @ 00000000003cdb00] 14 usable playlists:
    Input #0, mpegts, from 'bluray:H:\bd_probs\PIRANHA':
      Duration: 00:02:07.13, start: 600.000000, bitrate: 17503 kb/s
      Program 1 
        Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc
        Stream #0:1[0x1100]: Audio: dts (DTS-HD HRA) ([133][0][0][0] / 0x0085), 48000 Hz, 5.1(side), fltp, 1536 kb/s
    Output #0, matroska, to 'H:\Temp\test_videoOnly_00_25_53_3810_04.mkv':
      Metadata:
        encoder         : Lavf55.50.100
        Stream #0:0: Video: h264 (H264 / 0x34363248), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 23.98 fps, 1k tbn, 90k tbc
        Stream #0:1: Audio: vorbis (libvorbis) (oV[0][0] / 0x566F), 48000 Hz, 5.1(side), fltp
        Metadata:
          encoder         : Lavc55.71.100 libvorbis
    Stream mapping:
      Stream #0:0 -> #0:0 (copy)
      Stream #0:1 -> #0:1 (dts (dca) -> vorbis (libvorbis))
    Press [q] to stop, [?] for help
    frame=  226 fps=0.0 q=-1.0 size=   14256kB time=00:00:09.34 bitrate=12499.5kbits/s    
    frame=  432 fps=431 q=-1.0 size=   27192kB time=00:00:17.93 bitrate=12420.3kbits/s    
    frame=  643 fps=428 q=-1.0 size=   37370kB time=00:00:26.73 bitrate=11450.7kbits/s    
    frame=  855 fps=427 q=-1.0 size=   45781kB time=00:00:35.57 bitrate=10541.2kbits/s    
    frame=  915 fps=422 q=-1.0 Lsize=   48440kB time=00:00:38.08 bitrate=10420.6kbits/s    
    
    video:47420kB audio:988kB subtitle:0kB other streams:0kB global headers:7kB muxing overhead: 0.065453%
    Received signal 2: terminating. <- manually aborted
    

will check the pgs handling

comment:11 by Carl Eugen Hoyos, 10 years ago

for video, it is the stream with the highest resolution, for audio, it is the stream with the most channels

This is the (exact) opposite of what you wrote above (twice).

in reply to:  10 comment:12 by Carl Eugen Hoyos, 10 years ago

Replying to Selur:

  1. mkv doesn't support pgs subtitles

I think this is not correct, see ticket #2023.

comment:13 by Selur, 10 years ago

This is the (exact) opposite of what you wrote above (twice).

My mistake was that I assumed that always the first stream would be selected and the doc says always the "best" is picked. How is that the (exact) opposite ?

I think this is not correct, see ticket #2023.

I don't think you understood me right. :)
That was the conclusion of the fact that ffmpeg tried to convert the subtitles, if ffmpeg wouldn't have tried that but simply passed through the subtitles this whole report wouldn't exist, since then my mkv would have simply contained all the pgs stream, but ffmpeg crashed since it tried to convert the pgs stream and like you wrote yourself ffmpeg can't do ocr, so pgs->ass isn't possible for ffmpeg. (and ffmpeg crashed)

Last edited 10 years ago by Selur (previous) (diff)

comment:14 by Selur, 10 years ago

Here's why I assumed ffmpeg couldn't handle pgs subtitle properly:

ffmpeg -y -threads 8 -analyzeduration 1000M -probesize 1000M -playlist 20 -i bluray:"H:\bd_probs\Test3" -map 0:2 -scodec copy -an -vn "H:\Temp\test_videoOnly_00_25_53_3810_04.sup"

returns:

ffmpeg version git-2014-07-30-ff9a154 Copyright (c) 2000-2014 the FFmpeg developers
  built on Jul 30 2014 13:45:30 with gcc 4.9.1 (Rev1, Built by MSYS2 project)
  configuration: --arch=x86_64 --disable-debug --disable-shared --disable-doc --enable-gpl --enable-version3 --enable-runtime-cpudetect --enable-avfilter --enable-bzlib --enable-zlib --enable-librtmp --enable-gnutls --enable-avisynth --enable-frei0r --enable-filter=frei0r --enable-libbluray --enable-libcaca --enable-libopenjpeg --enable-fontconfig --enable-libfreetype --enable-libass --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-libschroedinger --enable-libsoxr --enable-libtwolame --enable-libutvideo --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvo-aacenc --enable-openal --enable-libopus --enable-libvidstab --enable-libvpx --enable-libwavpack --enable-libxavs --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzvbi
  libavutil      52. 93.100 / 52. 93.100
  libavcodec     55. 71.100 / 55. 71.100
  libavformat    55. 50.100 / 55. 50.100
  libavdevice    55. 13.102 / 55. 13.102
  libavfilter     4. 11.102 /  4. 11.102
  libswscale      2.  6.100 /  2.  6.100
  libswresample   0. 19.100 /  0. 19.100
  libpostproc    52.  3.100 / 52.  3.100
[bluray @ 0000000000379c40] 3 usable playlists:
Input #0, mpegts, from 'bluray:H:\bd_probs\Ice Age 2 - Jetzt taut's':
  Duration: 00:00:16.68, start: 11.650667, bitrate: 52302 kb/s
  Program 1 
    Stream #0:0[0x1011]: Video: mpeg2video (Main) (HDMV / 0x564D4448), yuv420p(tv), 1920x1080 [SAR 1:1 DAR 16:9], max. 39000 kb/s, 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc
    Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 192 kb/s
    Stream #0:2[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
[NULL @ 0000000005e8b8c0] Unable to find a suitable output format for 'H:\Temp\test_videoOnly_00_25_53_3810_04.sup'
H:\Temp\test_videoOnly_00_25_53_3810_04.sup: Invalid argument

-> ffmpeg doesn't like .sup as extension for pgs subtitles, it want's .pgs
(PGS normally is the format, but all tools that I could think of extracted .sup ;))
To be clear: when .pgs is used the extraction works.

Last edited 10 years ago by Selur (previous) (diff)

in reply to:  14 comment:15 by Carl Eugen Hoyos, 10 years ago

Replying to Selur:

To be clear: when .pgs is used the extraction works.

Could you elaborate? I don't understand.

comment:16 by Selur, 10 years ago

probably made a typo and still used mkv or ts as container, extracting pgs failed on all my tries since then, so it's probably not working and instead of giving a proper message that pgs extractiong is not possible ffmpeg tries to convert to ssa and fails,...
-> I gave up on using ffmpeg with subtitles for the time beeing

comment:17 by Carl Eugen Hoyos, 10 years ago

Component: undeterminedffmpeg
Reproduced by developer: set
Resolution: fixed
Status: newclosed
Summary: ffmpeg entries to extracts an addiional unwanted track from a blu-ray (stream mapping problem)ffmpeg automatically maps subtitles even if the decoder and encoder are not compatible

Fixed in 7d585bc9

The issue is not Bluray-related and was for example reproducible with the samples from ticket #2024:

$ ffmpeg -i dvbsubtest.ts -qscale 2 out.mkv
Note: See TracTickets for help on using tickets.