Samsung / GearVRf

The GearVR framework(GearVRf) is an Open Source VR rendering library for application development on VR-supported Android devices.
http://www.gearvrf.org
Apache License 2.0
407 stars 217 forks source link

Video streaming over network #598

Open arianaa30 opened 8 years ago

arianaa30 commented 8 years ago

Hi, I looked into one of the demos for 360 video playback. I was wondering if there is any demo for networked streaming of videos, that can use MPEG-DASH?

If your players work on top of Android's MediaPlayer, it doesn't support DASH yet. Google has an open source project called ExoPlayer (http://google.github.io/ExoPlayer/) that supports DASH.

thomasflynn commented 8 years ago

Interesting. I'm not familiar with the ExoPlayer api, but I would hope it at least has some similar apis to MediaPlayer. If you look into the source of GVRVideoSceneObject.java, you'll see the key thing needed is to give the MediaPlayer a SurfaceTexture to use. The GVRVideoSceneObject creates the SurfaceTexture and then hands it to the MediaPlayer. Assuming the same capability exists with ExoPlayer, you should be able to modify GVRVideoSceneObject to use ExoPlayer.

NolaDonato commented 8 years ago

Is this the thing you wanted me to look into?

From: thomasflynn [mailto:notifications@github.com] Sent: Thursday, June 2, 2016 6:00 PM To: Samsung/GearVRf GearVRf@noreply.github.com Subject: Re: [Samsung/GearVRf] Video streaming over network (#598)

Interesting. I'm not familiar with the ExoPlayer api, but I would hope it at least has some similar apis to MediaPlayer. If you look into the source of GVRVideoSceneObject.java, you'll see the key thing needed is to give the MediaPlayer a SurfaceTexture to use. The GVRVideoSceneObject creates the SurfaceTexture and then hands it to the MediaPlayer. Assuming the same capability exists with ExoPlayer, you should be able to modify GVRVideoSceneObject to use ExoPlayer.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/Samsung/GearVRf/issues/598#issuecomment-223464879, or mute the threadhttps://github.com/notifications/unsubscribe/AQw1S3-390CTWp39zJeI8ajq55ufhorJks5qH3x3gaJpZM4ItHJR.

thomasflynn commented 8 years ago

No, this is a new issue that popped up a few minutes ago.

From: NolaDonato [mailto:notifications@github.com] Sent: Thursday, June 02, 2016 6:19 PM To: Samsung/GearVRf Cc: Thomas Flynn; Comment Subject: Re: [Samsung/GearVRf] Video streaming over network (#598)

Is this the thing you wanted me to look into?

From: thomasflynn [mailto:notifications@github.com] Sent: Thursday, June 2, 2016 6:00 PM To: Samsung/GearVRf GearVRf@noreply.github.com Subject: Re: [Samsung/GearVRf] Video streaming over network (#598)

Interesting. I'm not familiar with the ExoPlayer api, but I would hope it at least has some similar apis to MediaPlayer. If you look into the source of GVRVideoSceneObject.java, you'll see the key thing needed is to give the MediaPlayer a SurfaceTexture to use. The GVRVideoSceneObject creates the SurfaceTexture and then hands it to the MediaPlayer. Assuming the same capability exists with ExoPlayer, you should be able to modify GVRVideoSceneObject to use ExoPlayer.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/Samsung/GearVRf/issues/598#issuecomment-223464879, or mute the threadhttps://github.com/notifications/unsubscribe/AQw1S3-390CTWp39zJeI8ajq55ufhorJks5qH3x3gaJpZM4ItHJR.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/Samsung/GearVRf/issues/598#issuecomment-223467311, or mute the threadhttps://github.com/notifications/unsubscribe/AJOFSvHUyI24h3FEGpyYfT1Y8mNDYT1Uks5qH4EQgaJpZM4ItHJR.

liaxim commented 8 years ago

Looks like ExoPlayer accepts a Surface. You pass a SurfaceTexture to the Surface constructor. So it seems feasible that a tweaked GVRVideoSceneObject would work with ExoPlayer.

@arianaa30 Does this help?

arianaa30 commented 8 years ago

That would be awesome! Is it possible put a sample using exoplayer? More importantly my most important need right now is to play multiple videos on a 360 view. Maybe you tie this to my open case #609 and do tests if we can play say 4 videos in 360 video, all glued together?

LaraMunozSanchez commented 8 years ago

Hi @arianaa30 ! Is it finally possible to use ExoPlayer instead of MediaPlayer? If so, do you have any example?

Thanks a lot

arianaa30 commented 8 years ago

They suggested it is possible. I never tested it though.

Sent from my phone. Pls excuse typos and brevity.

On Sep 5, 2016 5:50 AM, "LaraMunozSanchez" notifications@github.com wrote:

Hi @arianaa30 https://github.com/arianaa30 ! Is it finally possible to use ExoPlayer instead of MediaPlayer? If so, do you have any example?

Thanks a lot

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Samsung/GearVRf/issues/598#issuecomment-244718173, or mute the thread https://github.com/notifications/unsubscribe-auth/AFQSzUhPzjF4RYKUcz-t6FGrPHKqtclhks5qm_PegaJpZM4ItHJR .

LaraMunozSanchez commented 8 years ago

Don´t worry! Thanks for your quick answer.

arianaa30 commented 8 years ago

Please share the example if you made it work!

Sent from my phone. Pls excuse typos and brevity.

On Sep 6, 2016 3:25 AM, "LaraMunozSanchez" notifications@github.com wrote:

Don´t worry! Thanks for your quick answer.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Samsung/GearVRf/issues/598#issuecomment-244883121, or mute the thread https://github.com/notifications/unsubscribe-auth/AFQSzeg8O17PkaDySFqS9uKAxqsI49zjks5qnSNygaJpZM4ItHJR .

liaxim commented 8 years ago

We have something in the works. The pull requests are pending review so they are subject to changes.

Small changes to the framework to let the videoSceneObject use ExoPlayer https://github.com/Samsung/GearVRf/pull/845

Updated sample that can use either MediaPlayer or the ExoPlayer. Set the USE_EXO_PLAYER flag to have the sample use ExoPlayer. https://github.com/gearvrf/GearVRf-Demos/pull/318

LaraMunozSanchez commented 8 years ago

Thanks a lot @liaxim , I have a question... How can I play a DASH content? Do you have any example?

liaxim commented 8 years ago

Hi, playing DASH would be an ExoPlayer question. You should look around at their web site - I am sure they have examples. If you have problems integrating that with GVRF we can provide further assistance.

LaraMunozSanchez commented 8 years ago

Hi, that was my problem. I can play DASH content using ExoPlayer, but I don't know how to integrate it with GVRF. In the ExoPlayer example you can specify that you are using DASH content, but I can't find how to specify it through GVRF so any assistance will be welcomed. Thanks!

liaxim commented 8 years ago

The change in the framework has been merged. Please look at the gvr-360video sample, specifically the Minimal360VideoActivity class. There is a flag to enable use of the ExoPlayer (USE_EXO_PLAYER). The essence of the integration is in the makeExoPlayer method.

liaxim commented 7 years ago

Any luck using the ExoPlayer? Can we close this issue now?

LaraMunozSanchez commented 7 years ago

I can´t play DASH content with GVRF yet. I will continue trying.

liaxim commented 7 years ago

Let us know if you are experiencing problem with GVRF itself.

LaraMunozSanchez commented 7 years ago

It seems like the manifest is never loaded. Doing the same with the ExoPlayer´s demo it works, so it can be a GVRF or an integration problem, I´m not sure. Any idea? Has anyone tried to use other renderers (DASH, HLS or SmoothStreaming)?

liaxim commented 7 years ago

Can you share any logcat output? To my knowledge nobody has tried other renderers. I will try DASH but I can't give a time frame when.