输入参数到FFMPEG [英] Input parameters to FFMPEG

查看:213
本文介绍了输入参数到FFMPEG的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试制作一个依赖于从Linux到Windows的glob输入模式的FFMPEG脚本。不幸的是,不支持,所以我正在寻找一种替代方案。我不想在每次运行脚本时重命名或复制文件,因为这些文件在其他地方使用,我无法重命名,我想避免重复或不必要的临时文件。

I am trying to make an FFMPEG script that relied on a glob input pattern from Linux to Windows. Unfortunately that is not supported so I am looking for an alternative. I do not want to have to rename or copy the files every time I run the script because the files are used elsewhere and I cannot rename them and I would like to avoid duplication or unnecessary temporary files.

globs 数字序列命名图像我唯一的选择在这里?理想情况下,我想输入一个图像路径到FFMPEG的列表替代 ffmpeg -i * .jpg

Are globs numerically sequential named images my only option here? Ideally I would like to input a list of image paths to FFMPEG as a substitute for ffmpeg -i *.jpg

推荐答案

我可以找到最好的解决方案(这是Windows兼容的)是在文本文件中生成一行分隔的文件列表,并将其传递给FFMPEG。例如,要从一堆JPEG生成稳定的MP4:

The best solution I could find (that's Windows compatible) was to generate a line separated list of files in a text file and pass that through to FFMPEG. For example, to generate a stabilized MP4 from a bunch of JPEGs:

ffmpeg -f concat -safe 0 -i ./files.txt -vf deshake=rx=64:ry=64 ./stabilized.mp4

其中 files.txt 以下格式的文件列表。安全选项可以切换具有绝对/相对文件路径的功能。

Where files.txt is a list of the files in the following format. The safe option toggles the ability to have absolute/relative file paths.

# this is a comment
file 'C:/path/to/file1.jpg'
file 'C:/path/to/file2.jpg'
file 'C:/path/to/file3.jpg'

这篇关于输入参数到FFMPEG的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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