[FFmpeg-user] Packet corrupt on cut, notice on concat

Paul B Mahol onemda at gmail.com
Mon Feb 19 12:22:27 EET 2024

When trimming packets and later concatenating packets, ensure that no
packets that are not trimmed from stream of packets and thus are still part
of final file depend on any frame from any dropped/removed stream of
packets for correct glitch-free decoding.

Also ensure that there is no dangling packet in final file, dangling frames
- the frames that are not key frames and are not used by any other frame
for correct glitch-free decoding.

Also probably modern codecs can use various techniques to code packets in
various subtle incompatible ways for concatenation and trimming, like
single packet having multiple or partial frames encoded inside.

On Sun, Feb 18, 2024 at 6:04 PM Mark Filipak <markfilipak.imdb at gmail.com>

> On 18/02/2024 11.53, Gyan Doshi via ffmpeg-user wrote:
> > On 2024-02-18 09:59 pm, Mark Filipak wrote:
> >> On 18/02/2024 05.09, Gyan Doshi wrote:
> >>>
> >>> Add -mpegts_flags +initial_discontinuity to get rid of the corrupt
> packet messages. This may or
> >>> may not get rid of the glitches.
> >>>
> >>> Regards,
> >>> Gyan
> >>
> >> Hey, Gyan,
> >>
> >> No effect whatsoever. Same message, same glitches.
> >
> > I forgot to mention, it has to be added to the trim commands.
> Do you mean to '-ss' & '-to'?
> Oh, no, no. Even if it worked, what would I do with all the bad PTSs and
> audio frames left dangling.
> No, '-ss' & '-to' are disasters.
> Do you have any reaction at all to the news that decimal PTSs & DTSs are
> being truncated up? Did you
> know that? Why do you think it was done?
> --Mark.
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".

More information about the ffmpeg-user mailing list