clsid2 / mpc-hc

Media Player Classic
GNU General Public License v3.0
10.94k stars 491 forks source link

Subtitle: ttml/stpp support #2665

Closed 3052 closed 6 months ago

3052 commented 6 months ago

I have the below file, the subtitles are not recognized by MPC-HC

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
clsid2 commented 6 months ago

Unsupported format.

3052 commented 6 months ago

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:

clsid2 commented 6 months ago

If you are creating subtitles yourself, then just use SRT.

3052 commented 6 months ago

no. WebVTT is standardized:

https://www.w3.org/TR/webvtt1/

and used by public sites such as:

https://www.amcplus.com https://www.paramountplus.com/ https://www.peacocktv.com/

SRT is not standardized

clsid2 commented 6 months ago

If you want something that is properly supported by players use SRT or ASS.

If you want to be stupid and stubborn, go use W3 and ISO standards used by media companies that players do not give a fuck about.