I'm trying to convert a set of .PNG files and a .WAV file into an Ogg Vorbis video using ffmpeg on Windows 7. When I run "ffmpeg -codecs" I can see libvorbis listed, but when I try to use it in a command:

ffmpeg.exe -f image2 -r 1 -i "dir\%04d.png" -i "dir\audio.wav" -vcodec libvorbis -r 25 out.ogv

I get the error:

Invalid encoder type 'libvorbis'


Well, Vorbis is not video. It's an audio codec, typically embedded in the Ogg container format. Maybe that's where the confusion comes from.

You want to use Theora with libtheora. Also, you should specify both video and audio codecs, rather than having ffmpeg choose one. I typically add -shortest to tell ffmpeg to stop encoding whenever there are no more images or the audio track is finished.

ffmpeg -f image2 -r 1 -i "dir\%04d.png" -i "dir\audio.wav" -c:v libtheora -c:a libvorbis -shortest -r 25 out.ogv

Check the Theora/Vorbis encoding guide for quality options.

  • Wow, the .mp4 file is 10.2MB. The same data in .ogv is 87.6MB. – parsley72 Jul 12 '14 at 22:23
  • Ah, removing the "-r 25" brings it down to 16.4MB. – parsley72 Jul 12 '14 at 22:31
  • The file size depends on the quality too. You have to experiment with that. – slhck Jul 13 '14 at 11:09

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.