Hello!
I was interested in trying to this the video and audio capture
working. I did manage to get some tests working using the ffmpeg that
came bundled. Other versions of ffmpeg failed to see the device.
I really would like to use this filter with the VideoCaptureElement in
wpf mediakit. http://wpfmediakit.codeplex.com/
However, when I try to select the device, I get the following
exception:
{"Failed to get IAMStreamConfig"}
At lines:
/* Get the AMMediaType for the video out pin */
hr = videoStreamConfig.GetFormat(out media);
DsError.ThrowExceptionForHR(hr);
Wondering if you get a similar error yourself if you try running the
WebCamPlayerWindow.xaml sample within the WPFMediaKit solution?
Yes Mediakit is great. In fact, the code is very straight forward,
below is a combobox which shows all the video capture devices, it is
bound to the VideoCaptureDevice. That is enough. :)
<StackPanel>
<ComboBox x:Name="videoCapDevices"
ItemsSource="{Binding Source={x:Static
mediakit:MultimediaUtil.VideoInputDevices}}"
DisplayMemberPath="Name" Margin="0, 2, 0,0" />
<mediakit:VideoCaptureElement x:Name="vidCap"
EnableSampleGrabbing="True" MinWidth="100" MinHeight="100"
LoadedBehavior="Play" DesiredPixelWidth="320"
DesiredPixelHeight="240"
Stretch="Fill"
VideoCaptureDevice="{Binding Path=SelectedItem,
ElementName=videoCapDevices}"
FPS="30"/>
</StackPanel>
</Grid>
Yes, I did try the other capture devices and my webcam worked fine.
I'm wondering is this might have to do with format size......it wants
to cap my whole screen at 1920x1200, was gonna try playing with
registry settings.
As for ffmpeg, I tried the static 64bit build.
http://ffmpeg.zeranoe.com/builds/#
Thanks Roger!
The IAMStreamConfig stuff was somewhat "relic" and now that you
mention it, I might not be registering it right anymore when the DLL
is registered (I...guess that most dshow readers only use its capture
class....maybe [?).
I think I'll pul IAMStreamConfig and send you it to test to see if
that works, as I don't anticipate anybody actually needing/wanting
that anymore anyway...
-r
I'm not sure what you mean by "relic" and pulling IAMStreamConfig.
wpfmedia kit is querying for the IAMStreamConfig interface, your
filter will need to implement this interface to work. right?
I did uninstall and install the latest 0.2.4.1. I am still getting
the IAMSteamConfig failed error.
According to the following link
Exposing Capture and Compression Formats
http://msdn.microsoft.com/en-us/library/dd375630(v=vs.85).aspx
This method can get more information about accepted media types than
the traditional way of enumerating a pin's media types, so it should
typically be used instead.
IAMStreamConfig interface
http://msdn.microsoft.com/en-us/library/dd319784(v=vs.85).aspx
If we are implementing all those methods it should work....
Thank you, that solves my ffmpeg 64bit build! :)
But I am still getting the IAMSteamConfig failed error with mediakit.
>> IAMStreamConfig interface
>> http://msdn.microsoft.com/en-us/library/dd319784(v=vs.85).aspx
>>
>> If we are implementing all those methods it should work....
>
> It does seem to implement those methods.
Grr. hhmpf.
Did you get a chance to try the sample on your machine?
Thanks Roger.
--dave