[FFmpeg-user] Cut-edits with ffmpeg
tevans.uk at googlemail.com
Fri Jul 26 13:24:18 CEST 2013
On Fri, Jul 26, 2013 at 12:09 PM, S. Fisher <expandafter at yahoo.com> wrote:
> Look at my post of Jul 18 again:
>> It can be done using the filters select, aselect, setpts, and asetpts.
>> Let's say you want to keep only two segments: the one starting at
>> 5 seconds and ending at 20 seconds, and the one between 40 seconds
>> and 52 seconds.
>> ffmpeg -i "sample.avi" -vf select='-between(t,5,20)-between(t,40,52)',setpts=N/FRAME_RATE/TB
>> -af aselect='-between(t,5,20)-between(t,40,52)',asetpts=N/SR/TB sample.mp4
> When you say
> the numbers 130 and 200 refer to seconds, not frames.
No, when you say "between(n,130,200)" the numbers refer to frames :)
It's when you say "between(t,130,200)", as you do in your example,
that is when it refers to timestamps.
More information about the ffmpeg-user