-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
Do not preload subtitles in video.JS #38
Comments
@rgaudin This sounds like an enhancement for video.js?! Or can we do something about that? |
Maybe we could be smarter and offer the ability to select some subtitles to include instead of this enormous list which is not very usable anyway. |
This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions. |
@rgaudin I think that we should actually have some way to select subtitles. Maybe we introduce another argument which would take in a list of language codes. I've also opened a similar issue on ted and I think we should harmonize this behaviour on scrapers dealing with videos. |
Agrees. |
This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions. |
I can say that doing performance check on video loading on Android has shown that this pb can significantly slow down video playback (more than one second). To me it sounds like a pretty serious fix to implement. |
Do you have a sample ZIM/recipe to consider for the tests? |
No, but Mohit knows as he was the tester. It might be @rgaudin videi test zim. |
There seems to be a clear architecture problem around this at video.js level. Solution does not scale properly/without serious perf impact. This is really unrelated to ZIM storage i'm really in favour of attempting to implement a fix at video.js level. Most obvious idea would be to load subtitle file only when needed/chose. First thing first: opening issue upstream (at video js repo). |
If the issue is really that we pass too many subtitles, then I don't agree about opening a video.js issue ; video.js is simply presenting the subtitles we configure. Even if there was no perf issue, presenting 10s of subtitles languages in a dropdown is never going to be a good idea from a UX perspective. So I'm glad there is a perf issue in video.JS because it will force us to revisit the UI/UX. I think this problem should be handled in the scraper with proper UI to select which subtitles the user is interested in, and JS code to configure video.JS with only these subtitles. It was probably difficult to anticipate and even more difficult to code when only plain JS was used. Now that we have a powerful framework like Vue.JS almost in place and a real problem, it seems pretty straigthforward to implement. At least a proposition in this direction has been made in #278 |
@benoit74 OK, but considering your proposal runs at runtime, it will end up like an issue for video.js probably. |
I don't get why it would end up like an issue for video.js, sorry, could you elaborate? if the problem is that we pass too many subtitles like it has been suggested so far in this issue, and if we adapt the UI to never pass too many subtitles, then there is no more video.js issue to handle. |
Problem to the issue that subtitles are too slow to load when there are many seems pretty straightforward: tell video.js to not preload tracks with a Whole code used to test this:
I suggest that we never preload subtitles in Youtube scraper, I do not see any benefit of doing this. |
@benoit74 Great, should be implemented and released quickly. Same for TED. Proper testing on all readers is mandatory here. |
Adding the following line from tech.js in the video.js library, to the videojs-ogvjs.js plugin in this.preloadTextTracks = options.preloadTextTracks !== false; |
This is even better then, thank you! |
When building ZIM with
--all-subtitles
, all videos gets more than a hundred subtitles. Subtitles are loaded asynchronously on page load but the video and controls only starts/become active when all of them have been called which can takes seconds.The text was updated successfully, but these errors were encountered: