Skip to content

rozari0/mpv-youtube-search

Repository files navigation

🎬 mpv YouTube Search

Search and play YouTube videos directly from mpv media player

mpv yt-dlp License


About

This Lua script for mpv media player enables you to search and play YouTube videos without leaving your player. It uses zenity/kdialog/mpinput for the user interface and youtube-dl/yt-dlp for video search and playback.

Based on mpv-zenity-open-files by alifarazz.

Features

  • Search YouTube directly from mpv
  • Multiple UI options: Zenity, Kdialog, or mpinput
  • Fast and lightweight
  • Simple keyboard shortcuts
  • Works on Linux, macOS, and Windows (mpinput version)

Requirements

Installation

Quick Install

wget -O ~/.config/mpv/scripts/youtube-search.lua https://github.com/rozari0/mpv-youtube-search/raw/master/youtube-search.lua

Alternative Versions

For Kdialog:

wget -O ~/.config/mpv/scripts/youtube-search.lua https://github.com/rozari0/mpv-youtube-search/raw/master/youtube-search-kdialog.lua

For mpinput:

wget -O ~/.config/mpv/scripts/youtube-search.lua https://github.com/rozari0/mpv-youtube-search/raw/master/youtube-search-mpinput.lua

Keybindings

Key Combination Action
CTRL+SHIFT+S Search YouTube videos

Customization

Click to expand customization options

Custom Keybindings

Edit the bottom of the youtube-search.lua file to change the default keybinding.

mp.add_key_binding("Ctrl+Shift+s", "youtube-search", youtube_search)

Custom Result Number

Modify the limit variable in youtube-search.lua to change the number of search results displayed.

local limit = 10  -- Change this value

Screenshots

Zenity Interface

Zenity

Kdialog Interface

Kdialog

mpinput Interface

MPInput

Important Notes

  • Windows Users: Only the mpinput version is designed to work on Windows
  • Recommended: Using with mpv-gallery-view for an enhanced browsing experience

Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments


Made with love for the mpv community

About

This lua script for mpv media player will use zenity and youtube-dl for search youtube video.

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages