View Single Post
  #4  
Old 03-18-2012, 11:00 AM
compn compn is offline
Stream recording expert
 
Join Date: Sep 2006
Posts: 128
compn has a spectacular aura aboutcompn has a spectacular aura aboutcompn has a spectacular aura about
Default

Re: How to monitor activity on a stream


is it a static image on screen in between live events?

if so, you can use rtmpdump to output to mplayer -vo md5sum - to check if the static image is playing.

the command will look something like
rtmpdump rtmp://stream -o - | mplayer -vo md5sum -
and mplayer will output a file called 'md5sums' which is a txt and like this (if the image is perfectly the same image):

a7860a39c88b3ff31ef4f0570aec8432 frame00000000
a7860a39c88b3ff31ef4f0570aec8432 frame00000001
a7860a39c88b3ff31ef4f0570aec8432 frame00000002
a7860a39c88b3ff31ef4f0570aec8432 frame00000003
a7860a39c88b3ff31ef4f0570aec8432 frame00000004
a7860a39c88b3ff31ef4f0570aec8432 frame00000005
a7860a39c88b3ff31ef4f0570aec8432 frame00000006
a7860a39c88b3ff31ef4f0570aec8432 frame00000007
a7860a39c88b3ff31ef4f0570aec8432 frame00000008
a7860a39c88b3ff31ef4f0570aec8432 frame00000009
a7860a39c88b3ff31ef4f0570aec8432 frame00000010

then your script can just check if the md5sums match.

or if the frames arent perfectly the same, you could run mencoder - -ovc lavc -nosound -o file.avi -frames 100, and if mencoder output is highly compressed, like 1minute = 100k, then its probably a static image.
Reply With Quote