The free world is the new continent in cyberspace that we have built so we can live here in freedom. It's impossible to live in freedom in the old world of cyberspace, where every program has its feudal lord that bullies and mistreats the users. So, to live in freedom we have to build a new continent. Because this is a virtual continent, it has room for everyone, and there are no immigration restrictions. - Richard Stallman -

HandBrake is an open-source program designed to convert MPEG video (including DVD-Video) into an MPEG-4 video file in MPEG-4 Part 14 (.mp4) or Matroska (.mkv) containers.

The program is used to convert DVDs into other forms so they can be viewed on iPods, iPhones and with the Apple QuickTime Player and most media players.

Originally developed for BeOS, HandBrake is now available for Linux, Microsoft Windows and Mac OS X.
Supported file types.

Input:

DVD, DVD image, DVD VOB files, MPEG-TS, Matroska, AVI, mpeg-4, etc
Any DVD or Bluray-like source: VIDEO_TS folder, DVD image, real DVD or bluray (unencrypted -- removal of copy protection is not supported), and some .VOB, .TS and M2TS files
Most any multimedia file it can get libavformat to read and libavcodec to decode.

Handbrake cannot at present encode from DRM-encrypted videos purchased from iTunes or found on DVD or Blu-Ray discs. However, if VLC is installed under a Unix-based system, encrypted DVDs can be read as well.
Output:

HandBrake supports batch encoding through the Windows, Linux, and OS X GUI, though jobs must be queued one by one. It is also easily automated using the HandBrake CLI (command line interface). A number of third-party scripts and UI's exist for this purpose such as HandBrake Batch Encoder and Videoscripts , both of which make use of the CLI to enable queueing of several files in a directory or tree at once.

Hard Burn: This means the subtitles are written on top of the image permanently. They cannot be turned on or off like on the DVD.

Soft Subtitles: This means the subtitles will appear as separate selectable tracks in your output file. With the correct playback software, you’ll be able to enable / disable these subtitles as required.

Subtitle Outputs

DVD and ASTC Closed Captions - When selected, these will be passed through from your source file to the MKV or MP4 output file.

CC tracks cannot be burned into the video.

Only 1 CC track can be read from the source.

CC tracks within an MP4 appear as a subtitle track, not a CC track.

SRT subtitle import – You can import SRT files into HandBrake through the “Subtitles tab”.

SRT files are pass-through only. They cannot be burnt into the video.

You can import multiple SRT subtitle tracks.

You can set an offset (measured in milliseconds) to change the start time that the first and subsequent SRT subtitles will appear. Use trial and error encoding a single chapter to obtain the correct offset.

You should make sure the correct character code is selected from the “Char Code” dropdown. Selecting the wrong code, will result in your output file having no subtitle track, and can cause the player to crash when playing that track.

SRT Passthru

SRT Subtitles can also be passed through from input video files.

DVD Bitmap Subtitles (VOBSUB)

With MP4, you can burn ONLY 1 subtitle track into the video.

With MP4, you can not pass-through VOBSUB tracks.

With MKV, you can pass-through multiple VOBSUB tracks. These are not burned into the video unless you choose to do so however you can only burn 1 subtitle track into the file. The rest must be passed through.

SSA Subtitles

SSA Subtitles can be passed-thru or burned into the video.

When burned into the video, all styling (e.g. fonts, colors, etc) is preserved.

Animated effects (e.g. fade in/out, karaoke) are not currently supported. (Only the middle frame of the animation will be used.)

When passed-thru as text, only bold/italic/underline styles are preserved. Some players may not support the simultaneous display of multiple passed-thru SSA subtitles.

Setting a Default Subtitle track

If you wish to have your player automatically select a subtitle track during playback, then you can select the “default” checkbox for the subtitle track you wish to enable. You should note that this does not currently work with Apple software or playback devices.

While this option is available for mp4 files, it does not currently serve any purpose. Default subtitle tracks will only be enabled on playback when using mkv files.

Forced Subtitles

With some DVD sources, there is a subtitle track which only displays during foreign language sections of the video. On some titles this is a unique subtitle track in the same language as the main audio track, on others it uses the standard subtitle track in the same language as the main audio track except marks a subset of the subtitles as forced.

In order to select this track, HandBrake can scan the source for subtitles that appear only 10% (or less) of the time in addition to scanning for the presence of any forced subtitles.

To enable this functionality within the HandBrake user interface, from the “Subtitles” tab select the “Foreign Audio Search (Bitmap)” option from the “Track” dropdown menu and click the “Forced” Checkbox.

If you do not get a foreign section only subtitle track in your output file, then you may have to manually find and select the correct subtitle track from the “Track” dropdown menu.

In order to determine which subtitle track to select open the Activity Window and look for the following text:

In this case you can see that subtitle 0x20bd should probably be selected manually. The subtitle numbers may be obtained by looking for the output of the scan, the number will correspond with where in the drop down menu that subtitle will appear in the GUI.

The simplest method is using Dolby Pro Logic II. This is the default behavior for HandBrake. If you feed HandBrake an Dolby Digital AC3 or Digital Theater System 5.1 sound track and tell it to convert using AAC, it will default to converting or "downmixing" the track to Dolby Pro Logic II in an AAC track. This will sound fine on both stereo and surround audio systems and will play in pretty much anything. If your DVD already contains Dolby Pro Logic audio, also known as Dolby Surround, it will be preserved. If you wish, you can use Dolby Pro Logic I instead of II, by selecting "Dolby Surround" from the Track Mix drop-down menu. Be aware that, due to technical concerns, Dolby Pro Logic II is currently created as 5.0 sound. This means there is no separate subwoofer channel. Adding the sub channel can cause serious distortion, depending on how the DVD's audio was mastered.

The next method is called pass-through. This just copies, bit-for-bit, the soundtrack on your DVD. AC3 pass-through is possible in the .mkv, and .mp4 containers. DTS pass-through is possible in the .mkv container. QuickTime can decode AC3 audio but cannot pass it audio your optical port for use with a surround sound receiver. However, you can download a 3rd party QuickTime component from the open-source Perian project to achieve this. If you use the .mp4 container, you can pass-through AC3 audio in VLC, Perian, or on the AppleTV, although you have to end the file name in .m4v instead of .mp4 for QuickTime and the AppleTV. Using AC3 in .mp4 this way is standards-based, but it's a new standard and not everyone is on board yet. VLC or Perian can decode DTS audio in .mkv files, but pass-through of DTS is currently broken in Perian. To use pass-through, make sure you have AC3 or DTS Passthru selected in the Audio Codecs pop-up menu.

You can also combine Pro Logic II and AC3 pass-through. This will give you a file that will play anywhere from QuickTime to VLC to the iPhone (using the AAC Pro Logic II track) and play in true surround sound on an AppleTV or in Perian. It is the best of both worlds, and it is only possible in the .mp4 and .mkv containers. Again, MP4 file names must, confusingly, end in .m4v for QuickTime to read them. To use this hybrid format, in the Audio tab, set the first audio track to be the track you want, in AAC sound. Then set the second track to also use the same source track, and select AC3 pass-through.

Another method is to create 5.1 channel AAC audio tracks. For the Track Mix, select "6 channel discrete" from the drop-down menu, and your movie will contain discrete surround sound in the modern AAC format. This takes up less space than AC3: instead of 448kbps, you can do well with 384kbps (64 kbps per channel). Its real benefit is that it doesn't make QuickTime barf. Sadly, it is very difficult to hear all those discrete channels of sound. It cannot be sent over an optical cable to a home theater amp. If you try, whether on a Mac or an AppleTV, you will only hear "downmixed" surround sound, similar to Dolby Pro Logic. To hear the discrete surround sound in all its glory, you will need to attach an analog surround sound device to your Mac. One popular device is the Griffin FireWave. Then, you have to attach a cable to your amp/receiver for each of the six speaker channels. It cannot be done over optical/HDMI.

Activity Window and Log (Linux GTK GUI)

The Activity Window in the Linux Gui is opened (if its not already open) by clicking on the "Activity Window" icon in the toolbar. This window shows a detailed log of everything handbrake is doing. Why is this important and useful? Other than power users wanting to see what is going on in HandBrakes? heart and soul (libhb and the 3rd party contribs) it is also helpful to the average user as you can copy and paste its contents into our support forums so we can see exactly what HandBrake was doing to help answer your questions.
Note: When copying and pasting the output of the log, please enclose the log in "Code" tags when posting on the forum. (there is a button for this) It just makes the forum easier to read.

The Activity Log File

Activity logs are stored to disc after each scan or encode.

The current session is written to the file "Activity.log". Typically, this will be in the directory "$(HOME)/.config/ghb", but it is possible for the system to have a different default data directory. So the full path is also shown at the top of the activity window in the gui. A history of all encodes are also stored in separate log files. These can typically be found in the directory "$(HOME)/.config/ghb/EncodeLogs". These are text files, so you can view them with your favorite text editing/viewing tool.