mpv-player / mpv

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

Auto subtitles opening #3178

Closed susloparovdenis closed 8 years ago

susloparovdenis commented 8 years ago

mpv automatically loads only [filename].srt. It would be better to load also [filename].**.srt, for example [filename].en.srt

wiiaboo commented 8 years ago

--sub-auto=fuzzy or sub-auto=fuzzy in mpv.conf.

krompus commented 8 years ago

Oh nice! I was just looking into fixing this myself.

Is there a way to get mpv to recognise a subtitles directory? Example:

~/movies/BESTMOVIE.mp4
~/movies/Subtitles/BESTMOVIE.en.mp4

This would be really nice, as I prefer to keep subtitle files separate from video files.

This would also make it possible to, for example, have a directory full of random video files, and then just throw all of the subtitles into one big subdirectory. Currently, I keep movies with subtitles in their own subdirectory, which is at odds with the movies that don't have subtitle files.

Example of my current setup:

~/movies/AppleMovie/AppleMovie.mp4
~/movies/AppleMovie/AppleMovie.en.srt
~/movies/BananaMovie/BananaMovie.mp4
~/movies/BananaMovie/BananaMovie.en.srt
~/movies/AgaveMovie.mp4
~/movies/BlackberryMovie.mp4
~/movies/CanteloupeMovie.mp4
~/movies/DurianMovie.mp4
...

...which makes my OCD a little itchy... :)

wiiaboo commented 8 years ago

https://mpv.io/manual/master/#options-sub-paths

krompus commented 8 years ago

PERFECT!

Awesome, thanks!

maniak1349 commented 8 years ago

Since those options are to make user's life easier and reduce manual file renaming/moving around, maybe there should be an option to make mpv search in all subdirectories relative to video file up to level N? You can't guess every name of subtitle dirs, especially with multiple levels. For example It will be useful in these cases:

./movie.mkv
./subs/de/movie.ass
./subs/en/movie.ass

or

./movie.mkv
./subs/[sub_group_1]/movie.ass
./subs/sub_group_2/movie.ass

EDIT: It can be slow in some cases (subdirectories with lots of irrelevant files/subdirectories) so there probably should be some limit to that kind of search.