0

The scene: Ubuntu 16.04, newly upgraded from 14.04 where things perked along happily with avconv

The props: a directory full of stills, motor_animate_000.gif, motor_animate_001.gif, etc.

The players: Me, a mostly-newbie ffmpeg user, and ffmpeg.

The drama:

Based on a suggestion I had to solve another problem, I execute the command line:

ffmpeg -f image2 -framerate 30 -i motor_animate_%03d.gif motor.mpg

After the usual excrutiating detailed list of stuff from ffmpeg, I get the following error message (in more than one color, ooh, ooh).

[image2 @ 0x14f8420] Could not find codec parameters for stream 0 (Video: none, none): unknown codec Consider increasing the value for the 'analyzeduration' and 'probesize' options motor_animate_%03d.gif: could not find codec parameters Input #0, image2, from 'motor_animate_%03d.gif': Duration: 00:00:04.03, start: 0.000000, bitrate: N/A Stream #0:0: Video: none, none, 30 fps, 30 tbr, 30 tbn, 30 tbc File 'motor.mpg' already exists. Overwrite ? [y/N] y No decoder for stream #0:0, filtering impossible Error opening filters!

Can anyone tell me what's going on and how to fix it? All I want to do is make an mpeg clip out of a bunch of one-frame gifs.

Thanks.

  • How were the GIFs created? And have you tried with a recent binary? – Gyan Jan 6 '17 at 19:12
  • GIFs were created using Scilab. It works for one frame if I specify a fully qualified file name. I'd really rather not step outside of Ubuntu's package maintenance protocol on this -- I'm using other things (kdenlive) that work Just Fine using the Ubuntu version of ffmpeg, and don't want to throw myself into Dependency Hell. – TimWescott Jan 6 '17 at 21:01
  • And I spot-checked some of the GIFs -- they look just fine, at least to Ristretto. – TimWescott Jan 6 '17 at 21:04
1

It's worth a try using the concat demuxer.

First, create a text file like this:

file 'motor_animate_000.gif'
file 'motor_animate_001.gif'
file 'motor_animate_002.gif'
file 'motor_animate_003.gif'
...

Then run

ffmpeg -f concat -i list.txt motor.mpg

Do note that by just specifying a .MPG filename as output parameter, ffmpeg will encode to MPEG-1 at a bitrate of 200 kb/s. If MP4 is not acceptable and .mpg is needed, then add -c:v mpeg2video -b:v 1000k after list.txt to set codec and avg. bitrate. For MP4, just change extension; the defaults are decent.

  • That gives me a buttload of warnings of the ilk "DTS -922328613750886, next:100000 st:0 invalid dropping // PTS -922328613750886, next:100000 invalid dropping st:0 // Past duration 1.999992 too large". But it works. Thanks. – TimWescott Jan 7 '17 at 17:57
  • Yeah, you can ignore those. The concat demuxer usually works with video files which contain valid PTS values, not a relic like GIF. – Gyan Jan 7 '17 at 17:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.