[FFmpeg-user] Audio Video Lip Sync Problem - IPhone mov

Gagandeep Bawa gagandeep.bawa at ironroad.com
Fri Dec 2 12:29:47 CET 2011

i comment following lines which were setting fps, Now i am getting this
exception -   *[mp4 @ 0x1354c00] time base not set*

//cc->time_base.den = self.OutputVideo_FPS;

//cc->time_base.num = 1;

I also tried by setting their original sample rate and again get exception
- *too low sample rate*

 cc->time_base.den = pCodecCtx->sample_rate;

 cc->time_base.num = 1;

Apart from this if i hard code sample rate 30fps then it works fine for
IPhone4 camera recorded video and lip sync problem goes away. But when i
tried same 30fps sample rate for IPhone3GS camera recorded video then again
lip sync problem appear. Even i tried 25,20,15 fps for IPhone3GS video
nothing worked. Any idea ?

On Fri, Dec 2, 2011 at 11:59 AM, belcampo <belcampo at zonnet.nl> wrote:

> On 12/02/2011 10:47 AM, Gagandeep Bawa wrote:
>> Hi Guys,
>> I am compressing IPhone recorded mov file in to mpeg4 file with in my
>> IPhone app itself. For this i compiled ffmpeg libraries for IPhone and
>> doing compression programmatically using ffmpeg libraries with in IPhone
>> app. Everything working fine except video audio lip sync problem. Video
>> seems to be running slow and not proper sync with audio, however output
>> file duration comes correct same as it was in original file. I checked for
>> 12 sec video and 1 min video both. I am setting 15 frame rate for video. I
>> am just compressing video frames and not compressing audio frames, i am
>> writing audio frames as it is in out put stream.
> That's because you set it to 15fps, the source will be 25 or 30fps. So get
> what you asked for. Leave out the fps setting or set it the same as the
> source.
>> It would be great if some one can help me to resolve this audio video lip
>> sync problem. I need to fix this programmatically only not from ffmpeg
>> command line options.
> ______________________________**_________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/**listinfo/ffmpeg-user<http://ffmpeg.org/mailman/listinfo/ffmpeg-user>


Thanks & Regards,
Gagandeep, Tech Lead Mobility

+91- 7307470044


Ironroad IT India Pvt. Ltd.

IT-6, C-6,SEBIZ SQUARE, Sector-67, Mohali, Punjab, India

More information about the ffmpeg-user mailing list