带有音乐的视频需要很长时间 [英] Video with music taking long time
问题描述
我正在渲染带有过滤器的视频,并在最后添加音频.但是在运行时需要花费很长时间并且要连续渲染.谁能帮助我我哪里做错了?下面是命令
Hi I am rendering video with filters and adding audio at the end. But while running it is taking a long time and rendering continuously. Can anyone help me where I am wrong? below is the command
ffmpeg -i test.png -i test.mp4 -i test.mp3 -y -filter_complex "[1:v]scale=1422:800[scale1],[scale1]rotate=0:c=black@0:ow=rotw(0):oh=roth(0)[rotate0],[0:v][rotate0]overlay=258.04:107.71[mediaoverlayout0],color=black@0:451x137[c1],[c1]setsar=1,drawtext=fontfile='/Windows/fonts/Peddana-Regular.ttf':text='ADITYA':fontsize=121.199:fontcolor=#1e8bc3:line_spacing=16.91,rotate=0:ow=rotw(0):oh=roth(0):c=black@0[rottext1],[mediaoverlayout0][rottext1]overlay=x=544.63:y=263.076[out]" -vcodec libx264 -map "[out]" -map 2:a -preset veryfast -c:a copy -pix_fmt yuv420p op.mp4
推荐答案
添加-最短
输出选项,因为 color = black @ 0:451x137
没有结尾时间,因此会无限期编码.
Add the -shortest
output option because color=black@0:451x137
does not have an end time and therefore encodes indefinitely.
我猜您正在尝试在文本后面制作一个透明框.如果这是您要尝试的方法,请在drawtext中使用各种 box
选项.
I'm guessing you're trying to make a transparent box behind the text. If that's what you are trying to do then use the various box
options in drawtext instead.
此外,您正在使用值为0的旋转过滤器.由于它们什么都不做,您可以忽略它们.
Also, you are using the rotate filter with a value of 0. You could just omit them since they are doing nothing.
这篇关于带有音乐的视频需要很长时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!