ffmpeg output to dynamically created folders

做~自己de王妃 提交于 2019-12-25 18:37:05

问题


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:


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")


来源:https://stackoverflow.com/questions/43388776/ffmpeg-output-to-dynamically-created-folders

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!