Skip to content

Instantly share code, notes, and snippets.

@derpeter
Created September 28, 2016 15:47
Show Gist options
  • Save derpeter/bb4f37367f2e32cf14911189631bb657 to your computer and use it in GitHub Desktop.
Save derpeter/bb4f37367f2e32cf14911189631bb657 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 - \
-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