scientiffic
scientiffic

Reputation: 9415

ffmpeg unable to find encoder 'libvorbis'

I'm unable to transcode a video file to webm because my machine isn't able to find libvorbis. When I run the following command:

ffmpeg -y -i /public/uploads/tmp/1382112521-11953-7661/webm_Untitled.mov -vcodec libvpx -acodec libvorbis -s 640x360  -b 1500k -ab 160000 -f webm -g 30 -aspect 1.7777777777777777 /public/uploads/tmp/1382112521-11953-7661/tmpfile.webm

I get the error

Unknown encoder 'libvorbis'

I already have libvorbis installed on my machine, though (When I try "brew install libvorbis, it tells me: Warning: libvorbis-1.3.3 already installed).

How can I solve this problem?

Here is the full log:

ffmpeg -y -i /public/uploads/tmp/1382112521-11953-7661/webm_Untitled.mov -vcodec libvpx -acodec libvorbis -s 640x360  -b 1500k -ab 160000 -f webm -g 30 -aspect 1.7777777777777777 /public/uploads/tmp/1382112521-11953-7661/tmpfile.webm
ffmpeg version 1.2.1 Copyright (c) 2000-2013 the FFmpeg developers
  built on Oct 18 2013 12:20:19 with Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/1.2.1 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-avresample --enable-vda --cc=cc --host-cflags= --host-ldflags= --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libxvid --enable-libvpx
  libavutil      52. 18.100 / 52. 18.100
  libavcodec     54. 92.100 / 54. 92.100
  libavformat    54. 63.104 / 54. 63.104
  libavdevice    54.  3.103 / 54.  3.103
  libavfilter     3. 42.103 /  3. 42.103
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/public/uploads/tmp/1382112521-11953-7661/webm_Untitled.mov':
  Metadata:
    major_brand     : qt  
    minor_version   : 0
    compatible_brands: qt  
    creation_time   : 2013-09-27 20:08:57
  Duration: 00:00:02.14, start: 0.000000, bitrate: 17460 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 17292 kb/s, 29.88 fps, 29.83 tbr, 90k tbn, 180k tbc
    Metadata:
      creation_time   : 2013-09-27 20:08:57
      handler_name    : Core Media Data Handler
    Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 123 kb/s
    Metadata:
      creation_time   : 2013-09-27 20:08:57
      handler_name    : Core Media Data Handler
Please use -b:a or -b:v, -b is ambiguous
Unknown encoder 'libvorbis'

Upvotes: 32

Views: 20275

Answers (4)

yndolok
yndolok

Reputation: 5607

Edit 2020:

Homebrew now installs libvorbis by default, so you can just run:

brew install ffmpeg

If you're using Homebrew, try this:

brew install ffmpeg --with-libvorbis

...or, if you've already tried installing ffmpeg with Homebrew...

brew reinstall ffmpeg --with-libvorbis

If you want libvpx, too:

brew reinstall ffmpeg --with-libvpx --with-libvorbis

Upvotes: 71

llogan
llogan

Reputation: 134103

Your ffmpeg build is not compiled with --enable-libvorbis which is required if you want libvorbis support in ffmpeg, but you have some options:

Note: Vorbis has been made obsolete by Opus, so consider using libopus instead–especially if you are encoding to VP9/VP8 (WebM).


Download a build

This is an easy option. Already compiled macOS builds of ffmpeg are available and come with libvorbis support. You can just download the executable and optionally put it in /usr/local/bin.


Homebrew

Core

The Hombrew core FFmpeg formulae contains support for libvorbis by default (as of 2019-03-01). First, install Homebrew, then run:

brew install ffmpeg

However, the core formulae no longer supports additional, non-default options such as --with-aom, so if you want to customize it see the option below.

homebrew-ffmpeg

This is a third-party tap that provides a Homebrew formula with lots of additional options you can enable. First, install Homebrew, then:

  1. Uninstall ffmpeg if you installed it from Homebrew core:

    brew uninstall ffmpeg
    
  2. Then install ffmpeg from homebrew-ffmpeg:

    brew tap homebrew-ffmpeg/ffmpeg
    brew install homebrew-ffmpeg/ffmpeg/ffmpeg
    

For more options and info see homebrew-ffmpeg.


Compile

For complete instructions for manually compiling see FFmpeg Wiki: macOS.

Upvotes: 4

vhs
vhs

Reputation: 10089

Homebrew stopped supporting the --with-libvorbis option in late 2018. Precompiled binaries containing libvorbis for Linux, macOS and Windows here: https://ffmpeg.org/download.html

Upvotes: 3

scientiffic
scientiffic

Reputation: 9415

The problem was fixed with the suggestion here of rebuilding ffmpeg using:

./configure --disable-encoder=vorbis --enable-libvorbis; make; make install

http://xiphmont.livejournal.com/51160.html

Upvotes: 0

Related Questions