ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Audio capture with Media Foundation?

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
whisper1980 Posted - Aug 27 2019 : 15:12:44
I can capture video and audio from my notebook's integrated Webcam with DirectShow (DShow, based on the DirectShow1 demo), but with Media Foundation (MediaFoundationSourceReader), I can capture video to an AVI file but can't for the life of me figure out how to also capture the audio along with it.

Anyone know how to do that or should I stick with DirectShow? I had assumed it might be better to go with MF since I thought it was newer, but perhaps that is not a good reason.

Eric


Eric
4   L A T E S T    R E P L I E S    (Newest First)
whisper1980 Posted - Aug 27 2019 : 22:29:05
Thanks for the quick responses. It's strange that MF says both streams are video (only have the one camera). No worries, I'll go with DirectShow.

BTW, I've been using the FFmpeg library (via the free FFVCL version) to convert the huge AVI files into MP4 if anyone is looking for that kind of thing. It works quite well and I've integrated the options internally so it will be transparent to the user (i.e. not needing to use FFVCL's sample dialogs). Are you planning on providing AVI conversion features of your own? Perhaps you already have and I overlooked it?

Eric
xequte Posted - Aug 27 2019 : 22:00:00
Hi Eric

Perhaps it is best to stick with DirectShow.



Nigel
Xequte Software
www.imageen.com
whisper1980 Posted - Aug 27 2019 : 21:57:43
That routine returns two streams, both of type "video".

Also, this returns a -1:
i := ImageEnView1.IO.MediaFoundationSourceReader.IndexOfFirstStream(mmf_AUDIO_STREAM);

The DirectShow1 demo shows one video and one audio.
Video input: Integrated Webcam
Audio input: Microphone (Realtek Audio)





Eric
xequte Posted - Aug 27 2019 : 17:16:37
Hi Eric

Yes, MMF is newer but it's not as widely used as DirectShow.

Are there no audio streams with your capture:

https://www.imageen.com/help/TIEMediaFoundationSourceReader.StreamCount.html

Nigel
Xequte Software
www.imageen.com