Search Unity

Video Video Freezing Problem in Android Environment

Discussion in 'Audio & Video' started by ozlgktg, Mar 17, 2020.

  1. ozlgktg

    ozlgktg

    Joined:
    Jan 15, 2020
    Posts:
    21
    Hello,

    I'm playing with augmented reality in Unity (I use EasyAR SDK). I found some sample projects on youtube and started learning (About: playing video on an image target)

    Everything works fine in Unity, but when I export the skd and try the application on my android phone, the video on Quad freezes suddenly. There is no any error for other functions of the application. Only the video freezes sometimes and suddenly.

    I also changed the transcoding settings of my video, I changed the codec, I reduced the resolution again, nothing has changed. I tried to run with another video, but the result has not changed too. My video always freezes...

    My Video Player settings are as attached.

    Thanks for your help.
     

    Attached Files:

    Last edited: Mar 17, 2020
    dcavadia likes this.
  2. DominiqueLrx

    DominiqueLrx

    Unity Technologies

    Joined:
    Dec 14, 2016
    Posts:
    260
    Hi!

    It sounds like you should submit a bug so we can have a look at the situation. There probably is something specific about the video(s) you are using that are causing the problem. For instance, maybe there is a bad interaction between Unity and the movie's frame rate (transcoding doesn't change this).

    You can try with other movies to see if the problem is generalized or specific to the movie you're working with.

    You can also experiment with the VideoPlayer properties "Wait for First Frame" and "Skip on Drop". Enabling "Wait for First Frame" will make sure the first frame of the movie has been decoded before starting to run the clock. Enabling "Skip on Drop" will cause the VideoPlayer to skip ahead when it finds it's late compared to the current time, and this may help unblock if something in the movie is causing trouble during decoding.

    To simplify the exploration, you should try to replicate the problem in isolation, using a new scene that just has a VideoPlayer on the main camera and plays the movie in one of the camera planes (near or far).

    Let us know what you find, and again, don't hesitate to submit a bug so we can help with the analysis and fix this for you if possible.

    Dominique Leroux
    A/V developer at Unity
     
  3. ProjectileVomitTV

    ProjectileVomitTV

    Joined:
    Aug 12, 2020
    Posts:
    30
    Doesn't seem like the specific clip.

    You can find a bug report here. https://issuetracker.unity3d.com/is...video-clip-is-transcoded-on-android-9-devices

    I've tried lowering the resolution, bitrate, and the spatial quality. It seems that it's the transcoding. I'm using a .webm file to get transparency. If I don't transcode for Android playback is fine, except no transparency. If I transcode, I get the transparency but playback is truly awful. There currently seems like no way of developing an Android app with Unity that handles video with alpha in an acceptable way.
     
  4. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,791
    That bug report says lowering the resolution fixes it. So maybe it’s something else?
     
  5. rsharma9650

    rsharma9650

    Joined:
    Jun 20, 2020
    Posts:
    1
    i am using unity video player and video is freezing on 2 or 3 sec. even i play video in new scene with camera near plane rendering mode video work fine in desktop but in android device this problem is occure i am using 1080p .mp4 video in 30 fps than i realize when i use video resolution higher than device screen size it with freez so i use 720p video and it works, so you need to choose multipal videos for diffrent screen size and choose dynamically according to device screen size
     
    Last edited: Sep 22, 2020
  6. unity_68A881ACD256607C239C

    unity_68A881ACD256607C239C

    Joined:
    Oct 27, 2023
    Posts:
    2
    I'm facing the similar issue. Have your issue resolved..? Can you please help..?