jgreco / mpv-youtube-quality Goto Github PK
View Code? Open in Web Editor NEWA userscript for MPV that allows you to change youtube video quality (ytdl-format) on the fly
A userscript for MPV that allows you to change youtube video quality (ytdl-format) on the fly
In case I want to use yt-dlp instead of youtube-dl, I can just replace line 164 with this?
path = "yt-dlp"
I changed and It seems to do the job..
Thanks.
I tried this with CR and YouTube and it seems to remain in the default quality set in ytdl-format.
Hi,
I want first to thank you for your work on this awesome script.
And want to ask
İf you could add this to youtube-quality.lua
ytdl-raw-options=cookies="cookies.txt"
Could you include yt-dl cookies option to the script?
Could you add also format code name?
İf it will help you
I did ask the same question to the author from this script. I did ask the author to include --cookies to the script.
I think including --cookies will also fix other issues here that are opened.
If videos have many different quality options, it may happen that not all quality choices are visible on screen. I'm not sure if/how it may be possible to deal with this.
The OSC button isn't displayed when OSC is configured to use a box layout. After commenting out that osc.conf entry to go back to default layout, the button is displayed properly.
I know it has something to do with the conf file but I'm not sure exactly what to change inside
If possible, add audio only stream selection.
When a YouTube video has multiple quality options, the lower qualities are often obscured at the end of the list, which makes it impossible to see them. The dvd-browser.lua uses scroll-list.lua to enable a "scrolling" effect. Implementation of this would be welcome. Alternatively, you can do what bookmarker-menu.lua does and parse available qualities across multiple "pages".
I tried this with youtube-viewer it shows
nilxnil (unkown_video/nil)
however with the play-with-mpv extension it works properly.
Crunchyroll and VRV both provide many hardsubbed video streams, this makes picking a different quality option difficult as you have no way to tell which stream is hardsubbed or not.
Hello, thank you so much for this amazing wonderful software !
Please i have request : add support to choose between all video quality of all sites supported by yt-dlp not only youtube, thank you :)
I copied youtube-quality.lua to C:\Users\MNT\Desktop\MPV\mpv\scripts but not working please help
Hello ,
is it possible to get the script remember the "last" set setting or the next one that would be equivalent?
i do have a 20Mbit ADSL and alot of vids nowadays come prefetched with 4k resolution and that would help with playback.
Thank you very much for your super helpful script!
When I play a video hosted on a Peertube site and press Ctrl + f
, I don't get the quality selection options like with Youtube, it would be great if I could add support for Peertube.
mpv https://video.hardlimit.com/videos/watch/972c1a2d-0f25-4348-b4ed-41950f5d23e7
[youtube_quality]
[youtube_quality] stack traceback:
[youtube_quality] /home/g4570n/.config/mpv/scripts/youtube-quality.lua:241: in function </home/g4570n/.config/mpv/scripts/youtube-quality.lua:241>
[youtube_quality] [C]: in function 'sort'
[youtube_quality] /home/g4570n/.config/mpv/scripts/youtube-quality.lua:241: in function 'download_formats'
[youtube_quality] /home/g4570n/.config/mpv/scripts/youtube-quality.lua:88: in function 'fn'
[youtube_quality] mp.defaults:202: in function 'fn'
[youtube_quality] mp.defaults:60: in function 'handler'
[youtube_quality] mp.defaults:339: in function 'handler'
[youtube_quality] mp.defaults:448: in function 'call_event_handlers'
[youtube_quality] mp.defaults:485: in function 'dispatch_events'
[youtube_quality] mp.defaults:441: in function <mp.defaults:440>
[youtube_quality] [C]: in ?
[youtube_quality] [C]: in ?
[youtube_quality] Lua error: /home/g4570n/.config/mpv/scripts/youtube-quality.lua:241: attempt to compare two nil values
Also is it possible to control the amount of youtube video loaded in background? I seems like it just keeps loading entire video. And not a portion just ahead of current point of frame or time.
I have another issue. The font size is so large some options aren't even in the screen. How do i change the size?
Thanks
Hi. Useful script. I have a few enhancement suggestions/requests.
In Playlist Manager the key binding can be set to show or toggle in input.conf. Its annoying to always wait for 10 seconds for the menu to go off.
In case the video is not supported by ytdl (say, a local file), accidentally bringing up the menu causes the script to crash and the message "fetching available formats" to permanently appear on the video.
It would be slightly better to deal with it more gracefully
(this is a minor issue)
So I was just watching the last video from Wintergatan with mpv using the subs script and it wasn't loading well so I looked for something exactly like this and then you had the marble machine as a screenshot... Coincidences don't exist :'D
Jokes aside, thank you for this, it's really useful!
Is it possible to add an icon in the OSD (next to fullscreen) to summon the menu ?
No need to remember a new hotkey with this.
I want to package this script for Nix/NixOS and I need to specify a license.
If you are unsure about which license to pick, https://choosealicense.com has good explanations for all the common ones.
Is there any way to limit the cache time?
Also I want to know where does it cache it and how does it deletes it after use??
PLEASE NOTE: This conflicts with other scripts that modify the OSC, such as TheAMM's excellent mpv_thumbnail_script. Merging this OSC modification with that script or others is certainly possible, but is left as an exercise for the user...
I do not know lua, I have no plans to learn it in the near feature, I just want a solution to this problem.
I updated my mpv package today and after that the script no longer functioned properly. The line mp.set_property_number("playlist-pos", playlist_pos)
does not seem to reload the video, which I assume it did before. I replaced the line with mp.commandv("playlist-play-index", playlist_pos)
and it's working again.
Too lazy to make a pull request, but putting this out there in case someone is looking for a fix for the same problem.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.