ffmpeg output to dynamically created folders

2019-09-20 06:29发布

My main aim is from the below code:

@Echo off

for %%i in (*.mp4) do (
ffmpeg -i "%%i" -vf fps=1/1800 "%%~ni_%%d.jpeg"
)

I want to be able to use the file name to create a new folder with said file name and store the images that will be screentshot in the folder.

So basically have a separate folder created for each video file and it automatically naming the folder the same name as the file

1条回答
地球回转人心会变
2楼-- · 2019-09-20 07:04

Is this what you want?

@echo off
for %%i in (*.mp4) do (if not exist "%%~ni\" MD "%%~ni"
    ffmpeg -i "%%i" -vf fps=1/1800 "%%~ni\%%~ni_%%d.jpeg")
查看更多
登录 后发表回答