All credit goes to Wolfgang Schlatter for his guide on Google+, which I've only modified slightly.
-
Install Raspbian and download the crosscompiled ffmpeg from Google Drive or Mega.
-
Transfer arm.tar.gz to your Raspberry Pi and untar with
tar -xvf arm.tar.gz
. -
Move to the new folder with
cd arm/bin
. -
Start the livestream with 720p quality:
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/XXyourIDhereXX
Replace XXyourIDhereXX with your stream name. It will be something like 4myg-24r8-7byg-2oe7
.
Adjust the bitrate (-b 4000000
) to whatever you like (YouTube wants 1500-4000kbit/s for 720p.)
You can disable the camera led with this:
sudo echo "disable_camera_led=1" >> /boot/config.txt
Then reboot.