2

I have a sequence of .pngs and I want to encode them into a video using the h264 codec.

After a bit of googling I found that the proper incantation for doing this is

avconv -f image2 -i frame_%08d.png -c:v h264 -crf 1 -r 24 out.mov

but if I try this I get the following error:

[buffer @ 0x1919a40] Invalid pixel format string '-1'
Error opening filters!

Do I need to add extra options to get the .pngs to encode? I looked at the avconv help files but find them rather intimidating and hard to understand. I've uploaded the first .png here in case there is a problem with the input files, although the .pngs open just fine in Eye of Gnome.

The version of avconv I am using is the one you get from the Ubuntu package manager:

avconv version 9.14-6:9.14-0ubuntu0.14.04.1, Copyright (c) 2000-2014 the Libav developers
built on Jul 15 2014 13:57:40 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
2
  • 1
    For some reason I've noticed avconv will throw that error if it can't find the input file.
    – Jonathan
    Apr 5, 2015 at 20:54
  • I get the same error when trying to transcode an avi file with png encoding. The input file is definetly there and can be viewed just fine with totem. Maybe this has something to do with the png format?
    – Marius
    Feb 24, 2016 at 18:57

1 Answer 1

0

At times, as pointed out by Jonathan Leaders, this is caused by the absence of the input file.

Make sure you have a list of files corresponding to the input you have given:

frame_%08d.png

which means

frame_00000001.png
frame_00000002.png
frame_00000003.png

etc.

1
  • Unfortunately I've long since moved on from this problem, but I'm pretty sure those were the file names of the files I wanted to encode (my sample file for instance has this filename format.)
    – user168715
    Feb 24, 2016 at 20:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .