[FFmpeg-user] Why are these different?
Paul B Mahol
onemda at gmail.com
Mon Feb 12 10:16:30 EET 2024
On Mon, Feb 12, 2024 at 2:24 AM Mark Filipak <markfilipak.imdb at gmail.com>
wrote:
> On 11/02/2024 17.39, Paul B Mahol wrote:
> > On Sun, Feb 11, 2024 at 11:08 PM Mark Filipak <
> markfilipak.imdb at gmail.com>
> > wrote:
> >> On 11/02/2024 16.42, Paul B Mahol wrote:
> >>> Codec copy with -ss before -i and after -i is not documented that it
> gives
> >>> different results
> >>
> >> Does that make sense? I think it's not documented because no one knows
> how
> >> to explain the results.
> >
> > It is self explanatory.
>
> Hahaha... That's funny. You're a comedian, Paul.
>
> >>> because once you do not decode everything from start you basically can
> >>> not expect to get always (for any container and for any input)
> >>> frame-accurate results in both cases.
> >>
> >> I don't think decoding is being done. The cutting/trimming can be by
> >> dropping packets & remuxing.
> >> The packets have to be 'opened' to read the PTSs, but I don't think
> >> there's actual decoding.
> >
> > Packets here are just demuxed, not decoded. So -c copy will demux, so
> > sample accurate audio seeking is not possible.
> >
> >> '-ss'-before-'-i' is cutting at the right point.
> >
> > That one actually seeks without demuxing each packet from start.
>
> I think we're getting closer to my problem. So '-ss'-before-'-i' looks at
> the packet headers and the
> PES headers, but only individually. It doesn't form streams until it gets
> to the cut point. Then it
> begins forming the various streams. Is that what you mean?
>
> >> '-i'-before-'-ss' is cutting at the wrong point.
> >
> > This one does not seek at all, it just demux from start and drops packets
> > up to certain point.
>
> So, wouldn't the end result be the same? Many people have said that but
> that's not been my
> experience. Not at all.
>
> > For -c copy, that one demuxes from start (without any seeking, but just
> > skipping packets processing) but gives output only after timeline point.
>
> Sorry. "That one"? Which one? They both have '-c copy' of course.
>
> > Which is kind of logical because it does not decode at all. And for
> complex
> > codec that have different forward/backward frame predictions it will give
> > incorrect results because PTS may not match DTS - presentation timestamp
> vs
> > demux timestamp.
>
> DTS is not demux timestamp. And what do you mean by "it"? What is the
> antecedent of "it"? I'm lost
> in your explanation.
>
> > So for '-c copy' -ss after -i is mostly not useful, exp. for complex
> > video/audio codecs with complex interframe coding.
>
> As I wrote earlier in this thread, I did '-i'-before-'-ss' on a lark to
> see if it would be better.
> It was worse.
>
> So, it seems like I have the operations right and that they should be the
> same but they're not.
>
Operations are different and logically gives different results almost
always in any situation.
>
> Correct? Are you saying that '-ss'-before-'-i' & '-i'-before-'-ss' should
> be identical?
>
I never said such nonsense, and it is not bug of any sort.
I could be beneficial to explicitly mention that -c copy is not frame
accurate (no matter what position of -ss).
>
>
> _______________________________________________
> 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