Skip to content

Instantly share code, notes, and snippets.

@skoky
Forked from xurizaemon/youtube.sh
Created December 27, 2016 19:52
Show Gist options
  • Save skoky/8409d484a7de65a1c9d0604d16e89963 to your computer and use it in GitHub Desktop.
Save skoky/8409d484a7de65a1c9d0604d16e89963 to your computer and use it in GitHub Desktop.
Streaming to YouTube from Raspberry Pi via avconv with a Microsoft HD-3000 LifeCam.
#!/bin/bash
KEY=YOUR.KEYG-OESR-IGHT-HERE
URL=rtmp://a.rtmp.youtube.com/live2
while true ; do
avconv -ar 44100 -ac 2 -f s16le -i /dev/zero -f video4linux2 -s 640x360 -r 10 -i /dev/video0 -f flv "$URL/$KEY"
sleep 3
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment