Home Command line utilities Mps-youtube – A Commandline YouTube Player And Downloader

Mps-youtube – A Commandline YouTube Player And Downloader

By sk
Published: Last Updated on 4,763 Views

When it comes to download play YouTube videos, there are many CLI and GUI applications available, such as ClipGrabStreamlink, NewPipe and Youtube-dl etc. Today, we are going to learn yet another command line YouTube Player and downloader named Mps-youtube. It is a commandline program based on mps, which is also a command line program used to search, stream and download music. Using mps-youtube, we can easily search, play and download Youtube videos from commandline. It needs Mplayer or mpv to play videos. It is a free, open source program written using Python. It supports Linux, Mac OS X, and Windows.

Key features of mps-youtube

Concerning about the features of mps-youtube application, we can list the following:

  • Search and play audio/video from YouTube.
  • Search tracks of albums by album title.
  • Search and import YouTube playlists.
  • Create and save local playlists.
  • Download audio/video.
  • Convert to mp3 and other formats (requires ffmpeg or avconv).
  • View video comments.
  • Free and open source.

Mps-youtube - A Commandline Youtube Player And Downloader

Installing Mps-youtube

First, make sure you have installed the required dependencies:

  • mplayer: Alternative to mpv for playback
  • ffmpeg: for transcoding downloaded content

All of these packages are available in the official repositories of most Linux distribution.

Mps-youtube is available in the default repositories of some Linux distributions.

To install mps-youtube along with all required dependencies on Arch Linux and derivatives, run:

$ sudo pacman -S mps-youtube mplayer ffmpeg

On Debian, Ubuntu, linux Mint:

$ sudo apt-get install mps-youtube mplayer ffmpeg

Mps-youtube can also be installed using pip3, a python package manager. Make sure you have installed pip3. It is available in the default repositories as well. So, you can install it using your distribution's package manager.

For instance, pip3 can be installed using the following command in Debian, Ubuntu and other DEB based systems.

$ sudo apt-get install python3-pip

You can install mps-youtube using pip3 like below.

$ sudo pip3 install mps-youtube

Don't forget to install other required dependencies Mplayer and FFMpeg.

Configure Mps-youtube

Once installed, you can launch mps-youtube using command:

$ mpsyt

The above command will take you to the mps-youtube console window. Here is how mps-youtube console looks like.

mps-youtube console

mps-youtube console

Before going further, we need to do some necessary configurations.

By default mps-youtube will search for videos in the music category. To change this to all categories, enter the following command in mps-youtube console:

$ set search_music false

After the successful execution of the above command, you will see the following output:

Configure mps-youtube

Configure mps-youtube

Also, mps-youtube is set to play audio only by default. To view video output, enter the following command in the mps-youtube console:

$ set show_video true
Configure mps-youtube

Configure mps-youtube

Now, it is time to see how to use mps-youtube application to play your videos and/or download them.

Searching Youtube videos

To search for a video, use / or . followed by your search term. For instance, to search for the youtube video "see you again", type the following in mps-youtube console.

$ /see you again

After entering the above command, you will see the list of youtube videos based on your search term:

Searching videos with mps-youtube

Searching videos

As you see above, the results are displayed with serial number.

To go back and forth through search results, you can type "n" (for next video) or "p" (for previous video).

Playing videos

To play any video from the list just type its serial number and hit ENTER key. The video will play in the default player.

Playing videos with mps-youtube

Playing videos with mps-youtube

To adjust volume, use 9 and 0. Press Spacebar to pause the video. To seek, use left/right and up/down arrows. To exit the video, press q.

Viewing information about a video

To view the information of a specific video, say 1st video, type "i" followed by the serial number in the mps-youtube console window.

$ i 1
Viewing video details with mps-youtube

Viewing video details with mps-youtube

To go back, press ENTER key.

Viewing the comments of a video

To view the comments of a youtube video, type c followed by the specific video serial number.

$ c 1
Viewing video comments with mps-youtube

Viewing video comments with mps-youtube

Downloading videos

To download a video from the list, type d followed the serial number in the mps-youtube console.

$ d 1

This command will display the list of available formats. Choose any format to download by entering the respective number.

Download videos with mps-youtube

Download videos with mps-youtube

The downloaded files will stored in /home/user/Downloads/mps/ directory.

Show related videos

To view the similar videos type "r" followed by the video number.

$ r 1

Show videos by uploader

To show videos uploaded by uploader of a video, use "u" followed by number.

$ u 1

Copying URL to clipboard

To copy the URL of a video to clipboard, use "x" followed by the video number. Make sure you have installed python-pyperclip package.

$ x 1

Exit from Mps-youtube

To exit mps-youtube application, simply type in the console.

Viewing help

To view the help topics, just type "h".

mps-youtube help section

mps-youtube help section


Thanks for stopping by!

Help us to help you:

Have a Good day!!

You May Also Like


Slappy McPhee October 27, 2017 - 8:51 pm

This looks very promising! I am super excited to check it out for a retro project that I am working on.

Slappy McPhee October 27, 2017 - 9:02 pm

Running into an issue. Attempting to invoke playing a video from url and used the syntax described in the help menu: mpsyt playurl https://www.youtube.com/ however I receive error bad syntax………….

Einnerlink August 29, 2019 - 10:15 am

Are you sure Mps-youtube is available in the default repositories of some Linux distributions, for example Debian? I’ve searched it and it is not!


Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More