I wanted to live stream video to youtube using a Raspberry Pi
Engineering Notes
Update Raspberry PI OS
sudo apt-get update –allow-releaseinfo-change
sudo apt-get upgrade
Install a Raspberry Pi Camera
Test to be sure camera is setup correctly
vcgencmd get_camera
EXPECTED OUTPUT – supported=1 detected=1
If detected = 0, reseat ALL of the connection on the Pi camera
Including:
Main Board Ribbon connector
Camera Ribbon connector
Camera Module on the Camera Board
A loose cable is the #1 cause of detected=0
Turn off the webcam service
sudo service webcamd stop I
Start a live session on your youtube account
Stream from the Raspberry Pi
raspivid -o – -t 0 -fps 25 -g 50 -n -a 12 -b 5000000 | ffmpeg -re -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -f h264 -thread_queue_size 256 -i – -vcodec copy -acodec aac -ab 128k -strict experimental -f flv rtmp://a.rtmp.youtube.com/live2/youtube-code