Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Broadcasting to YouTube Live via RTMP using VLC from terminal

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
like image 978
devprashant Avatar asked Nov 04 '16 17:11

devprashant


People also ask

Can VLC stream RTMP?

VLC supports RTMP and rtmp:// URLs as of version 1.1, through the avio module via the libavformat library. In past versions, use of rtmpdump was required in conjunction with VLC, but that is no longer needed after VLC 1.1.

Can you stream from VLC to YouTube?

https://en.wikipedia.org/wiki/Real-Time_Messaging_Protocol#rtmpdump Because RTMP requires encryption to be viable for streaming securely, VLC may not support streaming to YouTube.

Can you live stream YouTube through an RTMP link?

You can stream to YouTube Live with RTMPS, a secure extension to the popular RTMP streaming video protocol. It is RTMP over a Transport Layer Security (TLS/SSL) connection and provides encryption.


1 Answers

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.

like image 161
devprashant Avatar answered Sep 20 '22 16:09

devprashant