[Ffmpeg-devel] PTS / DTS with XViD

Måns Rullgård mru
Tue Jul 18 09:39:04 CEST 2006


Jani Boutellier <bow at ee.oulu.fi> writes:

> Loren Merritt wrote:
>> On Mon, 17 Jul 2006, Jani Boutellier wrote:
>>> Hi,
>>> I'm using ffmpeg's libavformat to read a XViD stream that is
>>> wrapped in the OGM container. It works fine as long as I do not use
>>> B-Frames in XVid.
>>>
>>> When I use B-frames, I assume that I should read the PTS / DTS
>>> -indexes from the AVPacket structure to get the correct frame order
>>> for decoding, right?
>>>
>>> Well, PTS ans DTS both show just the ascending index numbers of the
>>> frames read from the bitstream, giving no hint of the correct frame
>>> decoding order -- and the video gets messed up.
>>>
>>> Is there another place where I should read the PTS and DTS from or
>>> what is the correct procedure anyway?
>>>
>>> BTW: I do not use libavcodec to decompress XVid frames, I just want
>>> read the frame bitstream from the OGM file with FFMPEG.
>
>> OGM doesn't know anything about B-frames (it has all the same
>> limitations as AVI in that regard). And all containers I've ever
>> heard of store frames in decoding order.
>> --Loren Merritt
>>
> Are you sure?
>
> Both of these sites indicate that there should be B-frame support:
> http://www.divxland.org/container_formats.php
> http://en.wikipedia.org/wiki/Comparison_of_container_formats

Both are wrong, as is to be expected of sites like those.  Which do
you trust, random websites or people who actually read specs and write
code?

> and if I play the ogm-clips that contain B-frames with TCPMP it looks
> fine. VLC media player shows the clip also.

Upload a sample.  We'll have a look and see what's wrong with it.

-- 
M?ns Rullg?rd
mru at inprovide.com




More information about the ffmpeg-devel mailing list