How to detect that a media stream has no sound

  • Thread starter Thread starter FE
  • Start date Start date
F

FE

Hi,

I need to create a program that will connect a media stream (a server on the
internet - Windows Media format) and then generate an error when :

* The stream is ok but there is no sound (for example when someone
disconnected the mic)
* The stream is ok but there is no more images

In these to cases, I imagine the encoding server is still working fine but
the source of the data to encode (sound or video) is not working fine.

How can I do that ?

To connect the stream I use the Windows media Player 9 component.

Thanks for your advices.
 
very kludgy. I think you have to look at the video when the conditions that
you mention exist and detect the presence of similar video to generate the
error message/alert. Eg. if loss of video results in a blue screen being
sent, grab frames at regular intervals, check a few pixels at different
locations for colour, and if they are all blue raise the error/alert. If the
image freezes, compare with previously sampled values. Similarly for sound,
try using code from one of the many 'oscilloscope' samples going around and
raise the alert when the values do not exceed a set threshold for a while
(you'll get some noise when the mic is disconnected). Remember that long
periods of silence are frequently encountered and are not necessary a fault
condition. (I saw an 'art' film once which had nothing on the sound track
for the first 15 minutes!). Same for 'frozen' video.

HTH

Sujit
 
Hi,

Thanks for all the feedback.

My problem is that I don't knwow the best way to do it. I am currently
using the media player component and so can play the media streams ...
but how to :

* For the sound : capture the level of the sound, ...
* For the video : make a snapshot of the video (so I can analyse it
with another function.

I also wonder for the sound if I can use an API to ask my windows to
tell me the level of the sound but according to the sound card (so I
don't get the level from the source (the media) but via the sound card).
Is the Media player componend can do that ? Do I have to take a look ad
Directxxx APIs ?

Thanks for your help.

Regards.

FE
 
Back
Top