Elmar Hanlhofer - Grinch Selfie
zoom

English / Deutsch | Print version Plop Linux  
Twitter
twitter

<< Previous
Install Wireshark

Table of Contents

Next >>
Install Java, Universal Media Server

Install HandBrake CLI


HandBrake is an open source video transcoder. Homepage: https://handbrake.fr/

You find the HandBrake source code and build script in the 99-optional/handbrake/ directory or download the package handbrake.tar.gz. I created a build script for the stable version and the Git version. The Git version supports more presets.

The HandBrake GUI needs GTK3, but GTK3 is currently not part of Plop Linux. So, you can compile only the command line version. Using the command line version is quite simple.


How to use HandBrake


You can use presets for various devices to transcode your videos. To list the presets use 'HandBrakeCLI -z'. The presets of the stable and Git version are different.

Transcode parameter:

--preset: Select preset for a device.

-i: Input movie file.

-o: Output movie file.

Example: Git version of HandBrake - Transcode for Xbox One

HandBrakeCLI --preset "Xbox 1080p30 Surround" -i "original-movie.mp4" -o "new.avi"

Example: Git version of HandBrake - Transcode for Playstation 3 and 4

HandBrakeCLI --preset "Playstation 1080p30 Surround" -i "original-movie.mp4" -o "new.avi"

Example: Stable version of HandBrake - Transcode for Xbox

HandBrakeCLI --preset "Xbox 1080p Full HD Surround" -i "original-movie.mp4" -o "new.avi"

Script for HandBrake


Create simple scripts to avoid adding the preset every time.

Base script: Download handbrake-base

#!/bin/sh

PRESET=Set your preset here

if [ "$1" == "" ]
then
    echo You have to specify an input file!
    exit 1
fi

if [ "$2" == "" ]
then
    echo You have to specify an output file!
    exit 1
fi

HandBrakeCLI --preset "$PRESET" -i "$1" -o "$2"

Script for Xbox One:

  • Save the script as 'handbrake-xbox'.
  • Replace line 3 with: PRESET="Xbox 1080p30 Surround"
  • Make the script executable with 'chmod 755 handbrake-xbox'.
  • Copy the script to a directory in your path. For example '/opt/bin'.
  • Use the script: handbrake-xbox "original-movie.mp4" "new.avi"

Script for Playstation 3 and 4:

  • Save the script as 'handbrake-ps'.
  • Replace line 3 with: PRESET="Playstation 1080p30 Surround"
  • Make the script executable with 'chmod 755 handbrake-ps'.
  • Copy the script to a directory in your path. For example '/opt/bin'.
  • Use the script: handbrake-ps "original-movie.mp4" "new.avi"

Build/install the Git version of HandBrake


HandBrake needs additional libraries. All libraries are in the package. Just run 'sh 000_all' to compile and install the required libraries and HandBrake.


Build/install the stable version of HandBrake


The stable version of HandBrake is disabled. You have to rename 2 scripts.

  • Rename '100_X_handbrake-stable' to '100_b_handbrake-stable' to enable the stable version.
  • Rename '100_b_handbrake-git' to '100_X_handbrake-git' to disable the Git version.

HandBrake needs additional libraries. All libraries are in the package. Run 'sh 000_all' to compile and install the required libraries and HandBrake.



<< Previous
Install Wireshark

Table of Contents

Next >>
Install Java, Universal Media Server


© 2016 by Elmar Hanlhofer