{"id":46527318,"url":"https://github.com/sanjay-np/nvim-yt-player","last_synced_at":"2026-04-02T20:55:14.130Z","repository":{"id":339244380,"uuid":"1157306282","full_name":"sanjay-np/nvim-yt-player","owner":"sanjay-np","description":"nvim-yt-player is a Neovim plugin for playing YouTube audio directly from Neovim using mpv + yt-dlp via IPC socket. Features include a premium ASCII visualizer UI, interactive search picker, queue editor, SponsorBlock integration, and full playback controls.","archived":false,"fork":false,"pushed_at":"2026-03-02T03:15:08.000Z","size":61,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-03-02T07:25:09.254Z","etag":null,"topics":["mpv","music","nvim-plugin","player","video-player","youtube","yt-dlp"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sanjay-np.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-13T17:06:59.000Z","updated_at":"2026-03-02T01:41:36.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/sanjay-np/nvim-yt-player","commit_stats":null,"previous_names":["sanjay-np/nvim-yt-control","sanjay-np/nvim-yt-player"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sanjay-np/nvim-yt-player","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanjay-np%2Fnvim-yt-player","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanjay-np%2Fnvim-yt-player/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanjay-np%2Fnvim-yt-player/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanjay-np%2Fnvim-yt-player/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sanjay-np","download_url":"https://codeload.github.com/sanjay-np/nvim-yt-player/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanjay-np%2Fnvim-yt-player/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31316008,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","music","nvim-plugin","player","video-player","youtube","yt-dlp"],"created_at":"2026-03-06T21:00:28.268Z","updated_at":"2026-04-02T20:55:14.109Z","avatar_url":"https://github.com/sanjay-np.png","language":"Lua","readme":"# 🎵 nvim-yt-player\n\nPlay YouTube audio directly from Neovim using **mpv** + **yt-dlp**. No browser, no Node.js — just pure Lua talking to mpv over a local IPC socket.\n\n## ✨ Features\n\n- **▶️ Seamless Playback**: Play any YouTube URL or search query instantly via a simple Neovim command.\n- **🏗️ Zero-Dependency Backend**: Runs entirely on pure Lua via a local UNIX socket. No browser extension, no Node.js requirement, no external bloated servers. Just `mpv` and `yt-dlp`.\n- **🎨 Premium ASCII Visualizer UI**: Implements a dedicated (`:YT ui`) animated player layout featuring a custom bounding-box grid, bouncy audio visualizer, interactive progress slidebar, and built-in queue alignment.\n- **🔍 Interactive Search Picker**: Search YouTube directly inside Neovim and preview video durations/channels in a native floating window buffer.\n- **📝 Interactive Queue Editor**: View and modify your active queue in real-time. Use `dd` to remove tracks or `J`/`K` to reorder them (`:YT queue_edit`).\n- **🎵 Endless Queuing \u0026 Playlists**: Instantly append streams or search results to your queue. You can even pass a full YouTube Playlist URL to rapidly ingest 100+ tracks (`:YT queue_playlist`).\n- **⏩ SponsorBlock Integration**: Natively caches and injects an mpv script to automatically skip sponsor and intro segments in YouTube videos (enable via config).\n- **🎛️ Total Control**: Full mappings to Play/Pause, Seek, Skip, Mute, Volume, and manipulate Playback Speed (0.25x – 3.0x).\n- **📊 Statusline Integration**: Formats progress bars smoothly for plugins like `lualine`\n- **🔔 Asynchronous Stability**: Stream fetching runs in the background. Neovim will never freeze or block while caching metadata or traversing tracks.\n\n## 📦 Requirements\n\n| Dependency | Install |\n|------------|---------|\n| [Neovim](https://neovim.io/) 0.9+ | — |\n| [mpv](https://mpv.io/) | `sudo apt install mpv` or `brew install mpv` |\n| [yt-dlp](https://github.com/yt-dlp/yt-dlp) | `pip install yt-dlp` or [binary release](https://github.com/yt-dlp/yt-dlp/releases) |\n\n## 🔧 Installation\n\n### lazy.nvim\n\n```lua\n{\n  \"sanjay-np/nvim-yt-player\",\n  config = function()\n    require(\"yt-player\").setup()\n  end,\n}\n```\n\n### packer.nvim\n\n```lua\nuse {\n  \"sanjay-np/nvim-yt-player\",\n  config = function()\n    require(\"yt-player\").setup()\n  end,\n}\n```\n\n## 🚀 Quick Start\n\n```vim\n:YT play https://www.youtube.com/watch?v=dQw4w9WgXcQ\n```\n\nOr search directly from Neovim (opens in a custom interactive floating window!):\n\n```vim\n:YT search lofi hip hop\n```\n\nIn the interactive search window:\n- `\u003cCR\u003e` (Enter): Play result (replaces current track)\n- `\u003cC-a\u003e` (Ctrl+A) or `a` / `A` (in Normal mode): Append result to the queue\n\n## 📋 Commands\n\nAll functionality is grouped under a single `:YT` command with auto-completion (press `Tab`!).\n\n| Command | Description |\n|---------|-------------|\n| `:YT play [url]` | Play URL / search, or resume |\n| `:YT search [query]` | 🔍 Search YouTube and pick a result |\n| `:YT queue \u003curl\u003e` | Append a single URL to the playlist |\n| `:YT queue_playlist \u003curl\u003e` | Fetch and append an entire playlist |\n| `:YT queue_edit` | Open interactive queue editor |\n| `:YT pause` | Pause |\n| `:YT toggle` | Toggle play/pause |\n| `:YT stop` | Stop playback |\n| `:YT next` / `:YT prev` | Next / previous track |\n| `:YT seek \u003csec\u003e` | Seek to absolute position |\n| `:YT seek_rel \u003c±sec\u003e` | Seek relative |\n| `:YT volume \u003c0-100\u003e` | Set volume |\n| `:YT vol_up` / `:YT vol_down` | Volume ±5 |\n| `:YT mute` | Toggle mute |\n| `:YT speed \u003crate\u003e` | Set speed (0.25–3.0) |\n| `:YT speed_up` / `:YT speed_down` | Speed ±0.25 |\n| `:YT shuffle` / `:YT repeat_toggle`| Shuffle / repeat |\n| `:YT ui` | Toggle the dedicated player side-panel |\n| `:YT info` | Toggle the floating player window |\n\n## 🎛️ Floating Player\n\n`:YTInfo` opens an interactive floating window:\n\n| Key | Action |\n|-----|--------|\n| `p` / `s` / `t` | Play / Pause / Toggle |\n| `n` / `b` | Next / Previous |\n| `m` | Mute |\n| `\u003e` / `\u003c` | Speed ±0.25 |\n| `+` / `-` | Volume ±5 |\n| `l` / `h` | Seek ±5s |\n| `L` / `H` | Seek ±30s |\n| `q` / `\u003cEsc\u003e` | Close |\n\n## ⚙️ Configuration\n\nAll options with defaults:\n\n```lua\nrequire(\"yt-player\").setup({\n  statusline = {\n    enabled = true,\n    format = \"{icon} {title} - {artist} [{position}/{duration}]\",\n    icon_playing = \"▶\",\n    icon_paused = \"⏸\",\n    truncate_title = 30,\n    progress_width = 10,\n  },\n\n  -- Search settings\n  search = {\n    limit = 10, -- number of results to fetch\n  },\n\n  notifications = {\n    enabled = true,\n    notify_on_track_change = true,\n    notify_on_command = false,\n  },\n\n  player = {\n    queue_display_limit = 5, -- Number of upcoming tracks to show in the `:YT ui` side-panel\n  },\n\n  keymaps = {\n    enabled = false,\n    prefix = \"\u003cleader\u003ey\",\n  },\n  \n  sponsorblock = false, -- Set to true to automatically skip embedded sponsor segments\n})\n```\n\n### Statusline Placeholders\n\n`{icon}` `{title}` `{artist}` `{album}` `{position}` `{duration}` `{volume}` `{progress}` `{speed}`\n\nExample output: `▶ Song Name ▓▓▓▓░░░░░░ [2:30/5:00] 1.5x`\n\n## 📊 Lualine Integration\n\n```lua\nrequire(\"lualine\").setup({\n  sections = {\n    lualine_x = { \"yt-player\" }\n  }\n})\n```\n\n## 🏗️ Architecture\n\n```\nNeovim (Lua) ←─ IPC pipe ─→ mpv ←── yt-dlp ←── YouTube\n```\n\nThe plugin spawns a headless `mpv --no-video` process and communicates through a UNIX domain socket using mpv's JSON IPC protocol. `yt-dlp` is used by mpv internally to resolve YouTube URLs into streamable media.\n\n## 🔧 Troubleshooting\n\n- **No audio**: Run `mpv --no-video \u003cyoutube-url\u003e` directly to verify mpv + yt-dlp work\n- **yt-dlp outdated**: Run `yt-dlp -U` to update\n- **Port conflict**: The IPC socket path is `/tmp/nvim-yt-player-ipc-\u003cpid\u003e`, unique per Neovim instance\n\n## 📄 License\n\nMIT\n","funding_links":[],"categories":["Media"],"sub_categories":["Cursorline"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanjay-np%2Fnvim-yt-player","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsanjay-np%2Fnvim-yt-player","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanjay-np%2Fnvim-yt-player/lists"}