-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Subtitles only sporadically work #634
Comments
As the subtitle handling is being done by InputStream.Adaptive, all the logging is done by it as well. Enable debug logging and you should see what is happening. |
Looks to be a Heisenbug - finally found some time to dig into this, and right at this moment all subtitles that I try also work. I'll continue to keep an eye on this. |
It seems that on my system I get subtitles for this video and not for that one. I'm running Kodi Nexus 20.3 on a Raspberry 4b, Debian 12/64bit (Bookworm). I updated the addon via zip file to the recently released 7.0.4.nexus.1. |
@martinSch81 - that is not related to the issue reported. Original issue is that the available subtitles do not appear to load for some unknown reason, not that there are no available subtitles. The two videos you linked to both have subtitles, however the first one has both an actual UK English subtitle stream uploaded along with the video, and also the ASR English subtitle that is automatically generated by Youtube, plus all the translated subtitles as well. The second video only has the ASR English subtitle, plus all the translated subtitles. If you have elected to not use the auto-generated subtitles, then the result is obvious - you won't have any available subtitles for the second video. If that is not the case, open a new issue and post a debug log so the problem can be looked into. @jmbreuer - is the issue you are seeing occuring on translated subtitles? It may be that the particular base language to translated language pair that is chosen may not actually exist (yet), even if it is identified as being available. |
Ah, stupid me. Thanks for pointing me in the right direction. I had in Subtitle language "English" selected and thought this will pick anything available in English since the next entry "English (no auto-generated)" sounded like the "higher quality only" subset. |
@martinSch81 - can't test at the moment, but based on your description and looking at the code, I think you are right, something is not working the way it is intended to. If you selected "English (no auto-generated)" it won't have shown any subtitles in your second video link, but if you selected "English" it should have made the auto-generated subtitles available. I think the reason it didn't is because of a typo
Should be
|
You are right. I changed that single line and updated the addon with that version. Now I get subtitles for both videos - the provided English subtitles for the first video and the auto-generated English subtitles for the second video. |
On a related note, I now have to open the menu while a video is playing and choose enable subtitles. I have to do this for each video. Before the new versions (with the updated .json files), I was able to use the subtitles hotkey to enable and the setting was remembered. |
I don't think there is anything specifically within this plugin that can effect this core Kodi functionality, but perhaps the use of InputStream.Adaptive means that Kodi doesn't know a video actually has subtitles enabled in time to enable them automatically when the stream starts. It's not related to this issue though, so open a new one and include a log. as I don't even know what settings you are using so can't even speculate as to what the issue may be. |
I re-tested with the YouTube Addon 7.0.5 and as much logging as I could turn on (I did not find additional debugging options for the InputStream stuff, but there seems to be enough in the logs). The upshot is, when selecting "Download subtitles before playback: Yes", subtitles work for me. But, there is no dynamic language selection during playback then, only ever one subtitle stream. When selecting "Download subtitles before playback: No", subtitles don't seem to work for me at all (since 7.0.4 and with all videos I've tested so far). Here's some logs:
Aah, "all available languages" is a separate setting that does not allow to choose whether to download before playback at all. (I must have set it away from that during my last round of testing, and only remembered the significance late in this round.) In my so far only test, it also worked, but it took one language switch for subtitles to show up, here's that log. I'll further keep an eye on things. |
Downloading the subs is only an option when a limited selection of languages is used, otherwise you will end up downloading 125 subtitles which will delay the loading and starting of the video playback. If you do download the subtitles, then InputStream.Adaptive cannot be used to load them, instead Kodi will look for the subtitle files and load them itself, and it won't show a lot of useful information about the subtitle to select the one you want, which is another reason why downloading is not offered as an option when all languages are enabled For some reason InputStream.Adaptive is not enabling the subtitle streams when they are loaded, which can be a problem on live streams with multiple periods, but that is not the case here. I can't reproduce the same behaviour. Maybe double check your InputStream.Adaptive settings and see whether you have enabled the loading of all stream types? I won't have time to look at this in detail just at the moment. Can you upload the logs directly to github so they don't get deleted? |
It seems that InputStream Adaptative has some kind of trouble enabling the Youtube subtitles with the hotkey. The hotkey activates/deactivates the flag, but the subtitles are not shown. If you open the subtitles menu and activate them manually, then the hotkey starts working (showing/hiding subtitles) for that video run. Until you open the video again from the start, then the hotkey fails again. If you deactivate InputStream Adaptative for the Youtube plugin, the subtitles hotkey always works as expected. So it seems the issue is not in the Youtube plugin. |
@malversoft - can you provide a debug log showing this, both the use of the hotkey and activating manually? |
I performed a sequence to demonstrate the behaviour I described in my previous message. This debug test was done with:
Youtube config:
InputStream Adaptive config:
Sequence:
From then on, the subtitles hotkey works for that video playback. You can stop and continue playback and the hotkey keeps working. Unless you stop and restart the same video from the beginning, then the hotkey fails again. If InputStream Adaptive is disabled in the Youtube plugin configuration, the subtitles hotkey always works as intended. I hope this helps to clarify the issue somehow. It affects activating subtitles not only with a keyboard, but also with a remote control. |
@malversoft - Thanks for that. It does seem to be the same issue as @jmbreuer has reported, just manifesting in a slightly different way. What InputStream.Adaptive is doing is the same - it is checking the subtitle stream, identifying that it is not already enabled, but not trying to enable and open the stream. It does so correctly when the subtitle is selected from the selection dialog. Will have to look a bit closer at what InputStream.Adaptive is doing here. |
(I'm still experiencing this - mostly no subtitles... now, on YT 7.0.9.2, InputStreamAdaptive 22.1.7.1, local build of kodi based on xbmc/xbmc@e79d0ce) @malversoft the observation that the subtitle menu and subtitle hotkey behave differently is golden. With the subtitle menu, I could always enable subtitles in the handful of videos I just tried (with the hotkey, none of them). After disabling subtitles with the hotkey (which always seems to work), re-enabling them with the hotkey only worked in some of the cases for me. Next time I have my full blown dev env with kodi open I'll try to remember to have a look at what the dialog toggle and the hotkey might be doing differently. |
Context
Expected Behavior
When selecting and enabling any of the (now many including auto-translations) subtitle streams in Kodi, the subtitles should show up.
Current Behavior
This only works very sporadically for me. Most of the time, the list of available subtitles is there alright, but enabling subtitles simply doesn't show any.
Unfortunately, it's random - not tied to specific videos or anything else I could correlate so far.
Also, I don't see any smoking guns in the log. It's like most of the time, the subtitle stream would simply be delivered 'empty'.
Steps to Reproduce
Please provide detailed steps for reproducing the issue.
Even that's not strictly necessary, I get the same behavior with "Prompt" and single-language subtitle modes
Log
The log is super noisy, but does not seem to contain any information about subtitle streams actually loaded / their URLs / HTTP response codes etc.
I'm happy to capture more with more appropriate debugging in place, for example.
Additional Information
I have a slight suspicion that the first video after starting Kodi / resuming from suspend / ... tends to work, whereas all afterwards don't (for all the times I really had an eye on this issue).
There seems to be no difference between 'normal', auto-generated, translated or auto-translated subtitles regarding this.
The text was updated successfully, but these errors were encountered: