Mar
30
Written by:
Jeremiah Morrill
3/30/2008 11:12 PM
The VideoRendererElement..well I'm sure some of ya'll are tired of hearing about it. But the beta is on Codeplex with a sample that shows you how to get a capture source (webcam) in WPF along with the GDI and compressed sample example.
There's some bugs left it in..and definitely a little refectoring needed. I don't think the VideoRendererElement should inherit from Control, but maybe FrameworkElement. I need to add some dependency properties for controlling things like video stretch and add some automatic tear down of the control.
Hope to get feedback.
-Jer
Tags:
8 comments so far...
Re: VideoRendererElement Beta with Webcam Sample
hey, this looks great. at first glance i thought you just had a shiny desk, heh. guess i need more coffee this am. keep up the awesome work. after i found your blog a while back i am addicted. i will definitely have to play with this soon!
By colbey on
3/31/2008 3:38 AM
|
Re: VideoRendererElement Beta with Webcam Sample
Wow, I can´t wrap my head around why your posts doesn´t get more attention. What you´ve accomplished here is one of the reasons why projects like Mediaportal don´t use WPF(Mediaportal has come pretty far in implementing their own version of WPF). Awesome stuff, think of all the cool mediaplayers that could be done with this...
By simsod on
3/31/2008 3:43 AM
|
Re: VideoRendererElement Beta with Webcam Sample
Thanks guys!
Simsod, I just posted a message on MediaPortals forum. Not sure if I picked the right category. But this surely would be a good solution for them.
-Jer
By Jeremiah Morrill on
3/31/2008 4:09 AM
|
Re: VideoRendererElement Beta with Webcam Sample
Hey... great app and code! I was bouncing around and trying to figure out how (if it's possible) to SAVE the video and audio from the camera afterwards? Maybe as a WMV or something? Any ideas?
By Greg on
8/25/2008 1:06 PM
|
Re: VideoRendererElement Beta with Webcam Sample
Greg,
This should be very possible. You just need to assemble a graph that does it! You will have to play around with graphedit, but you basically want to send uncompressed samples to something like a "WMVideo9 Encoder DMO", connected to a "WM ASF Writer" renderer.
By Jeremiah Morrill on
8/25/2008 1:26 PM
|
Re: VideoRendererElement Beta with Webcam Sample
Do you know if the graph can get the audio as well? (Sorry, I'm kind of an entry-level programmer... still learning to swim)
By Greg on
8/25/2008 1:34 PM
|
Re: VideoRendererElement Beta with Webcam Sample
You sure can do audio too. Before the graph.Run(), try doing a graph.RenderFile("some_path_to_a_file.mp3", null) and see what happens.
You also may want to check out my newer project for using dshow in WPF. the VRE is more of a fast "WriteableBitmap" and u gotta do some samplegrabber code to get it to render dshow video. This other solution is pure dshow interop: http://jmorrill.hjtcentral.com/Home/tabid/428/EntryID/256/Default.aspx
By Jeremiah Morrill on
8/25/2008 1:41 PM
|
Re: VideoRendererElement Beta with Webcam Sample
Hi Jer,
Thanks so much again for your help! I managed to get Video saved... (I added a Save Video Button on your sweet app). But I was hoping there was a way to capture both the Video and the Audio and put them into the save file.... like an .avi or whatever. I've successfully saved a video (with no sound) to the bin folder...
If I do the graph.RenderFile("something.mpg",null) before I run the graph.Run(), won't that make two seperate files? Maybe that's the only way to go... and I'll have to combine them later?
Just curious to know what your thoughts were... thanks again so much!
Greg
By Greg Lee on
8/29/2008 12:57 PM
|