我正在创建视频使用移动图像使用复杂的过滤器和格式的yuv420,我有问题的宽度是不可除以2(601*900)这样。这个错误发生在一些视频创作中,对许多人来说,它工作得很好。我的滤波器复合体正在缩放、旋转和叠加输入图像。以下是ffmpeg命令:
ffmpeg -loop 1 -t 10 -i background.jpg -s 700x900
-loop 1 -i img1.png -loop 1 -i img2.jpg
-loop 1 -i img3.jpg
-filter_complex
[1]scale=eval=frame:w='72':h='72'[img1];
[2]scale=eval=frame:w='598':h='382',rotate=a=0*PI/180:c=black@0:oh='roth(0*PI/180)':ow='rotw(0*PI/180)':bilinear=1,fade=in:st=2:d=3:alpha=1[img2];
[3]scale=eval=frame:w='598':h='382',rotate=a=0*PI/180:c=black@0:oh='roth(0*PI/180)':ow='rotw(0*PI/180)':bilinear=1,fade=in:st=3:d=4:alpha=1[img3];
[0][img1]overlay=W-w-5:5:format=auto:shortest=1:format=auto[bg1];
[bg1][img2]overlay=44:500:shortest=1:format=auto[bg2];
[bg2][img3]overlay=44:22:shortest=1:format=auto,format=yuv420p"
output.mp4通过对其进行一些搜索,发现-vf滤波器可以调整宽度:高度,但限制了它不能与过滤器复杂的使用。
我的错误日志:
E/mobile-ffmpeg: [libx264 @ 0xbd8c8800]
E/mobile-ffmpeg: width not divisible by 2 (601x901)
E/mobile-ffmpeg: Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height发布于 2021-04-09 07:06:07
在格式之前添加一个刻度。
scale=w=bitand(iw,65534):h=bitand(ih,65534),format=yuv420phttps://stackoverflow.com/questions/67015512
复制相似问题