How to monitor activity on a stream
I'm looking for a way to monitor activity on a stream so that I can determine if there is anything come through the stream or not. If there is, I'll initiate a dump on it.
I imagine this working as running a cron task that checks a stream every 60 seconds. If it determines that a stream is coming through, then call upon rtmpdump to start recording it. If not, then do nothing and check again in 60 seconds.
Since rtmpdump just kind of errors out when there is no stream data, it doesn't seem like it would be a good idea to attempt to use it to monitor a stream.
It would be easy if I was doing this on a case-by-case basis manually, but I'm trying to automate the task of recording streams automatically if they are available.
Has anyone come across a way to do this? Perhaps some other tools I can use in command line (linux)?
|