mirror of
https://github.com/ksyasuda/mpv-youtube-queue.git
synced 2025-12-05 02:53:38 -08:00
ed3d280cdad512859f51bcefa4b23ef79bcc5fc2
Some checks failed
Luacheck / luacheck (push) Failing after 13s
- update strip command to remove newline characters - add history db function call to playback restart listener to catch first video
mpv-youtube-queue
A Lua script that replicates and extends the YouTube "Add to Queue" feature for mpv
Features
- Interactive Queue Management: A menu-driven interface for adding, removing, and rearranging videos in your queue
- yt-dlp Integration: Works with any link supported by yt-dlp and supports downloading a supported video in the queue
- Internal Playlist Integration: Seamlessly integrates with mpv's internal playlist for a unified playback experience
- Customizable Keybindings: Assign your preferred hotkeys to interact with the currently playing video and queue
Requirements
This script requires the following software to be installed on the system
- One of xclip, wl-clipboard, or any command-line utility that can paste from the system clipboard
- Windows users can utilize
Get-Clipboardfrom powershell by setting theclipboard_commandinmpv-youtube-queue.conffile to the following:clipboard_command=powershell -command Get-Clipboard
- Windows users can utilize
- yt-dlp
Installation
- Copy
mpv-youtube-queue.luascript to your~~/scriptsdirectory~/.config/mpv/scriptson Linux%APPDATA%\mpv\scriptson Windows
- Optionally copy
mpv-youtube-queue.confto the~~/script-optsdirectory~/.config/mpv/script-optson Linux%APPDATA%\mpv\script-optson Windows to customize the script configuration as described in the next section
Configuration
Default Keybindings
add_to_queue - ctrl+a: Add a video in the clipboard to the queuedownload_current_video - ctrl+d: Download the currently playing videodownload_selected_video - ctrl+D: Download the currently selected video in the queuemove_cursor_down - ctrl+j: Move the cursor down one row in the queuemove_cursor_up - ctrl+k- Move the cursor up one row in the queuemove_video - ctrl+m: Mark/move the selected video in the queueplay_next_in_queue - ctrl+n: Play the next video in the queueopen_video_in_browser - ctrl+o: Open the currently playing video in the browseropen_channel_in_browser - ctrl+O: Open the channel page for the currently playing video in the browserplay_previous_in_queue - ctrl+p: Play the previous video in the queueprint_current_video - ctrl+P: Print the name and channel of the currently playing video to the OSDprint_queue - ctrl+q: Print the contents of the queue to the OSDremove_from_queue - ctrl+x: Remove the currently selected video from the queueplay_selected_video - ctrl+ENTER: Play the currently selected video in the queue
Default Options
browser - firefox: The browser to use when opening a video or channel pageclipboard_command - xclip -o: The command to use to get the contents of the clipboardcursor_icon - ➤: The icon to use for the cursordisplay_limit - 10: The maximum amount of videos to show on the OSD at oncedownload_directory - ~/videos/YouTube: The directory to use when downloading a videodownload_quality 720p: The maximum download qualitydownloader - curl: The name of the program to use to download the videofont_name - JetBrains Mono: The name of the font to usefont_size - 12: Size of the fontmarked_icon - ⇅: The icon to use to mark a video as ready to be moved in the queuemenu_timeout - 5: The number of seconds until the menu times outshow_errors - yes: Show error messages on the OSDytdlp_file_format - mp4: The preferred file format for downloaded videosytdlp_output_template - %(uploader)s/%(title)s.%(ext)s: The yt-dlp output template string- Full path with the default
download_directoryis:~/videos/YouTube/<uploader>/<title>.<ext>
- Full path with the default
License
This project is licensed under the terms of the GPLv3 license.
Languages
Lua
100%
