【问题标题】:How to install libtheora for MacOSX (ffmpeg)如何为 MacOSX 安装 libtheora (ffmpeg)
【发布时间】:2013-01-09 13:45:46
【问题描述】:

我的 ffmpeg 版本缺少“libtheora”编解码器,我下载了这个版本的“libtheora”以使其工作。 http://www.theora.org/downloads/ 问题是解压缩zip文件后,我不知道如何安装它。自述文件没有提供很多细节。我只运行make吗? 以前有人这样做过吗?

【问题讨论】:

    标签: ffmpeg ogg-theora


    【解决方案1】:

    用Homebrew很简单:

    brew install ffmpeg2theora
    

    但实际上它不允许您在此之后转换为 OGG/OGV 格式。真正帮助我最终将 MP4 转换为 OGV 格式的是在 libtheora 支持下编译 ffmpeg。详细解释可以在这里找到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
    

    【讨论】:

    • 您好ffmpeg2theora 这个命令不正确!这是最简单最正确的一个:shell ffmpeg2theora <file_input.mp4> --videoquality 7 --audioquality 4 --output <file_output.ogv> 问候
    • 雇佣你如何将此功能添加到 OSX 操作子菜单 github.com/klich3/OSX-Automator-custom-actions
    【解决方案2】:

    您可以使用 brew 为 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
    

    对我来说,它就像魔术一样。

    【讨论】:

      【解决方案3】:

      在阅读了长长的邮件列表并因为人们粗鲁而感到难过之后,我终于为我解决了这个问题。似乎有必要使用--extra-ldflags 和--extra-cflags 指定库路径。所以就我而言,它看起来像这样:

      ./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"
      

      当然,根据您所需的库和版本,这可能会有所不同。

      【讨论】:

        【解决方案4】:

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

        sudo port install libtheora
        

        【讨论】:

        • 我可以用 brew 做同样的事情吗?
        • 不,brew 没有 libtheora 的存储库。
        猜你喜欢
        • 2017-02-14
        • 1970-01-01
        • 2020-05-12
        • 2014-04-22
        • 1970-01-01
        • 2023-01-24
        • 1970-01-01
        相关资源
        最近更新 更多