README.md
December 12, 2025 ยท View on GitHub
๐ฌ mpv YouTube Search
Search and play YouTube videos directly from mpv media player
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
- mpv media player
- yt-dlp or youtube-dl
- For GUI versions: Zenity or Kdialog
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

Kdialog Interface

mpinput Interface

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
- Based on mpv-zenity-open-files by alifarazz
- Powered by yt-dlp
Made with love for the mpv community