Skip to content

Instantly share code, notes, and snippets.

@tomasinouk
Created November 30, 2015 04:21
Show Gist options
  • Save tomasinouk/8415acb4e2f86d54fcb9 to your computer and use it in GitHub Desktop.
Save tomasinouk/8415acb4e2f86d54fcb9 to your computer and use it in GitHub Desktop.
ffmpeg examples for streaming full screen

ffmpeg -f avfoundation -i "1" -vcodec libx264 -r 10 -tune zerolatency -b:v 500k -bufsize 300k -f rtp rtp://localhost:1234

ffmpeg -f avfoundation -i "1" -vcodec libx264 -r 10 -tune zerolatency -b:v 500k -bufsize 300k -f rtp udp://127.0.0.1:1234

ffmpeg -f avfoundation -i "1" -vcodec libx264 -r 10 -tune zerolatency -b:v 500k -bufsize 300k -f mpegts udp://127.0.0.1:1234

ffmpeg -f avfoundation -i "1" -vcodec libx264 -r 10 -pix_fmt uyvy422 -tune zerolatency -b:v 500k -bufsize 300k -f mpegts udp://192.168.88.38:1234

ffmpeg -f avfoundation -i "1" -r 50 -vcodec mpeg2video -b:v 8000 -f mpegts udp://192.168.88.38:1234

ffmpeg -f x11grab -s 1600x900 -r 50 -vcodec libx264 -preset ultrafast -tune zerolatency -crf 18 -f mpegts udp://localhost:1234

Mac OSX

ffmpeg -f avfoundation -i "1" -r 10 -vcodec libx264 -preset ultrafast -tune zerolatency -crf 18 -b:v 500k -bufsize 300k -f mpegts udp://192.168.88.38:1234

ffmpeg -f avfoundation -i "1" -vcodec libx264 -r 10 -pix_fmt uyvy422 -tune zerolatency -b:v 500k -bufsize 300k -f mpegts udp://192.168.88.38:1234

Windows

ffmpeg -f dshow -i video="screen-capture-recorder" -r 10 -vcodec libx264 -preset ultrafast -tune zerolatency -crf 18 -b:v 500k -bufsize 300k -f mpegts udp://172.31.66.20:1234

-crf 18

-pix_fmt yuv420p -f mpegts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment