[FFmpeg-user] rtmp Stream timeout

Marcel Grandemange marcel at antfarm.co.za
Tue May 3 19:52:38 CEST 2016


Evening

I sincerely hope someone can assist me with the following case.
I have the command below which is intended to monitor a rtmp stream and look
for silence within the stream.
It takes the rtmp stream plays it for 30 seconds and looks for 1 second of
silence within that period, this works very well however I have the
following case where, if for any reason the rtmp stream is invalid or down,
ffmpeg will "hang" indefinitely trying to play it.

As matter of interest the behavior is not the same with rtsp links. If the
link is invalid I receive a " Output file #0 does not contain any stream"
and ffmpeg quits which I'm quite happy with. How do I enable similar
functionality with rtmp links? A sample of the command I use at the moment
is below:

/usr/local/bin/ffmpeg -hide_banner -loglevel 32 -t 30 -i
rtmp://server/app/stream.stream -af silencedetect=n=-40dB:d=1 -f null -


More information about the ffmpeg-user mailing list