Tiling 4 different animations

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Locked
creinemann
Posts: 18
Joined: 2020-03-30T09:45:05-07:00
Authentication code: 1152

Tiling 4 different animations

Post by creinemann »

I am trying to tile for different animations onto one 2x2 tile, so that each animation appears in a separate box.

I am using this command
cd F:/TILED/
magick montage FC.mp4 08.mp4 09.mp4 14.mp4 -tile 2x2 TILEDout.gif

Which renders this:
Image

But what I want is one of the images in each box instead of four of the same.
Kind of like this (just an example):
Image

snibgo
Posts: 13034
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Tiling 4 different animations

Post by snibgo »

I suppose each input has the same number of frames, and are the same width and height?

There are many way of doing this. You could create enough single-colour frames, all the same size, width and height large enough for the four inputs. Add a "null:" image, then all the frames from the first mp4, and "-layers composite" to put those frame in the top-left corners. Repeat (in a single command) for the other input mp4s.

Something like this (Windows BAT syntax):

Code: Select all

magick ^
  -size 400x400 xc:White ^
  null: ^
  FC.mp4 ^
  -gravity NorthWest ^
  -layers composite ^
  08.mp4 ^
  -gravity NorthEast ^
  -layers composite ^
  09.mp4 ^
  -gravity SouthWest ^
  -layers composite ^
  14.mp4 ^
  -gravity SouthEast ^
  -layers composite ^
  out.gif
snibgo's IM pages: im.snibgo.com

Locked