Help with FFMPEG script

I have the following script in a button and it works great:

for /R %%A IN (*.mp4 *.avi *.mkv *.m4v) DO ffmpeg -i "%%A" -vf "select=gte(n,2500)" -vframes 1 "%%~nA.jpg"

This will make a video still of every video file in the current folder. I would like to modify it so that it will only work on my selected files rather than every file in the current directory.

Any help would be greatly appreciated.

Try

ffmpeg.exe -i {filepath} -vf "select=gte(n,2500)" -vframes 1 {filepath|ext=jpg}

Unfortunately, that does not work. The command prompt window pops up for a fraction of a second and that's about all that happens.

ffmpeg.exe -i {filepath} -vf "select=gte(n\,2500)" -vframes 1 {filepath|ext=jpg}

Next time, put your command in a code block. It's not that hard.

1 Like

That did the trick, thank you.