A full-featured YouTube client for Emacs powered by ~yt-dlp~ and ~mpv~.
ytbel provides an interactive interface for searching, browsing, streaming, and downloading YouTube videos directly from Emacs without requiring Google accounts or API keys. It’s basically an interface to the excellent YouTube downloader yt-dlp which also offers search capabilities (recently discovered this feature!).
yt-dlp allows searching, fetching playlists, channels, video information, etc. All of this was utilized to provide most of the essential YouTube features including history and subscription without the need of an account or API.
I started working on this project because my browser started feeling heavier with modern web, and I wanted to reduce my browser usage and rely on custom tools to perform common tasks I use the browser for.
- Search & Browse: Search YouTube, browse channels, view playlists, and discover trending videos.
- Streaming with mpv: Stream videos with selectable quality (best, 1080p, 720p, 480p, 360p, worst) or stream audio-only.
- Asynchronous Downloads: Download videos or extract audio (mp3, opus, m4a, flac, wav) in the background.
- Subscriptions Feed: Local, privacy-respecting subscription management with an aggregated multi-channel feed (no account needed).
- Watch History & Bookmarks: Local tracking of watch history and bookmarking for favorite videos (no account needed).
- Detailed Video Info: View full video metadata including descriptions, upload dates, view/like counts, tags, and categories.
- Thumbnail Support: Asynchronous thumbnail fetching and rendering.
- Direct URL Handling: Open YouTube URLs (videos, shorts, playlists, and channels) directly inside Emacs.
- Emacs 28.1+
- yt-dlp (for search, metadata extraction, and downloads)
- mpv (for video and audio streaming)
curl(optional, for fetching thumbnails in GUI Emacs)
Install it using use-package with :vc from Codeberg:
(use-package ytbel
:ensure t
:vc (:url "https://codeberg.org/ebeem/ytbel"))Or clone this repository, add it to your load-path, and require it:
(add-to-list 'load-path "/path/to/ytbel")
(require 'ytbel)
;; Optional configuration:
(setq ytbel-default-quality "1080p"
ytbel-download-directory "~/Videos/ytbel/"
ytbel-audio-download-directory "~/Music/ytbel/"
ytbel-show-thumbnails t)
;; M-x ytbelM-x ytbel: Open the ytbel home dashboard.M-x ytbel-search: Prompt for a query and search YouTube.M-x ytbel-trending: View trending videos.M-x ytbel-subscriptions: Open your subscriptions feed.M-x ytbel-open-url: Open a YouTube video, playlist, or channel URL.
n: Next video entryp: Previous video entryRET: Open entry (video details, channel, or playlist)q: Quit current buffer / return to previous viewg: Refresh current view?: Show keybinding help popups: Stream video at default quality (ytbel-default-quality)S: Stream video with interactive quality selection (best, 1080p, 720p, etc.)a: Stream audio only (great for those who listen to music from youtube)d: Download video (prompts for destination directory and quality)D: Download audio only (prompts for directory and format: mp3, opus, m4a, flac, wav)L: Open download log and progress buffer (*ytbel-downloads*)/: Search YouTubet: View trending videosc: Open channel of the selected videoi: Show video details, description, and metadataF: View subscriptions feed (recent uploads from subscribed channels)H: View watch historyB: View bookmarksU: Subscribe to the channel of the selected videoX: Unsubscribe from the channel of the selected videob: Toggle bookmark on the selected videoy: Copy video URL to the kill ringo: Open video in default web browser