ffmpeg输出到动态创建的文件夹 [英] ffmpeg output to dynamically created folders

查看:1457
本文介绍了ffmpeg输出到动态创建的文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的主要目的是从以下代码:

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.

因此,基本上为每个视频文件创建了一个单独的文件夹,并自动将文件夹命名为与文件相同的名称 / p>

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

推荐答案

这是你想要的吗?

@echo off
for %%i in (*.mp4) do (if not exist "%%~ni\" MD "%%~ni"
    ffmpeg -i "%%i" -vf fps=1/1800 "%%~ni\%%~ni_%%d.jpeg")

这篇关于ffmpeg输出到动态创建的文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