1
rated 0 times
[
1]
[
0]
/ answers: 1 / hits: 2587
/ 3 Years ago, sun, september 26, 2021, 12:21:54
I am using rtmpdump to restream live video on my local network on nginx rtmp server. like this:
sudo rtmpdump -r "rtmp://123.45.6.7/live/" -a "live/" -f "LNX 14,0,0,125" -W "http://123.45.6.7/jwplayer.flash.swf[1] " -p "http://123.45.6.7/[2] " --live -y "livestream2" | avconv -i pipe:0 -y
-v:v info -vcodec copy -acodec copy -f flv rtmp://localhost:1935/live/
it works great on its own with no problem but once in a while the original source might flicker and it will cause the running command to quit, and I have to manually run the command again. Is there a way to make a script which will automatically detect if rtmpdump quit and there is no zombie command running and rerun the command?
I want to automate this process for about 4 live streams. Is it possible?
More From » bash