|
-
April 4th, 2005, 02:14 AM
#1
A question about DirectShow
I would like to know if the audio part of a movie file could be scanned for a particular frequency tone. I plan on injecting an inaudible tone in to the microphone input of a digital camcorder and need to be able to scan the file for this tone. Once the tone is found, I then need to find the time index of the tone. The movie file will have multiple locations of this tone in the file. The purpose is to allow me to sync the video to some externally recorded data. The program would allow the user to step through the movie file or the recorded data and view them together.
If you have any comments or suggestion on direction or doablility of this, it would be greatly apprectiated.
Thank you,
Eldon Zacek
-
April 4th, 2005, 10:14 AM
#2
Re: A question about DirectShow
Yes, you can certainly do this.
When you use DirectShow to render your video, you just need to create your own rendering filter for the audio part and then add it to the graph explicitly.
If you do not want to use filter graph, you could also directly use DMOs (Directx/show Managed Objects).
I am answering based on my assumption that your question was a "Can we do " question as opposed to "How exactly to do this..." kind of question - if it was the latter, then we may need to dig deeper.
but here is one of the many links that could get you started:
http://msdn.microsoft.com/library/de...derengines.asp
-
April 4th, 2005, 11:38 AM
#3
Re: A question about DirectShow
You can also put a sample grabber filter into the audio chain of the filter graph and set a callback in your app to trap the samples as they're passed through.
Darwen.
-
April 4th, 2005, 01:36 PM
#4
Re: A question about DirectShow
Sure, Yes. I believe you cannot modify the packets through the sample grabber, so ideally you would want to remove your "special" tone from the audio stream after detection - if so, then maybe samplegrabber may not work.
But I think the original poster said his tone was "inaudible", so maybe he can use the sample grabber as you say -
He said it was a audio component in a video stream so I am curious as to which stage in the production is he actually inserting the tone in his audio and how, if at all, he is maintaining synchronization with the video frames....
-Vinayak
-
April 4th, 2005, 01:47 PM
#5
Re: A question about DirectShow
Actually you can modify the samples by using the sample grabber. You can set the 'Buffer' mode to off. I know the documentation says that this isn't good practice but I've personally never had a problem with it - just so long as the modifications are extremely quick to make.
In actual fact the sound dictates the synchronisation with the video : you'll see that the reference timer is situated in the sound renderer.
The sound is passed to the sound renderer about a second or two before the synchronised video. Meaning the samples passing through the audio part of the filter chain is always a second or two ahead of the video images.
Darwen.
-
December 2nd, 2005, 09:13 AM
#6
Re: A question about DirectShow
Does anyone have a short example of a samplegrabber? I'm trying to incorporate one into my project, but I can't seem to get all of the details straight. Thanks!
Best regards,
Dave
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|