How to Install Handbrake on OMV

How to Install HandBrake in OpenMediaVault and Docker

In diy, OpenMediaVault, Tutorials, Video by dbtech

In this post we’ll take a look at How to Install HandBrake in OpenMediaVault and Docker.

HandBrake is a tool for converting video from nearly any format to a selection of modern, widely supported codecs.

EDIT: In the video I made a mistake. I said that you can control the output of videos processed from the watch folder by changing settings in the GUI. That is incorrect. The GUI settings ONLY affect videos that are uploaded and processed via the GUI. To change the presets for videos processed automatically, you need to change the following Environmental Variable Settings:

  • AUTOMATED_CONVERSION_PRESET
  • AUTOMATED_CONVERSION_FORMAT

For instance, you might want to change AUTOMATED_CONVERSION_PRESET to something like this (without the quotes): “Vimeo YouTube HQ 1080p60” but you can change it to any of the available options seen in the GUI. The same is true for AUTOMATED_CONVERSION_FORMAT. You can change it to any setting seen as available in the GUI.

End of Edit

Sources

  • The HandBrake website can be found here.
  • The Docker source for this video can be found here.
  • The Github page with more info and settings can be found here.

Preparation

You’ll need 4 volumes setup for HandBrake to Work. You’ll need a folder for:

  • Config
  • Storage
  • Watch
  • Output

Create each of these folders in OpenMediaVault’s “Shared Folders” tab and be sure to make them available on the network in SMB/CIFS. Make note of the absolute path of each folder as you’ll need them in the next section.

Installing HandBrake

Installing HandBrake in Portainer is pretty straightforward. Open Portainer and create a New Stack. Name the stack “handbrake” without the quotes and then copy this into the “Web editor”:

---
version: "2"
services:
  handbrake:
    image: jlesage/handbrake
    container_name: handbrake
    ports:
      - 5800:5800
    volumes:
      - /docker/appdata/handbrake:/config:rw
      - $HOME:/storage:ro
      - $HOME/HandBrake/watch:/watch:rw
      - $HOME/HandBrake/output:/output:rw
    restart: unless-stopped

Be sure to adjust the 4 volumes to reflect your folders’ absolute paths. This is what mine looks like:

---
version: "2"
services:
  handbrake:
    image: jlesage/handbrake
    container_name: handbrake
    ports:
      - 5800:5800
    volumes:
      - /srv/dev-disk-by-label-Files/Config/Handbrake:/config:rw
      - /srv/dev-disk-by-label-Files/HBStorage:/storage:ro
      - /srv/dev-disk-by-label-Files/HBWatch:/watch:rw
      - /srv/dev-disk-by-label-Files/HBOutput:/output:rw
    restart: unless-stopped

Once you’ve got that configured for your setup, click the “Deploy Container” button and wait for it to deploy.

Using HandBrake

Once the HandBrake container has deployed, open Firefox and go to http://your-server-ip:5800. I’ve tried this in Google Chrome and it didn’t work, but it works just fine in Firefox.

Now you can setup your preferred presets and then start dropping your video files into your “Watch” folder. HandBrake should start recognizing the new files and transcoding them based on your preset settings.

Once the files have transcoded completely, you can go to your system’s “Output” folder and you should find the transcoded files that you can do with whatever you’d like (within legal boundaries, of course).

That’s it! You’re done. You’ve got HandBrake setup on your Docker-based server now!

Other OpenMediaVault Tutorials

If you’re interested in other tutorials for your home server, check here: https://dbtechreviews.com/category/openmediavault/