Login
 
Archive
Links
Search
Blog List
There are no categories in this blog.
 
Mar 28

Written by: Jeremiah Morrill
3/28/2008 5:14 PM

I think most people know what VLC is.  I figured VLC API could be a good example of a use case example for the VideoRendererElement. 

So I remember coming across a gentleman that made a WPF player that used VLC to decode the video.  The problem is the frames were updated with this code:

videoOutput.Source = BitmapSource.Create(
            width,
            height,
            96,
            96 * aspect * height / width,
            PixelFormats.Rgb24,
            null,
            buffer,
            bufferSize,
            stride
        );

As you can see, doing that code from every frame is going to beat up the GC and CPU quite a bit.  Not to mention the solution has pretty bad tearing of the video.  With a few small tweaks to his project (and the VideoRendererElement), I had tear-free, low-cpu usage video with a custom video source (VLC). 

Here is a screenshot with the two magic functions.  As you can see I have some color space issues.  Everyone looks like a smurf!

image

Maybe next I'll show a webcam with the VideoRendererElement.

Tags:

4 comments so far...

Re: VideoRendererElement and VLC

Nice work ! I think your color space issues might just be a case of RGB <-> BGR.

By Sven on   3/30/2008 11:01 PM

Re: VideoRendererElement and VLC

Any chance you could post the changes you made to the vlc wpf player?

Good work and thanks in advance.

shoey

By shoey on   4/14/2008 1:58 PM

Re: VideoRendererElement and VLC

How do I use VLC in WPF?

By publicENEMY on   4/15/2008 11:39 PM

Re: VideoRendererElement and VLC

Hi Jeremiah!
I guess you are my only hope, because you seem to be the only person in the web who managed to include the VLC into WPF and still maintains high performance due to your VRE.
Could you please be so kind and post the sourcecode for the example mentioned above or a little how-to?

Thank you so much!


Kolja
mail kolja-engelmann de

By Kolja Engelmann on   7/28/2008 7:14 AM

Your name:
Title:
Comment:
Security Code
Enter the code shown above in the box below
Add Comment    Cancel  
  Minimize
Text/HTML Minimize
Copyright 2007
Downloaded from DNNSkins.com