[Libav-user] audio sync issues with h264

Gonzalo Garramuno ggarra13 at gmail.com
Wed Jun 11 23:56:49 CEST 2014


I have written a viewer that allows writing h264 video with libx264.  
However the audio (mp3, ac3 or aac) comes out of sync with the video.  
The problem seems to be the first 20 frames or so that are not written 
out to the file.

I can reproduce the problem with the muxing.c example from the docs when 
I modify it like the attached diff.
In that case, I cannot tell that it starts early but the sound ends 20 
frames before the end of the movie.

Can someone suggest something to try?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: muxing.patch
Type: text/x-patch
Size: 442 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20140611/0a4dc8e2/attachment.bin>


More information about the Libav-user mailing list