mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
26.79k stars 2.84k forks source link

External subtitle file extensions are not documented #11934

Open porg opened 12 months ago

porg commented 12 months ago

The manual section on Subtitles: https://mpv.io/manual/master/#subtitles currently does not tell anything about the supported subtitle file formats.

Only hint that I could find in the source code was mpv/player/external_files.c static const char *const sub_exts[] = {"utf", "utf8", "utf-8", "idx", "sub", "srt", "rt", "ssa", "ass", "mks", "vtt", "sup", "scc", "smi", "lrc", "pgs", NULL};

My concrete inquiry: Youtube Studio offers to download subtitle files as:

Traneptora commented 11 months ago

SubViewer gets downloadded with a .SBV extension. Seems more widely known on the Internet with the .SUB extension.

Seems like an issue with SubViewer, not with mpv.

porg commented 11 months ago

Please re-open.

1) The reference should contain a section which subtitle formats are supported and which file extension bindings they have. Could someone with the necessary knowledge of mpv internals please add that?

2) I informed you that mpv has a binding for the SubViewer format under the file extension .SUB but not under .SBV although the latter seems quite common (video giant YouTube uses this file extension in its Youtube Studio).

chenlung commented 11 months ago

There are also various formats derived from TTML which I don't think mpv supports (iTunes Timed Text; Netflix Timed Text, etc.).

Dudemanguy commented 11 months ago

As for formats, we just use ffmpeg so it's whatever it supports. If you want to add .sbv to the list of extensions to autoload, that seems fine to me.

porg commented 11 months ago
bgx90 commented 7 months ago

Concerning VobSub subtitles, I would like to note that when an external .idx subtitle file is specified with the --sub-file option, mpv does not display the subtitles from the .sub file associated with the .idx file. When the .sub file is specified with the --sub-file option, mpv displays the subtitles but they are not displayed correctly; the size, color, and position are wrong, and editing the .idx file has no effect on the appearance of the subtitles. If those same subtitle files are muxed with the video in an mkv container, then mpv displays the subtitles correctly. I just spent a few hours figuring this all out. Maybe the issue is related to #16 External vobsubs (.idx/.sub pairs) do not work with Libav. Just to check, I also tried VLC and found that it had no problem displaying the subtitles properly when given an external .idx file.