summaryrefslogtreecommitdiff
path: root/example-scripts/ffmpeg/source-background-loop.sh
blob: a88c39dd410c08c57d9e2f5459e8ed68afa2c844 (plain)
  1. #!/bin/sh
  2. confdir="`dirname "$0"`/../"
  3. . $confdir/default-config.sh
  4. if [ -f $confdir/config.sh ]; then
  5. . $confdir/config.sh
  6. fi
  7. wget -nc -O /tmp/bg.ts http://c3voc.mazdermind.de/testfiles/bg.ts
  8. while true; do cat /tmp/bg.ts || exit 1; done |\
  9. ffmpeg -y -nostdin -re -i - \
  10. -filter_complex "
  11. [0:v] scale=$WIDTH:$HEIGHT,fps=$FRAMERATE [v]
  12. " \
  13. -map "[v]" \
  14. -c:v rawvideo \
  15. -pix_fmt yuv420p \
  16. -f matroska \
  17. tcp://localhost:16000