How to Create a Windows Right Click Menu to Mass Convert Videos to other formats with Handbrake

That title was a mouthful. I recently found a batch script on the Handbrake forum that would convert all video files in the current directory to another format with Handbrake (which is an open source video conversion application with pre-sets for many popular mobile devices). Anyway, I modified this batch script so that it would work on a folder and convert any files in that folder to another format (using a preset, which you can setup in the program… I just use the default preset for the iPhone and iPod Touch). Now, I wanted to be able to right click on a folder and select “Convert All Video to MP4” without having to copy this batch script to a new directory of video’s everytime I wanted to use it. Here’s the steps to accomplish this (This assumes that you have handbrake installed, also, I’m using the 32-bit version):

I tested this with Windows 7 (32-bit). Step 1, save this as a batch file to your computer somewhere where you can find it (I put mine in the C:Utilities directory and called it ConvertToMp4WithHandbrake.bat ). I use the iPhone & iPod Touch preset... or a custom one that I've used. You can see where to change it. I always convert to mp4's also. Here’s the batch script:

@echo off
cd "%1"
if not exist "Convert" (
echo Making convert directory...
mkdir Convert
FOR %%F in ("*.*") DO (
set o=%%F
echo Starting file: %%F
"C:Program FilesHandBrakeHandBrakeCLI.exe" -i "%%F" -o "Convert/%%F.mp4" --preset "iPhone & iPod Touch")

Now, how to get it in the context menu when you right click on a Folder (using the registry editor):

  1. Press Windows Key+R (or click start->run), then type in regedit
  2. In the tree, navigate to HKEY_CLASSES_ROOT\Folder\shell
  3. Right click on shell and select New->Key
  4. Type ConvertToMp4
  5. Click on ConvertToMp4, then double click on the (Default) value in right hand side and type in what you want to appear on the right click menu in Windows.. I typed Convert Video in Folder to MP4
  6. In the lefthand tree, click on ConvertToMp4
  7. Right Click, select New->Key and name it command
  8. Click on the new key you've created ("command"). Now, on the right hand side, double click on the (Default) value and enter the path to the batch file you saved with a %1 in parens after it. Mine looks like this C:\Utilities\ConvertToMp4WithHandbrake.bat "%1"

Tada.. ever folder you right click on in Windows will now have a "Convert Video in Folder to MP4" context menu. Thanks to everyone who posted before me and to those who originally put this script together.

Leave a comment

Please note that we won't show your email to others, or use it for sending unwanted emails. We will only use it to render your Gravatar image and to validate you as a real person.