Skip to content

Instantly share code, notes, and snippets.

@asperduti
Last active October 13, 2021 17:33
Show Gist options
  • Save asperduti/687951d27577978a25a724c9b6f31245 to your computer and use it in GitHub Desktop.
Save asperduti/687951d27577978a25a724c9b6f31245 to your computer and use it in GitHub Desktop.
Command-line to stream to Facebook live with FFmpeg. Specifications for Live on Facebook: https://www.facebook.com/business/help/162540111070395?id=1123223941353904
ffmpeg -re -y -i input_file.mp4 -c:a copy -ac 1 -ar 44100 -b:a 96k -vcodec libx264 -pix_fmt yuv420p -vf scale=1080:-1 -r 30 -g 60 -tune zerolatency -f flv -maxrate 2000k -preset veryfast "rtmps://live-api-s.facebook.com:443/rtmp/$KEY"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment