使用ffmpeg从子文件夹中的图像文件的时间段解析

发布于 2025-01-20 02:09:00 字数 464 浏览 3 评论 0原文

是否可以使用FFMPEG在子文件夹中搜索图像文件?我正在从JPEG创建一个时间衰变视频文件,它们位于子文件夹中(对于每个录制的一天)。

这是我当前的代码,如果我在文件夹中使用图像文件运行它,它将起作用,但是如果我尝试在父文件夹(包含子文件夹的文件夹)上运行它,则该代码将无法使用。

ffmpeg -framerate 50 -pattern_type glob -i '*.jpg' -c:v libx264 -pix_fmt yuv420p out3.mp4

编辑:我还在@kesh的建议之后尝试了此操作,

ffmpeg -framerate 50 -pattern_type glob -i '**/*.jpg' -c:v libx264 -pix_fmt yuv420p out3.mp4

这是什么是它确实会在子文件夹中找到文件,但似乎只能编码第一个子文件夹的内容。

Is it possible to search for image files in subfolders using FFMPEG? I'm creating a time lapse video file from jpegs and they are located in subfolders (for each recorded day).

Here is my current code, which will work if I run it in the folder with the image files, but it will not work if I try to run it on the parent folder (the folder containing the subfolders).

ffmpeg -framerate 50 -pattern_type glob -i '*.jpg' -c:v libx264 -pix_fmt yuv420p out3.mp4

Edit: I also tried this after the suggestion from @kesh

ffmpeg -framerate 50 -pattern_type glob -i '**/*.jpg' -c:v libx264 -pix_fmt yuv420p out3.mp4

What happens with that one is that it will indeed find the files in the subfolder but it only seems to encode the contents of the first subfolder.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文