Skip to content

Instantly share code, notes, and snippets.

@vijayantkatyal
Created May 6, 2017 09:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save vijayantkatyal/d945b6a2f98906901f2a17fbdd2fb369 to your computer and use it in GitHub Desktop.
Save vijayantkatyal/d945b6a2f98906901f2a17fbdd2fb369 to your computer and use it in GitHub Desktop.
Live Video Stream to Facebook
# stream video
ffmpeg -re -i live.mp4 -c:v libx264 -preset veryfast -maxrate 3000k \
-bufsize 6000k -pix_fmt yuv420p -g 50 -c:a aac -b:a 160k -ac 2 \
-ar 44100 -f flv "rtmp://rtmp-api.facebook.com:80/rtmp/"
# stream desktop
ffmpeg -video_size 1366x768 -framerate 25 -f x11grab -i :0.0 -ar 44100 -f alsa -ac 2 -i hw:0 -preset ultrafast output.mp4 -f flv "rtmp://rtmp-api.facebook.com:80/rtmp/"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment