I wanted an inexpensive way to livestream from my shop using a standalone device (rather than my phone or computer webcam) and since I had a Raspberry Pi 3 in the house, set up for RETROPIE gaming, I decided to get another SD card, Install NOOBS, and have a go at getting the Raspberry Pi Camera V2 up and running for use as a live YouTube streaming camera.
I first updated my Pi to the latest NOOBS Version 3.3.0
[ Ссылка ]
Then, after navigating to the YouTube Live Stream page and either setting up a New Stream OR Copy and Creating a previous stream, and getting your secret streaming key...
Paste the following code into terminal on your Pi -
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/[your-secret-key-here]
(The secret stream key is entered at the end of that code WITHOUT any brackets. Just the code pasted from YouTube.)
Ещё видео!