5

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.

  • 2
    Get a more recent version of ffmpeg from the actual FFmpeg project, not the ill-named and outdated ffmpeg that comes with Ubuntu, which is from Libav, the FFmpeg fork. – slhck May 11 '13 at 9:37
3

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.

|improve this answer|||||
  • Read the question. He asks specifically for avconv – rebellion Aug 15 '17 at 13:06
  • 2
    @Ronny-AndréBendiksen Read the answer. It is not possible with avconv alone. The OP's command was using ffmpeg options that are not supported by avconv. Secondly, this question was asked more than 4 years ago–was your comment necessary? – llogan Aug 15 '17 at 19:14
0

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

|improve this answer|||||

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.