[FFmpeg-user] problem with audio/video sync after conversion

Arlo Leach arlo at arlomedia.com
Tue Jun 19 21:46:34 CEST 2012


Hi folks,

I'm having a strange problem with audio/video playing out of sync on some videos I've converted with ffmpeg. I've been stuck on this for a few days and would be grateful for any ideas.

Here's a short video as exported from Final Cut Express:

http://www.arlomedia.com/projects/tests/ffmpeg/jug_original.php

This is the video after conversion by ffmpeg, with these settings:

/usr/bin/ffmpeg -i infile.mov -f mp4 -vcodec libx264 -vpre medium -acodec libfaac -r 15 -g 15 -b 360k -ab 48k -ar 22050 -s 512x288 -t 900 outfile.mp4 2>&1

http://www.arlomedia.com/projects/tests/ffmpeg/jug_converted.php

This works fine. But here's another, as exported from Premiere:

http://www.arlomedia.com/projects/tests/ffmpeg/sculpture_original.php

And the converted version, using the same ffmpeg settings as above:

http://www.arlomedia.com/projects/tests/ffmpeg/sculpture_converted.php

In this case, the sound and picture are out of sync when using the Flash version of the JWPlayer that you see on these pages. Playback is fine in the HTML5 version of the player, or the QuickTime player on my computer. I posted to the JWPlayer support board and was told that "usually this is caused by offsets between the audio and video stream, stored in a not widely used atom." I don't really know what that means, but since both videos play correctly before ffmpeg conversion, the problem seems to be a result of the conversion. However, I've compared the converted videos in MediaInfo (a video metadata viewer) and they have identical attributes.

Does anyone know, then, what is different about these videos, and if I can adjust my conversion settings to make them both play correctly in the Flash player?

If you want to take a look, you can download the videos here:

http://www.arlomedia.com/projects/tests/ffmpeg/jug_original.mov (good)
http://www.arlomedia.com/projects/tests/ffmpeg/jug_converted.mp4 (good)
http://www.arlomedia.com/projects/tests/ffmpeg/sculpture_original.mp4 (good)
http://www.arlomedia.com/projects/tests/ffmpeg/sculpture_converted.mp4 (out of sync)

By the way, I'm running an ffmpeg version installed from git on Nov 9 2011, which shows version number N-34622-g701e534. And here are the contents of the "medium" preset file I'm using:

coder=1
flags=+loop
cmp=+chroma
partitions=+parti8x8+parti4x4+partp8x8+partb8x8
me_method=hex
subq=7
me_range=16
g=250
keyint_min=25
sc_threshold=40
i_qfactor=0.71
b_strategy=1
qcomp=0.6
qmin=10
qmax=51
qdiff=4
bf=3
refs=3
directpred=1
trellis=1
flags2=+bpyramid+mixed_refs+wpred+dct8x8+fastpskip
wpredp=2

Thanks,
-Arlo

_______________________________

Arlo Leach
http://arlomedia.com





More information about the ffmpeg-user mailing list