Render LibVLC to SharpDX texture

This forum is about all development around libVLC.
mystery123sk
New Cone
New Cone
Posts: 8
Joined: 30 May 2020 07:47

Render LibVLC to SharpDX texture

Postby mystery123sk » 30 May 2020 07:52

Hi,

is there a way to render video using LibVLC directly to Texture2D, which could be used in my own scene in SharpDX? I know there is a way using vmem, but that's CPU involved leading into lower performance.

I'm not a professional, but I suppose there is a different directx device context in LibVLC and SharpDX, so some kind of copy might be inevitable.

Michal

mfkl
Developer
Developer
Posts: 739
Joined: 13 Jun 2017 10:41

Re: Render LibVLC to SharpDX texture

Postby mfkl » 30 May 2020 18:38

Hi,

Yes, it is possible: https://code.videolan.org/mfkl/LibVLCSharp/-/blob/d3d-texture/Samples/LibVLCSharp.D3DCallbacks/Program.cs

Note that the code above isn't up to date to latest libvlc 4 (which you need, libvlc 3 doesnt have this API). So you'll need to adjust the interop code in libvlcsharp/master. PR welcome.
https://mfkl.github.io

mystery123sk
New Cone
New Cone
Posts: 8
Joined: 30 May 2020 07:47

Re: Render LibVLC to SharpDX texture

Postby mystery123sk » 30 May 2020 19:41

Sounds great, will test it, thanks. Do you think it’s already ok to use version 4?

mfkl
Developer
Developer
Posts: 739
Joined: 13 Jun 2017 10:41

Re: Render LibVLC to SharpDX texture

Postby mfkl » 31 May 2020 12:39

Do you think it’s already ok to use version 4?
libvlc 4 is a development build, not a stable build.
https://mfkl.github.io

mightypanda
New Cone
New Cone
Posts: 1
Joined: 13 Oct 2020 18:36

Re: Render LibVLC to SharpDX texture

Postby mightypanda » 13 Oct 2020 18:37

Hello!
Have you succeeded in the effort, and do you have some code to share?
Thank you!
SB


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 25 guests