[Ffmpeg-devel] Re: mpeg samples with first pkt dts -1 and motion estimation weirdness
Tue Aug 8 22:49:02 CEST 2006
Michael Niedermayer wrote:
> On Tue, Aug 08, 2006 at 08:28:52PM +0200, Baptiste COUDURIER wrote:
>> Hi Michael
>> Sorry to bother you with that issue again.
> no problem but i post the reply to ffmpeg-dev where it belongs i guess
> you wont mind ...
Not at all.
>> Here is a sample with first pkt with dts as -1. That is problematic for
>> other formats (mov, gxf)
> the -1 is not a real bug, you can add some (scaled) constant to all
> timestamps to avoid the problem if you like, if you have some other
> suggestion on how to solve it dont hesitate to tell me ...
> but strictly speaking it is correct, the thing is that if you want
> some frame displayed at time= 0 then you must have a dts<0 if you
> use b frames
Can we have a flag or something that prevent those negative dts and
and treat them in av_write_frame or something ? I already see that code
needed for mov and gxf muxer.
OK, I understand, however that stream only contains only contains P
frames, and dts/pts are different, but parser should set has_b_frames so
that will be fine.
About mov, according to the specs we should still create ctts atom since
pts/dts are different, though it should not be needed.
>> I was wondering if that problem was caused by the motion estimation
>> method or something, maybe you know a way to fix that.
> yes, its trivial, the input file is totally broken, the timestamps are all
> random and invalid, just extract the video
> ffmpeg -i charcot22_cut.mpg -vcodec copy -f mpeg2video video.m2v
> does not work, the file is too broken (ill try to fix ffmpeg so it can
> extract the video) until then please use mplayer -dumpvideo
> and after striping the broken layers off the file can be encoded
> to mp4 without issues, just try it ...
Yes it's trivial, shame on me. I'm sorry.
> have we solved the lavf feeds bad timestamps to gxf issue?
I guess, now figuring out closed gop detection and we are all set.
Thanks a lot.
Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA
SMARTJOG S.A. http://www.smartjog.com
Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312
More information about the ffmpeg-devel