[FFmpeg-user] Fault-tolerant multicast UDP streaming

Axes-techsa stephen at axes-techsa.co.za
Wed Jan 14 06:39:35 CET 2015


I've had success looking at the issue in a different way 
Use fmpeg to save to disk as ffserver to setup a listening connection. So ffserver will serve what fmpeg is saving 
If your client connection goes down you fmpeg process is not affected as udp stream from fmpeg is not stopped 

Regards
 
Stephen Valentine
Technical
Mobile 079-107-3493
E-mail stephen at axes-techsa.co.za
 

 



Legal Disclaimer:
 
This message contains privileged and confidential information intended only for the use of the addressee named above.  If you are not the intended recipient of this message, you are hereby notified that you may not disseminate, copy or take any action based on the contents thereof; kindly inform the sender immediately.


> On 13 Jan 2015, at 01:52, Sam Gardner <samgardner90 at gmail.com> wrote:
> 
> I am using ffmpeg to capture an input video feed from a capture device,
> save to disk, and relay the feed via udp to a host machine. When the
> network is down, i.e. an unplugged cable, or faulty switch, or the host is
> down, ffmpeg crashes with:
> 
> "[mpeg1video @ 0x2fdcb20] ignoring invalid SAR: 0/0 Last message repeated
> 38 times av_interleaved_write_frame(): Network is unreachable frame= 758
> fps= 25 q=1.0 size= 616kB time=00:00:30.24 bitrate= 166.7kbits/sframe= 758
> fps= 25 q=1.0 Lsize= 616kB time=00:00:30.24 bitrate= 166.7kbits/s
> video:616kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
> muxing overhead: 0.000000% Conversion failed!"
> 
> When the network crashes, this also crashes the saving to disk.
> Unfortunately my capture device cannot handle multiple simultaneous access
> so I can't split this into two processes (easily).
> 
> I would like to make the UDP streaming fault tolerant to continue trying to
> stream the next frame if it can't send any packets - the process should not
> exit. Surely this has happened to other ffmpeg users who are using headless
> media servers? I don't want to use a daemon to restart the process as this
> will cause more headaches dealing with the frames saved to disk - they
> would be split to separate files on every frame! I have tried the tee muxer
> but I can't make the child processes continue if one of them fails.
> 
> Is there a flag I can set to continue/ignore the "Network is unreachable"
> exception thrown?
> 
> I'd like to do this without making a custom build of ffmpeg, but if anyone
> has tried this before I would appreciate any pointers.
> 
> Thanks
> 
> Sam Gardner
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user


More information about the ffmpeg-user mailing list