explaingit

mps-youtube/yewtube

8,714PythonAudience · developerComplexity · 2/5Setup · moderate

TLDR

Terminal-based YouTube player and downloader: search, play audio or video, manage playlists, and download MP3s, all from the command line, no API key needed.

Mindmap

mindmap
  root((yewtube))
    What it does
      Search YouTube
      Play audio or video
      Download content
    Features
      No API key
      Playlist support
      Album matching
    Playback backends
      mpv
      VLC
      mplayer
    Platforms
      Windows
      Linux
      Mac
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Search YouTube and play music through mpv or VLC in the background while working in a terminal.

USE CASE 2

Download a YouTube album by name, automatically match tracks by title and duration, and save them as MP3 files.

USE CASE 3

Import a YouTube playlist, customize the columns shown (views, likes, date), and replay specific tracks by number.

Tech stack

PythonmpvVLCmplayerffmpeg

Getting it running

Difficulty · moderate Time to first run · 30min

Requires a separate media player (mplayer, mpv, or VLC) installed before first use, ffmpeg or avconv needed for MP3 conversion.

In plain English

Yewtube is a terminal-based YouTube player and downloader. It runs entirely inside a command-line window with no graphical interface, and it does not require a YouTube API key, which many similar tools do. You type a search query, browse the results as a numbered list, and play or download items by entering the corresponding number. Playback works through an external media player that you install separately. The README lists mplayer, mpv, and VLC as supported options. Audio can be played through VLC without opening any GUI window, which is useful for listening to music in the background while working in a terminal. Video playback is also supported for items that have it. Beyond basic search and play, the tool can search for an album by name and attempt to match each track based on title and duration, building a playlist from the results. It can search and import YouTube playlists, create and save playlists locally, download content in various formats and resolutions, convert audio to MP3 (if you have ffmpeg or avconv installed), and browse comments on a video. Search results are customizable: you can change what columns appear (view count, upload date, likes, category, and others) and sort by different criteria. Repeat playback of specific songs or ranges is supported using a simple number syntax. Yewtube is a fork of mps-youtube, which itself was based on an earlier music search tool. It works on Windows, Linux, and Mac. Installation is straightforward using pip or pipx, and the program starts with the command yt. Python 3 is required.

Copy-paste prompts

Prompt 1
How do I install yewtube with pipx and configure mpv as the playback backend so audio plays without opening a GUI window?
Prompt 2
Show me the yewtube commands to search for an album, match all tracks by duration, and save a local playlist.
Prompt 3
How do I download a YouTube video at a specific resolution and convert it to MP3 using yewtube with ffmpeg installed?
Prompt 4
What columns can I display in yewtube search results and how do I sort them by view count or upload date?
Open on GitHub → Explain another repo

← mps-youtube on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.