Page 1 of 1

Recommendations needed for vout selection

Posted: 23 Feb 2019 12:56
by svenhenrik
I'm making a VR video player for Android based on libvlc. In the beginning I was using the android_display vout, but somewhere around 1.7.x (not sure exactly when) VLC focus changed to use the opengl vout, and arount the same time there was a notable performance degradation in the android_display vout. I followed suit and switched to using opengl, and performance went back to roughly the same level as pre 1.73.

However, I also want to use the great subtitle support in libvlc. With android_display I can provide two surfaces and get the subtitles drawn separately, but with the opengl vout they are always merged onto the same surface which is problematic. Subtitles aren't very common with 360/180 videos, but "flat" SBS 3D videos often have them.

My questions:
- Is support for rendering the subtitles to a different surface coming to the opengl vout, or is it a feature only i need? :)

- What would be the recommended way if all I want is to get the decoded video onto a texture as quickly as possible? I want to handle everything regarding mapping the video texture onto 3D surfaces myself, so android_display seems like the obvious choice, but opengl has better performance.

Re: Recommendations needed for vout selection

Posted: 25 Feb 2019 03:40
by mfkl
Is support for rendering the subtitles to a different surface coming to the opengl vout, or is it a feature only i need?
Think that's already possible? Have a look at this code https://code.videolan.org/search?utf8=% ... ref=master

What would be the recommended way if all I want is to get the decoded video onto a texture as quickly as possible?
That would be the new opengl callbacks available only with nightly/4.0 builds, example usage: https://github.com/videolan/vlc/commit/ ... aa6a2dR163

Re: Recommendations needed for vout selection

Posted: 25 Feb 2019 10:14
by svenhenrik
It's possible to provide a separate surface to libVLC for subpicture rendering, but the opengl vout does not render to the second surface. Subpictures are rendered in one pass after the video. The android_display vout renders subpictures to the second surface though. I've experimented with modifying the subpicture rendering to do two sbs renders which works for "flat" videos, but it will not be good enough for subtitles for panoramic videos (I don't think those are very common, but I think that might be because they're not very well supported to begin with.)

I'm still using 3.0.x, so I haven't looked at 4.0 builds yet, but I'll take a look at the opengl callbacks, looks very interesting!

Re: Recommendations needed for vout selection

Posted: 10 Mar 2019 11:41
by Jean-Baptiste Kempf
It's possible to provide a separate surface to libVLC for subpicture rendering, but the opengl vout does not render to the second surface. Subpictures are rendered in one pass after the video. The android_display vout renders subpictures to the second surface though. I've experimented with modifying the subpicture rendering to do two sbs renders which works for "flat" videos, but it will not be good enough for subtitles for panoramic videos (I don't think those are very common, but I think that might be because they're not very well supported to begin with.)

I'm still using 3.0.x, so I haven't looked at 4.0 builds yet, but I'll take a look at the opengl callbacks, looks very interesting!
4.0 opengl callbacks is what you need, indeed.