mpv doesn't automatically load subtitle files with language prefix on the filename (such as *.en.vtt)

Created on 9 Jan 2017  路  11Comments  路  Source: mpv-player/mpv

mpv version and platform

mpv 0.23.0-git-10a005d 64 bit build by srsfckn on Windows 7 64 bit

Reproduction steps

  1. Download any youtube videos with subtitle using youtube-dl option '--write-sub'
  2. The subtitle file will be placed in the same directory as video file, with *.en.vtt extension.
  3. Play the downloaded video using mpv

Expected behavior

mpv recognizes *.vtt files with the same name as the video as subtitle automatically

Actual behavior

The *.vtt files need to be dragged inside mpv window to make mpv recognize the subtitle.
An ugly hack: Renaming subtitle files from *.vtt to *.srt makes mpv recognize the subtitle automatically.

Sample files

https://0x0.st/fQy.7z

question

Most helpful comment

It seems that I just need to put sub-auto=fuzzy in the configuration file to load prefixed subtitles.

All 11 comments

"vtt" is in the list of subtitle file extensions just like "srt". While I didn't try to reproduce it, it should just work.

mpv has no problem displaying vtt subtitle. The problem here is the vtt subtitle isn't loaded as soon as the video file is played.

Need to drop vtt file inside mpv window to make mpv load the subtitle.

The sample file contains a webm file and a separate vtt subtitle to reproduce the issue.

That's because it has not the same filename?

I suppose it's necessary for subtitle to have exact same filename as the video so that mpv can load the subtitle as soon as the video is played.

I just surprised that mpv doesn't recognize language prefix on subtitle filename (*.en.vtt) since Videolan's vlc automatically load *.en.vtt file as correct subtitle.

I think vlc's behavior is the expected behavior for loading subtitle files with language prefix on the filename.

mpv also does it if you set fuzzy matching. It's not enabled by default.

It seems that I just need to put sub-auto=fuzzy in the configuration file to load prefixed subtitles.

So not a bug, closing.

sub-auto=fuzzy

Is there any reason for this not to be enabled by default? It would have saved me some trouble.

mpv git actually changes behavior to load language suffixes with exact.

Is there any reason for this not to be enabled by default? It would have saved me some trouble.

Well, it might load unrelated random files, for once...?

Well, it might load unrelated random files, for once...?

I have files called Pan's Labyrinth [2006] 720p BRRip XviD AC3 - CODY.avi and Pan's Labyrinth [2006] 720p BRRip XviD AC3 - CODY.Eng.srt. I find it hard to imagine how that subtitle file could have been loaded when trying to watch a different movie. Even if the the fuzzy matching is really really fuzzy, videos with subtitle files tend to live in their own separate directories, at least in every video stash I've ever seen. And even if mpv did occasionally load unrelated subtitle files I could just skip past them with 'j' the same way I skip past all the subtitle tracks for languages I can't read. But instead I had to go googling to fix a problem when I wanted to be watching a movie.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

532910 picture 532910  路  3Comments

WoLpH picture WoLpH  路  3Comments

thebunnyrules picture thebunnyrules  路  3Comments

szg0000 picture szg0000  路  3Comments

olivergondza picture olivergondza  路  3Comments