[Libav-user] lbavformat Audio Sync

Kelvin kiboshed at gmail.com
Mon Jul 31 14:58:41 EEST 2017


Hi,

Is there a guide to achieving good audio/video sync when using libavformat?

I'm generating .mov files and setting the PTS on both audio and video
frames based on the same system clock, but for some reason when played back
in ffplay/mplayer the video always runs faster than the audio.

Should one not set the audio and video frames' PTS based on the same system
clock?

Using 'ffplay -sync audio' reports a close to zero A-V delay on the command
lne but the video starts in sync and quickly ends up playing several
seconds ahead of the audio.

Using 'ffplay -sync video' does report a growing A-V delay and similarly
the video is playing faster than the audio. In this mode it also resamples
the audio which becomes deeper.

I've included the first few seconds worth of ffprobe -show_frames debug
here in case that helps: https://pastebin.com/69Mcageb

Any hints would be much appreciated.

Thanks,
Kelvin.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20170731/027ef6c4/attachment.html>


More information about the Libav-user mailing list