0
I'm totally a newbie to FFmpeg and programming stuff, so the question might be too stupid... I have a video and want to crop it into small pieces and render out each one, so I'm trying to use a FOR loop:
FOR /l %x IN (0,40,1000) DO ffmpeg -i sample.avi -filter:v "crop=20:20:x:x" outx.avi; done
What I got is: [NULL @ 0000000002624220] Unable to find a suitable output format for 'outx.avi;' outx.avi;: Invalid argument
Anyone can help this out?
Thanks for the answering first! I removed the trailing, then the error gone! But seems like all the file will save as a same name"outx.avi", I tried "outx.avi" because I thought it will be save as out1.avi and then out2.avi ... but actually it doen't work... is there anyway I can make them save in different name in the for loop? – Link – 2017-09-28T15:22:12.067
I change the file name to out%x.avi and fixed! – Link – 2017-09-28T15:29:29.357
Glad you got it working. If this answer solved your question, please mark it as accepted using the green checkmark next to it. Thanks. – slhck – 2017-09-28T17:20:33.597