[FFmpeg-user] Merging animated gif and mp3

OldZepHead OldZepHead at gmail.com
Wed Apr 22 20:10:31 CEST 2015

G'afternoon folks.  
Just joined and first time poster, so apologies upfront if this is a basic
question, but I have searched this forum (and google) for a couple days and
I cant find the answer  

I'm trying to put together a video for my sons sports team banquet.  I have
been given an animated gif of a bunch of pictures taken over the year and
the soundtrack that they use for each game in mp3.  I have converted the
animated gif into an mp4 using ffmpeg and it works fine. However, when I try
use ffmpeg to create a single video with the pics and soundtrack merged,
nothing I do works.  I'd like to have the 'CombinedPics' file repeat until
the 'Soundtrack' file ends.

These are just some of the things I've tried:

For the commands below, the files are:
CombinedPics1.gif - animated gif with all of the combined pictures - About
10 mins long
CombinedPics1.mp4 - the gif above converted to an mp4 using ffmpeg (works
Soundtrack.mp3 - A bunch of the songs they use when they come on the field -
about 30 mins long

Just some of the things I've tried...(there are countless other attempts as
./ffmpeg -i Soundtrack.mp3 -i CombinedPics1.mp4 -filter_complex
overlay=shortest=1 Merged_out1.mp4
./ffmpeg -i Soundtrack.mp3 -i CombinedPics1.mp4 -shortest=1 Merged_out1.flv
./ffmpeg -i Soundtrack.mp3 -i CombinedPics1.mp4 -filter_complex
overlay=shortest=1 Merged_out1.flv
./ffmpeg -i Soundtrack.mp3 -ignore_loop 0 -i CombinedPics1.gif
-filter_complex overlay=shortest=1 Merged_out1.flv
./ffmpeg -i Soundtrack.mp3 -ignore_loop 0 -i CombinedPics1.gif  shortest=1
./ffmpeg -i Soundtrack.mp3 -ignore_loop 0 -i CombinedPics1.gif
-filter_complex shortest=1 Merged_out1.mkv
./ffmpeg -i CombinedPics1.gif -loop_input -i Soundtrack.mp3 Merged_out1.mp4
./ffmpeg -i -loop 1 CombinedPics1.gif -i Soundtrack.mp3 Merged_out1.mp4

Two thing's I've picked up on from this forum - 1) loop 1/ignore_loop don't
act the same way is all ffmpeg builds, and 2) the order of operations and
encoding types matter greatly.

I'm on a mac using ffmpeg version:
ffmpeg version 2.6.1 Copyright (c) 2000-2015 the FFmpeg developers built
with llvm-gcc 4.2.1 (LLVM build 2336.11.00)

If anyone could assist it would really be appreciated.

View this message in context: http://ffmpeg-users.933282.n4.nabble.com/Merging-animated-gif-and-mp3-tp4670012.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.

More information about the ffmpeg-user mailing list