Create a folder.jpeg for videos from batch script

cmd.exeffmpeg

I want to be able to run a batch file and it looks in all the folders within directory and creates a folder.jpeg for each flv it finds in a folder.

I have this script that works but it puts the folder.jpeg outside of the directory

for %%i in (*.flv) do ffmpeg -i "%%i" -f mjpeg -ss 00:00:14.435 -f image2 -vframes 1     "folder.jpeg"

useing ffmpeg to create the folder images

Best Answer

Try running something like this in the top level folder:

for /r %%i in (*.flv) do ffmpeg -i "%%i" -f mjpeg -ss 00:00:14.435 -f image2 -vframes 1 "%%~dpifolder.jpeg"
Related Question