Skip to content

Instantly share code, notes, and snippets.

@chrismckelt
Forked from caasi/vlc.sh
Last active January 13, 2017 12:54
Show Gist options
  • Save chrismckelt/7509a1e4b1c65914bffe37ca1320f6c6 to your computer and use it in GitHub Desktop.
Save chrismckelt/7509a1e4b1c65914bffe37ca1320f6c6 to your computer and use it in GitHub Desktop.
vlc 2.2.0 and YouTube Live
cvlc v4l2:///dev/video0:width=640:height=480 --sout '#transcode{vcodec=h2
64,vb=1000,acodec=aac,ab=64,channels=2}:std{access=rtmp,mux=ffmpeg{mux=flv},dst=rtmp://a.rtmp.youtube.com/live2
/wv92-uxa8-d6u0-8r4p}'
raspivid -o - -t 0 -vf -hf -fps 30 -b 6000000 | ffmpeg -re -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -f h264 -i - -vcodec copy -acodec aac -ab 128k -g 50 -strict experimental -f flv rtmp://a.rtmp.youtube.com/live2
/wv92-uxa8-d6u0-8r4p
@chrismckelt
Copy link
Author

raspivid -o - -t 0 -w 1280 -h 720 -fps 25 -b 4000000 -g 50 | ./ffmpeg -re -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -f h264 -i - -vcodec copy -acodec aac -ab 128k -g 50 -strict experimental -f flv rtmp://a.rtmp.youtube.com/live2/wv92-uxa8-d6u0-8r4p

@chrismckelt
Copy link
Author

chrismckelt commented Jan 13, 2017

raspivid stream

raspivid -o - -t 0 -n -w 600 -h 400 -fps 12 | cvlc -vvv stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8554/}' :demux=h264

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment