Documentation
Install Handbrake
sudo apt install handbrake
Re-encoding videos
-
Open Handbrake
-
Source > browse to video
-
Set Preset as needed
ⓘ See below for more details
- Pick General > Very Fast 720p30 for something you’ll watch only once
- Otherwise, pick General > Fast 1080p30
-
Set other settings; most of the defaults are fine, except:
ⓘ See below for more details
- Go to Audio and check the source audio (to the left of the arrow)
- If the source is 2.0 channels and less than 160 kbps, or if you want highest audio quality, remove the default audio track(s), click Add to add a new track, and for Encoder choose the appropriate Passthru option
- To keep subtitles, go to Subtitles, click Add > Embedded Subtitle List and choose the desired source tracks, or click Add All to keep them all
- Go to Audio and check the source audio (to the left of the arrow)
-
When you’re ready to start encoding, click Start
-
To add more videos while the first one is encoding, simply repeat the above steps, but instead of clicking Start, click Enqueue. You can view the queue at any time by clicking Queue.
-
If you didn’t change the default location, the newly encoded videos will be placed in your Videos folder
More details (most of the defaults are fine except as noted in bold)
👉 Smaller file sizes typically load quicker on streaming devices
-
Presets
- Very Fast will give a much smaller file size and slightly reduced quality as compared to Fast
- Fast presets are good balance between file size and quality
-
Dimensions
- Auto Crop (enabled by default): the video will be automatically cropped to remove black bars on any side
-
Filters
- If your video is interlaced, make sure you select Deinterlace > Decomb (this may be set by default for some presets)
-
Video
- Encoder: x264 (default) - this is the best default choice for most devices
- Some older devices like Sony DVD players only support MPEG-4. Try that if x264 doesn’t work.
- x265 will give better video quality and smaller file sizes, but isn’t supported by many devices yet; only use it if you know your device supports it
- Framerate: 30 (default)
- Container: mp4 (default)
- Quality RF: (default is normally fine) - a higher number gives lower quality (on a logarithmic scale)
- Profile: (default is normally fine)
- Set to baseline for older devices with weaker CPUs, but this will greatly increase the size of the video
- Size: Using x264 and RF: 20 will average about 925 MB per hour of video (this can vary greatly; this is only an average)
- Encoder: x264 (default) - this is the best default choice for most devices
-
Audio
⚠️ Handbrake does an audio re-encode by default
- If you care about file size and the source audio is more than 2.0 channels or more than 160 kbps, leave the default settings
- This will re-encode the audio to 2 channels at 160 kbps
- If you care about audio quality or the source audio is 2.0 channels and 160 kbps or lower, remove the default audio track(s), click Add to add a new track, and for Encoder choose the appropriate Passthru option
- This will pass through the source audio without re-encoding it
- The AAC (default) codec is fine for most purposes
- If you play the video and the audio doesn’t work, try reencoding it with a different codec
- If you care about file size and the source audio is more than 2.0 channels or more than 160 kbps, leave the default settings
-
Subtitles
- For many presets, Handbrake will only add subtitles if the audio tracks are in a foreign language
- To keep any of the source subtitle tracks, click Add > Embedded Subtitle List and choose the desired source tracks, or click Add All to keep them all
- If your subtitles are in a different file you can choose Import SRT or Import SSA to import them into the destination file (recommended)
-
To burn in subtitles:
-
In the Subtitles tab, select the SSA subtitle from the Track dropdown, then click the +Subtitle button
-
The subtitle should appear in the Track list. Fill in the circle in the Burned In column by clicking it to make sure the subtitles will be burned in.
-
By default, Handbrake will use an .m4v extension. Some applications require an .m4v extension to enable certain features (chapters, AC3 audio, SRT subtitles), while other applications require an .mp4 extension to properly handle the video. Change the extension as necessary.
-
Ripping DVDs
-
Install library for reading encrypted DVDs (libdvdcss)
-
Ubuntu
sudo apt -y install libdvdread4 sudo /usr/share/doc/libdvdread4/install-css.sh
(Reboot may be necessary)
-
Mac
-
Install Homebrew
-
Go here and follow installation instructions: http://brew.sh/
-
If you see a window prompt to install Xcode, choose not to install it (all necessary dependencies will be installed by the script)
-
-
Install libdvdcss
brew install libdvdcss
-
Close and reopen Handbrake
-
-
-
Insert the DVD
-
Open Handbrake
-
Select the source drive (e.g. /dev/scd0)
-
Follow the instructions above to configure Handbrake and start the encoding