[FFmpeg-user] the trim filter
Paul B Mahol
onemda at gmail.com
Fri Jul 5 00:11:23 EEST 2024
On Thu, Jul 4, 2024 at 10:44 PM Mark Filipak <markfilipak.imdb at gmail.com>
wrote:
> On 04/07/2024 14.22, Paul B Mahol wrote:
> > On Thu, Jul 4, 2024 at 8:05 PM Mark Filipak <markfilipak.imdb at gmail.com>
> > wrote:
> >
> >> Is there some secret to the trim filter?
> >>
> >> --filter_complex "split=2[i5][i6],
> >> [i5]trim=start_frame=481:end_frame=134047[o5],
> >> [i6]trim=start_frame=138745:end_frame=246719[o6],
> >> [o5][o6]concat=n=2"
> >>
> >> I get "dup=481", instead, and wind up with 20.061708[3..] seconds of
> black
> >> frames preceding the
> >> segment I want, and the frame rate is 19.181 FPS.
> >>
> >>
> > You need to rewrite audio timestamps, otherwise you get 'empty' gaps.
>
> Have you found an atrim expression that works?
>
> I tried adding atrim=start=20.062. Now playback goes for 20.061708[3..]
> sec of black frames, then
> freezes for another 20.061708[3..] sec, then continues as though nothing
> strange had happened.
>
You need to rewrite timestamps otherwise you get discontinuities.
Also note that each frame have certain number of audio samples in it.
>
> Actually changing the audio frame's PTSes is going to be harder than hard.
>
> --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