Last active
May 31, 2017 08:55
-
-
Save duvrai/f38590d2b14cc6d4ef2a53797df68d97 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Automatically restarting server from stackoverflow.com/a/697064 | |
until /usr/local/bin/ffmpeg -loglevel warning \ | |
-use_wallclock_as_timestamps 1 -ss 0.2 -input_format h264 -framerate 25 -video_size 1920x1080 -thread_queue_size 512 -i /dev/video0 \ | |
-f alsa -thread_queue_size 5120 -i hw:1 \ | |
-f mpegts -c:v copy -c:a aac udp://239.3.4.5:50000 | |
do | |
echo `basename "$0"` "server crashed with exit code $?. Respawning.." >&2 | |
sleep 1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment