user26602: I try to add .srt subtitles to the mkv file and it doesn't work.
I use the following very simple command:
$ ffmpeg -y -i original.mkv -i sub_original.srt -map 0 -map 1 -c copy ~/temp.mkv
ffmpeg version n4.2 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9.1.0 (GCC)
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-nvdec --enable-nvenc --enable-omx --enable-shared --enable-version3
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Input #0, matroska,webm, from 'original.mkv':
  Metadata:
    encoder         : libebml v1.3.0 + libmatroska v1.4.1
    creation_time   : 2019-09-14T13:50:43.000000Z
  Duration: 00:58:52.45, start: 0.000000, bitrate: 8212 kb/s
    Stream #0:0(eng): Video: h264 (High), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
    Stream #0:1(rus): Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s (default)
    Metadata:
      title           : Dub
    Stream #0:2(eng): Audio: ac3, 48000 Hz, 5.1(side), fltp, 640 kb/s
    Stream #0:3(rus): Subtitle: subrip (default) (forced)
    Metadata:
      title           : Forced
    Stream #0:4(rus): Subtitle: subrip
    Stream #0:5(eng): Subtitle: subrip
    Stream #0:6(ger): Subtitle: subrip
    Stream #0:7(fre): Subtitle: subrip
    Stream #0:8(ita): Subtitle: subrip
    Stream #0:9(spa): Subtitle: subrip
    Stream #0:10(dut): Subtitle: subrip
    Stream #0:11(por): Subtitle: subrip
    Stream #0:12(tur): Subtitle: subrip
    Stream #0:13(gre): Subtitle: subrip
    Stream #0:14: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 854x1280 [SAR 72:72 DAR 427:640], 90k tbr, 90k tbn, 90k tbc (attached pic)
    Metadata:
      filename        : Cover_Unbelievable.jpg
      mimetype        : image/jpeg
Input #1, srt, from 'sub_original.srt':
  Duration: N/A, bitrate: N/A
    Stream #1:0: Subtitle: subrip
Output #0, matroska, to 'temp.mkv':
  Metadata:
    encoder         : Lavf58.29.100
    Stream #0:0(eng): Video: h264 (High) (H264 / 0x34363248), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 23.98 fps, 23.98 tbr, 1k tbn, 1k tbc (default)
    Stream #0:1(rus): Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1(side), fltp, 448 kb/s (default)
    Metadata:
      title           : Dub
    Stream #0:2(eng): Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1(side), fltp, 640 kb/s
    Stream #0:3(rus): Subtitle: subrip (default) (forced)
    Metadata:
      title           : Forced
    Stream #0:4(rus): Subtitle: subrip
    Stream #0:5(eng): Subtitle: subrip
    Stream #0:6(ger): Subtitle: subrip
    Stream #0:7(fre): Subtitle: subrip
    Stream #0:8(ita): Subtitle: subrip
    Stream #0:9(spa): Subtitle: subrip
    Stream #0:10(dut): Subtitle: subrip
    Stream #0:11(por): Subtitle: subrip
    Stream #0:12(tur): Subtitle: subrip
    Stream #0:13(gre): Subtitle: subrip
    Stream #0:14: Video: mjpeg (Baseline) (MJPG / 0x47504A4D), yuvj420p(pc, bt470bg/unknown/unknown), 854x1280 [SAR 72:72 DAR 427:640], q=2-31, 90k tbr, 1k tbn, 90k tbc (attached pic)
    Metadata:
      filename        : Cover_Unbelievable.jpg
      mimetype        : image/jpeg
    Stream #0:15: Subtitle: subrip
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
  Stream #0:2 -> #0:2 (copy)
  Stream #0:3 -> #0:3 (copy)
  Stream #0:4 -> #0:4 (copy)
  Stream #0:5 -> #0:5 (copy)
  Stream #0:6 -> #0:6 (copy)
  Stream #0:7 -> #0:7 (copy)
  Stream #0:8 -> #0:8 (copy)
  Stream #0:9 -> #0:9 (copy)
  Stream #0:10 -> #0:10 (copy)
  Stream #0:11 -> #0:11 (copy)
  Stream #0:12 -> #0:12 (copy)
  Stream #0:13 -> #0:13 (copy)
  Stream #0:14 -> #0:14 (copy)
  Stream #1:0 -> #0:15 (copy)
Press [q] to stop, [?] for help
[matroska @ 0x564c2717f840] Starting new cluster due to timestamp
[matroska @ 0x564c2717f840] Starting new cluster due to timestamp37 bitrate=8282.2kbits/s speed= 387x    
frame=84685 fps=9337 q=-1.0 Lq=-1.0 size= 3542743kB time=00:58:52.41 bitrate=8215.9kbits/s speed= 389x    
video:3070859kB audio:469153kB subtitle:265kB other streams:0kB global headers:0kB muxing overhead: 0.069655%

At first glance it seems to work - if I open new file with VLC I can see new subtitle stream, but the subtitles themselves are not visible!
I get the followng warnings/errors in the console:

[matroska @ 0x557924efe840] Starting new cluster due to timestamp
[matroska @ 0x557924efe840] Starting new cluster due to timestamp

So I suppose it's the root of the problem, but I don't know what to do with it. Some other videos work fine with the same command, some don't.

user1760: Possibly #6037 mkv muxing broken and #7064 External subtitle files cause wrong interleaving. Workaround may be to try -max_interleave_delta. Experiment to see which values work for you.

