How To Use VLCKit for iOS to render video output into GLES texture

iOS, iPad, iPhone, tvOS specific usage questions
Singletons
New Cone
New Cone
Posts: 1
Joined: 14 Apr 2016 14:03

How To Use VLCKit for iOS to render video output into GLES texture

Postby Singletons » 14 Apr 2016 14:24

Hi everyone, I can't find solution of how to render video output from MobileVLCKit (iOS) into my OpenGLES texture, can you please help me with this problem or give some direction to how solve it, thank for help

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

Re: How To Use VLCKit for iOS to render video output into GLES texture

Postby fkuehne » 16 Apr 2016 08:59

MobileVLCKit renders in an OpenGL context by itself and in the latest unstable code, it also supports multi-threaded OpenGL rendering correctly. However, there is no direct way to render to an OpenGL texture.

However, libvlc, the low level library behind VLCKit, supports rendering decoded frames to a memory buffer (which we call "vmem") that is currently already used by the VLCMediaThumbnailer class. Maybe this way could be adapted to give you the raw the buffers so you can render them yourself in your OpenGL context? Obviously, this will involve a speed penalty and not allow 0 copy rendering for hardware decoded media.
VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net

dgoodine
New Cone
New Cone
Posts: 1
Joined: 19 Jul 2016 21:38

Re: How To Use VLCKit for iOS to render video output into GLES texture

Postby dgoodine » 07 Oct 2016 23:49

Felix,

I just tried to use that approach and the framerate is really bad (3 fps 2440x1400 frames), most likely due to shuttling the 16mb frames back and forth from the GPU. So the approach of using the vmem callbacks is not feasible, at least for large videos.

Do you have any plans to support rendering to an OpenGL GL_TEXTURE_2D anytime in the future?

-d


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

Who is online

Users browsing this forum: No registered users and 6 guests