[FFmpeg-user] I found the bugs

Mark Filipak markfilipak.imdb at gmail.com
Mon Jun 17 18:35:19 EEST 2024


On 17/06/2024 03.16, Paul B Mahol wrote:
> On Mon, Jun 17, 2024 at 3:16 AM Mark Filipak <markfilipak.imdb at gmail.com>
> wrote:
> 
>> To expand on my idea:
>>
>> The video is this:
>> I P B B P B B P B B I P B B..
>> I want to change it to this:
>> I B B P B B P B B P I B B P..
>>
> 
> If this is what I think it is, your are wasting your time.

It is possible. But can FFmpeg do it? You see, Paul, I read in several places from seemingly 
authoritative people that professional videos are PTS-ordered. I've since discovered that 
professional videos are almost always DTS-ordered -- I now have a packet browser and have seen it to 
be true. However, I have seen professional videos that are PTS-ordered but I didn't think too much 
about it at the time.

My idea is to take the 4-second video -- DTS-ordered -- that I sent to trac, change it to 
PTS-ordered, and see if '-vf showinfo' and '-f show_frames' respond correctly. It's a long shot, but 
it might show something useful -- what if PTS-order made showinfo show_frames and framecrc all 
agree? Wouldn't that be something interesting?

> Its nonsense to change order of encoded frames, no manipulation of clock
> can fix that.

No, no. Manipulation of PCR. Fix up the PCRs so that the result is truly PTS-ordered.

> When doing concat you can not concat in middle of group of frames.

I'm not doing that.

> Each beginning and end frame must be the key-frame.

Of course.

>> To do that, I reckon I need to,
>> 1, move the packets that contain P-frames,
>> 2, insert revised 'program_clock_reference_base's and
>> 'program_clock_reference_extension's into each
>> of them to account for the new order, and
>> 3, do some packet fixup (maybe).
>>
>> Is that possible with FFmpeg?
>>
>> --Mark.




More information about the ffmpeg-user mailing list