[FFmpeg-user] ~50% performance difference overlaying static image with png series using -vf/-filter_complex
nicolas.george at normalesup.org
Fri Aug 23 17:20:28 CEST 2013
Le sextidi 6 fructidor, an CCXXI, Paul B Mahol a écrit :
> I didn't benchmark but I assume -loop takes most of time as it decodes
> same file over and over again.
> So instead adding looping of main input inside overlay it would be
> better to add generic solution:
> repeat filter which would repeat each frame [0-inf] times.
There are a lot of things missing in overlay to achieve subtle effects, and
this is only one of them. I will try to make a summary on the -dev
mailing-list with useful suggestions.
To implement this particular effect in the most general case, the original
solution of sandwitching the background in front of the overlay to give the
sync seems the only solution.
If the video is CFR, the following hack should eliminate most of the
overhead due to the loop effect:
-loop 1 -i bg.png -i video.mp4 lavfi ' fps=25 [bg] ;
[bg]  overlay=shortest=1'
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the ffmpeg-user