Page 1 of 1
Disabling spherical view
Posted: 25 Jul 2017 05:00
by svenhenrik
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!
Re: Disabling spherical view
Posted: 25 Jul 2017 10:29
by Jean-Baptiste Kempf
I'm not sure it is currently doable.
Re: Disabling spherical view
Posted: 26 Jul 2017 03:48
by svenhenrik
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
Re: Disabling spherical view
Posted: 26 Jul 2017 05:02
by svenhenrik
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.
Re: Disabling spherical view
Posted: 26 Jul 2017 17:05
by svenhenrik
Tested and working now. Turned out I also had to make sure that BuildRectangle was called for all projection modes in SetupCoords.