Tuesday, March 17, 2015

Handbrake Email Notifications

So you’d like to know via email when each of your files have completed ripping/encoding in Handbrake. Maybe you’d like to start a queue on your workstation and get a ding on your phone when it’s done. Or, maybe you have a rig in the basement you’ve set aside for such chores1 and want an email on your workstation when it’s done.

Whatever the case, Handbrake doesn’t do this natively. I’ve googled around and I didn’t find a solution, at least not on the first page. So I rigged this up myself. Note that I did this on a Windows machine using Handbrake 0.10.1.6962. I’m sure it’ll work for some older versions and somebody can probably rig up a Mac version of this. But, those aren’t my problems.

So this is what you need:

  1. An email address to send from. And not just the address but all the information required to send email from that address (server, port, credentials, etc).

And this is what you need to do:

  1. Download a copy of blat and configure it. This is a program that enables you to send emails from the command line. I’ll leave you to the instructions on how to install and configure.
  2. Test your blat installation!
  3. In the same folder where you installed blat you are going to create a batch file. Name it “handbrake.bat”.
  4. The contents of handbrake.bat will be three lines that looks something like this: 

    set file=%1
    set file=%file:"=%
    blat -to username@email.com -subject "[handbrake] Complete: %file%" -body "%file%"

    “username@email.com” is the address where you want to send the notifications, and %file% is going to represent the converted video filename. Adjust the email address and content of the subject/body to taste.
  5. Open Handbrake preferences. On the General tab there is a “When Done” section. Check the “Send File To” option and hit the Browse button.
  6. Browse your way to where you saved the handbrake.bat file and select it.
  7. No arguments are needed. Close preferences.
  8. Test your handbrake email notification!
This is very very very very very very very important: for this to work you must run Handbrake as an administrator. I’m running on Windows 8, and that is done either by right click and “Run as Administration” or right click, properties, Compatibility Tab, and check Run This Program As An Administrator.

 

  1. But, I wouldn’t know anything about that.

No comments: