LoginSignup
0
0

More than 3 years have passed since last update.

Ubuntu14.04 64bit(trusty)でHandbrake(disable gtk x265)をCompileした時のエラー対応(opus not found)

Last updated at Posted at 2016-10-01

必要なライブラリのインストール

sudo apt-get update
sudo apt-get -y install git subversion yasm build-essential autoconf libtool zlib1g-dev libbz2-dev libxml2-dev libogg-dev libtheora-dev libvorbis-dev libsamplerate-dev libfribidi-dev libfreetype6-dev libfontconfig1-dev libass-dev libjansson-dev libmp3lame-dev libx264-dev zip unzip tar gzip

エンコード中に「Segmantation Fault」が出力されて失敗するためにlibx264を別でビルド&インストール

sudo apt-get -y build-dep libx264-142
sudo apt-get -y source libx264-142
cd x264-0.142.2389+git956c8d8
sudo ./configure --enable-static --enable-shared --extra-cflags=-fno-aggressive-loop-optimizations
sudo make -j8
sudo cp libx264.so.142 /usr/lib/x86_64-linux-gnu/

Handbrakeビルド

git clone https://github.com/HandBrake/HandBrake.git hb
cd hb
./configure --disable-gtk --disable-x265
cd build
sudo make -j8

コンパイル中に以下のエラーが出るので個別に対処

ERROR: opus not found
/usr/bin/ld: -lharfbuzz not found

libopusを手動でビルド&インストール

handbrakeのソースフォルダ配下「/contrib/libopus」に移動して以下を実行

cat module.defs
~
LIBOPUS.FETCH.url = http://download.handbrake.fr/contrib/opus-1.1.3.tar.gz
~
wget http://download.handbrake.fr/contrib/opus-1.1.3.tar.gz
tar zxvf opus-1.1.3.tar.gz
cd opus-1.1.3
./configure
make -j12 && make install

libharfbuzz-devをインストール

apt-get install libharfbuzz-dev

再度ビルド&インストール

cd build
sudo make -j8 && make install
HandBrakeCLI --version
[11:29:37] hb_init: starting libhb thread
[11:29:37] thread 7f4cd8333700 started ("libhb")
HandBrake 20160929182728-d398531-master
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0