I wanted to stream to Youtube using a Raspberry PI with a Pi Cam
A lot easier than you think……
Engineering notes:
Update Raspberry Pi with latest updates:
sudo apt update –allow-releaseinfo-change
sudo apt upgrade
In Youtube, Select Create -> Go Live -> Right Now -> Start -> Select Streaming Software -> Go
Select if made for kids or not
Edit -> Configure just like you would an uploaded video – Description, monetizing, public/Private/Unlisted, Add to playlist etc
copy stream key ->
copy stream url ->
kill webcam service on Raspberry Pi
sudo service webcamd stop I
Start the streaming on the Raspberry Pi
ssh raspberryPI_IP_Address
screen bash
raspivid -o – -t 0 -fps 25 -g 50 -rot 180 -n -a 12 -b 6000000 -vf | 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 streamurl/stream key
Make sure to add the ‘/’ between the url and key
verify your stream start on youtube, should be automatic
detach streaming session
Cntrl-A D
Check your detached sessions
screen -list
To Reattach a screen session:
screen -r [session name from screen -list]
To terminate a screen session:
reattach a screen session
Cntl-D
And its gone