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 VideoPlayer freezes on Google Pixel 3

Discussion in 'Audio & Video' started by Dumamax, Jan 22, 2019.

  1. Dumamax

    Dumamax

    Joined:
    Jul 2, 2013
    Posts:
    4
    I have been having an issue for awhile now that I have been unable to solve, and I'm not quite sure where to go to find a solution. I am creating an app that utilizes the video player on android, and whenever the video is played it will freeze randomly and will not resume without restarting the app altogether. It seems like it has specific points it likes to freeze at (especially a specific frame around the 7 second mark), but sometimes it will run fine all the way through, or freeze before or after that mark in a near random way. It definitely tends to freeze on specific frames more than others, but there's no knowing which one it will freeze on each time.

    I have tried creating an empty project with only the video player and main camera, and setting the render mode to the near plane, far plane, and even a material override on a plane within the scene, but the issue persists regardless. Even though the visual and audio freezes, using Debug.Log(video.isPlaying()) shows that the video is still technically playing, and this is confirmed when you wait long enough, the video will reach its end and will stop (the frozen frame will go away as if the video has ended normally). This will also happen regardless of the video clip it plays, and the duration of the video. I have tested a video with a length less than 5 seconds, and I haven't gotten it to freeze yet, but I wouldn't be surprised if it could still happen at this point.

    I think this may have something to do with the Google Pixel 3, because I haven't encountered this issue on any of my old phones, and when I test my app (or the new empty project) on my friend's Galaxy S9, it works fine with no issues. I'm at a loss, and have tried everything I could think of to troubleshoot this issue to no avail. Any help would be greatly appreciated! Thank you!
     
    Last edited: Jan 28, 2019
  2. AndyUnityDeveloper

    AndyUnityDeveloper

    Joined:
    Dec 7, 2013
    Posts:
    7
    Hi @Dumamax did you figure it out? I'm seeing the same issue on the Pixel 3 and other devices too. However, in my case the audio continues. I'm trying different encodings to see if it helps.
     
  3. Dumamax

    Dumamax

    Joined:
    Jul 2, 2013
    Posts:
    4
    Unfortunately I haven't been able to figure out why this is happening yet. I only have access to a few types of phones, so I'm not 100% sure this is a Pixel 3 issue specifically or if it is a larger issue overall. Have you experienced this issue with any other devices in particular?
     
  4. MikeGDev

    MikeGDev

    Joined:
    Dec 19, 2017
    Posts:
    53
    Hi @Dumamax on some phones the video was freezing for me when using .mp4 but when switching to .webm it worked.

    However, I experience that the video is flipped upside down on the Pixel 3 no matter which format I am using. Have you also experienced this?