Skip to content

Instantly share code, notes, and snippets.

@Canx
Last active October 14, 2018 20:16
Show Gist options
  • Save Canx/16245df14c286370ec7958f7be6f6fc4 to your computer and use it in GitHub Desktop.
Save Canx/16245df14c286370ec7958f7be6f6fc4 to your computer and use it in GitHub Desktop.
ffmpeg screencast streaming
# Servidor multicast
ffmpeg -f x11grab -s 1920x1080 -framerate 10 -i :0.0 -c:v libx264 -tune zerolatency -x264-params keyint=5:min_keyint=2 -pix_fmt yuv420p -s 1280x800 -threads 0 -f mpegts udp://239.0.0.1:1234
# Cliente multicast
ffplay -probesize 32 -sync ext udp:239.0.0.1:1234
# Grabar archivo a la vez que hacemos multicast y grabar audio también!!!
now=$(date +"%m_%d_%Y")
ffmpeg -f x11grab -s 1920x1080 -framerate 10 -i :0.0 -f pulse -i default -acodec libmp3lame -tune zerolatency -c:v libx264 -x264-params keyint=5:min_keyint=2 -pix_fmt yuv420p -s 1280x800 -threads 0 -f tee -map 0:v -map 1:a "salida_${now}.mp4|[f=mpegts]udp://239.0.0.1:1234/"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment