[Libav-user] -debug_ts packet order

Kelvin kiboshed at gmail.com
Wed Aug 2 03:48:44 EEST 2017


Does -debug_ts show the packets in the exact order they were found in the
container or reorder the packets based on their timestamps?

I've used libavformat to write a .mov file containing interleaved mpeg4 and
PCM audio frames, setting the DTS based on the same clock for both video
and audio frames so that they remain in sync. However on playback there are
a few audio packets at the beginning then silence until the end when audio
starts up.

Looking at 'ffmpeg -debug_ts -re -copyts -i 00000006.mov -f null out.null',
I can see a few audio packets at the beginning then the audio doesn't start
until 15 seconds later and has weird  timestamps:
https://pastebin.com/Wx0sTxQH The DTS values written out to FFmpeg were OK
but there is a large jump in the audio DTS values when I decode them later
from the .mov file.

I'm interleaving the audio and video all throughout the 15 seconds video
file so it's strange that -debug_ts shows the audio packets appearing at
the end and no audio packets at all for the intervening 15 seconds.

Is there a way with ffmpeg to dump the packets in the order that they
appear in a .mov file, regardless of timestamp ordering?

Many thanks,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20170802/51b7d730/attachment.html>

More information about the Libav-user mailing list