ffmpeg can't create Ogg Vorbis

2

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'

parsley72

Posted 2014-07-06T05:44:23.290

Reputation: 940

Answers

2

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.

slhck

Posted 2014-07-06T05:44:23.290

Reputation: 182 472

Wow, the .mp4 file is 10.2MB. The same data in .ogv is 87.6MB. – parsley72 – 2014-07-12T22:23:20.237

Ah, removing the "-r 25" brings it down to 16.4MB. – parsley72 – 2014-07-12T22:31:08.110

The file size depends on the quality too. You have to experiment with that. – slhck – 2014-07-13T11:09:57.870