Search Unity

Video There is a stutter when launching the video player.

Discussion in 'Audio & Video' started by ekdrnqkdrn, Mar 7, 2023.

  1. ekdrnqkdrn

    ekdrnqkdrn

    Joined:
    Apr 20, 2020
    Posts:
    4
    hi.

    I am developing mobile using Unity version 2022.1.0f1.

    When I run the video in the video player, there is a lot of stuttering at the beginning.
    This keeps happening even when playing short videos on loop.

    Many people have inquired about this problem but no solution.

    How can I solve this problem?

    I tried these to solve this problem.
    However, the problem still occurs.

    1. Reduce the video size.
    2. Turn on/off the "Optimized Frame Pacing" option in the project settings.
    3. Toggle "Multithreaded Rendering" option on/off in project settings.
    4. Inside the script Application.targetFrameRate = 60;
     
    Last edited: Mar 9, 2023
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,036
    1. Update to the latest 2022.2 branch, that version is old
    2. Attach the profiler in the android build to see what causes the performance issue
     
  3. Zer0_obscura

    Zer0_obscura

    Joined:
    Nov 20, 2013
    Posts:
    13
    Hello, did you get this figured out? Im having the same issue.
     
  4. ekdrnqkdrn

    ekdrnqkdrn

    Joined:
    Apr 20, 2020
    Posts:
    4
    Reducing the width and height of the image alleviates this problem, but the problem still occurs.
     
  5. The_Island

    The_Island

    Unity Technologies

    Joined:
    Jun 1, 2021
    Posts:
    502
    Can you try enabling WaitForFirstFrame and disabling SkipOnFrameDrop? Unfortunately, I can't help you more than that without more info. Like what is the file, MP4 or webm, the resolution and framerate? Also, the platform you are having the issue with. Is it Android, iOS, or Windows in the Editor? Does it happen on all platform or just one? A video of your problem would also help because stutter can mean different by different people.
     
    Last edited: Jun 9, 2023
  6. ekdrnqkdrn

    ekdrnqkdrn

    Joined:
    Apr 20, 2020
    Posts:
    4
    We use looping video by URL. The video end event counts up and advances to the next event. For example, if we play the same video 15 times, we will go to the next one. Therefore, when SkipOnDrop is enabled, SkipOnDrop cannot be used because the total time and video time are different.

    The video extension is .mp4 and originates from Android phones and Android editors. The resolution of the video is 720x520 and the frame rate is 30 frames.
     
  7. i'm having similar problem in android when loading downloaded video from persistent data path. loading video from url works fine though.
     
  8. The_Island

    The_Island

    Unity Technologies

    Joined:
    Jun 1, 2021
    Posts:
    502
    I would open a bug report
     
  9. halinc

    halinc

    Joined:
    Feb 24, 2019
    Posts:
    32
    I’m experiencing the same: video stutters on Android when loading from device. On iOS everything is fine. Using Unity 2022.3.5f1. Is there an open bug report already on this?
     
    AlonMixed likes this.
  10. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,036
    I'd say just make one
     
  11. Rave-TZ

    Rave-TZ

    Joined:
    Jul 21, 2013
    Posts:
    77
    I'm also experiencing stuttering but only if the video has audio. Smooth playback without audio.