New to the forums? Click here to read the "How To" Guide.

Developer? Click here to go to the Developer Forums.

Playback issues with Oculus Video on Gear VR

FunKingFunKing Posts: 41
Brain Burst
edited March 2018 in Samsung Gear VR
After playing a local file in Oculus Video v. 2.48.10 (usually 180° or 360° stereoscopic) one or a couple of times, the Oculus Video app becomes unresponsive during any other video playback (the video plays in slow motion and the GUI stutters), and even the Samsung VR app can't play any videos at all afterwards. Files that play just fine on the Samsung VR can trigger this problem on the Oculus Video.

I've been able to reproduce this issue 100% of the time on two different devices:
A short video sample that triggers the problem can be found here: Clip-Ghost in the Shell VR_3dv_360_TB.mp4 (5s, 8.45MB).

Steps to reproduce the problem:
  1. Download the file into the phone and insert the phone in the Gear VR
  2. Open the file using Oculus Video, and it should play normally (only the 1st time) in 360°, stereoscopic mode.
  3. Play the video a 2nd time. It might play normally again at least on the S7, but already becomes glitchy on the Note 4.
  4. When playing the video a 3rd time, the Oculus Video app becomes very unresponsive during playback (including the GUI). It can't play correctly almost any video, unless the phone is removed from the Gear VR and reinserted.
FWIW, here are some technical details about the video file (from ffprobe):
  major_brand     : isom
  minor_version   : 512
  compatible_brands: isomiso2avc1mp41
  encoder         : Lavf57.66.105
Duration: 00:00:05.03, start: 0.032993, bitrate: 14083 kb/s
  Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661),yuv420p(tv, bt709), 3840x2160 [SAR 1:1 DAR 16:9], 13949 kb/s, 30 fps, 30 tbr, 90k tbn, 60 tbc (default)
    handler_name    : VideoHandler
  Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 126 kb/s (default)
    handler_name    : SoundHandler

I also captured some basic performance stats via logcat on the Note 4, available here: N4_logcat_VrApi.txt. From it one can see how the performance has dropped dramatically.

The problem happens even in airplane mode, after rebooting the device, etc., and both devices uses stock ROMs (none has root), have up-to-date software and OS.

I'm still investigating the logcat to see if I can find anything else interesting to share.

