Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
animation over a video?
#1
Hi
I'm trying to make an animation that can play over a video. I have 20 files saved as .png so that the end file can be placed over a video so that it shows through the clear area, but when I run the animation playback all the images remain on the screen. If I save them as jpgs of course it's fine.
What's the best way to do this whole thing?
Reply
#2
In animations frame can be of two types:

- replace: the frame replace everything that has been displayed until then
- combine: the frame is added over the existing image

Usually you want mostly replace (but optimizations for file size (like Filters>Optimize>For GIF) can replace some of that by combine).

You tell Gimp if you want combine or replace by adding them in parentheses in the layer name in the layers list: My layer (replace). You can also specify this hen you export the animation.
Reply
#3
Thanks for that. I have tried under both combine and replace options, but when I use the playback under the filters menu it still shows all the frames visible at the same time. Is this because they are .png files?
Reply
#4
(01-18-2019, 09:35 AM)mikefoam Wrote: Hi
I'm trying to make an animation that can play over a video. I have 20 files saved as .png
....snip....
What's the best way to do this whole thing?

Ofnuts has answered from the animation aspect, however IMHO this is more a video editing question.

To combine a video with an animation, one or the other has to be converted to an equivalent format.

It is not usually practical to convert video to animation - large file size - limited colours - etc, so the animation has to get added to the video, which means using a video editor.

Used to be a bit of an art to put a picture-in-a-picture, not any more. Normally I would recommend Openshot for this, but I believe it is a bit flakey in Windows. Have a hunt around for alternatives.

This in linux: https://i.imgur.com/UCslTsr.jpg Easy enough, a sequence of numbered pngs (001.png, 002.png ..) will add automatically and can be scaled/positioned to suit. While a gif can repeat, not so a video, it needs to be copied and pasted to extend the duration.
Reply
#5
Thanks again. You are correct of course. This is for a web page - so when we build the page we can put a gif over a video. The animation I have is on a plain background (it is a series of rendered images out of our cad package). All I'm trying to do is produce a gif that has a transparent background so the video can show though.
Reply
#6
Reads like you need to remove the background and that depends on your images.

Take the 20 png's and File -> Open-As-Layers As a check go to Image -> Mode and check RGB

edit: If you previous optimised the animation, un-optimise it Filters -> Animation -> un-optimise

Then it depends on the image layers but say the background is white you need to add an Alpha Channel to each layer Layer -> Transparency -> Add Alpha Channel This is a bit tedious so I attach a plugin anitools.py that bulk adds.

Next to remove all white Colors -> Color-to-Alpha for each layer. White is the default. If your paper colour is black, color pick that. Another, a script this time c2a-all-layers.scm

screenshots: https://i.imgur.com/TEYnDrp.jpg

Once that is done, export as a gif animation. One frame per layer (replace) for all frames. Check the animation. Note not all gif players correctly display the transparency mask as a chequer pattern, some white, some black.

screenshots: https://i.imgur.com/bamVTvP.jpg


Attached Files
.zip   c2a-all-layers.zip (Size: 1.69 KB / Downloads: 116)
Reply
#7
Thanks I'll give that a go over the weekend (my head hurts right now). However I already put an alpha channel as the background in my cad package - would this still be an alpha channel in Gimp or would I have to do what you suggested?
Reply
#8
Quote:.... However I already put an alpha channel as the background in my cad package..

Easy to check in Gimp. Open one of your png images. Use Layer -> Transparency and if Add alpha channel is greyed out then the image already has an alpha channel. There is also an indication in the layer menu layer name. No alpha is bold and with alpha not bold. Have a look at this one again https://i.imgur.com/TEYnDrp.jpg
Reply


Forum Jump: