Open GuilhermeFrainer opened 1 week ago
That's by design. External subs are always preferred. There are some other scattered issues around related to this (like #6071). Maybe this could be changed or made into an option but no one has ever tried.
--alang
is facing the same problem.
For some devs, external tracks may be preferred. They should think that if you don't want external ones, why leave them here.
But for some encoders/users, it's totally different. The more important/necessary tarcks will be embeded in videos. Others will move to the independent files.(Especially for audio tracks)
It's pretty trivial to just move the language matching check above the external file stuff. But there's probably scenarios where people want the external tracks to be selected first, and I was never sure what the right way to handle that was.
Here is the workaround for OP. https://github.com/CogentRedTester/mpv-sub-select
It's pretty trivial to just move the language matching check above the external file stuff. But there's probably scenarios where people want the external tracks to be selected first, and I was never sure what the right way to handle that was.
Probably just need an option... like everything.
Hmm, maybe something like --external-files-priority=<yes|no|auto>
. I'm not sure what the best behavior for auto would be. Maybe like: external tracks that are specifically selected but with no language -> language -> external track with language -> autoloaded tracks
?
I wondered if this option was necessary in https://github.com/mpv-player/mpv/pull/9059. If it is added for every track type it should replace --audio-display
's values.
Here is the workaround for OP. https://github.com/CogentRedTester/mpv-sub-select
I couldn't get it to work either unfortunately. Got the exact same issue. This is the sub-select.json
file I was using:
[
{
"alang": ["jp", "jpn"],
"slang": ["eng", "en", "enUS"],
"condition": "not sub.external"
}
]
I tried changing a few things around to no avail.
I couldn't get it to work either unfortunately.
You should report to the script creator, not here.
Maybe like:
external tracks that are specifically selected but with no language -> language -> external track with language -> autoloaded tracks
?
Not sure I understand what you mean exactly. I think the external track with language specification should be preferred over internal tracks, if both matches slang selection.
I was only suggesting putting external tracks with languages on the same "level" as the general language matching. But the external tracks would still be chosen before internal ones assuming there's no language-based selection. If we want to add the additional variable of preferring external vs internal tracks, we can but yeah it gets even more complicated.
mpv Information
Other Information
Reproduction Steps
mpv.conf
withsub-file-paths
slang
inmpv
so that the external subs' language is last on the priority list (in my case,slang=eng,en,enUS,jpn,jp
.slang
(choosing the external subs by default).Expected Behavior
In my case, I was expecting mpv to respect the priority list in
slang
and choose the (embedded) English subs by default.Actual Behavior
Mpv instead seemed to ignore the list in
slang
and set the (external) Japanese subs by default.Log File
output.txt
Sample Files
No response
I carefully read all instruction and confirm that I did the following:
--log-file=output.txt
.