Does anyone else have the same issue?


  • FunKingFunKing Posts: 41
    Brain Burst
    These log entries appear right when Oculus Video plays the video a 2nd time, on the Note 4:
    I OMX     : width (3840),height (2160),fps (30)
    E OMX     :  setParam  sum(16588800) > max resolution(8847360)
    I OMX     : getparameter OMX_IndexParamVideoController remained resource:552960, sum = 8294400
    E ACodec  :  configureCodec multi window instance fail  appPid : 21866
    D VideoPlayerAnalytics: Event : {"name":"oculus_video_sdk_playback_event","module":"com.oculus.vrshell","extras":{"event_type":"on_extract_audio","time_from_launch_ms":88183,"ovr_user_id":"611503492359723","battery_info":"Good,Discharging,37,314","board":"APQ8084","gatekeepers":"oculus_hmp_recording=off,oculus_force_every_frame_logging=off,oculus_video_allow_screen_capture=off,oculus_video_liger_exoplayer2=on,oculus_video_movies_use_experimental_player=on,oculus_video_use_ambisonic_renderer=on,oculus_video_direct_experiment=on,oculus_video_enable_rect_spatialization=off,","session_ID":"3b3d7c77-5c23-4138-a1c7-723d7641e4af","url":"LOCAL","file_extension":"mp4","streaming_type":"mp4","video_id":"0","provider":"local","channel":"com.oculus.cinema","did_extract_video":true,"did_extract_audio":true,"did_start_playback":true,"width":3840,"height":2160,"duration_ms":5033,"fps":0.0,"is_3D":true,"video_mime_type":"video/avc","video_renderer_name":"","audio_mime_type":"audio/mp4a-latm","audio_renderer_name":"","audio_track_count":2,"audio_channel_layout":"stereo","load_duration_ms":33},"time":1519865160761}
    E OMX_C2D : Destroy C2D instance
    E OMX_C2D : Destroy C2D instance
    I ExtendedACodec: Reallocated OMX.SEC.avc.sw.dec in place of
    E OMXNodeInstance: getExtensionIndex(13e:SEC.avc.sw.dec, ERROR: BadParameter(0x80001005)
    E ACodec  : [OMX.SEC.avc.sw.dec] storeMetaDataInBuffers failed w/ err -2147483648
    I ExtendedACodec: setupVideoDecoder()
    I ACodec  : >>> getPortFormat 16, OMX.SEC.aac.dec
    I OMX     : getparameter OMX_IndexParamVideoController remained resource:552960, sum = 8294400
    I ACodec  : [OMX.SEC.aac.dec] Now Loaded->Idle
    W ACodec  : cannot describe color format 0x13 = 19 with stride=0 and sliceHeight=0
    E ACodec  : Wrong cropped rect (0, 0) - (3840, 2160) vs. frame (0, 0)
    E ExtendedACodec: [OMX.SEC.avc.sw.dec] configureCodec returning error -22
    E ACodec  : signalError(omxError 0x80001001, internalError -22)
    E ACodec  : [OMX.SEC.avc.sw.dec] configureCodec returning error -22
    E ACodec  : signalError(omxError 0x80001001, internalError -22)
    E MediaCodec: Codec reported err 0xffffffea, actionCode 0, while in state 3
    E MediaCodec: Codec reported err 0xffffffea, actionCode 0, while in state 0
    E MediaCodec: configure failed with err 0xffffffea, resetting...
    I ACodec  :  [OMX.SEC.avc.sw.dec] Now uninitialized
    I ACodec  :  [] Now kWhatShutdownCompleted event : 6949
    I MediaCodec: Codec shutdown complete
    I ACodec  :  [] Now uninitialized
    I OMXClient: Using client-side OMX mux.
    I ACodec  : [] Now Loaded
    I VideoDirect2: Audio codec initialization: 0.108926 s
    I SEC_BASE_COMP: SEC_OMX_ComponentStateSet: Cur(1) -> Dest(2)
    E NdkMediaCodec: sf error code: -22
    I VideoDirect2: VideoStatus = -10000
    E NdkMediaCodec: sf error code: -38
    I VideoPlayerCore: Command: playbackFailed  0x0 VideoDirect Error
    I VideoSession:  - PlaybackFailed
    I VideoSession:  - State Changed: ready --> failed
    I VideoSession:  - State Changed: failed --> initializing
    I've searched for some of the messages above, problem seems to be related to multiple instances of ExoPlayer. I wonder if there are multiple instances being created, or if the first video playback isn't finished correctly, causing problems on the next video. References:
    So far, Oculus support couldn't reproduce this issue. I've followed all their suggestions but one (factory reset). If anyone have any other recommendation, please let me know. Thanks!
  • iraltairalta Posts: 6
    Hi FunKing,

    We have exactly the same problem with Samsung s7 but not with s6. I talked with Oculus Support and they told me that their engineers are working in the problem, but they couldn't give me a solution yet. 

    Do you find any trick or way to reproduce the video more than three times? We find that with .mkv compression works perfectly, but we would like work to .mp4 compression.

  • FunKingFunKing Posts: 41
    Brain Burst
    Hi Iralta!

    Workarounds so far would be:
     * Use another app (e.g., Samsung VR)
     * Remove and reinsert the phone when you have this problem
     * I didn't test this yet, but I wonder if lowering the resolution and/or bitrate would help
     * I think it worked for me yesterday (but I couldn't reproduce it today on the Note 4): pausing the video before the playback ends.

    If I figure out anything new I'll post in this thread again. 
  • FunKingFunKing Posts: 41
    Brain Burst
    Just adding some more details:
    • The problem doesn't happen in any "cinema" (home, cinema, ant, moon, or void) with any of the following projection modes: 2D, 3D vertical, or 3D horizontal. If you change the file name (removing the "_3dv_360_TB" part), the same video that triggers the problem in 360°, stereoscopic mode can be played multiple times, without problems, in any of the previously mentioned projection modes.
    • The problem is triggered when the video is played in one of the following projection modes: 360°, 360° 3D, 180°, 180° 3D.
    • Here's a screenshot of the Samsung VR app error when loading any video after the problem is triggered by Oculus Video:
  • FunKingFunKing Posts: 41
    Brain Burst
    edited March 2018
    I did a few more tests, converting the original clip into different combinations of video resolutions and bit rates. For reference, I used some values from the FAQ How do I view my own 360 or 3D panoramic videos in Oculus Video on my Samsung Gear VR?:

    For 3D panoramic videos, we recommend the following specifications:


    • 3840 x 1920 resolution at 30 FPS
    • 2048 x 2048 resolution at 60 FPS

    Bit rate: 20 Mb/s

    These formats always triggers the bug:
       3840x2160, 30 fps, 14.083 kb/s, 8,861,995 bytes (original)
       3840x2160, 30 fps,  5.351 kb/s, 3,389,300 bytes (reduced bit rate to 5 Mb/s)
       3840x1920, 30 fps, 11.253 kb/s, 7,127,568 bytes (reduced to recommended resolution)
       2160x2160, 30 fps,  7.737 kb/s, 4,900,619 bytes (reduced to square recommended resolution)

    This next format is an odd one, since it also always triggers the problem (all other videos become slow and causes error on the Samsung VR after a single playback), but is played fine (i.e., without being slowed down) on Oculus Video multiple times:
       2048x2048, 30 fps,  6.950 kb/s, 4,402,097 bytes (reduced resolution)

  • FunKingFunKing Posts: 41
    Brain Burst
    edited March 2018

  • FunKingFunKing Posts: 41
    Brain Burst
    To further investigate this issue, I've installed the Oculus 360 Videos app (Oculus360VideosSDK.apk) from the Native SDK (Oculus Mobile SDK 1.12.0). It is a much "simpler" version of the Oculus Video app, and the "Oculus 360 Videos" app doesn't trigger the bug, no matter what video I play, no matter how many times I play them (even on the Note 4).

    This basically confirms that there is a bug in the current Oculus Video app (2.48.10).

    AFAIK, the source code for Oculus Video is not available, right? I'd love to take a look at it...
  • FunKingFunKing Posts: 41
    Brain Burst
    And finally I received confirmation from Oculus that the problem is acknowledged and is being worked on:
    We're aware of the behavior you've mentioned with the video app after playing videos twice and our team of engineers are actively working on this. I do not have a time frame to provide so all I can do is reassure you that this is known and we're working on future software enhancements.
  • lahj3lahj3 Posts: 4
    I had the same issue when trying to watch videos that I sideloaded onto my Oculus Go. This can be fixed by re-encoding the audio with ffmpeg for a given video. Although Oculus claims to support the aac audio encoding format, I was able to resolve the issue by switching from aac to mp3 audio encoding. The easiest way to do this is to keep your existing video encoding and just change the audio encoding, which you can do with the following ffmpeg command: 
    ffmpeg -i broken_video.mp4 -acodec mp3 -vcodec copy fixed_video.mp4 
Sign In or Register to comment.