Open muisje opened 3 days ago
See https://www.reddit.com/r/selfhosted/s/Z5wLmXq3qu for a semi-related discussion. The default behavior of stable-ts and pyav is dictating which audio track is picked, I haven’t done any additional work or thought what it might look like to sift through the streams and encode individual languages. I’m not even sure if it’s a problem worth solving.
I’ll think on it.
I believe bazarr is also a workaround for this as it tracks the languages of audio and subtitles.
I didn't have the issue in mentioned in the reddit comment, but i guess this would solve according to that theory. It now extracts one audio track if it has multiple in the pull request #144 . Bazarr didn't work well because it was using detect language which is not totally reliable and lacks control. I think my pull request solves the issue. I tested it with TRANSCRIBE_FOLDERS set. And the folder with a couple files of http://cdn.media.ccc.de/congress/2019/h264-hd/ which have videos with multiple and single audio tracks.
So let's say there's a video with audio in multiple languages. And i would only be interested in one language. In my case Spanish. So i would like subgen to choose the Spanish audio track if available. (If not just skip it).
What happens is that subgen takes the English audio track. And then doesn't generate any subtitles because i configured it to skip English.
output when it get's triggered by a jellyfin webhook:
Language 'eng' detected in movie.mkv and is in the skip list ['eng'], skipping subtitle generation
Which results in no subtitles even though there's a spanish audio track that would like to be transcribed.
With these settings i would imagine nothing would be skipped, because nothing will be English. But i guess forced detect language will not be used when checking the language with the sample.
My proposal is:
With these options the users of subgen i would think make sure they get the right subtitles transcribed.