[Libav-user] Timing Issues Only With Windows Media Player

wm4 nfxjfg at googlemail.com
Fri Mar 14 16:49:28 CET 2014

On Fri, 14 Mar 2014 09:34:31 -0400
"Stephen H. Gerstacker" <stephen at napkinstudio.com> wrote:

> I’m constructing a video file from pre-encoded packets. Video is H.264, Audio is AAC, and the container is MP4.
> As an example, I have:
> - 20 seconds of video
> - 10 seconds of audio, starting at 5 seconds in.
> I’m checking PTSs and writing with av_write_frame in the proper order. The resulting file works great in VLC and QuickTime, but if I open the video in Windows Media Player, that audio starts playing immediately. Everything else about the audio is fine, it just starts at the wrong time.
> Any idea on why this would be happening? Is there a proper way to push audio in to a video file that doesn’t start immediately?
> I’ve also tried av_interleaved_write_frame, but that didn’t change anything.

For starters, does windows media player even allow audio to start at a
different time? If so, you could e.g. take a "working" file and compare
it with a ffmpeg produced file.

More information about the Libav-user mailing list