ffmpeg - 将图像序列以相反的顺序转换为视频 [英] ffmpeg - convert image sequence to video with reversed order
本文介绍了ffmpeg - 将图像序列以相反的顺序转换为视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
查看文档,它是我不清楚 ffmpeg 是否允许我以相反的顺序将图像序列转换为视频,例如使用这个序列:
Looking at the docs, it is not apparent to me whether ffmpeg would allow me to convert an image sequence to a video in reverse order, for example using this sequence:
frame-1000.jpg
frame-999.jpg
frame-998.jpg
...
frame-1.jpg
是否可以为帧索引提供步进方向"?
Is it possible to give a "step direction" for the frame indices?
推荐答案
由于您的命名方案的偶然性,您很幸运.
Due to happenstance of your naming scheme, you're in luck.
FFmpeg 的图像序列解复用器有一个起始编号选项,我已经确认它接受负值.
FFmpeg's image sequence demuxer has a start number option and I've confirmed that it accepts negative values.
所以,
ffmpeg -start_number -1000 -i frame%d.jpg reversed.mp4
这里的-"必须被解释为数字系列的一部分,所以它是 frame%d
而不是 frame-%d
.
Here the '-' has to be interpreted as part of the number series, so it's frame%d
and not frame-%d
.
这篇关于ffmpeg - 将图像序列以相反的顺序转换为视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文