On Mon, Jun 17, 2024 at 5:35 PM Mark Filipak <markfilipak.i...@gmail.com> wrote:
> On 17/06/2024 03.16, Paul B Mahol wrote: > > On Mon, Jun 17, 2024 at 3:16 AM Mark Filipak <markfilipak.i...@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. > PTS order is order once frames are decoded and going to be presented to user, thats why it is called presentation timestamps. > > 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? > If decoder follows specifications for decoding bitstreams correctly than changing order of raw encoded frames as stored in bitstream will almost every-time cause broken decoding. > > > 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. > If this is at format container layer, I dunno how would that work even if its is possible to be useful. > > > 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. > > > _______________________________________________ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-user > > To unsubscribe, visit link above, or email > ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". > _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".