[FFmpeg-devel] frames not parsed correctly for VOB file (mpeg2)

Christian Cier-Zniewski christian.cier
Wed Feb 3 19:40:48 CET 2010

Michael Niedermayer schrieb:
> On Wed, Feb 03, 2010 at 10:52:23AM +0100, Christian Cier-Zniewski wrote:
>> Christian Cier-Zniewski schrieb:
>>> I have analyzed the packet data a bit further and realized that it mostly 
>>> contains at least two frames, instead of a single frame which would I 
>>> expect to be correct.
> they are called field pictures
Just before reading your reply I realized that the material is 
interlaced and that it is correct to return two fields in one packet.
Thanks for clarifying that. That is what I want. My patch is indeed wrong.
> i suggest you look in svnlog we did had an alternative implementation
> of things that did not merge field pictures but i changed it to what we
> have now because it at that time appeared simpler. I had not considered
> apparently that one could store timestamps on only the wrong fields.
Could you please explain what you mean by "on only the wrong fields"?
Since it is ok to have the two fields per packet I have no need to 
change the current implementation.
> Iam not opposed to replace the current code by what we had previously
> if someone (like you) provides a patch that does this. I guess this will
> involve some adapting of the old code from compute_pkt_fields() the
> rest might be simple apply the diffs
> And of course it would require some testing with mpeg-ps/ts and h264
The "only" problem I still have is that no timestamps at all are 
returned by av_read_frame().
The current implementation should return PTS/DTS info though, shouldn't it?
Could you please point me in the right direction where the problem might be?
av_read_packet() successfully returns PTS/DTS info if they are inside 
the PES header of this VOB file.
But somewhere inside av_read_frame_internal() they get lost which should 
not happen.


More information about the ffmpeg-devel mailing list