2013-01-09 33 views

回答

0

您是否试过Macports(http://www.macports.org/)来安装ffmped或libtheora? 如果你没有它...下载安装它。 然后进入您的控制台并执行此:

sudo port install libtheora 
+0

我可以用啤酒做同样的事吗? –

+0

不,brew没有libtheora的回购。 –

2

这是非常简单,Homebrew

brew install ffmpeg2theora 

但实际上它不会让你转换成OGG/OGV格式在此之后。实际上帮助我将MP4转换成OGV格式到底是在编译ffmpeglibtheora的支持。详细的解释可以在这里找到ffmpeg Mac OSX compilation guide。而在此之后,我终于能够运行following command

ffmpeg -i input.mkv -codec:v libtheora -qscale:v 7 -codec:a libvorbis -qscale:a 5 output.ogv 
3

您可以为ffmpeg的安装libtheora与酿造

brew install theora 

要在你的ffmpeg应该重新编译ffmpeg的使用它。解来源:https://trac.ffmpeg.org/wiki/CompilationGuide/MacOSX

brew install automake fdk-aac git lame libass libtool libvorbis libvpx opus sdl shtool texi2html theora wget x264 xvid yasm 

git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg 
cd ffmpeg 
./configure --prefix=/usr/local --enable-gpl --enable-nonfree --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid 
make && sudo make install 

因为对我来说就像魔法。

1

在阅读了一个很长的邮件列表并因为人们很粗鲁而感到难过之后,我终于为我解决了这个问题。似乎有必要用--extra-ldflags--extra-cflags来指定lib路径。所以在我的情况是这样的:

./configure --prefix=/usr/local --enable-gpl --enable-nonfree \ 
--enable-libass --enable-libfdk-aac --enable-libfreetype \ 
--enable-libopus --enable-libtheora --enable-libvorbis \ 
--enable-libvpx --enable-libx264 --enable-libxvid 
--extra-ldflags="-L/usr/local/Cellar/lame/3.99.5/lib \ 
-L/usr/local/Cellar/libogg/1.3.2/lib \ 
-L/usr/local/Cellar/theora/1.1.1/lib \ 
-L/usr/local/Cellar/libvorbis/1.3.5/lib \ 
-L/usr/local/Cellar/xvid/1.3.4/lib" \ 
--extra-cflags="-I/usr/local/Cellar/lame/3.99.5/include \ 
-I/usr/local/Cellar/libogg/1.3.2/include \ 
-I/usr/local/Cellar/theora/1.1.1/include \ 
-I/usr/local/Cellar/libvorbis/1.3.5/include \ 
-I/usr/local/Cellar/xvid/1.3.4/include" 

根据您的需要的库和版本,这可能是当然不同。