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

查看:59
本文介绍了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天全站免登陆