aboutsummaryrefslogtreecommitdiff
path: root/example-scripts/ffmpeg/source-mjpg-framegrabber.sh
blob: e5797ad611e7b32f1b375ef0be6c1b4271e2fe91 (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. ffmpeg -y -nostdin -xerror \
  8. -use_wallclock_as_timestamps 1 -timeout 3000000 -f mjpeg -i "http://10.73.5.2:1881/stream.mjpg" \
  9. -filter_complex "
  10. [0:v] scale=$WIDTH:$HEIGHT,fps=$FRAMERATE [v] ;
  11. anullsrc=r=$AUDIORATE:cl=stereo [a]
  12. " \
  13. -map "[v]" -map "[a]" \
  14. -c:a pcm_s16le \
  15. -c:v rawvideo \
  16. -pix_fmt yuv420p \
  17. -f matroska \
  18. tcp://localhost:10002