In the next article we are going to take a look at mps-youtube. This is a free application that gives us the possibility of download YouTube videos and watch them using the terminal of our Ubuntu. This program is one of the many that we can use, but it has a very comfortable navigation, which in my view makes it stand out from other programs that do the same thing. This article is an update of another post that a colleague wrote some time ago about this same program.
The application that this article occupies, has the same purpose as youtube-dl, but that adds extra functionalities such as video playback, advanced search, playlist creation and some other more.
This project is based on mps, a terminal-based program for searching, playing, and downloading music. The program uses YouTube as a source of content. It will allow us to download video or if we prefer only the audio.
General characteristics of mps-youtube
This is a tool multi platform (Gnu / Linux, Windows and MacOS), it is open source and is developed in Python.
The program will allow us to use functionalities to search for tracks from an album using its title. We will also be able to find and import YouTube playlists. We will be able to create and save local playlists.
A good option of this application is that it gives us the possibility of convert the track that interests us to mp3 and other formats (requires ffmpeg or avconv).
Another option to highlight is that it gives us the possibility of view video comments. The downside is that I have not seen a way to post comments.
It works with Python 3.x and it only requires the mplayer or mpv libraries to function properly.
The program's interface, despite being a terminal program, is clean and pleasant. This application is in continuous development. All users hope to see improvements in their next releases. Whoever needs it, will be able to see the source code and all the general characteristics of the program in more depth on its page of GitHub.
Install mps-youtube
To play the videos we will need a program like Mplayer. The following commands will help us to install the program on Ubuntu / Debian to install MPS-Youtube and Mplayer respectively. To do this we open a terminal (Ctrl + Alt + T) and write the following:
sudo apt install mps-youtube sudo apt install mplayer
On the other hand, if you have the well-known Python pip utility installed, you can use pip to install This application. First we would have to install some dependencies and then we can install mps-youtube. From a terminal (Ctrl + Alt + T) and we write.
We install the necessary dependencies
sudo pip3 install dbus-python pygobject
We install mps-youtube
sudo pip3 install mps-youtube
This is a pretty nice alternative to the many Youtube-related tools, with more features than the traditional ones.
Using and configuring mps-youtube
Using this program is simple. To start we will have to write the following command:
mpsyt
With this I know will launch the program interface. Next 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. As with almost everything, this can also be changed. For watch videos of all kinds We will need to configure it with the following command:
set search_music false
Finally, we only have to configure the video output:
set show_video true
With the set command you can see all the available configuration parameters.
Perform a search It is very simple. In the text input we place a period in front of what we want to search for, for example:
.nirvana
Watching a video is very easy. All you have to do is type the number that the list that appears on the screen gives you and press Enter. For download the video Instead of reproducing it, we have to make use of the following command.
d ITEM-NUMBER
Where ITEM-NUMBER is the number to the left of the name of the video that we discussed earlier. Then it will give us the option to choose what type of file we want to download (mp3, mp4, etc).
As can be deduced from the article, it is a simple tool, easy to use and configure, which will allow us to watch videos from the terminal and without the need to open a browser. It is an extremely light tool that hardly consumes RAM or hard disk space. For those of us who work on the command line, it is a must-have utility.
YouTube-dl -_-
One question, do you skip the youtube post?
When I used it, I didn't see any advertising, but I can't assure you either. Try it yourself and leave us a comment about it. Salu2.
I get KeyError: 'dashmpd', why can it be?
Hello. Try installing "pip3 install youtube_dl", as I understand it can solve this kind of problem. If you solve it, leave a comment and I will add it to the article. Salu2.