6

I have a folder containing many time stamped PNG images which I'd like to merge to a short movie. The contents of that directory looks like this:

└── images
    ├── img_20130421_115547.png
    ├── img_20130421_115617.png
    ├── img_20130421_115926.png
    ├── img_20130421_120034.png
    ├── img_20130421_120129.png
    ├── img_20130421_120245.png
    ├── img_20130421_120354.png
    ├── ...

I tried running the following commands inside the images directory, to no avail:

$ ffmpeg -y -f image2 -pattern_type glob -i 'img*.png' -r 24 out.mp4
ffmpeg version 0.8.6-6:0.8.6-0ubuntu0.12.10.1, Copyright (c) 2000-2013 the Libav developers
  built on Apr  2 2013 17:02:16 with gcc 4.7.2
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
Unrecognized option 'pattern_type'
Failed to set value 'glob' for option 'pattern_type'

$ avconv -y -f image2 -r 24 -i 'img_%08d_%06d.png' out.mp4
avconv version 0.8.6-6:0.8.6-0ubuntu0.12.10.1, Copyright (c) 2000-2013 the Libav developers
  built on Apr  2 2013 17:02:16 with gcc 4.7.2
img_%08d_%06d.png: No such file or directory

$ avconv -y -f image2 -r 24 -i 'img_%*.png' out.mp4     
avconv version 0.8.6-6:0.8.6-0ubuntu0.12.10.1, Copyright (c) 2000-2013 the Libav developers
  built on Apr  2 2013 17:02:16 with gcc 4.7.2
img_%*.png: No such file or directory

$ avconv -y -f image2 -r 24 -i 'img_%.png' out.mp4 
avconv version 0.8.6-6:0.8.6-0ubuntu0.12.10.1, Copyright (c) 2000-2013 the Libav developers
  built on Apr  2 2013 17:02:16 with gcc 4.7.2
img_%.png: No such file or directory

I'm using Ubuntu 12.10. How do I get this to work? thanks.

sa125
  • 1,036

2 Answers2

4

Use ffmpeg, not avconv

avconv does not support the "glob pattern" (among many other things). Use ffmpeg from FFmpeg instead (not the old, fake "ffmpeg" from the Libav fork).

See the FFmpeg Download page for links to already compiled binaries for Linux, OS X, and Windows. Or follow a compile guide.

Example

ffmpeg -framerate 10 -pattern_type glob -i "*.png" output.mkv
  • Consider adding the output option -vf format=yuv420p (or the alias -pix_fmt yuv420p) when outputting H.264 video from images so the output is compatible with QuickTime, WMP, and other dumb players.

  • See the FFmpeg image file demuxer documentation for more info.

llogan
  • 63,280
0

Use the image2pipe demuxer. cat *png | avconv -f image2pipe -i - ....