I am increasingly convinced that when I say that the Linux terminal is a powerful tool and unfairly valued by all those outside the operating system, I say it with some reason. the terminal it has so many possibilities that you can even search for YouTube videos and play them through it.
Want to know how it’s done? Then don’t miss what we’re going to show below, which is nothing more and nothing less than the mps-youtube program, A terminal application that weighs little, simple and useful and allows us to play and download YouTube videos based on commands, and we will show you how to install and use it.
mps-youtube is already in the Ubuntu repositories, only it is not in the latest version. per install the latest version we will have to resort to PIP, so first we will have to open a terminal and type this:
sudo apt-get install python-pip
After we have installed it, we have to use it to get mps-youtube, As we just commented. To do this we must enter these commands in the terminal:
sudo pip install mps-youtube
As for the player we will use to watch the videos, we have two alternatives: MPlayer2 or MPV. To install MPlayer2 enter this command:
sudo apt-get install mplayer2
And to install the MPV player this other:
sudo apt-get install mpv
As for which player to use I leave it to your discretion, however mps-youtube works by default with MPV. This can be changed a posteriori, but we will explain this below.
Using and configuring mps-youtube
To begin with use the application we must write the following command:
Then we proceed to configure it. If instead of MPV we want to use MPlayer as the default player, within the interface that will open we write the following:
set player mplayer
By default mps-youtube only allows music search, however this can also be changed to watch videos of all kinds with the following command:
set search_music false
Finally, we only have left set video output:
set show_video true
With the order
set they can See all parameters available settings.
Doing a search is very simple. In the text input interface we place a point in front of what we want to look for, For example:
Watching a video is very easy: All you have to do is write the list number on the left and press Return, And to download a video all we have to do is use this command:
Where ITEM-NUMBER is the number left on the left of the name of the video we discussed earlier.
As you can see, this is a tool simple, easy to use and set up, Which will allow us to watch videos from the terminal and without having to open a browser. Leave us a comment with your experience if you dare to try it.