# handbrake/cfg - "Build" settings for package #--------------------------------------------------------------------- [technotes] 1. The source tarball used by this package was created based on "git" upstream sources. The sources were obtained as follows: ocgitfetch --run \ --checkout=1.8.2 \ https://github.com/HandBrake/HandBrake.git #--------------------------------------------------------------------- 2. "handbrake" depends on numerous other packages. However, it builds its own copies or versions of some of these packages internally. The distro's copies of the packages in question aren't needed. Therefore, in theory, "handbrake's" "depends" block doesn't need to list these packages. In practice, the "depends" block does list some or all of the internal packages (at least, the ones supported by this distro), because this is the simplest way to ensure that we've caught all dependencies. ---------------------------------------------------------------------- 3. This "cfg" file copies source tarballs for some or all of the de- pendencies that the build procedure builds from the subdirectory "spe- cial/download/" located next to this "cfg" file in the distro "/src/" directory tree. If "handbrake" is updated, distro maintainers may need to update the "special/download/" directory tree as well or the build procedure may try to go on the Internet to download files itself. ---------------------------------------------------------------------- 4. Sample "handbrake" commands: Note: The latest version of "handbrake" may no longer support some of these commands. This command converts the longest title on a DVD (usually the main feature) to a "low resolution iPod" output file that's good for iPod viewing: handbrake -i /dev/dvdreaders/DEVICE-NAME \ --longest -o output.mp4 --preset "iPod Low-Rez" This command converts the longest title on a DVD (usually the main feature) to a "high resolution iPod" output file that's good for play- back on a TV set (using an iPod as the playback device): handbrake -i /dev/dvdreaders/DEVICE-NAME \ --longest -o output.mp4 --preset "iPod High-Rez" More "--preset" modes (just a partial list): --preset "Animation" -- For cartoons and computer graphics --preset "AppleTV" -- For AppleTV output --preset "Classic" -- Faster encoding but lower quality --preset "Constant Quality Rate" -- High quality in a single pass, but un- predictable file sizes and bitrates --preset "Deux Six Quatre" -- High-quality x264 encoding --preset "iPod High-Rez" -- For playback from iPod to TV screens --preset "iPod Low-Rez" -- For playback on an iPod --preset "PS3" -- For playback on a Sony PlayStation 3 --preset "PSP" -- For playback on a Sony PlayStation Portable Note: Replace "/dev/..." with the appropriate Linux device name. Al- ternatively, mount the appropriate DVD device and specify the "mount" directory instead of the device name. Warning: Some encoding modes may take a long time on older PCs (they may be five times slower than realtime or slower). ---------------------------------------------------------------------- 5. Sample low-level "handbrake" usage: You can specify low-level settings as opposed to "presets" like "iPod Low-Rez". For example: mount -o loop -t iso9660 /var/tmp/foo.iso /mnt/cdrom handbrake -i /mnt/cdrom -o output.mp4 \ --title 27 \ -e x264b13 -b 500 -R 44100 -B 128 -2 -w 320 umount /mnt/cdrom Explanation of "handbrake" options used: --title 27 Select one DVD title (by title number) -e x264b13 Set codec to x264 (baseline profile) -b 500 Set average video bitrate to 500kbps -R 44100 Set audio sample rate to 44100 -B 128 Set audio bitrate to 128kbps -2 Request two-pass encoding -w 320 Set output width to 320 pixels ---------------------------------------------------------------------- 6. Encoding speeds: For a lightly-loaded 1.7 GHz PC, "handbrake" used to be 5 to 10 times slower than real-time when it generated high-quality high-resolution output files. For modern PCs, as of mid-2021, "handbrake" ran at closer to real-time though in the same range for some cases. ---------------------------------------------------------------------- 7. Known bug in release 0.9.0: Putting chapter markers in an MKV container used to cause a lockup at the end of the encoding procedure and resulted in an unusable file. The problem was probably corrected in release 0.9.1 or 0.9.2, but the fix hasn't been confirmed. #--------------------------------------------------------------------- [buildtimes] 00.12 hours (or 007.10 minutes) - 2021 L.A. dedi box: 6x2 CPU 32GB RAM 00.18 hours (or 010.75 minutes) - ThinkPad W530 i7 4x2 32GB RAM 00.37 hours (or 022.20 minutes) - HP EliteBook 8560w 32GB RAM using clang 9 #--------------------------------------------------------------------- # Build times using older "handbrake" and/or "gcc" releases: 00.09 hours (or 005.62 minutes) - ThinkPad E540 i7 4x2 16GB RAM 00.10 hours (or 005.85 minutes) - HP EliteBook 8560w 32GB RAM 00.19 hours (or 011.68 minutes) - Dell Inspiron 6400 2.0 GHz Intel Duo 7200 2GB RAM 01.00 hours (or 059.88 minutes) - Compaq 1.7 GHz Intel Pentium 4 512MB RAM #--------------------------------------------------------------------- [settings] altpkg = yes defer = glibc64 exepack = yes fortran = disabled license = See "license*.txt" in installed tree licfile = COPYING revision = numeric tmpsize = 561M unpack = relaxed dontfind = \ dav1d ffmpeg2 ffmpeg3 ffmpeg4 \ ffmpeg5 freetype fribidi jansson libbluray \ libdvdnav libdvdread \ libxml2 portaudio18 x264 x265 setpaths = \ cairo fontconfig gettext libdvdcss libnotify \ libpng libvpx114 opus pcre portaudio19 \ xorg bzip2 zlib lame theora \ gtkcore numactl jpeg-turbo #--------------------------------------------------------------------- [depends] a52dec actools bzip2 cairo cmake dav1d enca esound expat faac faad2 ffmpeg fftw fontconfig freetype2 fribidi gawk gettext graphite2 grep gtk12 gtkcore harfbuzz id3lib imlib2 jam jansson jpeg-turbo lame libao libass libbluray libdca libdvdcss libdvdnav libdvdread libgsm liblzo libmad libmpeg2 libnotify libogg libpng libquicktime libsamplerate libsndfile libvorbis libvpx114 libxml2 libzimg meson mkvtoolnix mp4v2-utils nas nasm2 ncurses ninja numactl opus patch pkgconf portaudio19 python sdl sed speex tar termcap theora util-linux #vlc x264 x265 xorg xvidcore xzutils yasm zlib #--------------------------------------------------------------------- [configure] export UNPACKTOP=`pwd` rm -fr /tmp/handbrake-pc.log # These source directories exist in HandBrake's "contrib" directory. # However, as of Winter 2024, they don't seem to be used. So, we use # the system versions instead and delete these directories to force # consistency. rm -fr contrib/{bzip2,lame,libopus,libvpx,zlib} mkdir -p download cp -p $PKGDIR_SPECIAL/download/* download/ bash ./configure \ --prefix=$PKGDIR_PROD \ --optimize=speed #--------------------------------------------------------------------- [build] export UNPACKTOP=`pwd` cp -p $PKGDIR_SPECIAL/pkg-config.wrapper.in pkg-config chmod 755 pkg-config PATH=`pwd`:$PATH cd build smpmake smpmake install #--------------------------------------------------------------------- [postbuild] BINDIR=$PKGDIR_PROD/bin cd $BINDIR ln -nsf HandBrakeCLI handbrake #--------------------------------------------------------------------- cd $BINDIR PROGBASE=ghb rm -fr ../xbin/ mkdir -p ../xbin/ mv $PROGBASE ../xbin/ cp -p $PKGDIR_SPECIAL/$PROGBASE.wrapper.in $PROGBASE chmod 755 $PROGBASE #--------------------------------------------------------------------- # Original URLs. These URLs were valid at one point, but may have died # since then. If you download newer versions of tarballs [etc.], don't # delete the original versions, as you may not be able to replace # them. [urls] url_debian = tbd url_home = http://handbrake.fr/ url_lfs = n/a when last checked url_tarball = git # See "technotes" in "cfg" file #--------------------------------------------------------------------- [history] 180518 Updated from 1.0.7 to 1.1.0 180620 Updated to 1.1.1 180908 Updated to 1.1.2 190218 Updated to 1.2.1 190223 Updated to 1.2.2 210816 Updated to e6a032ade ("git" hash) 211004 Updated to a8bc2549b - same as 1.4.2 220109 Updated to a11651939 - same as 1.5.0 220110 Updated to 09690d610 - same as 1.5.1 240124 Updated to 6247edabd - same as 1.7.2 240224 Updated to 86156a66c - same as 1.7.3 240921 Updated to 77f199ab0 - same as 1.8.2