Subtitles no longer autoloaded
So, the 2017-02-12 changelog says: "sub: remove .txt as text subtitle extension", which leaves me with no subtitles support. Is there a way to readd .txt as subtitle extension? I couldn't find anything in the documentation.
Why do your subtitles have a .txt extension?
That's the default where I come from. Almost all subtitles produced in the last ~20 years are in .txt.
And where is that?
Poland.
Could you upload a sample? I've never seen a .txt subtitle before.
.txt is used as a container for various formats. Some examples:
-
time-based (rarely used anymore)
00:01:54:Pomóż mi! Nie!00:01:57:Akcja rozgrywa się między 09:00,|a 10:00 wieczorem00:02:00:w dniu prawyborów prezydenckich|w stanie Kalifornia. -
frame based (old)
[2453][2482]Poprosiłem fotografa.
[2484][2526]Najstarsze zdjęcia 506. Pułku.
[2528][2554]PochodzÄ… z Toccoa.
- frame based (currently in wide use):
{5390}{5414}Czas na nas.{5414}{5486}- Co z Sheldonem?|- Nie idzie.{5488}{5543}Co powiemy Siebertowi?{5543}{5735}Powiedzcie, że dr Cooper woli|zedrzeć maskę natury
That's horrible. Why would they choose an extension that's used everywhere to indicate a simple text file as something to be interpreted as subtitles?
Well, it's a text :) and I'm not sure what other choices were available ~20 years ago when the subtitles scene started. In any case, it has worked quite well all those years.
I can't think of a way to fix this completely. We either revert to accepting .txt again and screw people with .txt on the video's directory or use an heuristic and only allow .txt if prefixed by 'pl' or 'pol'?
What do you use to get these subtitles, subliminal?
Maybe rename subs.txt to subs.pol and make mpv ttreat that .pol file as text subs?
No idea if it can work out or not, just couldn't help showing myself off. Sorry...
Just wondering: how is .txt a problem? I have many videos with .txt that's not subtitles and never had any problems, the file is just not loaded (txt "[file] Stream opened successfully", followed by "Can not open external file file.txt").
I've never used subliminal. For a very long time there have been large polish-only sites that dealt with subtitles and although recently they started switching to .srt, the vast majority is .txt.
Renaming is not really an option, since people's collections often are on DVDs.
Would it be a big problem to add supported extensions in the config file?
@fhlfibh same effort as ffmpeg-converting the text subs to srt before playing.
Do you mind uploading a sample file with the .txt subs? Maybe try https://www.subtitle-converter.com/
Though I think the idea of choosing the files extensions mpv should load would be better, have a default set for obvious ones .srt .ass .idx .sub etc... and let people add whichever extensions they want to load?
I reverted mpv to previous version when I find out that it don't support *.txt subtitles. I propose two workarounds which are not mutually exclusive:
Workaround: Usually filename of .txt subtitles is the same as video file, so you could accept and auto-load *.txt subtitles if video and subtitles name are the same, for example: some video.mp4 some video.txt subtitles auto-loaded, and if filename mismatches .txt subtitles will be not loaded.
Additional workaround: You could add small button in lower right corner of window and shortcut key to open directory browse window for user, so that he could choose another file with subtitles.
Workaround: Usually filename of .txt subtitles is the same as video file, so you could accept and auto-load *.txt subtitles if video and subtitles name are the same, for example: some video.mp4 some video.txt subtitles auto-loaded, and if filename mismatches .txt subtitles will be not loaded.
That's --sub-auto=exact/fuzzy behavior exactly, not a workaround.
You can just rename the .txt files to .sub or something else random.
Renaming is not an option as I mentioned previously. I guess it all boils down to a question whether there are other mpv users who lost subtitle support with this change and if there's enough of them for this update to be reverted...
Workaround: Usually filename of .txt subtitles is the same as video file, so you could accept and auto-load *.txt subtitles if video and subtitles name are the same, for example: some video.mp4 some video.txt subtitles auto-loaded, and if filename mismatches .txt subtitles will be not loaded.
That's --sub-auto=exact/fuzzy behavior exactly, not a workaround.
--sub-auto=exact/fuzzy/all is not working, subtitles are not loading. Maybe because .txt subtitles are not supported...
And if I would want to change all my *.txt subtitles, what extension/format should I choose to not have problems? What subtitle extensions/formats are most popular/trouble-less?
.sub, .srt, .vtt, etc. It just matters that it's an extension that'll get autoloaded. You don't even need to convert them.
Maybe it's time to abandon the DOS age and start recognizing files by contents rather than filename suffix?