FFprobe Check Stream Link

Krasic picture Krasic · May 28, 2015 · Viewed 7.3k times · Source

I am trying to use FFprobe to test if a streaming link is active or not.

For example this is a working streaming link:

ffprobe -loglevel quiet -show_streams rtmp://Lrmh0w.cloud.influxis.com/yoy/_definst_/185

I do get output which mean link is active.

However, once I change link to something not work:

ffprobe -loglevel quiet -show_streams rtmp://Lrmh0w.cloud.influxis.com/yoy/_definst_/18555555555

The command keeps running in background with no result.

Is there a way to bypass this, or is there any ffprobe timeout parameter? I couldn't find it from the official website documentation.

Answer

Maks picture Maks · Jul 16, 2015

I'm just using *nix timeout:

/usr/bin/timeout 5s /usr/bin/ffprobe $SOURCE

In my case, it was enough.