Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am using ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers . I need to convert a file .mp4, to .ogg format. I am on Mac OS X, and I have tried this so far:

ffmpeg -i sample_mpeg4.mp4 -acodec vorbis -vcodec libtheora -f ogg output.ogv

I am getting: Unknown encoder 'libtheora'

ffmpeg -i sample_mpeg4.mp4 -acodec libvorbis -vcodec --enable-libtheora output.ogv

I am getting: Unknown encoder '--enable-libtheora'

ffmpeg -i sample_mpeg4.mp4 -acodec libvorbis -vcodec libtheora -f ogv output.ogv

I am getting:

[NULL @ 0x7f81bb00f800] Requested output format 'ogv' is not a suitable output format
output.ogv: Invalid argument

ffmpegtheora is not an option as it can not be install on the server.

share|improve this question
    
What about ffmpeg -i file.mp4 file.ogg? This works on my Debian wheezy box, not sure about Mac OS X. –  user49740 Jan 9 '13 at 13:48
    
Nope. It does not work –  Unknown Jan 9 '13 at 13:54
    
Then it's an OSX-specific problem. You most probably don't have the required codecs. –  user49740 Jan 9 '13 at 13:56
1  
In the future, when asking FFmpeg questions, please include the full, uncut command output, not just the error messages you think are relevant. –  slhck Jan 9 '13 at 14:02

2 Answers 2

Your FFmpeg version is missing the required encoders, libtheora for Theora video and libvorbis for Vorbis audio.

You can only add these encoders by either

  • compiling them with FFmpeg, or
  • installing an executable that bundles them already.

For you the easiest choice would be to download a static version from the FFmpeg download page. They all come with libtheora and libvorbis, regardless of the operating system they were built for.

What you then need to do is extract the download archive and simply run the ffmpeg binary that was included. The correct syntax would be:

ffmpeg -i in.mp4 -c:v libtheora -c:a libvorbis out.ogv

If you want to change the quality for either audio or video, you can change the bit rate, e.g. with -b:v 1M or -b:a 192k. Play with those values and use a higher or lower bitrate depending on the quality or file size constraints you have.

You can also use VBR (constant quality) with -q:v, where values range from 0 to 10 (higher is better), with 7 being recommended. The audio quality can be set with -q:a, again with values from 0 to 10, where 4 is recommended and corresponds to roughly 128 kBit/s.

Note that --enable-libtheora is a configuration option and doesn't work when calling ffmpeg.

share|improve this answer

--enable-libtheora should be used when building ffmpeg from source, not while trying to run the program. You should try rebuilding ffmpeg (using the latest source of course ) and adding support for libtheora during configure (./configure --enable-libtheora etc....)

If you need help on building from source, there's lots of stuff on google, but it boils down (for you) enabling the libraries you need, you can see here and _http://jungels.net/articles/ffmpeg-howto.html for starters.

share|improve this answer
    
There's usually no need to build from source, as it can be quite a chore on OS X. Package managers such as Homebrew simplify this task, but the OP may as well just use a static build from the FFmpeg download page. –  slhck Jan 9 '13 at 14:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.