slide Wipe effects with ImageMagick tool and ffmpeg - ffmpeg

I have to do a four slide effects named 'Wipe Up', 'Wipe Down', 'Wipe Right', 'Wipe Left'. Like curtain of two images for each type. I think it can be possible with cropping of images with 'convert'
convert 01.jpg -crop 1920x5 output_%03d.jpg
where i can get sequence of images and compose at same time to the second image(What I don't know..) And then I can build video from this sequence of images with ffmpeg:
ffmpeg -i output_%03d.jpg out.mp4
Maybe someone can help me with compossing of images in the same time when I croping? Thanks for any suggestions!
PS: all images have fixed dimensions: 1920x1080

You could use ImageMagick's MIFF format (Multiple Image File Format) to send a stream of multiple, cropped images to another invocation of ImageMagick to put them together in a video sequence. So assuming you start with this:
and did this
convert input.png -crop 1920x10 miff:- | convert - -loop 0 out.gif
you would get this

Related

How can I create a transparent video from transparent images?

I have a set of transparent images, where each one represents a frame of a video. I know that I can overlay them on top of another video using -i %d.png. What I want to be able to do is turn them into a transparent video ahead of time, and then later be able to overlay that transparent video onto another video. I've tried just doing -i %d.png trans.mov and then overlaying trans.mov on top of another video, but it doesn't seem like trans.mov is actually transparent.
You have to use an encoder that supports transparency/alpha channel. You can view a list of encoders with ffmpeg -h encoders and get further details with ffmpeg -h encoder=<encoder name>, such as ffmpeg -h encoder=qtrle. Then refer to the Supported pixel formats line: if has as "a" in the supported pixel format name, such as rgba, then it supports alpha. See a general list of pixel formats with ffmpeg -pix_fmts.
The simplest solution is to mux the PNG files into MOV:
ffmpeg -framerate 25 -i %d.png -c copy output.mov

ffmpeg makes yellow patches in gifs

I have a bunch of png images made from a python script. When I convert the images to a mp4 format using ffmpeg, the video looks good. But the moment I make them into gifs it starts creating random yellow patches as shown below.
The syntax I use to convert png to gif is ffmpeg -i img%04d.png animation.gif
Thanks.

ImageMagick - convert png(s) to animated gif rather than having separate multiple overlapping images

Confuse as to what I'm doing wrong. I used the following command:
convert -loop 0 -delay 10 dog_cursor_24_1.png dog_cursor_24_2.png dog_cursor_24_3.png, dog_cursor_24_4.png, dog_cursor_24_5.png test.gif
Outputs a GIF image but upon viewing, the images are overlapping each other, which I do not want. Should look like a moving picture.
In Imagemagick, you do not use commas. So remove them. Put -loop 0 before the output gif and add +repage after reading the pngs to remove any virtual canvas.
convert -delay 10 dog_cursor_24_1.png dog_cursor_24_2.png dog_cursor_24_3.png dog_cursor_24_4.png dog_cursor_24_5.png +repage -loop 0 test.gif
If that does not work, then post your animation. It may need a different -dispose method.

Glitchiness when I add transparency to a gif and convert it to webm

Starting off I have this gif from google images:
Then I convert the blue to transparency:
convert octopus.gif -transparent "#00AEFF" octopus-transparent.gif
Now I have this (note glitchiness has already started to appear)
Now for the grand finale, I convert it to webm:
convert octopus-transparent.gif tmp%03d.png
ffmpeg -framerate 25 -f image2 -i ./tmp%03d.png -c:v libvpx -pix_fmt yuva420p octopus.webm
See the following screenshot. It is still transparent, but the sizing is no longer steady, and frankly it's starting to look a little creepy:
I don't really know much about video codecs and I've just got this far with others' help. I'd appreciate advice as to how I can change these commands to avoid the glitches.
Your problem may be due to unequal sized frames from an optimization, so add -coalesce to your command, so that it is
convert octopus.gif -coalesce -fuzz 25% -transparent "#00AEEF" miff:- | convert -dispose background - octopus-transparent.gif
If you just want to save as gif again, you can add -layer optimize before saving. But if you want to output to webm, you may need to avoid the -layers optimize.
Also you do not have constant blue color, so you need -fuzz.
The pipe to convert allows one to set the dispose method. It won't work inline in the first convert, since it needs be be set right after reading the input and thus will pickup the blue background rather than the transparent.
What is your IM version? Perhaps you need an upgrade. I get this using IM 6.9.8.3 Q16:

Imagemagick: converting gif to pngs and pngs to gif produce different results

I am getting some problems trying to convert a gif file to pngs (change some colors in the pngs, but not yet) and then reconvert it into gif.
I convert the gif using: convert loading_32.gif loading.png. It produces 11 pngs files, what is pretty fine. But when I am trying to convert these pngs files into gif again using convert -delay 10 -loop 0 *.png loading2.gif , I get a different gif. Here the links to the gifs: original gif and generated gif
Hope someone can help!
This happens because *.png doesn't add the images in the original order. Try the following...
convert -delay 10 -loop 0 loading-{0..11}.png loading2.gif

Resources