{"id":13835416,"url":"https://github.com/cvzi/mpv-youtube-upnext","last_synced_at":"2025-04-07T13:10:25.533Z","repository":{"id":50370469,"uuid":"255289362","full_name":"cvzi/mpv-youtube-upnext","owner":"cvzi","description":"A userscript for MPV that allows you to play \"up next\"/recommended youtube videos ⏭️","archived":false,"fork":false,"pushed_at":"2025-03-11T19:11:39.000Z","size":3417,"stargazers_count":70,"open_issues_count":5,"forks_count":9,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-31T12:06:46.273Z","etag":null,"topics":["mpv","mpv-script","youtube","youtube-dl"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cvzi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-13T09:56:14.000Z","updated_at":"2025-03-30T17:09:18.000Z","dependencies_parsed_at":"2024-01-15T19:44:00.976Z","dependency_job_id":"faca77a0-bdff-417b-9261-3c385573946e","html_url":"https://github.com/cvzi/mpv-youtube-upnext","commit_stats":{"total_commits":106,"total_committers":10,"mean_commits":10.6,"dds":"0.33018867924528306","last_synced_commit":"3f9bc5e43fbbdaf824e10234cd7ed8e96542283f"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cvzi%2Fmpv-youtube-upnext","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cvzi%2Fmpv-youtube-upnext/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cvzi%2Fmpv-youtube-upnext/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cvzi%2Fmpv-youtube-upnext/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cvzi","download_url":"https://codeload.github.com/cvzi/mpv-youtube-upnext/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247657282,"owners_count":20974345,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mpv","mpv-script","youtube","youtube-dl"],"created_at":"2024-08-04T14:01:01.496Z","updated_at":"2025-04-07T13:10:25.513Z","avatar_url":"https://github.com/cvzi.png","language":"Lua","funding_links":[],"categories":["Streaming"],"sub_categories":[],"readme":"# youtube-upnext\nA userscript for MPV that allows you to load the up next/recommened youtube video on the fly, as though you were using the web player.\n\n![screenshot](screenshot_menu.png)\n\nToggle the menu with `ctrl+u` (configurable). Select from the list with the arrow keys (configurable), and press `Enter` (configurable) to select. Menu times out after 10 seconds (configurable).\n\nPress `Space` to append to the playlist. Close menu with `Escape` or `ctrl+u`.\n\n## Installation\n\nCopy youtube-upnext.lua into your scripts directory, e.g.:\n\n    cp youtube-upnext.lua ~/.config/mpv/scripts/\n\noptional, copy the config file:\n\n    cp youtube-upnext.conf ~/.config/mpv/script-opts/\n\n\nMake sure you have cURL or GNU Wget installed.\ncURL is included in Windows 10+, macOS, Android and many Linux distributions.\n\n### Windows:\n\nThe location of the scripts directory on Windows is `%APPDATA%\\mpv\\scripts` e.g. `C:\\Users\\cvzi\\AppData\\Roaming\\mpv\\scripts`\n\nYou are encouraged to install a newer version of cURL:\n* Official cURL releases https://curl.se/windows/\n* [Chocolatey package](https://community.chocolatey.org/packages/curl)\n* [Scoop package](https://github.com/ScoopInstaller/Main/blob/master/bucket/curl.json)\n* [Winget package](https://github.com/microsoft/winget-pkgs/tree/master/manifests/c/cURL/cURL)\n* [git for windows](https://git-scm.com/) includes a version of cURL\n\nIf you downloaded/installed the curl/wget executable, you have to [add the directory of the curl.exe/wget.exe to your machine's\n%PATH%](https://stackoverflow.com/a/41895179/10367381).\n\n### [uosc](https://github.com/tomasklaen/uosc) menu integration\n\nIf you want to add the upnext menu to **uosc**, you need to add one of the following line to your `input.conf`.\nIf you use the line starting with `#` it just creates an entry in the uosc menu.\nIf you use the second line, it also creates a keyboard shortcut to open the menu.\nReplace `u` with the key of your choice:\n\n```\n#           script-message-to youtube_upnext menu     #! Youtube Recommendations\nOR\nu           script-message-to youtube_upnext menu     #! Youtube Recommendations\n```\n\nIf you want it to appear in a submenu, replace `Youtube Recommendations` with e.g. `Utils \u003e Youtube Recommendations`\n\n\u003cins\u003eNote:\u003c/ins\u003e If you're using the default menu of uosc and you don't have the uosc menu defined in `input.conf`, you first need to create\na menu configuration. You can find an example at https://github.com/tomasklaen/uosc#examples\n\nIf you want an entry in the controls bar of uosc, you can add the following to the `controls=` entry in your `uosc.conf`:\n\n```\n\u003cstream\u003ecommand:queue_play_next:script-message-to youtube_upnext menu?Up Next\n```\n\n* Pick your desired title instead of `Up Next`\n* Pick another icon instead of `queue_play_next` from [Google Material Icons](https://fonts.google.com/icons?selected=Material+Icons)\n\n![screenshot of uosc](screenshot_uosc.webp)\n\n### mpv.net:\nThe script folder for mpv.net is:\n`%APPDATA%\\mpv.net\\scripts`\n\nThe .conf files belong into:\n`%APPDATA%\\mpv.net\\script-opts`\n\nThe keyboard shortcut in the script and the .conf-file doesn't work with mpv.net.\nYou need to set the keyboard shortcut yourself in your `input.conf`. Default location is `%APPDATA%\\mpv.net\\input.conf`.\nAdd the following line to the end of your `input.conf` (change the key if it's already used):\n\n```\n\n Ctrl+u     script-message-to   youtube_upnext   upnext-menu\n\n```\n\n### SVP\n\nInstallation is the same as for normal mpv. You need to install yt-dlp. On Windows you have to\n[add the directory of the yt-dlp.exe to your machine's %PATH%](https://stackoverflow.com/a/41895179/10367381)\nor put yt-dlp.exe into `%APPDATA%\\mpv\\` e.g. `C:\\Users\\cvzi\\AppData\\Roaming\\mpv\\yt-dlp.exe`.\n\nYou need to update yt-dlp occasionally when it stops working.\n\nUnfortunately SVP does not make the quality available to scripts. That means the quality settings that were\nselected in SVP are not preserved when the next video is loaded.\n\n### Old mpv versions\n\nIf you are using an old version of mpv before `v0.37.0`, you may have to use an [older version](https://github.com/cvzi/mpv-youtube-upnext/releases/tag/v1.0) of this script\nand set `use_json_lua` to `yes` in the configuration.\n\n## Credit\n- I pretty much copied the [mpv-youtube-quality](https://github.com/jgreco/mpv-youtube-quality) script and added wget\n\n## [youtube-quality](https://github.com/jgreco/mpv-youtube-quality)'s Credit\n- [reload.lua](https://github.com/4e6/mpv-reload/), for the function to reload a video while preserving the playlist.\n- [mpv-playlistmanager](https://github.com/jonniek/mpv-playlistmanager), from which I ripped off much of the menu formatting config.\n- ytdl_hook.lua, from which I ripped off much of the youtube-dl code to fetch the format list\n- somebody on /mpv/ for the idea\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcvzi%2Fmpv-youtube-upnext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcvzi%2Fmpv-youtube-upnext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcvzi%2Fmpv-youtube-upnext/lists"}