-2

I want to continue rotate two overlay image parallelly depend on the audio length.

I am using below command and it is working fine to create a video and it is rotating the first overlay gif image. but it is not rotating the second textoverlay.png file. I want to rotate both image in the same time.

ffmpeg -loop,1,-i,background.jpg,-ignore_loop,0,-i,overlay1.gif,-i,textoverlay.png,-i,watermark.png,-i,audio.mp3,-filter_complex,[1]scale=524:524,rotate=0.06*PI*t:c=black@0.0:ow='hypot(iw,ih)':oh=ow[b];[2]scale=406:406,rotate=0.06*PI*t:c=black@0.0:ow='hypot(iw,ih)':oh=ow[pic2];[3]scale=100:50[watermark];[0:v][b]overlay=(W-w)/2:(H-h)/2[over1],[over1][pic2]overlay=(W-w)/2:(H-h)/2[pic3],[pic3][watermark]overlay=(W-120):(H-60),scale=830:830,format=yuv420p,-ss,00:00:00,-to,00:00:08,-c:v,mpeg4,-b:a,3M,-c:a,aac,-b:a,192k,-q:v,1,-shortest,output.mp4

I also tried this link But this is not working.
Any help would be appreciated.
Thanks in advance.

Pradeep Kumar
  • 586
  • 3
  • 19

1 Answers1

0

Add -loop 1 to textoverlay.png, and use ; instead of , in your filtergraph when separating distinct filterchains.

ffmpeg -loop,1,-i,background.jpg,-ignore_loop,0,-i,overlay1.gif,-loop,1,-i,textoverlay.png,-i,watermark.png,-i,audio.mp3,-filter_complex,[1]scale=524:524,rotate=0.06*PI*t:c=black@0.0:ow='hypot(iw,ih)':oh=ow[b];[2]scale=406:406,rotate=0.06*PI*t:c=black@0.0:ow='hypot(iw,ih)':oh=ow[pic2];[3]scale=100:50[watermark];[0:v][b]overlay=(W-w)/2:(H-h)/2[over1];[over1][pic2]overlay=(W-w)/2:(H-h)/2[pic3];[pic3][watermark]overlay=(W-120):(H-60),scale=830:830,format=yuv420p,-ss,00:00:00,-to,00:00:08,-c:v,mpeg4,-c:a,aac,-b:a,192k,-q:v,1,-shortest,output.mp4
llogan
  • 121,796
  • 28
  • 232
  • 243