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

Video Multiple time playback issues on Android

Discussion in 'Audio & Video' started by paranilhwe, Mar 26, 2020.

  1. paranilhwe

    paranilhwe

    Joined:
    Sep 5, 2018
    Posts:
    12
    When playing the same video multiple times on Android, the video slows or drops. To solve this problem, I tried to destory and re-create the video player every moment, but the problem still occurs. Does anyone know about this?
     
  2. DominiqueLrx

    DominiqueLrx

    Unity Technologies

    Joined:
    Dec 14, 2016
    Posts:
    260
    Hi!

    I haven't seen mention of this before. Is the game doing other things that become more intensive as time progresses? Or maybe there's garbage collection happening? If you simplify your scene to the maximum (just one VideoPlayer sitting on the main camera, looping a given video), does the problem still happen?

    If so, it'd be worth logging a bug so we can investigate. It'd also be good to know if this happens across different devices, or if it's hapening to every video (try different encodings for example), etc.

    Thanks for bringing this to our attention,

    Dominique Leroux
    A/V developer at Unity
     
  3. paranilhwe

    paranilhwe

    Joined:
    Sep 5, 2018
    Posts:
    12
    videoscene.png
    Hi, Thank you for your reply. To test as you said, I made a very simple scene as you seen in the picture. I tested on 3 devices (galaxy s8, galaxy note 9 and note 10). After played a video 10~20 times, s8 and note9 stopped Immediatly. On note10 it seems ok. The video that I used : 1920x1080, h.264.
     
    Last edited: Mar 27, 2020
  4. DominiqueLrx

    DominiqueLrx

    Unity Technologies

    Joined:
    Dec 14, 2016
    Posts:
    260
    OK, thanks for helping narrow it down.

    You can probably simply further the test scene by omitting the Plane object an having the VideoPlayer render directly in the main camera's near or far plane. You can also turn audio off (Audio Output Mode = None). This will remove further "noise" from the analysis.

    You can also capture the logcat output from one of the failed runs, maybe something interesting will show up in there.

    Something I wanted to ask: is the playback just stopping, or is the app crashing? We have another investigation pending where longer-duration playback ends up causing an internal table overflow, resulting in the app exiting, so this may be the same problem.

    So when you're done with these few additional tests, I feel you can submit a bug so we can pick up the analysis you are starting and come up with a fix.

    Sorry for this situation and thanks for the help!

    Dominique
     
  5. paranilhwe

    paranilhwe

    Joined:
    Sep 5, 2018
    Posts:
    12
    Hi,
    "is the playback just stopping, or is the app crashing?"
    -> Just playback was stopped.
    I am testing various situations now. If I get some meaningful logs, I'll let you know.
     
  6. Diane1379

    Diane1379

    Joined:
    Mar 31, 2020
    Posts:
    1


    Nice sir thats very intresting thanks for sharing this with us