ffmpeg How to add apng dynamic diagram on video and let it play circulated

0

ffmpeg How to add apng dynamic diagram on video and let it play circulated:

ffmpeg -y -i input.mp4 -ignore_loop 0 -i test.png -  
filter_complex 'overlay=x=100:y=100:shortest=1' out.mp4

Do you have any other ways?

Skey JIA

Posted 2018-07-06T06:01:07.687

Reputation: 13

Answers

0

Use the movie filter to load the APNG image and set loop=0 to loop forever:

movie=test.png:loop=0

So in total:

ffmpeg -y -i input.mp4 \
-filter_complex \
    'movie=test.png:loop=0[animation]; \
    [0:v][animation]overlay=x=100:y=100:shortest=1' \
out.mp4

I created a program that overlays an animated PNG on top of a video. It uses the same technique — check out the README for an example.

slhck

Posted 2018-07-06T06:01:07.687

Reputation: 182 472

link How can I solve this problem? – Skey JIA – 2018-07-08T03:54:01.757

Is it really a problem? The message tells you exactly what happens. – slhck – 2018-07-08T16:42:19.103