[Libav-user] audio sync issues with h264

Gonzalo Garramuno ggarra13 at gmail.com
Thu Jun 12 00:04:37 CEST 2014


On 11/06/14 18:56, Gonzalo Garramuno wrote:
> 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?
I should add that encoding with the mpeg4 codec works without a problem.


More information about the Libav-user mailing list