Skip to content

Instantly share code, notes, and snippets.

@markvdb
Created November 15, 2016 19:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save markvdb/014aad82d6f343eeec93e1a95295746f to your computer and use it in GitHub Desktop.
Save markvdb/014aad82d6f343eeec93e1a95295746f to your computer and use it in GitHub Desktop.
#!/bin/sh
confdir="`dirname "$0"`/../"
. $confdir/default-config.sh
if [ -f $confdir/config.sh ]; then
. $confdir/config.sh
fi
ffmpeg -y -nostdin \
-i "udp://227.0.0.2:9000" \
-ac 2 \
-filter_complex "
[0:v] scale=$WIDTH:$HEIGHT,fps=$FRAMERATE [v] ;
[0:a] aresample=$AUDIORATE [a]
" \
-map "[v]" -map "[a]" \
-pix_fmt yuv420p \
-c:v rawvideo \
-c:a pcm_s16le \
-f matroska \
tcp://localhost:10000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment