I would like to find an application external to the internet browser that would play only youtube sound.
Preferably a very light one, CLI or GUI.
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
There is youtube-dl that lets you download youtube videos from the cli. There is also a new(ish) tool called mps-youtube, that I haven't personally used, but looks like it does exactly what you want.
Give it a try and let us know if it works
MPS is available in Ubuntu repos.
Launch the MPS console with
To search youtube in mps console:
After searching a term, and then selecting a number, the stream will play sound; there are play/pause, seek, volume options:
To see options:
More detailed options:
mpsyt help search
mpsyt help download
After searching and then selecting the number of the stream with a command that would show download options:
Playlists can also be searched in the PLS console with
or even simpler
In order to select only the audio stream and send it to a player (video players like SMPlayer, VLC, mpv, mplayer, Dragon Player, Totem, but also audio players like Audacious):
It is able search, list and play Youtube videos, and is meant to work with SMPlayer, but can be used separately. It has a setting to add/use different players and also an option to select only audio.
Go to settings
Then select and/or add players to be used, and edit their setting to play also audio (for video players) or only audio, for audio players like Audacious.
They can then be found when right-clicking a title and selecting 'Open audio'.
Can be found as deb and other formats here. It supports more than Youtube (Baidu, Video etc) and has a setting to play only audio:
It can create and save playlists.
It will start after a few seconds, some players after more than others. The fastest seems to be SMPlayer.
To use the 'no-video' arguments with the Firefox addons, the way to do it is like so for Flashgot:
and like so for OpenWith:
More on playing embedded videos in external players, in this superuser question.
Also, an idea is that using certain internet browsers (Seamonkey, Epiphany etc - but not Firefox and Chrome), an Youtube title could be dragged and dropped onto
mpv or a
mpv fron-tend to play Youtube videos.
For the present purpose those players should be started with a 'no video' argument.
(more here) can be adjusted to play only sound.
sudo add-apt-repository ppa:nilarimogard/webupd8 sudo apt-get update sudo apt-get install youtube-viewer
In spite of what is said at the link above, it works fine with mplayer.
Just like MPS from the other answer, it is meant to search, play and download youtube streams, only that by default it will play the video and not just the audio stream. It can use mplayer as external player.
The command for mplayer without video is
To start Youtube Viewer with this option:
youtube-viewer --video-player=mplayer -novideo
That can be added in a .desktop file with the lines:
[Desktop Entry] Name=Youtube Audio-only Exec=bash -c 'youtube-viewer --video-player=mplayer -novideo' Terminal=true Type=Application Icon=youtube-viewer
When started, just type the search and then the number of the track to play.
Closing the terminal will close the play.
d <number> will download that video, by default as webm. And, of course, Youtube-Viewer is meant for seeing the youtube video too. For that, just use
youtube-viewer --video-player=mplayer or
Headset app lets you play only the audio from YouTube. It has built in search functionality where you can search directly into YouTube. It also provides you an option to play songs from particular subreddit. But it opens a small window, which plays the lowest possible quality of video from YouTube.
The application is opensource and available as a .deb file for Ubuntu and also for other platforms like Windows and Mac OS.
Nightly Build on any snapd enabled Linux Distribution can be installed using:
Arch Linux (AUR):