Skip to content

Instantly share code, notes, and snippets.

@kabakaev
Created March 9, 2016 19:19
Show Gist options
  • Select an option

  • Save kabakaev/c1bb002919c50f0e97d5 to your computer and use it in GitHub Desktop.

Select an option

Save kabakaev/c1bb002919c50f0e97d5 to your computer and use it in GitHub Desktop.
#!/bin/bash -x
echo this command will stream from macbook pro FaceTime webcam to youtube
echo you may wish to run \"brew install ffmpeg\" to get it working
youtube_streaming_key=$1
[ -Z "$youtube_streaming_key" ] && youtube_streaming_key='xxxx-xxxx-xxxx-xxxx'
youtube_rtmp_url='rtmp://a.rtmp.youtube.com/live2'
ffmpeg -video_size 1280x720 -framerate 30 -f avfoundation -i "0:0" -vcodec libx264 -preset ultrafast -maxrate 1984k -bufsize 3968k -vf "format=yuv420p" -g 60 -acodec libvo_aacenc -b:a 128k -ar 44100 -f flv $youtube_rtmp_url/$youtube_streaming_key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment