Audio Delay playing Videos

Discuss any general programming issues here
Post Reply
xabierpayet
Posts: 267
Joined: Fri Feb 24, 2012 9:34 am

Audio Delay playing Videos

Post by xabierpayet »

Is not possible have an AVI (divx) or MPG video playing with the audio synchronized in android?
I did the test in 3 devices with 50 different videos, and the audio is always delayed by about 0.5 to 1 second.
Does not matter which file - always the same issue.
In the computer all work fine.
May be must be possible to add an offset to playvideo? for example: playvideo(1,0,0,{offsetaudio=500})
and displace the audio x milliseconds to fit it in the video.
Mp4 files in Android don't work fine neither, several lag at the first of the file normally.
User avatar
Juan Carlos
Posts: 884
Joined: Mon Sep 06, 2010 1:02 pm

Re: Audio Delay playing Videos

Post by Juan Carlos »

Perhaps the problem is the plugin to decode the video format.
xabierpayet
Posts: 267
Joined: Fri Feb 24, 2012 9:34 am

Re: Audio Delay playing Videos

Post by xabierpayet »

yes, is possible, an updated version of the plugin will be the solution
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Audio Delay playing Videos

Post by airsoftsoftwair »

Hmm, I have to check. This definitely used to work. Maybe some things have changed in OpenSL in more recent Android versions.
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Audio Delay playing Videos

Post by airsoftsoftwair »

I'm afraid I can't reproduce either of the problems. MP4 files play instantly and also there is no lag with videos either.

What is the resolution of those videos that you're trying to play? Keep in mind that on Android there is no GPU-accelerated video playback so there are some limits on what you can play smoothly because it's all done by the CPU so don't expect to be able to play a full HD video smoothly.
Post Reply