![]() The important part here is the command -stream_loop -1 which loops the gif infinitely over the video. This will overlay the gif at the top left corner. Overlaying an animated gifĪssuming that you have a video named video.mp4 and an animated gif named animated.gif - the FFmpeg command to overlay the gif on the video is as follows: ffmpeg -y -i video.mp4 -stream_loop -1 -i animated.gif -filter_complex overlay=x=0:y=0:shortest=1 -map -map 0:a? test.mp4 In this article we will focus on overlaying an animated gif which uses a similar process, but with a few important tweaks. In a previous article we discussed how to overlay static images. ![]() ![]() Why would you want to do this? One common pattern is needing to add an animated watermark on a video - this might be a company logo, or some kind of animation. ![]() A common operation in FFmpeg is overlaying an animated asset on top of a video. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |