gpt4 book ai didi

image - FFmpeg:计算将图像和 .mp3 转换为视频的时间

转载 作者:行者123 更新时间:2023-12-04 22:46:21 25 4
gpt4 key购买 nike

是否有任何公式可以用来计算 FFmpeg 将单个 .jpg 图像和 .mp3 歌曲转换为视频所用的时间?

我正在使用以下代码:

ffmpeg -loop 1 -r ntsc -i image.jpg -i song.mp3 -c:a copy -c:v libx264 \  -preset fast -threads 0 -shortest

Lets say we have an image with X resolution and .mp3 length of L. Would the formula be:

time = X * L(in seconds) ?

感谢您的任何提示。

最佳答案

首先,使用键“-t 10”运行基准测试,这意味着 10 秒基准测试并计算运行时间。

ffmpeg -i .......... -t 10 -f null - -benchmark

基准输出,运行时:utime:

bench: utime=3.203s
bench: maxrss=215036kB
[aac @ 0000026cb6474600] Qavg: 1569.054

关于image - FFmpeg:计算将图像和 .mp3 转换为视频的时间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15831197/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com