- compile ffmpeg for arm https://github.com/fiorix/ffmpeg-arm
- create youtube 'live event'. get rtmp url + session id
- run this:
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/<SESSION>
you can tweak -b
and -fps
to your liking. the settings above work well for 1080p. by not specifying width or height we get the full 1920x1080 resolution from the raspi camera
note: it might work with libav-tools
instead of ffmpeg
(ffmpeg isnt on apt-get in raspbian) but I haven't tested it
example video created using above method: https://www.youtube.com/watch?v=Xn4yNavjdR4&t=28m0s
I was able to get ffmpeg set up using http://www.jeffreythompson.org/blog/2014/11/13/installing-ffmpeg-for-raspberry-pi/. It worked pretty well, and as he points out it goes a lot faster if you use make -j4 (to use 4 cpus). Now to figure out why YouTube doesn't seem to stream very smoothly. I have -b 100000 to reduce quality and it still buffers for a very long time. I can see I'm not using 100% of my upload bandwidth, so I'm not sure what's up.
Still, this is progress!! Thanks for the help with this. I'll keep plugging away at it to see if I can get the buffering to go away.
o2bnMaine