[how to] install handbrake on rockstor (non docker) / docker attempt

Here’s the quite space consuming handbrake install process.

Note this is non-docker install. I couldn’t get the best handbrake docker working https://hub.docker.com/r/coppit/handbrake/. Here is my best attempt (which installs but refuses connection to webui and doesn’t convert files thrown in the watch folder). https://gist.github.com/coleberhorst/574c10913e55d82bf369149c115aaefc

The other advantage of installing handbrake on the system directly is the ability to install a disk drive and rip dvds (even copyprotected for archival purposes). Anyways on to install.

Dependencies
I installed dpkg but the built in rpm command would work fine as well. This portion is only required for copyprotected dvds (read most dvds):

sudo yum install dpkg
wget https://centos.pkgs.org/6/naulinux-school-x86_64/libdvdcss2-1.2.11-6.el6.x86_64.rpm
dpkg -i libdvdcss2-1.2.11-6.el6.x86_64.rpm

Install these massive groups and cry as your root space gets sucked up.

sudo yum groupinstall “Development Tools” "Additional Development"
sudo yum install fribidi-devel jansson-devel libogg-devel libsamplerate-devel libtheora-devel libvorbis-devel opus-devel
sudo yum localinstall --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm
sudo yum install lame-devel x264-devel

Building Handbrake
Optionally remove --disable gtk to enable the user interface.

git clone https://github.com/HandBrake/HandBrake.git && cd HandBrake
./configure --launch-jobs=$(nproc) --launch --disable-gtk
cd build && sudo make install

Ripping a dvd
Plug in your dvd drive and verify where it shows up in /dev/. Usually /dev/sr0/. Note that your probably want to change your -o to some location on your filesystem that makes sense. I throw mine in my utorrent-completed folder so it can be grabbed by Radarr or Sonarr etc.

mkdir /media/dvdrom
mount /dev/sr0/ /media/dvdrom/
HandBrakeCLI -f mkv -N eng -m -i /media/dvdrom/VIDEO_TS -o /mnt2/utorrent-completed/TITLE.mkv -e ffmpeg -b 2000 -B 192
umount /media/dvdrom/