ffmpeg的:输出到同一个文件夹递归输入源? [英] ffmpeg: Output to the same folder as source with recursive input?

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

问题描述

我有很多的GIF我想转换成许多子目录webms的,我有这个脚本,将做到这一点,但它会输出到脚本所在的目录:

I have a lot of gifs I want converted to webms in many sub directories, and I have this script which will do it, but it will output to the directory where the script is located:

for /r %%a in ("*.gif") do ffmpeg -i "%%a" -c:v libvpx -crf 12 -b:v 4000k "%%~na.webm"
pause

我已经尝试了一堆东西,但我无法弄清楚如何让输出在同一个子目录土地作为输入文件,所以我可以保持文件夹结构。

I've tried a bunch of things, but I can't figure out how to get the output to land in the same sub directory as the input file so I can maintain the folder structure.

编辑:这是我使用Windows批处理文件

it's a Windows batch file I'm using.

推荐答案

您缺少为输出文件名两个命令修饰符。

You are missing two command modifiers for your output filename.

"%%~dpna.webm"

这篇关于ffmpeg的:输出到同一个文件夹递归输入源?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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