Broadcasting to YouTube Live via RTMP using VLC from terminal

devprashant picture devprashant · Nov 4, 2016 · Viewed 18.3k times · Source

When running:

cvlc -vvv 'Bootstrap Tutorial.mp4' --sout '#rtp{dst=rtmp://a.rtmp.youtube.com/live2,name=pa1p-8c4m-zzvp-5j6t,mux=ts}'

I get this debugging log.

When additionally specifying the access method:

cvlc -vvv 'Bootstrap Tutorial.mp4' --sout '#std{access=rtmp,dst=rtmp://a.rtmp.youtube.com/live2/pa1p-8c4m-zzvp-5j6t,mux=ts}'

I get this debugging log.

How do I stream live video and audio to YouTube using VLC from terminal?

Resources I looked into:

  1. https://blog.vucica.net/2015/08/streaming-to-youtube-live-with-vlc-and-ffmpeg.html
  2. https://forum.videolan.org/viewtopic.php?f=14&t=130520&p=436913&hilit=rtmp+youtube#p436913
  3. Problems Starting VLC HTTP Stream with Servlet
  4. https://forum.videolan.org/viewtopic.php?f=4&t=112221&p=380232&hilit=rtmp+youtube#p380232

Answer

devprashant picture devprashant · Nov 7, 2016

i transmitted video to youtube live from terminal using vlc.

Following is the command:

cvlc  -vvv FILE016.MP4 --sout '#transcode{vcodec=h264,scale=Auto,width=1280,height=720,acodec=mp3,ab=128,channels=2,samplerate=44100}:std{access=rtmp,mux=ffmpeg{mux=flv},dst=rtmp://a.rtmp.youtube.com/live2/stream-name}'

Note , youtube sometimes shows a message to use h264 as transcoder and ab to 128 when i tried to transcode video to flv on a low speed internet connection.