Ffmpeg: move the "image" slider over the "background" from 0% to 100% in sync with audio

I am trying to create a video using the following code:

`$`ffmpeg -loop 1 -r 5 -i video.png -r 5 -i progress.png -filter_complex "overlay=x='if(gte(t,0), -W+(t)*5, NAN)':y=H-h" -i video.mp3 -acodec copy video.mp4

I have the following files

  • video.png http://i.imgur.com/pmwnaLV.png
    • This is a still frame of 1280x720 pixels, which is just a background with the waveform of the video.mp3 file.
  • progress.png http://i.imgur.com/qXltKR2.png
    • it's just a translucent image of 1280x100 pixels that should simulate the animation (from 0 to 100% of the width of the video.png file to simulate the animation "fill up".

My problems are as follows:

  • Video does not sync with audio. The progress indicator fails, and does not end at the end of the song, it just continues and continues on ...
  • Also ... it just goes on and on! I left him making the video in 1 hour, and he never stopped.

, - , , .

- ?

+3
2

, -shortest .

, , , . : " / "

, 3- 1280:

  • 3 = 3 × 60 = 180 .
  • " / " = 1280/180 = 7,11 .

7.11 - , 5 -W+(t)*5,.

, .

+4

!

@AJ29: , .

yuv420, 2px; overlay = format = yuv444 .

ffmpeg -y  -i "wanderhouse - Sugar.mp3" -loop 1 -i frame.png -i waveform.png -i progress.png -filter_complex "[1][2]overlay=x=0:y=H-h:eval=init[over];[over]drawtext=fontfile=impact.ttf:fontsize=72:text='WANDERHOUSE- - SUGAR':x=(w-text_w)/2:y=(h-170-text_h):fontcolor=white:shadowy=2:shadowx=2:shadowcolor=black[text];[text][3] overlay=x='floor(if(lt(-W+(n)*0.248182258846,0), -W+(n)*0.248182258846))':y=H-h:format=yuv444" -shortest -acodec copy -vcodec libx264 -pix_fmt yuv420p -preset ultrafast -crf 10 video.mp4 -report

. 0.248182258846 - , "progress.png" (n).

!

@mark4o: , . qrtle, -, "" ", , .


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

+3

All Articles