Search Unity

Bug Quest 2 - Can't load any new videos after a while.

Discussion in 'Audio & Video' started by unity_72N10sId98y9kg, Aug 8, 2022.

  1. unity_72N10sId98y9kg

    unity_72N10sId98y9kg

    Joined:
    Nov 12, 2020
    Posts:
    2
    I have made a simple VR movie player on the Quest 2. The movies are h265 files stored locally on the device. I load them in a videoplayer component through url. The videoplayer uses a render texture attached to a skybox material so the movie play 360.

    After 30 or so cycles of preparing and playing movies, the video player is not able to load any new video and I receive this error in Unity :
    W Unity : AndroidVideoMedia::VideoDecoder::ConsumeOutputBuffers bad buffer index: -10000

    And these errors in logcat :
    08-08 12:34:25.179 833 8229 E OMX-VDEC-1080P: Failed to call streamon on OUTPUT
    08-08 12:34:25.179 833 8229 E OMX-VDEC-1080P: empty_this_buffer_proxy failure
    08-08 12:34:25.179 833 8229 E OMX-VDEC-1080P: ERROR: Sending OMX_ErrorHardware to Client
    08-08 12:34:25.180 6853 8227 E ACodec : [OMX.qcom.video.decoder.hevc] ERROR(0x80001009)
    08-08 12:34:25.180 6853 8227 E ACodec : signalError(omxError 0x80001009, internalError -2147483648)
    08-08 12:34:25.180 6853 8226 E MediaCodec: Codec reported err 0x80001009, actionCode 0, while in state 6
    08-08 12:34:25.180 6853 6923 E NdkMediaCodec: sf error code: -38
    08-08 12:34:25.180 6853 6923 I chatty : uid=10082(com.APP.myApp) Thread-15 identical 1 line
    08-08 12:34:25.180 6853 6923 E NdkMediaCodec: sf error code: -38

    Since it always happen after XX cycles, I guess some memory is full. I dont see any problem in the profiler, so the RAM must be OK.
    Anyone has experienced this or could give me an hint where to look further?

    I'm using Unity 2021.3.7f1

    Thank you!
     
  2. The_Island

    The_Island

    Unity Technologies

    Joined:
    Jun 1, 2021
    Posts:
    502
    Can you try on using 2022.2+? I know we made some changes related to h265 on android, and we didn't backport it yet.
     
  3. unity_72N10sId98y9kg

    unity_72N10sId98y9kg

    Joined:
    Nov 12, 2020
    Posts:
    2
    Thanks for the hint. Same results with Unity 2022.2. And the same happens with h264 movies.
    When a video is loaded with URL, where is it stored? In the RAM? When I do a Memory profiler snapshot, what should I look for?
     
  4. The_Island

    The_Island

    Unity Technologies

    Joined:
    Jun 1, 2021
    Posts:
    502
    I am reading on the error code, and I see multiple reports in Exoplayer (same backend) with issues similar to what you have. Some people say it is maybe related to not correctly releasing the codec. I am pretty sure we are releasing the codec, but the issue could be with the API. Can you submit a bug report? We will try to investigate
    Is there a reason you need to prepare the VideoPlayer 30 times? Could you pause and seek at the start as a workaround?
    It is probably hardware accelerated, so the textures are probably stored on the GPU, not the RAM.

    Links:
    https://github.com/google/ExoPlayer/issues/3601
     
  5. npsoftware

    npsoftware

    Joined:
    Jan 6, 2023
    Posts:
    1
    Hi!
    I am experiencing exactly the same problems. I got an app, where you travel between various 360 3D video locations. eventually the video player freezes.. Did you find any solution for this?
     
  6. The_Island

    The_Island

    Unity Technologies

    Joined:
    Jun 1, 2021
    Posts:
    502
    If you can reproduce it, you should open a bug report.