In VLCKit,is there an approach that can get pixels buff of video every frame?

iOS, iPad, iPhone, tvOS specific usage questions
xrddd
New Cone
New Cone
Posts: 9
Joined: 03 Jun 2019 06:13

In VLCKit,is there an approach that can get pixels buff of video every frame?

Postby xrddd » 03 Jun 2019 06:48

I want get the video pixels buff in my app loop,so I can use it as texture to render myself.
Any help appreciate!

fkuehne
Developer
Developer
Posts: 7264
Joined: 16 Mar 2004 19:37
VLC version: 0.4.6 - present
Operating System: Darwin
Location: Germany
Contact:

Re: In VLCKit,is there an approach that can get pixels buff of video every frame?

Postby fkuehne » 03 Jun 2019 17:59

The only supported way for this is to use the vmem output module, which would require all your frames to pass through the main application memory, which can have a significant performance impact and would require changes to VLCKit itself, as we currently don't expose this API on the ObjC side of things.

I'm wondering what you are trying to achieve?
VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net

xrddd
New Cone
New Cone
Posts: 9
Joined: 03 Jun 2019 06:13

Re: In VLCKit,is there an approach that can get pixels buff of video every frame?

Postby xrddd » 04 Jun 2019 05:48

The only supported way for this is to use the vmem output module, which would require all your frames to pass through the main application memory, which can have a significant performance impact and would require changes to VLCKit itself, as we currently don't expose this API on the ObjC side of things.

I'm wondering what you are trying to achieve?
Thanks Felix! I want to get the video frame picture in my app's every frame,so with that frame picture data(using as GL texture), draws myself via OpenGLES,achieving video playing.
what I know is,VLC-android has IVLCVout interface(which can set setVideoSurface),and via SurfaceTexture we can capture frames from video stream as an OpenGL ES texture easily.
May be there isn't a counterpart in iOS, or exactly on ObjC side?

unidan
Developer
Developer
Posts: 1493
Joined: 25 Mar 2018 01:00

Re: In VLCKit,is there an approach that can get pixels buff of video every frame?

Postby unidan » 04 Jun 2019 11:50

Hi,

On libvlc 4, you would have opengl callbacks for this, but it isn't released yet and vlckit isn't compatible yet.

xrddd
New Cone
New Cone
Posts: 9
Joined: 03 Jun 2019 06:13

Re: In VLCKit,is there an approach that can get pixels buff of video every frame?

Postby xrddd » 05 Aug 2019 04:53

Hi,

On libvlc 4, you would have opengl callbacks for this, but it isn't released yet and vlckit isn't compatible yet.
hi, unidan,thanks for your reply. is a VLCKit branch(even developing) available that has the feature? I can build from it.

unidan
Developer
Developer
Posts: 1493
Joined: 25 Mar 2018 01:00

Re: In VLCKit,is there an approach that can get pixels buff of video every frame?

Postby unidan » 08 Aug 2019 17:49

> hi, unidan,thanks for your reply. is a VLCKit branch(even developing) available that has the feature? I can build from it.

Not from now, but VLCKit is being ported to libVLC4 currently.

vicybvr
New Cone
New Cone
Posts: 1
Joined: 13 Nov 2019 19:39

Re: In VLCKit,is there an approach that can get pixels buff of video every frame?

Postby vicybvr » 13 Nov 2019 21:39

Hi

I would be very interesting in this as well. My use case is, i guess, similar to what xrddd describes: I also want to use the texture in a custom mesh, and add some custom vertex and fragment shading, for my application.

So, whenever a shareable version of VLCKit that yoiu feel comfortable opening, i would love to beta test it!

XuanTung
New Cone
New Cone
Posts: 1
Joined: 12 Jan 2023 15:35

Re: In VLCKit,is there an approach that can get pixels buff of video every frame?

Postby XuanTung » 12 Jan 2023 15:43

Hi team,
VLCKit 4.0 is available now, is this feature available yet?

fkuehne
Developer
Developer
Posts: 7264
Joined: 16 Mar 2004 19:37
VLC version: 0.4.6 - present
Operating System: Darwin
Location: Germany
Contact:

Re: In VLCKit,is there an approach that can get pixels buff of video every frame?

Postby fkuehne » 17 Jan 2023 10:08

There are very early alpha builds of VLCKit v4 available. However, the API mentioned by @unidan is not public yet.
VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net

ssbmaccom
Cone that earned his stripes
Cone that earned his stripes
Posts: 184
Joined: 26 Nov 2015 15:21
Operating System: Mac OS, iOS, tvOS

Re: In VLCKit,is there an approach that can get pixels buff of video every frame?

Postby ssbmaccom » 08 Mar 2023 09:56

Sorry to be a bit off-topic, but I thought with libvlc4 you wanted to get around OpenGL as it may get deprecated on Apple platforms and eg. Catalyst framework does not include OpenGL. So I am a bit curious, if there will be a OpenGL callback, when OpenGL is not used anymore.
But actually I would also be interested in grabbing single full frames from streams via VLCKit. Got an idea to utilize them for a mart feature.


Return to “VLC for iOS, iPadOS and Apple TV”

Who is online

Users browsing this forum: No registered users and 3 guests