Getting video frames Bitmaps...

This forum is about all development around libVLC.
macropolo
New Cone
New Cone
Posts: 2
Joined: 30 Jul 2019 17:27

Getting video frames Bitmaps...

Postby macropolo » 30 Jul 2019 17:33

Dear All, how could be possible to get an event (with a callback method or whatever) to get each new frame feeded to the VLC Player?

My intention is to make some video processing over the video stream, so I have to gain access to each new frame as a Bitmap or Canvas object. A syncrhonous event and the data itself of the frame buffer would be necessary for this.

Ususally I work with Delphi but any C++, Java or whatever example would be quite enough.

Many thanks in advance.

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

Re: Getting video frames Bitmaps...

Postby mfkl » 31 Jul 2019 04:23

Hi macropolo,

Here's a C# example on how to do this: https://github.com/ZeBobo5/Vlc.DotNet/blob/develop/src/Vlc.DotNet.Wpf/VlcVideoSourceProvider.cs
https://mfkl.github.io

macropolo
New Cone
New Cone
Posts: 2
Joined: 30 Jul 2019 17:27

Re: Getting video frames Bitmaps...

Postby macropolo » 31 Jul 2019 13:44

Many thanks mfkl.

I'm going to take a look to it. As far as I understand from my first scan, the deal is with two callback events:

LockVideo(IntPtr userdata, IntPtr planes)

DisplayVideo(IntPtr userdata, IntPtr picture)

I will explore the use of these methods to get the corresponding image.

Thanks.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 27 guests