MPS-Youtube - Play and Download Youtube Video on Linux Command Line

MPS-Youtube is a freeware, youtube player and downloader application which works right from your command line. You can use this tool on your Linux system  terminal to search, play, and download youtube videos and playlists. It is a tiny utility which works flawlessly on all flavors of Linux, Microsoft Windows and Mac operating systems. It is a lightweight and surprisingly a powerful tool. It's installation and usage process is pretty simple. It uses a well known terminal based aplication MPS to perform its search and play operations. In this article, we will discuss its prominent features, installation method and usage. Originally, it was considered a YouTube audio player only, but if we install Mplayer on our Linux system, we can use MPS-Youtube utility to not only play audios, but videos as well. It has received continuous improvements over the course of time. You can also browse alternative tools like streamlink and youtube-dl. Let's first review its feature list.

Prominent Features of MPS-Youtube

This tool has been around for a good while now so over the passage of time, it has evolved into a feature rich and pretty stable utility. Here are some of the noteworthy features of this application.

  1. It can easily search and play Youtube playlists.
  2. It can search and play both audio and videos from Youbute with a single keyboard strike.
  3.  MPS-Youtube can convert videos to mp3 and some other formats (please be advised that you need FFMPEG setup for this purpose).
  4. You can easily view video's comments.
  5. It lets you create and save local playlists.

Let's get started on how to install and use this utility on popular Linux operating system like Ubuntu, Debian, Linux Mint etc.

How to Install and Use MPS-Youtube

As already mentioned in the introductory paragraph, we are going to need Mplayer for playing videos, here are commands you need to run on your Ubuntu/Debian or Linux mint system to install MPS-Youtube and Mplayer respectively.

sudo apt-get install mps-youtube
sudo apt-get install mplayer

Alternatively, if you have the well known Python's pip utility running on your system, you can use pip to install this application too. The command to install MPS-Youtube via pip is below.

sudo pip3 install mps-youtube

You can also use docker container to test and run this utility, if you wish to use this utility via dockers, here is command to get this setup.

sudo docker run -v /dev/snd:/dev/snd -it --rm --privileged --name mpsyt rothgar/mpsyt

Congratulations, your command line youtube player and downloader has been installed successfully now. Let's demonstrate the usage of this tool with the help of some examples.

In order to use this utility, simply type following command and it will take you to video play and download environment.


Here is how it will take you to its console window, from here you can perform your all required operations.

mpysyoutube console

Before we start using this utility, let's perform some necessary configurations. By default, MPS-Youtube search for music only, if you want to disable this feature, run following command in mpsyt's console window.

set search_music false

Following screenshot will further help in understanding this point.

music false

Also an important tweak to make, by default MPS-Youtube plays the audio only, if we need to enable both audio and video of the files, run following command.

set show_video true

Alright, we are all set to proceed further, here you can search your desired content by specifying "/" character, followed by your search term, i.e to search for data regarding keyword "Linux", we typed "/Linux" and hit Enter. Here is sample output of this command.

MPS-Youtube Search

You can move back and forth between filtered results using "n" ( for next) and "p" ( for previous) hotkeys.

Once you have decided to play any video from the list, simply enter the reference number and it will start playing it for you. I.e. to play a video located at 5th number in the above search results, type "5" and hit Enter. There you go, our video is on the play now!

play video

If you want to download any particular video, simply type "d REFERENCE_NO" , where replace "REFERENCE_NO" with the actual serial number of video in the search results. I.e. to download video at location 5 in above mentioned search results, you need to type "d 5" in mpsyt's shell console.

You can learn more about all the ins and outs of this tool by using its built in help manuals, simply type "h" and it will display the following message:

  Enter help <topic> for specific help:

basic      : Basics
search     : Searching and Retrieving
edit       : Editing / Manipulating Results
download   : Downloading and Playback
dl-command : Downloading Using External Application
encode     : Encoding to MP3 and other formats
playlists  : Using Local Playlists
invoke     : Invocation Parameters
config     : Configuration Options
tips       : Advanced Tips
new        : New Features

You can view all available help and guides using above mentioned commands.


Hope you enjoyed this article. In this tutorial we have discussed important features, installation and working of MPS-Youtube tool. It is a cross platform, extremely lightweight tool which hardly consumes any amount of RAM or hard disk space. It is under continuous development and we hope to see many improvements in its upcoming releases. For people working on command line, it is a must-have utility.

Leave a Comment