-
Notifications
You must be signed in to change notification settings - Fork 20
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
Toggle to allow youtube-dl to fully cache the entire video before playing with mpv #32
Comments
Suppporting this use case is difficult because the addon does not know the state of the video cache nor can control the process after the parameters have been passed to mpv (and then subsequently to youtube-dl). However, mpv uses youtube-dl just to retrieve video/audio/subtitle urls and then retrieves and caches the video file before playing it. Looking into the mpv player documentation, cache size and duration can be controlled. mpv will still start play, but when paused the cache is still filed up to the specified size or duration. It might be fixable using a script though. |
Does there need to be a cache? If it just launches the command like "youtube-dl videourl -o /tmp/filename && mpv --pause filename" then mpv wouldn't even start until the video was downloaded, avoiding needing to know about any cache. |
Well, if someone primarily wants to watch a video the cache should be sufficient. For downloading youtube videos there are other addons with more/better functionality for that task. However, you could always change the path to a shell and use a shell script if you actually need to download (and keep) the video file. This could introduce command injection issues and I'm not sure how well firefox's own nsIProcess protects against that. Implementing this functionality directly into the addon is probably doable, but i'd suggest to use youtube-dl's Someone would still have to implement that change and create a pr - provided that @antoniy accepts it |
For those who have a sometimes slow/unreliable internet connection, streaming is not a good choice. An option to allow youtube-dl to download/cache the entire video before opening it with mpv would be nice.
The text was updated successfully, but these errors were encountered: