Showing posts with label mps-youtube. Show all posts
Showing posts with label mps-youtube. Show all posts
Sunday, October 25, 2015
YouTube Command Line Player And Downloader `mps-youtube` 0.2.0 Released With Support For Downloading YouTube Playlists, More
mps-youtube is a command line tool that can be used to search, play and download YouTube videos, which supports both local and YouTube playlists.
By default, mps-youtube is basically a YouTube audio player (and downloader), but you can enable external video playback (via mpv or MPlayer) from its options:
Features:
- 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 from YouTube, with support for DASH (so it can mux separate audio and video streams - that means it can download 1080p YouTube videos since all 1080p YouTube videos use DASH);
- view video comments;
- works under Linux, Windows and Mac OSX;
- many other small but useful features.
The latest mps-youtube 0.2.0, released today, adds quite a few new features and improvements, such as:
- auto detect terminal size;
- transcode audio to mp3 and other formats (requires ffmpeg or avconv);
- added "da" (download best available audio file) and "dv" (download best available video file) commands to playlist search results;
- added options to download YouTube playlists (use "dapl" for audio and "dvpl" for video) by url or id;
- the progress indicator now works with mpv;
- added option to show system notifications (on Ubuntu, install "libnotify-bin" and enable notifications using "set notifier notify-send");
- Added overwrite true/false option for downloads (skips download if downloaded file already exists);
- added copy to clipboard feature (requires "xclip" from the repositories and "xerox" which you can install via python-pip);
- remux audio downloads for better file compatibility.
Getting started with mps-youtube
To start mps-youtube, use the following command:
mpsyt
Before using mps-youtube, let's configure it.
mps-youtube uses mplayer as the default media player but you can change this to mpv by using the following command:
set player mpv
By default, mps-youtube searches for music only. If you want to disable this, use the following command:
set search_music false
Also, mps-youtube plays just the audio by default so if you wish to enable playing videos (using the player set above), run the command below (once again, after running "mpsyt"):
set show_video true
You can view all the available configuration options by using the command below:
set
Searching for music / videos using mps-youtube is as easy as adding "." or "/" in front of the search terms (without the quotes). For instance, to search for Led Zeppelin, you can use:
.led zeppelin
or:/led zeppelin
You can navigate to the next / previous page of results by using "n" (next) and "p" (previous).
To play an item, enter its number. You can also play multiple items, for instance, use "1-5" to play items 1 to 5 or "1, 2, 6" to play the first, second and sixth item and so on.
To download an item, use:
d ITEM-NUMBER
For example, to download the 3rd search result, use "d 3" - this displays all the available audio and video formats and lets you choose which to download. You can also download the best audio (use "da ITEM-NUMBER") or best video (use "dv ITEM-NUMBER"). This works for both searches and playlists.
This is just to get you started so for more information on using mps-youtube, type "h" and then "help TOPIC" (where topic is "basic", "search" and so on) as explained in mps-youtube:
Install mps-youtube
Arch Linux users can install the latest mps-youtube via AUR
mps-youtube is available in Ubuntu 14.10 and 15.04 repositories as well as Debian Sid and Jessie however, that's an older version so if you want to install the latest version in Ubuntu, Debian, Linux Mint and so on, you can use PIP:
1. Install Python PIP:
sudo apt-get install python3-pip
2. Install mps-youtube using Python PIP:
sudo pip3 install mps-youtube
3. You'll also need either mpv or mplayer if you want to play audio or video via mps-youtube.
mpv is available in the official Ubuntu 14.04, 14.10 and 15.04 repositories as well as in Debian Jessie and Sid so to install it, use the following command:
sudo apt-get install mpv
Of course, you can also use mplayer, which is available in the official repositories for any Ubuntu / Debian version - install it using the following command:
sudo apt-get install mplayer
If you had mps-youtube installed and you want to upgrade it (or you want to upgrade it later on, when a new version is released), use the following command:
sudo pip3 install mps-youtube --upgrade
For Windows and Mac OS X installation instructions, bug reports and so on, see the mps-youtube GitHub page.
Labels:
audio,
cli,
linux,
mps-youtube,
music player,
Ubuntu,
video,
youtube
Saturday, October 17, 2015
Command Line YouTube Player `mps-youtube` Sees New Release(s)
mps-youtube was updated to version 0.2.2 (and shortly after to 0.2.3) recently, bringing some interesting new features, like an option to use an external application for downloading YouTube videos, metadata tagging of downloaded audio files and more.
mps-youtube is a a command line tool to search, play and download YouTube videos, which supports both local and YouTube playlists.
By default, mps-youtube is basically a YouTube audio player, but it can also serve as a YouTube video player (and downloader), by enabling external video playback (officially, it supports mpv and mplayer for video playback) from its options.
What makes mps-youtube special is the easy to use command line interface, the integrated YouTube search and the ability to download and play only the audio stream, great for those with limited data plans. Here's a list of the most important mps-youtube features:
- 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 from YouTube, including option to download full YouTube playlists, with support for DASH (so it can mux separate audio and video streams - that means it can download 1080p YouTube videos since all 1080p YouTube videos use DASH) - requires avconv or ffmpeg;
- transcode audio to mp3 and other formats (requires ffmpeg or avconv);
- system notifications;
- view video comments;
- works under Linux, Windows and Mac OSX;
- many other small but useful features.
Now back to mps-youtube 0.2.2 (and 0.2.3, which was released shortly after 0.2.2). Probably the most important new feature is the addition of an option which allows setting an external application for downloading YouTube audio/video. This means you can use something like aria2, which supports multiple connections.
To set mps-youtube to use aria2, firstly make sure aria2 is installed:
sudo apt-get install aria2
And then use the following command in mps-youtube to set the external download command to aria2:set download_command aria2c --dir=%d --out=%f %u
For instance, to set the download_command to aria2 and use 4 connections, use:set download_command aria2c -s4 -x4 --dir=%d --out=%f %u
For more info about this, type "help dl-command" in mps-youtube. It's important to mention that using an external download command does not support (at least for now) transcoding the downloaded file to another format directly from mps-youtube.
Other changes in mps-youtube 0.2.2 and 0.2.3:
- implemented skip to previous track. Use > and < keys for next and previous track, q for quit (was ctrl-c). mpv / mplayer input.conf can be imported to use custom keymappings;
- implemented metadata tagging of downloaded audio files (requires ffmpeg or avconv). This feature is not complete and currently, it uses the YouTube video title as metadata;
- the stream quality is now displayed in the status line;
- fixed progress bar for mpv 0.7;
- fixed YouTube comments overshoot window size;
- fixed issue with audio remux when using d download command;
- fixed issue with "set" command.
Install mps-youtube
Arch Linux users can install the latest mps-youtube via AUR.
mps-youtube is available in Ubuntu 14.10 and 15.04 repositories as well as Debian Sid and Jessie however, that's an older version so if you want to install the latest version in Ubuntu, Debian, Linux Mint and so on, you can use PIP:
1. Install Python PIP (requires Python 3):
sudo apt-get install python3-pip
2. Install mps-youtube using Python PIP:
sudo pip3 install mps-youtube
3. You'll also need either mpv or mplayer(2) if you want to play audio or video via mps-youtube.
mpv is available in the official Ubuntu 14.04, 14.10 and 15.04 repositories as well as in Debian Jessie and Sid so to install it, use the following command:
sudo apt-get install mpv
The mpv version in Ubuntu is pretty old so if you want to install a newer version, you can use Doug McMahon's mpv PPA.
Of course, you can also use mplayer2, which is available in the official repositories for any Ubuntu / Debian version - install it using the following command:
Of course, you can also use mplayer2, which is available in the official repositories for any Ubuntu / Debian version - install it using the following command:
sudo apt-get install mplayer2
If you had mps-youtube installed and you want to upgrade it (or you want to upgrade it later on, when a new version is released), use the following command:
sudo pip3 install mps-youtube --upgrade
For Windows and Mac OS X installation instructions, bug reports and so on, see the mps-youtube GitHub page.
Configuring and using mps-youtube
To start mps-youtube, use the following command:
mpsyt
Before using mps-youtube, you'll need to configure it, in case you won't like the defaults.
mps-youtube 0.2.3 uses mpv as the default media player but you can change this to mplayer2 by using the following command:
set player mplayer
(that's not a typo, the mplayer 2 executable is "mplayer").By default, mps-youtube searches for music only. If you want to disable this, use the following command:
set search_music false
Also, mps-youtube plays only the audio by default so if you wish to enable playing videos (using the player set above), run the command below (once again, after running "mpsyt"):
set show_video true
You can view all the available configuration options by using the command below:
set
Searching for music / videos using mps-youtube is as easy as adding "." or "/" in front of the search terms (without the quotes). For instance, to search for Volbeat, you can use:
.volbeat
or:/volbeat
You can navigate to the next / previous page of results by using "n" (next) and "p" (previous).
To play an item, enter its number. You can also play multiple items, for instance, use "1-5" to play items 1 to 5 or "1, 2, 6" to play the first, second and sixth item and so on.
To download an item, use:
d ITEM-NUMBER
For example, to download the 3rd search result, use "d 3" - this displays all the available audio and video formats and lets you choose which to download (see screenshot above). You can also download the best audio (use "da ITEM-NUMBER") or best video (use "dv ITEM-NUMBER"). This works for both searches and playlists.
This is just to get you started so for more information on using mps-youtube, type "h" and then "help TOPIC" (where topic is "basic", "search" and so on) as explained in mps-youtube:
Wednesday, October 14, 2015
mps-youtube Migrates To YouTube API v3, Gets Ubuntu Sound Menu Support
mps-youtube 0.2.4 was released today and with this version, the app was migrated to YouTube API v3. This is an important change because the old v2 API was shut down recently so previous mps-youtube versions no longer work.
Another important change in this release is the addition of MPRIS v2 support, which means that mps-youtube can now make use of Ubuntu's Sound Menu, GNOME Shell Media Player Indicator extension and so on.
Another important change in this release is the addition of MPRIS v2 support, which means that mps-youtube can now make use of Ubuntu's Sound Menu, GNOME Shell Media Player Indicator extension and so on.
mps-youtube is a command line YouTube audio player which supports both local and YouTube playlists (with built-in YouTube search).
By default, the app plays only the audio (it only downloads the audio stream, great for those with limited data plans) however, you can enable video playback from its options and in this case, mpv or mplayer is used to play the videos (other players might work, but only mpv and mplayer are officially supported).
Other mps-youtube features include downloading YouTube audio/video (including 1080p videos) - either single videos or complete YouTube playlists, transcode audio to mp3 and other formats (requires ffmpeg or avconv), optional system notifications as well as many other small but useful features.
mps-youtube 0.2.4
The latest mps-youtube 0.2.4 brings support for Data API v3, an important change because the old v2 API was shut down recently so previous mps-youtube versions no longer work.
Another important change in mps-youtube 0.2.4 is the addition of MPRIS v2 support. This allows integrating mps-youtube with the Ubuntu Sound Menu, GNOME Shell Mediaplayer Indicator extension and others.
To get this to work with the Ubuntu Sound Menu (used by default in Ubuntu w/ Unity and Xubuntu), you need to install a desktop file for mps-youtube. To speed things up, I created a desktop file for you and to install it, along with an YouTube icon, simply use the following commands (or download it from HERE and install it manually):
sudo apt-get install wget
cd /tmp
wget https://github.com/hotice/failsdownloads/raw/master/mps-youtube.tar.gz
tar -xvf mps-youtube.tar.gz
sudo cp /tmp/mps-youtube/youtube.png /usr/share/pixmaps/
sudo desktop-file-install /tmp/mps-youtube/mps-youtube.desktop
Then, start playing a song/video in mps-youtube and it should show up in the Ubuntu Sound Menu:
For GNOME Shell Mediaplayer Indicator extension, mps-youtube doesn't need a desktop file and it should work without any tweaks:
Besides these changes, mps-youtube 0.2.4 includes bug fixes:
- Fix issue with rate-limiting in "album" command
- Fix display issue with small terminal width
For how to install and configure mps-youtube, see THIS article.
Tuesday, October 6, 2015
Command Line YouTube Player `mps-youtube` Gets YouTube Playlists Support, More
mps-youtube, a command line tool to search, play and download YouTube videos with local playlists support, has received quite a few changes since our previous article about it. The most important new feature is YouTube playlist support: you can now search and play YouTube playlists.
![]() |
Searching YouTube playlists in the latest mps-youtube |
Unfortunately, mps-youtube doesn't yet support downloading complete YouTube playlists, but hopefully this will be added in a future release.
Here are the most important changes in mps-youtube since our previous article (current version: 0.1.38)
Here are the most important changes in mps-youtube since our previous article (current version: 0.1.38)
- added prompt to mux audio on m4v download;
- faster opening of audio streams;
- added "pls <query>" command to search for YouTube playlists;
- added "pl <playlist url>" command to open YouTube playlist url;
- added "dlurl <YouTube url>" command for directly downloading a YouTube video;
- added "playurl <YouTube url>" command for directly playing a YouTube video;
- added "url <YouTube url>" command for retrieving a specific YouTube video;
- added "i<number>" for YouTube playlist information display;
- added stream url preloading for first item of opened YouTube playlists
- same playlist file is now shared between Python2.7+ and Python3+ (was separate);
- list user uploads using "user <username>";
- other changes and many bug fixes.
![]() |
YouTube playlist loaded in mps-youtube |
Install mps-youtube
Debian update: mps-youtube is now available in Debian unstable thanks to Zlatan Todoric: mps-youtube so install it using:
sudo apt-get install mps-youtube
For Ubuntu, see below.
1. mps-youtube can be installed using pip. To Install pip in Ubuntu, use the following command:
sudo apt-get install python3-pip
2. Then install mps-youtube using pip:
sudo pip3 install mps-youtube
3. You'll also need mplayer, which you can install using the following command:
sudo apt-get install mplayer
To upgrade mps-youtube, use this command:
sudo pip3 install mps-youtube --upgrade
Arch Linux users can install mps-youtube via AUR.
If you want to use this with MPV, you can install it in Ubuntu (Saucy and Trusty) by using THIS PPA.
mpsyt is also available for Windows and Mac OS X. See its GitHub page for installation instructions.
Usage
Start mps-youtube by typing the following command in a terminal:
mpsyt
To search for a video on YouTube, prefix your search with either "." or "/". Or, search for an YouTube playlist by using the command below:
pls <query>
You can see all the available commands by typing "h" in the mpsyt shell.
More on using pms-youtube in our previous article.
For bug reports, feature requests, etc., see the mps-youtube GitHub page.
For bug reports, feature requests, etc., see the mps-youtube GitHub page.
Labels:
cli,
linux,
mps-youtube,
music player,
Ubuntu,
windows,
youtube
New Command Line YouTube Player And Downloader With Local Playlists Support: mps-youtube
youtube-dl is probably the most popular command line YouTube (and not only) downloader for Linux but there's a new tool that tries to do things a bit differently.
mps-youtube is a new tool which, besides being able to download YouTube videos (either the whole video or just the audio), can also search and play YouTube videos and create local playlists, all from the command line.
By default, this is basically a YouTube audio player (and downloader), but you can enable (external) video playback from its options.
By default, this is basically a YouTube audio player (and downloader), but you can enable (external) video playback from its options.
The tool uses mplayer for streaming but it can also use mpv, a relatively new mplayer fork.
Update: the tool was initially called "pms-youtube" but that was quite an unfortunate name :) so the tool was renamed to mps-youtube.
Installation
Debian update: mps-youtube is now available in Debian unstable thanks to Zlatan Todoric: mps-youtube so install it using:
sudo apt-get install mps-youtube
For Ubuntu, see below.
1. mps-youtube can be installed using pip. To Install pip (Python3 version) in Ubuntu, use the following command:
sudo apt-get install python3-pip
2. Then install mps-youtube using pip:
sudo pip3 install mps-youtube
3. You'll also need mplayer, which you can install using the following command:
sudo apt-get install mplayer
Later on, if you want to upgrade mps-youtube, use this command:
sudo pip3 install mps-youtube --upgrade
Arch Linux users can install mps-youtube via AUR.
If you want to use this with MPV, you can install it in Ubuntu (Saucy and Trusty) by using THIS PPA.
mpsyt is also available for Windows and Mac OS X. See its GitHub page for installation instructions.
Usage
To run mps-youtube, use the following command:
mpsyt
To search for a video on YouTube, prefix your search with either "." or "/".
Example: to search for "pantera", use:
.pantera
Then, to play an item from the search results, enter its number. You can also use combinations, for instance use "1,2,3" to play items 1, 2 and 3, or "1-5" to play items 1 to 5. You can also use "shuffle" or "repeat" along with the track numbers, for example "shuffle 1-4".
To download an item, use:
d ITEM-NUMBER
for example, to download the 3rd search result, use "d 3".By default, mps-youtube will only play (and download) the audio. To view (and optionally to download) the video instead, use this command:
set show_video true
By default, the tool uses mpv if found and if it's not installed, it uses mplayer. If you want to switch to mplayer, use this commands:
set player mplayer
To switch to mpv, use these commands:
set player mpv
You can find out all the available commands by simply entering "h":
Note: More documentation is available
at https://github.com/np1/mps-youtube
Searching
You can enter a search term to search whenever the program is
expecting text input. Searches must be prefixed with either
a . or / character.
When a list of items is displayed, you can use the following
commands:
Downloading
d 3 to download item 3
Selecting Items
all to play all
1 2 3 to play items 1 2 and 3
2-4 6 7-3 to play items 2 3 4 6 7 6 5 4 3
3-6 9-12 shuffle to play selected items in random order
3-6 9-12 repeat to play selected items continuously
Manipulating Items
rm 1 3 to remove items 1 and 3. Also use rm 1 2 5-7 to
remove a range
rm all to remove all items
sw 1 3 to swap the position of items 1 and 3
mv 1 3 to move items 1 to position 3
Playlist commands
add 1 2 5-7 to add items 1 2 5 6 and 7 to the current playlist.
add 1 2 3 <playlist_name> to add items 1,2,3 to a saved
playlist. A new playlist will be created if the given name
doesn't already exist.
vp to view the current playlist (then use rm, mv and sw to
modify it)
ls to list your saved playlists
open <playlist_name or ID> to open a saved playlist as
the current playlist
view <playlist name or ID> to view a playlist (leaves
current playlist intact)
play <playlist name or ID> to play a saved playlist
directly
save or save <playlist_name> to save the currently
displayed items as a stored playlist on disk
mv <old_name or ID> <new_name> to rename a playlist
rmp <playlist_name or ID> to delete a playlist from disk
q to quit
Labels:
cli,
linux,
macosx,
mps-youtube,
music player,
Ubuntu,
windows,
youtube
Subscribe to:
Posts (Atom)