10

Is it possible to stream a particular YouTube video's content with VLC?

The scenario is that you could paste a YouTube URL into a VLC dialog, and then have VLC stream the video as if it were a local media file.

Current version - when trying to open a file or network stream results in

VLC can't recognize the input's format: The format of 'http://www.youtube.com/v/foo' cannot be detected. Have a look at the log for details.

Any existing features in VLC, or workarounds that you know of to accomplish this streaming idea?

1
  • did u try it? alot of sites can stream to vlc just haven't tried youtube
    – user33788
    May 22, 2010 at 0:08

6 Answers 6

3

Yes. If you grab the actual video stream file (using a youtube downloader site, or firefox add-in), and pasting the URL into VLC, it will stream/play the file.

I do this all the time from an OS that doesn't support Flash (easily), but does support VLC & Firefox.

1
  • 1
    Judging by your avatar is this OS.... FreeBSD? ;)
    – Earlz
    May 22, 2010 at 1:52
3

You can absolutely download and play YouTube videos with VLC.

  1. Copy your video ID from the youtube URL. In this case I am using: http://www.youtube.com/watch?v=BEiat9O74ms

  2. I will use the following URL to view your video: http://www.youtube.com/embed/BEiat9O74ms Where BEiat9074ms is the video ID of the video you want to watch.

  3. In VLC, under the Media menu, select "Open Network Stream" and paste the URL from step 2. into the network URL:

  4. Enjoy your YouTube video in VLC.

3
  • This works for me, very cool. Do you know if it's possible choose playback resolution? Or does it just default to the highest?
    – wysiwyg
    Aug 7, 2017 at 23:25
  • The same parameters for a normal video should apply according to the documentation. There is also another question which has been answered here: stackoverflow.com/questions/7582336/…
    – Stephan
    Aug 8, 2017 at 0:03
  • With some live streamings like this one of FreeCodeCamp return adaptive demux: Encountered discontinuity and then ts demux error: libdvbpsi error (PSI decoder): TS duplicate (received 0, expected 1) for PID 0.
    – Pablo A
    Mar 10, 2019 at 4:52
1

Why are you pasting a YouTube URL into VLC? You use your web browser to display web pages, which in turn loads an instance of Adobe Flash which then retrieves a different URL to the video.

I used a YouTube URL retrieval service to try and get the FLV, and I put it into VLC and it came up with an error.

You can investigate the log files and see if it is possible to investigate further. It may be that YouTube does some User-Agent filtering, and you will need to have VLC masquarade as a web browser/Adobe Flash to retrieve the stream.

3
  • 1
    The question is centered more around whether VLC might perform some of that URL bait and switch automatically on the user's behalf.
    – p.campbell
    May 22, 2010 at 6:04
  • 1
    I know it is, I'm pointing out that it doesn't. May 22, 2010 at 7:38
  • The REALLY important point is that it ONLY plays the URL entered, not the Google / YouTube bait and switch that results in embedded advertisements in the stream. Oct 24, 2021 at 8:53
1

You can do it , with version 1.1.0. Just put the URl in Network tab

1
  • Nope. In 1.1.12: The format of 'http://www.youtube.com/v/k_oTQd93eRI' cannot be detected. Have a look at the log for details. The log says Compressed SWF format not supported. Maybe codecs are missing?
    – l0b0
    Apr 16, 2012 at 19:10
0

Is similar to this answer. Install Streamlink:

sudo -H pip install streamlink

Then send the stream to vlc --fullscreen:

streamlink --player="vlc --fullscreen" "https://www.youtube.com/freecodecamp/live" best

Personally what I was needing was just the audio, cvlc --no-video.

To save bandwidth you could use worst instead of best.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .