Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subtitle: TTML support #6

Open
3052 opened this issue Mar 14, 2024 · 4 comments
Open

Subtitle: TTML support #6

3052 opened this issue Mar 14, 2024 · 4 comments

Comments

@3052
Copy link

3052 commented Mar 14, 2024

I have the below file, the subtitles will not load

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'out.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf60.16.100
  Duration: 01:38:48.75, start: 0.000000, bitrate: 3957 kb/s
  Stream #0:0[0x1](und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(progressive), 1200x720 [SAR 1:1 DAR 5:3], 3822 kb/s, 24 fps, 24 tbr, 19200 tbn (default)
    Metadata:
      handler_name    : USP Video Handler
      vendor_id       : [0][0][0][0]
      encoder         : AVC Coding
  Stream #0:1[0x2](zho): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s (default)
    Metadata:
      handler_name    : USP Sound Handler
      vendor_id       : [0][0][0][0]
  Stream #0:2[0x3](eng): Subtitle: ttml (stpp / 0x70707473), 1 kb/s (default)
    Metadata:
      handler_name    : USP Subtitle Handler
@pkoshevoy
Copy link
Owner

@3052 Is there a publicly available sample file with this subtitle type?
Does this subtitle type work with any known player (vlc or ffplay)?

@3052
Copy link
Author

3052 commented Mar 14, 2024

@pkoshevoy
Copy link
Owner

@3052 ffmpeg doesn't have a decoder for ttml, and as my player depends on ffmpeg API for demuxing/decoding -- ttml subtitles most likely are not going to be supported until they are supported by ffmpeg.

ffplay version N-114162-g2129d66a66 Copyright (c) 2003-2024 the FFmpeg developers
  built with Apple clang version 14.0.0 (clang-1400.0.29.202)
  configuration: --prefix=/Users/pavel/x86_64 --disable-debug --enable-libx264 --enable-libzimg --enable-libass --enable-libbluray --enable-libmodplug --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-runtime-cpudetect --extra-cflags=-I/opt/local/include --extra-ldflags='-headerpad_max_install_names -L/opt/local/lib'
  libavutil      59.  1.100 / 59.  1.100
  libavcodec     61.  1.101 / 61.  1.101
  libavformat    61.  0.100 / 61.  0.100
  libavdevice    61.  0.100 / 61.  0.100
  libavfilter    10.  0.100 / 10.  0.100
  libswscale      8.  0.100 /  8.  0.100
  libswresample   5.  0.100 /  5.  0.100
  libpostproc    58.  0.100 / 58.  0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/tmp/out.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf61.0.100
  Duration: 03:53:20.06, start: 0.000000, bitrate: 1331 kb/s
  Stream #0:0[0x1](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 159 kb/s (default)
      Metadata:
        handler_name    : SoundHandler
        vendor_id       : [0][0][0][0]
  Stream #0:1[0x2](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, smpte170m/smpte170m/bt709, progressive), 720x480 [SAR 8:9 DAR 4:3], 1165 kb/s, 23.98 fps, 23.98 tbr, 16k tbn (default)
      Metadata:
        handler_name    : VideoHandler
        vendor_id       : [0][0][0][0]
  Stream #0:2[0x3](eng): Subtitle: ttml (stpp / 0x70707473), 1 kb/s (default)
      Metadata:
        handler_name    : USP Subtitle Handler
No decoder could be found for codec ttml
   7.61 A-V: -0.002 fd=   1 aq=   34KB vq=   13KB sq=    0B 

@3052
Copy link
Author

3052 commented Mar 15, 2024

yeah, seems like support for TTML is pretty crappy at this time, missing from FFmpeg and MPV. as a workaround, it seems WebVTT is pretty common with better support:

@3052 3052 changed the title Subtitle: ttml/stpp support Subtitle: TTML support Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants