fbsamples / 360-video-player-for-android

Sample code for creating a 360 video player on Android. Creates an OpenGL ES scene that renders a sphere textured with video frames from MediaPlayer playback. Does not use the NDK. This is a simple example of the core elements of 360 video rendering and is not intended to be production quality code. The code may be unstable. This is won't be maintained.
Other
616 stars 166 forks source link

Play multiple videos #3

Closed arianaa30 closed 8 years ago

arianaa30 commented 8 years ago

I want to show multiple videos, say 4 videos inside the 360 sphere. Is it possible to do that? So basically these 4 videos are "tiles" of the original equirectangular video, being played by 4 simultaneous media players! So eventually it brings the impression of watching a single video!

03lafaye commented 8 years ago

You would need to ensure that you can support parallel hardware decodes on your device to do that. It definitely is possible. Not planning to support this in this project which is just a simple sample 360 video player.

arianaa30 commented 8 years ago

I see. I actually just created a multi-video player (2D) which nicely plays up to 8 videos, almost smoothly. I just need to map it to the sphere. For a single mediaplayer, we know, but now that we have a mother media player consisting of multiple media players, I don't know how to do that.

We need to modify the shaders, right? Do you know how easy it is to do?

03lafaye commented 8 years ago

You'd be limited by how many external texture samplers you can have so you'd likely need multiple draws. If you did a draw for each video and updated the bound external texture you can reuse the same shaders. Good luck but your work is out of the scope of what this project is meant for. You'll have to figure it out by playing around with it on your own. Thanks.

SrujithPoondla commented 7 years ago

@arianaa30 by any chance were you able to play multiple videos over sphere? @03lafaye is there any other project dealing with this multiple videos problem.