2013-01-09 38 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" 

根據您的需要的庫和版本,這可能是當然不同。