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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 VMR_Capture Demo, no Audio
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

DavidRM

9 Posts

Posted - Oct 16 2013 :  14:14:12  Show Profile  Reply
I just bought ImageEn today, and I'm looking at the VMR_Capture demo as a blueprint for what I'm trying to do.

For some reason, though, it's not recording audio. RenderAudio is set to true (which is just part of the demo and I haven't changed anything in the demo), but there's no audio being recorded to the AVI.

I tested with the Windows Sound Recorder and my microphone is working fine.

I'm using Delphi XE2.

Thanks!

-David

xequte

39104 Posts

Posted - Oct 23 2013 :  02:01:06  Show Profile  Reply
Hi David

I'm afraid the VMR capture demo does not handle audio. You should code SetAudioInput (in the same manner as the SetVideoInput code).


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

DavidRM

9 Posts

Posted - Oct 23 2013 :  11:11:03  Show Profile  Reply
No dice. I had already tried that. Tried again, setting it to the only audio input format available, and the result was the same: No audio.


        // set video source as index of IO.DShowParams.VideoInputs
        w := VideoFormats[ ListBox1.ItemIndex ].MaxWidth;
        h := VideoFormats[ ListBox1.ItemIndex ].MaxHeight;
        SetVideoInput(ComboBox1.ItemIndex, StrToIntDef(edit4.Text,0), w, h); // set the second parameter if you have more than one camera with same name
        SetAudioInput(0);
        // enable video and audio rendering
        RenderVideo:=true;
        RenderAudio:=true;
Go to Top of Page

DavidRM

9 Posts

Posted - Oct 23 2013 :  11:28:19  Show Profile  Reply
While I was at it, I tested each of the 10 available audio codecs too, using SetAudioCodec.

Made no difference.

-David
Go to Top of Page

xequte

39104 Posts

Posted - Oct 23 2013 :  11:38:17  Show Profile  Reply
Hi David

Have you tried using a third party DirectShow tool to compare your results:

http://www.sibisa.com/3-good-directshow-tools-to-test-filters/



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

DavidRM

9 Posts

Posted - Oct 23 2013 :  12:44:03  Show Profile  Reply
So there's no simple, drop-in way to get audio recorded with video?

-David
Go to Top of Page

DavidRM

9 Posts

Posted - Oct 23 2013 :  14:03:36  Show Profile  Reply
Here is what GraphEdit shows. As you can see, the audio connects to the Smart Tee filter...and that's it. You can see where the Smart Tee filter *SHOULD* connect to one of the MUX filter inputs, but doesn't.


11.21 KB
Go to Top of Page

fab

1310 Posts

Posted - Oct 24 2013 :  12:59:28  Show Profile  Reply
Ok, this seems a bug!
Please try this fix:

- open ieds.pas unit
- in method TIEDirectShow.StdConnect replace the line…
fBuilder.RenderStream(@PIN_CATEGORY_CAPTURE, @MEDIATYPE_Audio, fCurAudioInput, fCurAudioCodec, ppf);

..with…
fBuilder.RenderStream(@PIN_CATEGORY_CAPTURE, @MEDIATYPE_Audio, fCurAudioInput, fCurAudioCodec, multiplex);
Go to Top of Page

DavidRM

9 Posts

Posted - Oct 24 2013 :  14:16:30  Show Profile  Reply
That did the trick!

Rockin'. =)

-David
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: