[FFmpeg-user] Subtitles disappear

Cecil Westerhof Cecil at decebal.nl
Mon Jan 4 16:52:39 EET 2021


Moritz Barsnick <barsnick at gmx.net> writes:

> On Mon, Jan 04, 2021 at 09:58:34 +0100, Michael Koch wrote:
>> For copying the subtitles from the input to the output,
>> -c:s copy
>> might work. I haven't tested it.
>
> Since MP4 only supports "timed text" subtitles, this will only work if
> the source MKV also contains this type of subtitles.
>
> Had Cecil shown us ffmpeg's complete console output, we would know what
> his source delivers. MKV can carry all types of subtitles. If Cecil's
> MKV contains text based subtitles, these can usually be converted by
> ffmpeg. If Cecil's MKV contains picture based subtitles (e.g. Blu-ray
> PGS, or DVD subs), these cannot be converted to text based subtitles by
> ffmpeg.

In principle I look for a general solution, because the input files
are of a range of type. But in this specific situation:
Input #0, matroska,webm, from 'input.mkv':
  Metadata:
    encoder         : libebml v1.3.0 + libmatroska v1.4.0
    creation_time   : 2013-05-31T13:08:21.000000Z
  Duration: 01:22:57.92, start: 0.000000, bitrate: 9416 kb/s
    Chapter #0:0: start 0.000000, end 512.333000
    Metadata:
      title           : 00:00:00.000
    Chapter #0:1: start 512.333000, end 849.542000
    Metadata:
      title           : 00:08:32.333
    Chapter #0:2: start 849.542000, end 1270.250000
    Metadata:
      title           : 00:14:09.542
    Chapter #0:3: start 1270.250000, end 1686.667000
    Metadata:
      title           : 00:21:10.250
    Chapter #0:4: start 1686.667000, end 2025.500000
    Metadata:
      title           : 00:28:06.667
    Chapter #0:5: start 2025.500000, end 2601.083000
    Metadata:
      title           : 00:33:45.500
    Chapter #0:6: start 2601.083000, end 2906.042000
    Metadata:
      title           : 00:43:21.083
    Chapter #0:7: start 2906.042000, end 3368.000000
    Metadata:
      title           : 00:48:26.042
    Chapter #0:8: start 3368.000000, end 3739.833000
    Metadata:
      title           : 00:56:08.000
    Chapter #0:9: start 3739.833000, end 4254.625000
    Metadata:
      title           : 01:02:19.833
    Chapter #0:10: start 4254.625000, end 4622.042000
    Metadata:
      title           : 01:10:54.625
    Chapter #0:11: start 4622.042000, end 4977.917000
    Metadata:
      title           : 01:17:02.042
    Stream #0:0(eng): Video: h264 (High), yuv420p(progressive), 1920x816, SAR 1:1 DAR 40:17, 24 fps, 24 tbr, 1k tbn, 48 tbc (default)
    Stream #0:1(eng): Audio: ac3, 48000 Hz, stereo, fltp, 640 kb/s (default)
    Stream #0:2(eng): Subtitle: subrip (default)
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (ac3 (native) -> mp3 (libmp3lame))
[libx264 @ 0x55fadd95b480] using SAR=545/544
[libx264 @ 0x55fadd95b480] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX XOP FMA3 BMI1
[libx264 @ 0x55fadd95b480] profile High, level 3.1
[libx264 @ 0x55fadd95b480] 264 - core 155 r2917 0a84d98 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=2 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=6 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=1 keyint=250 keyint_min=24 scenecut=40 intra_refresh=0 rc_lookahead=10 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'output.mp4':
  Metadata:
    encoder         : Lavf58.20.100
    Chapter #0:0: start 0.000000, end 512.333000
    Metadata:
      title           : 00:00:00.000
    Chapter #0:1: start 512.333000, end 849.542000
    Metadata:
      title           : 00:08:32.333
    Chapter #0:2: start 849.542000, end 1270.250000
    Metadata:
      title           : 00:14:09.542
    Chapter #0:3: start 1270.250000, end 1686.667000
    Metadata:
      title           : 00:21:10.250
    Chapter #0:4: start 1686.667000, end 2025.500000
    Metadata:
      title           : 00:28:06.667
    Chapter #0:5: start 2025.500000, end 2601.083000
    Metadata:
      title           : 00:33:45.500
    Chapter #0:6: start 2601.083000, end 2906.042000
    Metadata:
      title           : 00:43:21.083
    Chapter #0:7: start 2906.042000, end 3368.000000
    Metadata:
      title           : 00:48:26.042
    Chapter #0:8: start 3368.000000, end 3739.833000
    Metadata:
      title           : 00:56:08.000
    Chapter #0:9: start 3739.833000, end 4254.625000
    Metadata:
      title           : 01:02:19.833
    Chapter #0:10: start 4254.625000, end 4622.042000
    Metadata:
      title           : 01:10:54.625
    Chapter #0:11: start 4622.042000, end 4977.917000
    Metadata:
      title           : 01:17:02.042
    Stream #0:0(eng): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1024x436 [SAR 545:544 DAR 40:17], q=-1--1, 24 fps, 12288 tbn, 24 tbc (default)
    Metadata:
      encoder         : Lavc58.35.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    Stream #0:1(eng): Audio: mp3 (libmp3lame) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp (default)
    Metadata:
      encoder         : Lavc58.35.100 libmp3lame

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof


More information about the ffmpeg-user mailing list