Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Large videos not playing on Gear VR, but do play on Google Cardboard. Any ideas?

Discussion in 'AR/VR (XR) Discussion' started by xtopher, Apr 4, 2016.

  1. xtopher

    xtopher

    Joined:
    Jul 3, 2009
    Posts:
    78
    Hi all. I have an odd issue that I ran into over the weekend. We have a VR project that uses some 360 video and ambisonic audio. It runs great on an Android device set up for Google Cardboard, but on the same hardware the video won’t play at all when plugged into Gear VR hardware. I can play any files at 720p, but nothing above that unless it’s only a couple minutes long. Normally I would think the video in question was too big of a resource for the device, but since the same content plays reliably in another project there must be something else going on.

    If anyone could give me some insights as to what is happening I would greatly appreciate it! I get exactly the same results with any combination of the particulars listed below.

    Hardware:
    - Galaxy Note 4, and an S7
    - Gear VR (the white one)

    Software
    - Unity 5.3.2f1
    - Unity 5.3.4p1
    - Unity 5.3.4f1
    - AVPro 1.1.0, 1.2.0

    Note - I have tried all combinations of the above both with and without any of the Oculus software (utilities and Unity package). When not using Oculus software I am using Unity built in VR.

    Video
    - One movie file at 3840x1920, about 500mb

    Note - I have tried a wide range of encoded sizes/settings, and the only constant result I get is that I can play anything at 720p, or most anything above 720p but only for very short durations. Again, let me stress that the 500mb file DOES PLAY successfully when set up for google cardboard on the same android hardware, but not when set up for the gear vr.

    Any insights? This is killing me. Thanks so much, and all the best
     
  2. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Sounds like the GearVR services are not able to render the video because there is too much going on. We are currenly playing back video fine on GearVR using Easy Movie Texture. We have loaded videos at 2K without issue, but pushing to 4K is sometimes a struggle. The video file you have is pretty large, have you run it through Handbrake to optimise it?
     
  3. xtopher

    xtopher

    Joined:
    Jul 3, 2009
    Posts:
    78
    The resolution isn't the issue, it's the length/overall file size, and only when working with GearVR hardware. We can play out full res movies just fine, but only when they are about 300mb or less. In contrast, running on the exact same hardware configured for Google Cardboard I can play an 800mb movie at the same res. It's like there is a physical limit being imposed somewhere.
     
  4. Sephis

    Sephis

    Joined:
    Sep 4, 2012
    Posts:
    12
    Did you try to use easy movie texture or other videos player plugin?
    I recently made a GearVR application, it was playing 4k videos with easy movie texture and some of those videos was almost 1Go and I just had an issue when I tried to play multiple videos at the same time.
     
  5. pshort

    pshort

    Joined:
    Mar 10, 2016
    Posts:
    6
    Hi, we had the same issue and I completely feel your pain. And like you, it was file size that was the deciding factor not bitrate or resolution.

    We are using MPMP as our video player plugin but I think it is similar to AVPro.

    Is the phone on Lollipop? We noticed that the OS made a difference as to the size we could play. On Lollipop it was 270MB, on Marshmallow it was 700MB (or there abouts). We were unable to resolve this size restriction, so we ended up creating two player scenes depending on which OS the phone was on. For the Lollipop player we had to break the video into 5 smaller videos and play them back-to-back. There is a slight moment when you switch videos (similar to a dvd chapter change) but if you have any black moments you can disguise this pretty well.

    Our final video settings were:
    H.265
    2048x2048
    30fps
    Tgt bitrate: 5
    Max bitrate: 12

    This gave us one 695MB for Marshmallow (18min 40sec) and five smaller videos (~170MB) for Lollipop.

    If you come up with a solution that doesn't involve splitting up the video, please let me know!

    Hope this helps,
    Pete
     
  6. pshort

    pshort

    Joined:
    Mar 10, 2016
    Posts:
    6
    Hi xtopher, did you ever resolve this? I have found a potential solution you might want to explore.

    Are you using the StreamingAsset folder for storing videos? On Android this folder is converted into a JAR file so that files cannot be accessed directly via the file system. Android MediaPlayer memory maps the file into RAM and then plays from there. What this means is that the whole video file must be copied to RAM before it can be played. The above limitation is simply the device running out of memory.

    Perhaps try saving the videos to a persistent data folder on the device and get your player to reference it from there.

    Hope this helps,
    Pete
    breakingfourth.com
     
    ninestar09 likes this.
  7. hassank

    hassank

    Joined:
    Nov 18, 2015
    Posts:
    48
    @pshort were you able to save the video to a persistent data folder on device and play using Easy Movie Texture? I'm running into the issue mentioned on this thread.
     
  8. dagon

    dagon

    Joined:
    Jan 4, 2013
    Posts:
    20
    I'm using AVPro load and play video from Oculus/360Videos folder like default 360videoplayer app in gearvr .
    I was play video samsung video demo 598mb and every think is good ,no have any problem.
    Hope this helps,
     
  9. UmairEm

    UmairEm

    Joined:
    Nov 7, 2015
    Posts:
    31
    Hi all,

    I am going through same issue. Video goes to black on Note 5 with Lollipop and same results with S6 Edge Marshmallow. Has anyone found consistent solution?

    Thanks
     
  10. dagon

    dagon

    Joined:
    Jan 4, 2013
    Posts:
    20
    Solution is do not place video in your project and StreamingAssets folder
     
  11. UmairEm

    UmairEm

    Joined:
    Nov 7, 2015
    Posts:
    31
    I guess the problem is with video player plugin. As I am using AVPro video player and I just checked the logcat it is flooded by following error messages:

    And this is caused only when I use OES fast path option. I can not turn it off as device triggers overheat warning in 5 minutes without it. Seems like the developers are aware of it. I will try your solution anyway.

    Many Thanks
     
  12. retrouverons

    retrouverons

    Joined:
    Jan 5, 2017
    Posts:
    1
    Hi Christopher,

    Have you solved the issues on the large videos not playing on Gear VR yet? I have the same problem now with my two Gear VR headsets (first versions) & my two Note 4s. The videos are made with Gear 360 and about 750MB size and 3 min lengths, about 2K resolutions. Would be really helpful to know if / how you solved the issues, as this is my important research projects with an industry customer involved. Thank you so much. Eune


     
  13. Hexacop

    Hexacop

    Joined:
    Nov 26, 2015
    Posts:
    1
    Just another idea... If you have got to play a 3min video you can easily compress it to around 300Mb without any noticeable quality degradation. Use h265 and you can make it even much smaller ;-)
     
  14. 265lutab

    265lutab

    Joined:
    Sep 15, 2014
    Posts:
    155
    Where should the video be placed instead of the StreamingAssets folder? If the PersistentDataPath is the correct place how do I put my movie when the app is downloaded from the GearVR Store?
     
  15. Konrad_Ziaja

    Konrad_Ziaja

    Joined:
    May 31, 2017
    Posts:
    7
    Hey, I am currently on the same boat.

    Video file is
    3.2min
    4k
    h.264
    60k bitrate,

    resulting in 1,5GB.

    Is there a way to do it using unity video player or do I need any of the plugins you mentioned, like avpro (too costly) or easy movie? What path do I use to get the video from Oculus/360videos folder for my app?
     
  16. 265lutab

    265lutab

    Joined:
    Sep 15, 2014
    Posts:
    155
  17. dagon

    dagon

    Joined:
    Jan 4, 2013
    Posts:
    20
    you can using unity video player with play video in url
    you can view video path by "my file" application in samsung phone : select the video -> more ->details
    ex : /storage/emulated/0/Oculus/360Videos/videoname.mp4
    if you want unity application play it you need allow your app read and write permission
    add in AndroidManifest.xml :
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
     
    Last edited: Sep 1, 2017
  18. Konrad_Ziaja

    Konrad_Ziaja

    Joined:
    May 31, 2017
    Posts:
    7
    Hey, quick update from my end to summarize my experience.

    Putting video files outside of the .apk did work and videos played correctly without an issue. You simply need to pass correct path to the video player url (file:///sdcard/...), and use permissions like dagon posted above, in manifest or simply in player settings. This would be problematic for the client though, because he would need to manually copy the movies to the phone(s) and we ended up leaving this idea.

    Next thing we did was copying the video files from streaming assets folder to external folder on startup using File.WriteAllBytes so that everything is done automatically, but copying 1,5GB of video files was too long.

    What I ended up doing was using Easy Movie Texture so I could play h.265 encoded videos because it basically cuts size in half, resulting in having videos of 200-500mb in the project (one video encoded with h.264 was 900mb+). However they still didn't play (200mb should be small enough to fit in ram right?).

    So after a lot of digging I found out that the problem was resolution of the video. I had 4096x2160 videos which work with apps like Samsung Gallery or default Android 360 player without googles, but strangely not on the app I made. Downgrading them to 3840x1920 did all the work and they now sit comfy in streaming assets. You still have to sideload the app because it's over 1GB with movies, but at least it's a single .apk now, and it was never meant to be distributed through any app store so w/e.

    There, hope this helps somebody :)
     
  19. leathie

    leathie

    Joined:
    Aug 14, 2018
    Posts:
    1
    I have similar problems....I download 3d full length movies to my phone and the vr gear googles will play the vids up to about 2GB.....I even put a larger sd card in my Galaxy S7 edge and no change. I am running the OCULUS and Samsung gear software. A lot of the great 3d movies are like 4 to 10 GB and I get an error message when I click to play. I am going to order a generic pair of the google headset and we will see what will happen then.
    So you can watch full length 3d movies with the vr gear....just smaller files....and I use a bluetooth headset over the VR googles for killer audio - a true movie theater experience - of course u can set the software to place u right in the middle of a theater - u can turn ur head and see all the seats and everything!
     
    Last edited: Aug 14, 2018