26602: <p>I try to add .srt subtitles to the mkv file and it doesn't work.
I use the following very simple command:</p>
<pre><code>$ ffmpeg -y -i original.mkv -i sub_original.srt -map 0 -map 1 -c copy ~/temp.mkv
ffmpeg version n4.2 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9.1.0 (GCC)
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-nvdec --enable-nvenc --enable-omx --enable-shared --enable-version3
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Input #0, matroska,webm, from 'original.mkv':
  Metadata:
    encoder         : libebml v1.3.0 + libmatroska v1.4.1
    creation_time   : 2019-09-14T13:50:43.000000Z
  Duration: 00:58:52.45, start: 0.000000, bitrate: 8212 kb/s
    Stream #0:0(eng): Video: h264 (High), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
    Stream #0:1(rus): Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s (default)
    Metadata:
      title           : Dub
    Stream #0:2(eng): Audio: ac3, 48000 Hz, 5.1(side), fltp, 640 kb/s
    Stream #0:3(rus): Subtitle: subrip (default) (forced)
    Metadata:
      title           : Forced
    Stream #0:4(rus): Subtitle: subrip
    Stream #0:5(eng): Subtitle: subrip
    Stream #0:6(ger): Subtitle: subrip
    Stream #0:7(fre): Subtitle: subrip
    Stream #0:8(ita): Subtitle: subrip
    Stream #0:9(spa): Subtitle: subrip
    Stream #0:10(dut): Subtitle: subrip
    Stream #0:11(por): Subtitle: subrip
    Stream #0:12(tur): Subtitle: subrip
    Stream #0:13(gre): Subtitle: subrip
    Stream #0:14: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 854x1280 [SAR 72:72 DAR 427:640], 90k tbr, 90k tbn, 90k tbc (attached pic)
    Metadata:
      filename        : Cover_Unbelievable.jpg
      mimetype        : image/jpeg
Input #1, srt, from 'sub_original.srt':
  Duration: N/A, bitrate: N/A
    Stream #1:0: Subtitle: subrip
Output #0, matroska, to 'temp.mkv':
  Metadata:
    encoder         : Lavf58.29.100
    Stream #0:0(eng): Video: h264 (High) (H264 / 0x34363248), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 23.98 fps, 23.98 tbr, 1k tbn, 1k tbc (default)
    Stream #0:1(rus): Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1(side), fltp, 448 kb/s (default)
    Metadata:
      title           : Dub
    Stream #0:2(eng): Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1(side), fltp, 640 kb/s
    Stream #0:3(rus): Subtitle: subrip (default) (forced)
    Metadata:
      title           : Forced
    Stream #0:4(rus): Subtitle: subrip
    Stream #0:5(eng): Subtitle: subrip
    Stream #0:6(ger): Subtitle: subrip
    Stream #0:7(fre): Subtitle: subrip
    Stream #0:8(ita): Subtitle: subrip
    Stream #0:9(spa): Subtitle: subrip
    Stream #0:10(dut): Subtitle: subrip
    Stream #0:11(por): Subtitle: subrip
    Stream #0:12(tur): Subtitle: subrip
    Stream #0:13(gre): Subtitle: subrip
    Stream #0:14: Video: mjpeg (Baseline) (MJPG / 0x47504A4D), yuvj420p(pc, bt470bg/unknown/unknown), 854x1280 [SAR 72:72 DAR 427:640], q=2-31, 90k tbr, 1k tbn, 90k tbc (attached pic)
    Metadata:
      filename        : Cover_Unbelievable.jpg
      mimetype        : image/jpeg
    Stream #0:15: Subtitle: subrip
Stream mapping:
  Stream #0:0 -&gt; #0:0 (copy)
  Stream #0:1 -&gt; #0:1 (copy)
  Stream #0:2 -&gt; #0:2 (copy)
  Stream #0:3 -&gt; #0:3 (copy)
  Stream #0:4 -&gt; #0:4 (copy)
  Stream #0:5 -&gt; #0:5 (copy)
  Stream #0:6 -&gt; #0:6 (copy)
  Stream #0:7 -&gt; #0:7 (copy)
  Stream #0:8 -&gt; #0:8 (copy)
  Stream #0:9 -&gt; #0:9 (copy)
  Stream #0:10 -&gt; #0:10 (copy)
  Stream #0:11 -&gt; #0:11 (copy)
  Stream #0:12 -&gt; #0:12 (copy)
  Stream #0:13 -&gt; #0:13 (copy)
  Stream #0:14 -&gt; #0:14 (copy)
  Stream #1:0 -&gt; #0:15 (copy)
Press [q] to stop, [?] for help
[matroska @ 0x564c2717f840] Starting new cluster due to timestamp
[matroska @ 0x564c2717f840] Starting new cluster due to timestamp37 bitrate=8282.2kbits/s speed= 387x    
frame=84685 fps=9337 q=-1.0 Lq=-1.0 size= 3542743kB time=00:58:52.41 bitrate=8215.9kbits/s speed= 389x    
video:3070859kB audio:469153kB subtitle:265kB other streams:0kB global headers:0kB muxing overhead: 0.069655%
</code></pre>
<p>At first glance it seems to work - if I open new file with VLC I can see new subtitle stream, but the subtitles themselves are not visible!</p>
<p>I get the followng warnings/errors in the console:</p>
<blockquote>
<p>[matroska @ 0x557924efe840] Starting new cluster due to timestamp</p>
<p>[matroska @ 0x557924efe840] Starting new cluster due to timestamp</p>
</blockquote>
<p>So I suppose it's the root of the problem, but I don't know what to do with it. Some other videos work fine with the same command, some don't.</p>
 1760: <p>Possibly <a href="https://trac.ffmpeg.org/ticket/6037" rel="noreferrer">#6037 mkv muxing broken</a> and <a href="https://trac.ffmpeg.org/ticket/7064" rel="noreferrer">#7064 External subtitle files cause wrong interleaving</a>. Workaround may be to try <code>-max_interleave_delta</code>. Experiment to see which values work for you.</p>
