As mentioned in “Broadcast on Bambuser from an IP-cam” I had a stability problem when streaming from a D-Link DCS-923L IP-cam to Bambuser. It turned out that the camera is doing something funny with the motion jpeg every 30 minutes that makes the mjpeg decoder in avconv crash.
I have no idea what is happening but since no obvious fix was available I decided to work around the problem using a simple python script that simply restarts avconv when it crashes.
#!/usr/bin/env python3 import subprocess from datetime import datetime while True: print("Starting at", datetime.now()) subprocess.call(["avconv", "-an", "-f", "mjpeg", "-r", "5", "-i", "http://camera/MJPEG.CGI", "-f", "flv", "-same_quant", "rtmp://123456.fme.bambuser.com/b-fme/xxx...xxxx"])
This seems to do the trick but with the downside of generating loads of clips at Bambuser.