YouTube Streaming from a Raspberry Pi

its dead easy to stream to you tube. You could use OBS (find out how here) or use this method, which runs on a raspberry pi with an attached camera , it uses a few lines of code typed into a raspberry pi terminal.

raspivid -o – -t 0 -vf -hf -fps 30 -b 600000 | ffmpeg -i pipe: -f alsa -ac 1 -i plughw:1,0 -vcodec copy -acodec aac -ab 128k -g 50 -strict experimental -f flv rtmp://a.rtmp.youtube.com/live2/XXXX-your youtube code here-XXXX

to get your streaming key ( the “XXXX-your youtube code here-XXXX” bit of the code) go to Youtube and join up. then click on the camera iscon the go live

You need to sign up for streaming 24 hours before you use it (handy to know if you’re running a workshop on streaming)

the streaming key is in your streaming settings

theres a few ducks to get in a row before you can start streaming

Set up your raspberry pi, follow the instructions here

Attach the camera to your raspberry pi. follow the instructions here

Choose the camera from the preferences, or by the raspi-config

or in a terminal window type, sudo raspi-config , and choose the legacy camera from the menu

The raspberry pi camera support is legacy ware, but still works, you might have to download ffmpeg to get it working. Type this into a terminal window to install it

sudo apt-get install ffmpeg

Check to see if your camera is working type in a terminal

vcgencmd get_camera