例如: 如果我像这样转换视频:
ffmpeg -i demo.avi -ss 00:00:05 -t 00:00:15 test.flv
速度很快
ffmpeg -i demo.avi -ss 00:45:05 -t 00:00:15 test.flv
我必须等待很长时间才能真正起作用。
有什么办法可以解决吗?
最佳答案
-ss
的行为取决于它在命令中的位置:作为输入或输出选项。正如 ffmpeg 文档所述:
-ss position (input/output)
When used as an input option (before "-i"), seeks in this input file to position.
When used as an output option (before an outputfilename), decodes but discards
input until the timestamps reach position. This is slower, but more accurate.
position may be either in seconds or in "hh:mm:ss[.xxx]" form.
您还可以使用 -ss
作为输入选项和输出选项,这可以提供速度和(可能提高)准确性。参见 [FFmpeg-user] Reducing seek time when start time offset (-ss) is large和对 Enhancing -ss option 的评论有关更多示例和详细信息。
关于video - ffmpeg从指定时间段缓慢转换视频,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12208639/