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

Don Moir donmoir at comcast.net
Fri Mar 14 20:26:30 CET 2014


----- Original Message ----- 
From: "wm4" <nfxjfg at googlemail.com>
To: <libav-user at ffmpeg.org>
Sent: Friday, March 14, 2014 11:49 AM
Subject: Re: [Libav-user] Timing Issues Only With Windows Media Player


> 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.

I think it may be whatever codec is installed for playback of that file type and could be just installing a different codec pak or 
whatever could fix it.

Codec packs can be a mess though and ffmpeg removes that nonsense if used for playback. It is totally up to the player though either 
directly or indirectly to handle the time offsets of audio and video that might occur.

WMP may or may not have anything to do with it. You should be able to tell though what is being used (codec pak) for playback or if 
it's a format that is internal to WMP. 



More information about the Libav-user mailing list