首页 > 解决方案 > 在视频 #2 中重新缩放和重新定位 FFMPEG 中的图像

问题描述

我正在尝试使用 Mobile-FFMPEG 来实现此结果:
所需的视频输出显示

使用以下命令:

电子/命令:

ffmpeg -y -loop 1 -t 10 -i /storage/emulated/0/InvitationTemp/image.png -s 991x903
-loop 1 -i /storage/emulated/0/InvitationTemp/image_0.png 
-loop 1 -i /storage/emulated/0/InvitationTemp/image_1.png 
-loop 1 -i /storage/emulated/0/InvitationTemp/image_2.png 
-loop 1 -i /storage/emulated/0/InvitationTemp/image_3.png 
-loop 1 -i /storage/emulated/0/InvitationTemp/image_4.png 
-filter_complex 
    
[1]scale=eval=frame:w='min(292/2,298/2)':h='min(292/2,298/2)',rotate=a=0*PI/180:c=black@0:oh='roth(0*PI/180)':ow='rotw(0*PI/180)':bilinear=1,fade=in:st=0:d=1:alpha=1[img1];  [2]scale=eval=frame:w='min(258/2,322/2)':h='min(258/2,322/2)',rotate=a=0*PI/180:c=black@0:oh='roth(0*PI/180)':ow='rotw(0*PI/180)':bilinear=1,fade=in:st=1:d=2:alpha=1[img2];
[3]scale=eval=frame:w='min(240/2,218/2)':h='min(240/2,218/2)',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[img3]; [4]scale=eval=frame:w='min(290/2,320/2)':h='min(290/2,320/2)',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[img4]; [5]scale=eval=frame:w='min(425/2,91/2)':h='min(425/2,91/2)',rotate=a=0*PI/180:c=black@0:oh='roth(0*PI/180)':ow='rotw(0*PI/180)':bilinear=1,fade=in:st=4:d=5:alpha=1[img5];
[0][img1]overlay=137:341:shortest=1:format=auto[bg1];
[bg1][img2]overlay=609:74:shortest=1:format=auto[bg2];
[bg2][img3]overlay=432:325:shortest=1:format=auto[bg3];
[bg3][img4]overlay=700:579:shortest=1:format=auto[bg4];
[bg4][img5]overlay=92:786:shortest=1:format=auto,format=yuv420p /storage/emulated/0/InvitationEventVideos/video_2021_Feb_09_09_39_38.mp4

但是我收到了这个输出......未能正确地重新调整和重新定位我的 png。

https://www.youtube.com/watch?v=EIJEPIHTcio

标签: videoffmpeg

解决方案


推荐阅读