[FFmpeg-user] crop video file using frame numbers in between

Mark Himsley mark at mdsh.com
Wed Apr 18 23:46:55 CEST 2012


On 18/04/2012 22:42, Mark Himsley wrote:
> On 18/04/2012 15:41, Chandu Nalluri wrote:
>> Hi
>> Is there anyway cut a video using "frame numbers in between" using
>> ffmpeg.
>> Suppose, I have an avi file with 1000 frames, and I want to cut video
>> from
>> 301 th frame to 500 th frame. The -frames option is giving only first set
>> of n frames. Anyone, please help me.
>
> Use the select filter.
>
> ffmpeg -i <input> -vf 'showinfo,select=gte(n\,301)*lte(n\,500)' <output>

Sorry - you don't need the showinfo - I accidentally left that after my 
testing...

-- 
Mark



More information about the ffmpeg-user mailing list