


pointsize 30 -size 200x200 -gravity center \ # Generate 30 input frames (requires ImageMagick)Ĭonvert -alpha on -background none -fill red \ Using FFmpeg 1.2.1 installed using MacPorts:įfmpeg version 1.2.1 Copyright (c) 2000-2013 the FFmpeg developersīuilt on 13:46:11 with Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn)Ĭonfiguration: -prefix=/opt/local -enable-swscale -enable-avfilter -enable-libmp3lame -enable-libvorbis -enable-libopus -enable-libtheora -enable-libschroedinger -enable-libopenjpeg -enable-libmodplug -enable-libvpx -enable-libspeex -enable-libass -enable-libbluray -enable-gnutls -enable-libfreetype -mandir=/opt/local/share/man -enable-shared -enable-pthreads -cc=/usr/bin/clang -arch=x86_64 -enable-yasm -enable-gpl -enable-postproc -enable-libx264 -enable-libxvid Is it possible to do all of this in one step? I mean, I can write a script and pull it all together by creating multiple files and blah blah blah.but it seems like there has got to be a better way.Encoding a video using "overlay=shortest=1" in the filter chain will lead to the last frame being dropped. The background just turns white.Īlso, I'd like to know how I could combine the three steps into one call to FFMPEG. What I'm missing at this point is how to maintain the transparent background of the original PNG. I was also able to get the JPG into the PNG using:įfmpeg -i frame.png -i a.jpg -filter_complex " overlay=0:0:enable='between(t,0,0)'" frameWithJPG.png Then across the middle, I want to add white letters for a titile.įfmpeg -y -i a.jpg -vf "crop=400:400:0:0" a.jpgįfmpeg -y -i frame.png -vf drawtext="text='Hello, World!': fontcolor=white: fontsize=100: x=(w-text_w)/2: y=(h-text_h)/2" frameWithText.png In the upper left hand corner, I want to insert a.JPG that starts out at 800x800, but I want to crop it down to 400x400.

Let's say I want to end up with a 1000x1000 PNG file with a transparent background.
