[Ffmpeg-devel] av_seek_frame() issues with audio from MPEG-TS
Wolfram Gloger
wmglo
Wed Dec 7 10:04:43 CET 2005
Hi,
> I begin by finding the first video key frame
> with a PTS that is not AV_NOPTS_VALUE. This will be my starting point of
> playback for my new output stream. Now I need the audio to align up exactly
> so that it starts precisely when the video starts. My idea was to take the
> PTS of the video (no decoding yet so I'm still working with the AVPacket
> container) and make a call into av_seek_frame() to grab the audio frame that
> either starts exactly when the video frame does or just before it.
>
> What I find is that the av_seek_frame() returns an audio frame with a PTS
> greater than that of the video (by many audio frames in duration).
Does this only happen at the start of the file?
Can you check that it also happens when you first seek to somewhere
within the TS file?
I.e., could it be that there simply _are_ no audio frames with a
PTS earlier than your initial video frame.
Regards,
Wolfram.
More information about the ffmpeg-devel
mailing list