GearVRf icon indicating copy to clipboard operation
GearVRf copied to clipboard

Video streaming over network

Open arianaa30 opened this issue 8 years ago • 19 comments

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.

arianaa30 avatar Jun 03 '16 00:06 arianaa30

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.

thomasflynn avatar Jun 03 '16 00:06 thomasflynn

Is this the thing you wanted me to look into?

From: thomasflynn [mailto:[email protected]] Sent: Thursday, June 2, 2016 6:00 PM To: Samsung/GearVRf [email protected] 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.

NolaDonato avatar Jun 03 '16 01:06 NolaDonato

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

From: NolaDonato [mailto:[email protected]] 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:[email protected]] Sent: Thursday, June 2, 2016 6:00 PM To: Samsung/GearVRf [email protected] 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.

thomasflynn avatar Jun 03 '16 01:06 thomasflynn

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?

liaxim avatar Jun 17 '16 15:06 liaxim

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?

arianaa30 avatar Jun 17 '16 15:06 arianaa30

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

Thanks a lot

LaraMunozSanchez avatar Sep 05 '16 10:09 LaraMunozSanchez

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" [email protected] 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 .

arianaa30 avatar Sep 05 '16 14:09 arianaa30

Don´t worry! Thanks for your quick answer.

LaraMunozSanchez avatar Sep 06 '16 08:09 LaraMunozSanchez

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" [email protected] 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 .

arianaa30 avatar Sep 06 '16 12:09 arianaa30

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

liaxim avatar Sep 09 '16 17:09 liaxim

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

LaraMunozSanchez avatar Sep 14 '16 09:09 LaraMunozSanchez

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.

liaxim avatar Sep 14 '16 14:09 liaxim

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!

LaraMunozSanchez avatar Sep 15 '16 09:09 LaraMunozSanchez

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 avatar Sep 15 '16 15:09 liaxim

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

liaxim avatar Sep 19 '16 17:09 liaxim

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

LaraMunozSanchez avatar Sep 20 '16 06:09 LaraMunozSanchez

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

liaxim avatar Sep 20 '16 14:09 liaxim

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)?

LaraMunozSanchez avatar Sep 22 '16 10:09 LaraMunozSanchez

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.

liaxim avatar Sep 22 '16 14:09 liaxim