21

Is there a way to listen to YouTube videos without having the video playing?

I work on a computer, and I usually listen to music while working. In the last couple of years I find myself using YouTube as almost the only source of music. However, the type of music that I like (techno, trance, house, etc) poses a problem that anyone who has ever listened to such music mixes on YouTube will understand - the videos of these mixes are basically a slideshow of a really really (really) hot babes. And while I do appreciate the pictures, it's a problem having these pics appear on the screen in the office.

As much as I try not to have this page on the screen, sometimes I need to pause the video, change it, etc.

3

8 Answers 8

4

Try Chrome extension: Stylebot

You can install CSS styling from lots of other users who have submitted the styling or you can just make your own.

To remove video content. You just need to use selector tool to select video element and mark height = 0.

Good thing with this extension that you can use it to style any website to remove distractions. Whenever you want to remove styling you can reset it.

See screenshot:

enter image description here

1
  • The style that worked for me was video { height: 1px !important; }
    – Fluffy
    Mar 8, 2016 at 20:38
3

Here is a very simple userscript your can make:

var player = document.getElementById('player-api');
player.style.height = "35px";

I'll let you actually implement it.

Looks like this when done:

enter image description here

3
  • Thanks, this actually looks as the thing I need. However, can't really test it till I know what to do with it - I've never tried to write any script for greasemonkey or tampermonkey. Oh well, guess it's never to late to start...
    – kliteyn
    Feb 8, 2014 at 22:21
  • Just tested this with Greasemonkey and it works great! Thanks!
    – dmikester1
    Apr 24, 2017 at 14:08
  • Great tip, 40px to get the scrolling May 9, 2017 at 17:14
1

Use Stylish for Chrome, and add the following style for YouTube URLs:

.webgl canvas, #movie_player  {
    height: 50px;
}
1
1

If you are using HTML5 player and playlist then the [answer with a userscript] does not work1.
I would recommend a script like this

document.getElementsByClassName('html5-video-container')[0].style.visibility='hidden';

It hides the video, but leaves the video player field. It stills loads the video in the background, but it doesn't display it.

1
  • 1
    Please note that "above" really has no context in answers, since they can be sorted in multiple ways, not just chronologically. It would be better to link to the answer to reference it. (Use the "share" link under the answer.)
    – ale
    Apr 7, 2015 at 18:10
0

We recently added a play entrypoint to the youtube-dl-api-server . With this, after installing the webservice you can listen any youtube video by just opening urls like this:

http://example.com/play?format=m4a&url=youtube.com/watch?v=UYCilZ8yMmU

It works with any media player and you can even build playlists with these URLs!

If you want an easier client-side solution, just open the video URL in VLC, then from the "Video" menu select "Video Track->Disable".

0

First:
Youtube doesn't seem to want any audio-only listeners:

Google alluded to the fact that the terms of service do not allow separate playback of audio and video, or advertisements to be blocked

Source: https://thenextweb.com/insider/2015/07/21/how-youtube-killed-an-extension-with-300000-users/

Second:
All working solutions here only hide the video from the eye (which can be easily done by just switching to another tab or window) so the whole data for the video is still be downloaded and the video-part is wasted bandwidth.

So I would suggest this solution:

Do not use YouTube to "listen" to videos

There are lots of free alternatives to Youtube that only stream audio and additionally allow to listen to and organize your favorite music and also have a much better continuous music control flow than youtube (for example, you can continue to listen the current song while searching the next one)

here is a good overview of free streaming sites

This might not always be a solution, but I think this answer has to be added for a complete list of possibilities.

3
  • +1 Agreed the reason of this answer. Nonetheless some streaming sites listed are down and some call for YouTube videos. May 30, 2017 at 3:19
  • 1
    +1 for the link to the Youtube TOS. As for the rest - I know that there are good streaming sites (many are unavailable outside US), but I was asking about Youtube specifically.
    – kliteyn
    Jul 3, 2017 at 14:17
  • This is clearly not true as the Phone Application can do it with YouTube Red. Apr 18, 2018 at 19:56
0

There may be a method some day to do this in the browser. Right now, it's worth noting that with YouTube Red you can do this with the YouTube Music application using audio-only mode.

Use audio mode

With a YouTube Red membership, you can turn on audio mode to listen to music without loading the video. This allows you to continuously enjoy music from your favorite artists, even if you're experiencing low connectivity or video playback issues.

Until then you can either

1
  • For live streams could be something like cvlc --no-video $(youtube-dl --get-url https://www.youtube.com/watch?v=fEvM-OUbaKs) or with mpv
    – Pablo A
    Jun 15, 2022 at 21:31
0

invidio.us is a new platform, where you can watch and listen to youtube videos, even on a smartphone.

With the Firefox addon hooktube, you can automate a redirect for all youtube videos

Not the answer you're looking for? Browse other questions tagged or ask your own question.