tg-z / web-clip

26 stars 5 forks source link

Mps-youtube - A Commandline YouTube Player And Downloader #1052

Open tg-z opened 4 years ago

tg-z commented 4 years ago

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:

Mps-youtube – A Commandline Youtube Player And Downloader

Installing Mps-youtube

First, make sure you have installed the required dependencies:

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

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

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

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

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

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

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

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

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

Resource:

Thanks for stopping by!

Help us to help you:

Have a Good day!! https://www.ostechnix.com/mps-youtube-commandline-youtube-player-downloader/