#11602(undetermined:new): Muxing MKV and adding external SRT as anything except the only subtitle stream in an MKV prevents subtitle display in VLC
#11602: Muxing MKV and adding external SRT as anything except the only subtitle stream in an MKV prevents subtitle display in VLC -------------------------------------+------------------------------------- Reporter: Kurt | Type: defect Fitzner | Status: new | Priority: normal Component: | Version: git- undetermined | master Keywords: mkv srt | Blocked By: muxer remux | Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Summary of the bug: When re-muxing an MKV video that already has subtitle streams in it to add an additional external subrip .srt file, if the external .srt is included as anything except the only subtitle stream in the output then the added external subtitle will not display in VLC or on a Roku media player. You can select any number of existing subtitle stream from the input MKV video and they will properly copy to the output and display when the video is played. The following produces videos where the added external subtitle DOES NOT display, but where the subtitle stream included from the input .mkv DOES display: {{{ % ffmpeg -report -i invid.mkv -i 1b.srt -map 0:v? -c:v copy -map 0:a? -c:a copy -map 0:s:0 -c:s:0 copy -map 1:s:0 -c:s:1 copy outvid1.mkv % ffmpeg -report -i invid.mkv -i 1b.srt -map 0:v? -c:v copy -map 0:a? -c:a copy -map 1:s:0 -c:s:0 copy -map 0:s:0 -c:s:1 copy outvid2.mkv }}} The following produces a video where the added external subtitle (the same one as the above) DOES display properly: {{{ % ffmpeg -i invid.mkv -i 1b.srt -map 0:v? -c:v copy -map 0:a? -c:a copy -map 1:s:0 -c:s:0 copy outvid3.mkv }}} This was attempted on ffmpeg Windows 64 builds: ffmpeg version 2025-05-07-git-1b643e3f65-full_build-www.gyan.dev ffmpeg version 2025-05-19-git-c55d65ac0a-full_build-www.gyan.dev -- Ticket URL: <https://trac.ffmpeg.org/ticket/11602> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11602: Muxing MKV and adding external SRT as anything except the only subtitle stream in an MKV prevents subtitle display in VLC -------------------------------------+------------------------------------- Reporter: Kurt | Owner: (none) Fitzner | Type: defect | Status: new Priority: normal | Component: | undetermined Version: git-master | Resolution: Keywords: mkv srt | Blocked By: muxer remux | Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by Kurt Fitzner): Log file for a run which creates an undisplayable subtitle is available at: https://va1der.ca/~public/ffmpeg-20250521-190837.log.xz -- Ticket URL: <https://trac.ffmpeg.org/ticket/11602#comment:1> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11602: Muxing MKV and adding external SRT as anything except the only subtitle stream in an MKV prevents subtitle display in VLC -------------------------------------+------------------------------------- Reporter: Kurt | Owner: (none) Fitzner | Type: defect | Status: closed Priority: normal | Component: | undetermined Version: git-master | Resolution: invalid Keywords: mkv srt | Blocked By: muxer remux | Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Changes (by mkver): * resolution: => invalid * status: new => closed Comment: Here is the relevant information about the output streams from your log: {{{ Stream #0:3, 0, 1/1000: Subtitle: subrip Stream #0:4(eng), 0, 1/1000: Subtitle: subrip (default) (forced) Metadata: title : English (translations only) DURATION : 00:11:33.297000000 }}} It means that the second subtitle stream (the one that has been copied from the input Matroska file) is marked as default and forced, whereas the first one (from the external srt) is not. Therefore players will prefer the second subtitle track because it is the default. But players typically still allow to switch to a non-default track (VLC does in my test). Anyway, you can (re)set the disposition of output streams via the -disposition option. You can also use the header editor from MKVToolNix to modify the flags of an already existing Matroska file. -- Ticket URL: <https://trac.ffmpeg.org/ticket/11602#comment:2> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
participants (1)
-
FFmpeg