HandBrake is a popular video transcoding software that can be used to convert video files into different formats. While the software comes with a graphical user interface (GUI), it also has a command-line interface (CLI) that can be used to automate the transcoding process. In this blog post, we’ll walk you through the steps to use HandBrake CLI on Windows Server.
Step 1: Download HandBrake CLI The first step is to download the HandBrake CLI for Windows from the official website: https://handbrake.fr/downloads2.php. Choose the appropriate version for your system (32-bit or 64-bit) and download the ZIP file.
Step 2: Extract HandBrake CLI Once the ZIP file is downloaded, extract it to a location of your choice. For this tutorial, we’ll assume that you extracted it to the following directory:
Step 3: Open Command Prompt To use HandBrake CLI, you need to open Command Prompt on your Windows Server. You can do this by following these steps:
Press the Windows key + R to open the Run dialog box.
Type “cmd” and press Enter.
Step 4: Navigate to HandBrake CLI directory In Command Prompt, navigate to the directory where you extracted HandBrake CLI. For example:
cd C:\Program Files\HandBrakeCLI\
Step 5: Transcode a video file Now that you’re in the HandBrake CLI directory, you can use the following command to transcode a video file:
HandBrakeCLI.exe -i input_file.mp4 -o output_file.mp4 –preset-import-file C:\Program Files\HandBrakeCLI\presets.json –preset “Preset Name”
Here’s what each part of the command does:
HandBrakeCLI.exe – this is the executable file for HandBrake CLI.
-i input_file.mp4 – this specifies the input file that you want to transcode. Replace “input_file.mp4” with the name of your input file.
-o output_file.mp4 – this specifies the output file that you want to create. Replace “output_file.mp4” with the name that you want to give your output file.
–preset-import-file C:\Program Files\HandBrakeCLI\presets.json – this specifies the location of the HandBrake presets file. This file contains preconfigured settings for different types of videos. You can use the default file that comes with HandBrake, or create your own.
–preset “Preset Name” – this specifies the preset that you want to use to transcode your video. Replace “Preset Name” with the name of the preset that you want to use. You can find a list of available presets in the HandBrake presets file.
For example, if you want to transcode a video file called “video.mp4” using the “Fast 1080p30” preset and save the output as “output.mp4”, you would use the following command:
HandBrakeCLI.exe -i video.mp4 -o output.mp4 –preset-import-file C:\Program Files\HandBrakeCLI\presets.json –preset “Fast 1080p30”
Step 6: Monitor progress Once you start the transcoding process, you’ll see a progress bar in the Command Prompt window. You can use this to monitor the progress of the transcoding process. Once the process is complete, you’ll see a message that says “Encode done!”.
In conclusion, using HandBrake CLI on Windows Server you can works with most common video files and formats, including ones created by consumer and professional video cameras, mobile devices such as phones and tablets, game and computer screen recordings, and DVD and Blu-ray discs. HandBrake leverages tools such as Libav, x264, and x265 to create new MP4 or MKV video files from these Sources.