Disabling spherical view

This forum is about all development around libVLC.
svenhenrik
New Cone
New Cone
Posts: 7
Joined: 25 Jul 2017 04:47

Disabling spherical view

Postby svenhenrik » 25 Jul 2017 05:00

Hello! I'm trying to use libVLC on Android to play video in VR. I render the video to a texture, and provide my own geometry. Ironically enough videos that contain Spatial Media Metadata don't work. LibVLC does its own spherical rendering and only gives me cropped output.

I'm looking for a way to instruct libVLC to ignore the spherical meta data and give me an un-cropped video. Tried setWindowSize and changing aspect ratios but haven't had any luck so far.

Any help would be greatly appreciated!

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Disabling spherical view

Postby Jean-Baptiste Kempf » 25 Jul 2017 10:29

I'm not sure it is currently doable.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

svenhenrik
New Cone
New Cone
Posts: 7
Joined: 25 Jul 2017 04:47

Re: Disabling spherical view

Postby svenhenrik » 26 Jul 2017 03:48

Ok, that's unfortunate, thanks for letting me know. I will try to find out where to disable it in the code.

Any hints to roughly where in the code base the transformation is applied? I'm still not very familiar with the inner workings of libVLC. I found something in ffmpeg regarding reading the meta data which I could probably disable, but if there's a simpler way I would appreciate some guidance :)

svenhenrik
New Cone
New Cone
Posts: 7
Joined: 25 Jul 2017 04:47

Re: Disabling spherical view

Postby svenhenrik » 26 Jul 2017 05:02

Nevermind, I think I found the right thread to pull. I also realized I might want to keep the viewpoint support for spatial audio, just convince libVLC not to apply it to the video output.

It looks like modifying getViewpointMatrixes in modules/video_output/opengl/vout_helper.c to always return identity could work. I can't build and verify at the moment, but I will update this post once I do.

svenhenrik
New Cone
New Cone
Posts: 7
Joined: 25 Jul 2017 04:47

Re: Disabling spherical view

Postby svenhenrik » 26 Jul 2017 17:05

Tested and working now. Turned out I also had to make sure that BuildRectangle was called for all projection modes in SetupCoords.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 29 guests