How to stream video from a source site like YouTube without a GUI?

5

I need to set up a computer to put video on several screens at the same time. To save as many resources as I can from the original computer (which is getting old), I have two questions:

  • Is it necessary to use a GUI to stream video from a Linux machine?
  • And, if isn't, how do you automate video streaming without a GUI (in Linux)?

I think the screens are gonna be connected to a computer, and playing the stream via YouTube, but is there a way to avoid using a GUI for all of this?

user57129

Posted 2014-04-25T22:28:11.693

Reputation: 61

Do you mean the screens are all connected to a single machine running linux? vlc, mplayer and mpv can all play a youtube url directly from the command line. – Paul – 2014-04-25T22:45:06.473

Please [edit] and clarify your question. If the screens are physically attached to the computer, you don't need any kind of "streaming". How did youtube get into this, are you going to play local files or youtube videos? Is your question "How can I play youtube videos without a GUI"? – terdon – 2014-04-26T11:15:48.640

Answers

2

Install Streamlink:

sudo -H pip install streamlink

Send the stream to cvlc --fullscreen:

streamlink --player="cvlc --no-video" "https://www.youtube.com/freecodecamp/live" best

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

To save bandwidth you could use worst instead of best.

Pablo A

Posted 2014-04-25T22:28:11.693

Reputation: 369

Great tip here. +1 – JakeGould – 2019-03-10T05:16:30.683