This repository contains HandBrake with supporting programs MakeMKV and libdvdcss packages for Fedora distributions. Along with HandBrake, the same repository is used to host the CUDA and FFMpeg enabled Blender and a FFMPeg binary compiled with most of the possible options. I’m not able to provide separate repositories for them as either you have a full blown multimedia collection with each component strictly tied to each other, or you just have the plain Fedora repositories with no license/patent encumbered options.
None of these packages can be distributed inside the main Fedora repositories as they are presented here due to patent and licensing issues or simply because they are coupled with non open source software.
These packages try to comply as maximum to the Fedora Packaging Guidelines; which means they have
debuginfo packages, default Fedora’s GCC compile time options (where possible) and standard locations for binaries, data and docs.
Supported Fedora/CentOS/RHEL distributions:
- Fedora 22 – i686/x86_64
- Fedora 23 – i686/x86_64
- CentOS/RHEL 6 – i686/x86_64
- CentOS/RHEL 7 – i686/x86_64
Not all distributions are on par regarding features and packages, let’s say most of the development goes on to the latest Fedora release due to it being my daily desktop.
HandBrake, MakeMKV and libdvdcss
HandBrake HandBrake is a tool for converting video from nearly any format to a selection of modern, widely supported codecs. MakeMKV is a one-click solution to convert video into free and patents-unencumbered format that can be played everywhere. It converts the video clips from proprietary (and usually encrypted) disc into a set of MKV files, preserving most information but not changing it in any way. Additionally MakeMKV can instantly stream decrypt video without intermediate conversion and can decrypt Blue Ray discs and protected DVD discs. libdvdcss is a support library designed for accessing DVDs without having to bother about the decryption.
By the combination of these 3 packages any video title can be ripped or transcoded without problems.
Additional libraries that are normally fetched during HandBrake compilation have been pre downloaded and are shipped in the source rpm. This to avoid unnatural behaviour when compiling packages with Fedora tools such as mock or Koji.
HandBrake is made of two separate packages;
HandBrake-cli. The former being the GTK main GUI interface, and the latter the command line program. MakeMKV contains both graphical and command line interfaces into one package.
Fedora ships the latest HandBrake with the GTK 3 interface enabled, while CentOS/RHEL 6 version is at 0.9.8; as it is the last version available that still builds with GTK 2.20 as shipped in the distribution.
HandBrake Bundled libraries
Historically, HandBrake has always linked statically the libraries required by the program. Since version 0.9.9 there’s the option to have them as external libraries and link them to the main executable. This does not mean thought that they can be used straight from Fedora repositories; some have restrictive licenses, some are forked and some do not contain the required patches for HandBrake.
All the libraries that can be linked are now linked from the main repositories, while the rest is left as bundled. Still left as bundled libraries inside the build due to versioning/patches are the following modules (libav is a fork of ffmpeg):
- CentOS/RHEL 6: faac, mp4v2, ffmpeg, libbluray, libdca
- Fedora 22: fdk-aac, x265
- Fedora 23+, CentOS/RHEL 7: libav
The CentOS/RHEL 6 builds still bundle libbluray and ffmpeg, as the packages currently in EPEL 6 are too old. There’s an effort for updating libbluray to the same Fedora version, but the current RPMFusion maintainers don’t want to grant a buildroot override for MPlayer rebuilds, even if the MPlayer maintainer is willing to rebuild it.
To install the repository on a supported Fedora 22+ distribution, run as root the following command:
dnf config-manager --add-repo=http://negativo17.org/repos/fedora-handbrake.repo
To install the repository on CentOS/RHEL:
Then, to install the HandBrake packages (as an example both the graphical interface and the command line tool), perform the following commands:
yum -y install HandBrake-gui HandBrake-cli
yum -y install makemkv
yum -y install libdvdcss
Please note that the 64 bit MakeMKV tarballs contain a 32 bit binary. The binary is required by the main MakeMKV program (
makemkvcon) for proper operation and comes only in binary format. This means that the 64 bit MakeMKV package will pull in the 32 bit mmtdsdec and associated
glibc packages; which in a normal 64 bit desktop system are not guaranteed to be installed:
rpm -q --whatrequires mmdtsdec makemkv-1.9.7-1.fc23.x86_64 $ rpm -ql mmdtsdec /usr/bin/mmdtsdec /usr/share/doc/mmdtsdec /usr/share/doc/mmdtsdec/eula_en_linux.txt $ rpm -ql mmdtsdec /usr/bin/mmdtsdec /usr/share/doc/mmdtsdec /usr/share/doc/mmdtsdec/eula_en_linux.txt $ file /usr/bin/mmdtsdec /usr/bin/mmdtsdec: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.24, stripped
Registering MakeMKV to avoid expiration
Please use the provided beta registration key published by the developers:
After starting MakeMKV just press the “Register” button and paste the provided code.
Playing protected Blu-Ray discs
Starting with version 1.8.5, MakeMKV comes with the
libmmbd library. This library provides a simple API that any application can use to decrypt M2TS/SSIF files from a Blu-Ray disc. The library is licensed under the open-source LGPL license; although the way the library works, it launches a MakeMKV instance in background and communicates with MakeMKV in order to get decryption keys; so a working MakeMKV installation is required for the library to function. The
libmmbd library is designed to be updated very infrequently – all the logic is inside MakeMKV (in
libmmbd is just a proxy. The
libmmbd source code is part of MakeMKV
oss linux package.
libmmbd emulates two popular open-source libraries,
libbdplus. What this means, that after a one-time setup, any application that uses
libbluray/libaacs for decryption will be able to open a protected Blu-Ray disc, as long as MakeMKV is installed. Most notable application that uses
libbluray is Videolan VLC player.
libbluray library, starting from version 0.5.0 supports setting two environment variables to ease
libmmbd loading, so the MakeMKV package already contains what’s required for the override (of course adjusted for 32/64 bit environments):
$ cat /etc/profile.d/makemkv.sh export LIBBDPLUS_PATH=/usr/lib64/libmmbd.so.0 export LIBAACS_PATH=/usr/lib64/libmmbd.so.0
This is equivalent to set an explicit library override in your library directory:
ln -sf libmmbd.so.0 libaacs.so.0 ln -sf libmmbd.so.0 libbdplus.so.0
To debug such a setup, you can use the variable
MMBD_TRACE prepended to the command you want to run. For example, to decrypt and print information from a Blu-Ray disc:
MMBD_TRACE=1 bd_info /dev/sr0
Or to make sure MakeMKV is doing it’s part for VideoLan:
Fully fledged FFMpeg binaries
It started due to my personal usage with support for NVENC, the hardware encoding support for Nvidia video cards, but due to popular request the custom built FFMpeg package that drops in as a replacement for RPMFusion enables linking and support for all the codecs/encoders/decoders that would result in an unredistributable binary.
The following codecs/encoders/decoders/transports have been enabled:
- VP8 and VP9 de/encoding
- WebP encoding
- AAC (Fraunhofer, LibVO and other variants) de/encoding
- OpenAL 1.1 capture support
- BluRay reading
- AMR-WB de/encoding
- AMR-NB de/encoding
- RTMP[E] support
- OpenH264 encoding (H.264 Cisco variant)
- OpenGL rendering
- SSH transport
- Fontconfig/fribidi text support
- CDIO Audio CD support
- NVENC (Nvidia H.264/265 GPU hardware encoder)
- QSV (Intel Quick Sync Video H.264/265 CPU hardware encoder)
- HE-AAC+ (3GPP AAC+ High Efficiency Advanced Audio Codec v2 encoder)
This sobstitutes the FFMPeg binaries that were provided as part of the CUDA enabled programs, as it is now tied to all the other multimedia libraries available in this repository. The support for Nvidia H.264/H.265 hardware encoding/decoding and Intel Quick Sync Video is enabled here as well and the required packages are now installed through the use of RPM weak dependencies.
To install the main FFMPeg binary and enable transcoding of practically everything, proceed as you would with the normal FFMpeg package from RPMFusion:
dnf install ffmpeg
Then after installing, you can see what options have been enabled at compile time by issuing one of the following commands:
ffmpeg -formats ffmpeg -devices ffmpeg -codecs ffmpeg -decoders ffmpeg -encoders
The package has a different Epoch so it is not overwritten by normal updates. The idea is to have all the possible codecs/transports supported out of the box, so also expect HEVC kvazaar (H.265), CIFS transport, and other stuff, as soon as I have more time.
CUDA/FFMpeg enabled Blender
The Blender packages contained herein enable all the possible build options including support for the RedCode image formats (for the old Red line of professional cameras), CUDA and FFMPeg.
Installing Blender works exactly like with the normal package from Fedora, except that the package will pull in all required libraries to enable FFMpeg support:
dnf install blender
If you have an Nvidia video card supported by the latest drivers and have the Nvidia repository enabled, you can install blender with the following command and get the benefit of using your GPU(s) for rendering.
dnf install blender-cuda nvidia-driver
This will pull in CUDA support for the installed Nvidia driver as well as the CUDA kernels for the various cards. Remember to manually load the
nvidia-uvm module (or simply reboot) prior to starting Blender.
CUDA devices will then be selectable in the System pane of the User Preferences in the main Blender interface as depicted in the Screenshot below.
The address for contacting me is in the package’s changelog, otherwise leave a comment in the post, I’ll do my best to reply to everyone.