- Home /
VideoPlayer - Audio lag on Android,VideoPlayer - Audio Lag on Android
For the playback of VideoPlayer, there has always been a problem that the audio and video will not be synchronized. The audio track will be later than the video. The degree of the lagging is different on different devices. I have tried to use the VP8 compression format. Some device have improved but some others cannot playback or still lag, the biggest disadvantage is that the file will be fat when packing the AssetBundle files.
I wonder is anyone have the same (or similar) problem or have a solution? BTW, I dont know how to do if the Audio Output Mode of VideoPlayer selects API Only? I can't find any related usage at present.
My environmental information is:
Unity version: {Unity2018.4.6f1}
PlayerSettings: {Platform = Android(min API Level= 16), AutoGraphicsAPI = true, MultithreadedRendering = false}
Project Settings: {Audio.DefaultSpeakerMode = Stereo, Audio.DSPBufferSize = Best latency, Audio.MaxVirtualVoices = 512, Audio.MaxRealVoices = 32}
VideoPlayer: {Source = VideoClip, SkipOnDrop = true, AudioOutputMode = Direct}
The format of the video file is mp4:
Format: H.264, AAC, 44100Hz, stereo (LR)
Resolution: 1920x1080
Size: 1.1 MB
FrameRate: 30.14
Data transfer rate (BitRate): 1.23 Mbit / sec