Simple Batch Encoding GUI For HB CLI

Discussion of the cross-platform HandBrake command line interface
Forum rules
Activity Log is required for support requests. Posts without this will be locked! See Must Read: How To Get Questions Answered on These Forums for details

Forum Rules can be found here

Simple Batch Encoding GUI For HB CLI

Postby XGEOX » Sun May 03, 2009 7:49 pm

Hello folks,

I haven't posted on the HB forums before, but today I thought I'd pop in and share a small app I've been working on, in the hope that some of you will find it useful. Wasn't quite sure whether this should go into 'General' or 'CLI' discussion - apologies if this is the wrong place.

A few months ago I needed to batch-process a large number of films which I'd previously ripped to an external e-sata drive. As I was experimenting with the AutoIt3 language at the time, I decided to write a simplified GUI for the Windows Handbrake CLI which would allow me to set up an automated encode (and subsequently re-encode for various other devices with ease).

It worked very well, and I took some time this weekend to add some functionality and configuration options so that it could be used by others.

I've put it online in the hope that some of you will find it useful. Please note that this has not been extensively tested, and may not work well (or at all) on your system. Use at your own risk.

If you do decide to use it and come across a bug or a feature you think would be useful, please let me know. :)

Screenshot
Image

Download
http://georgewilkinsdesign.com/public/Batch%20Video%20Encoder.zip

Functionality
- Displays list of VOB folders within a specified directory (using folder names as film titles)
- Allows selection of multiple titles
- Provides list of encoding presets (based on latest HB set) which may also be adjusted or added to
- Allows automatic or manual cropping for the entire batch, or title-specific cropping values to be specified
- Sends each title to Handbrake CLI in sequence, encoding each one to the specified output directory
- Displays progress during the encode process

Requirements
Works on Windows XP - Should work on earlier versions and Vista as well
Requires Handbrake 0.9.3 CLI

Instructions
- Unzip/open the program (Won't work inside the zip)
- Select the location of your Handbrake CLI executable
- Select source directory (should contain various film folders with VOBs inside)
- Select destination/target directory (Note: existing files of the same name will be overwritten!!!)
(You should now see a list of titles, with 'cropping' and 'state' values shown for each)
- Select a preset to encode with
- Click 'Preview' to generate a single chapter preview of the selected films, or 'Encode' for entire films
- Allow the Handbrake to do its thing


Notes On Cropping
You can choose automatic, manual or title-specific cropping.

If the cropping fields are dimmed/disabled, cropping will be done automatically. Click 'Manual' to switch to manual mode and set the cropping values. These will be applied to all films in your batch. Click 'Automatic' to switch back to automatic cropping.

To specify cropping values for a particular title, create a file called 'VIDEO_CROP.TXT' in the VOB folder of the title you wish to crop.
Type your cropping values into this file in the format: T,B,L,R
These values will be shown in the films list (restart the app if it was open when you created the cropping file) if you've done it correctly. Note that the program will not check for the validity of cropping values - if they're out of range or otherwise invalid for the preset you've chosen, Handbrake may well crash; breaking the encoding process.

Using / Editing / Creating Presets
When you first run the app, it will generate a file called 'presets.cfg' within its parent directory. The format of this file is fairly self-explanatory. You can add, remove or tweak as many presets as you like inside this file.

I haven't tested all of the presets, so I'd suggest you run a preview encode of the films you wish to encode to determine that the quality and cropping are correct.



Thanks to the Handbrake Devs for a brilliant encoder!
XGEOX
 
Posts: 1
Joined: Sun May 03, 2009 6:03 pm

 

Re: Simple Batch Encoding GUI For HB CLI

Postby brendo234 » Wed May 13, 2009 7:08 am

I just sent you a private message, but I thought I'd also add a feature request on this thread...

I love the idea for the program, however, when I downloaded it and tried to use it, I realized that it only supports DVD rips and VOB files.

I was so excited when I found a program that would automate the batching of video files, however, I was really hoping that it would support the batching of MPG or AVI files.

Our video camera creates very large MPG files, so I use handbrake to encode/compress them... it usually takes it down to 20-30% of the original size with no noticable loss in audio/video quality.

If you could add support to your software for the batch conversion of any type of video file inside the source folder, that would be great!!!

Bug report:
Trying to cancel out of the folder selection doesn't work, the selection screen kept popping back up on me. I'm using Windows 7 RC1.
brendo234
 
Posts: 1
Joined: Wed May 13, 2009 7:00 am

Re: Simple Batch Encoding GUI For HB CLI

Postby alexn16 » Wed Nov 04, 2009 7:21 pm

Greetings,

How are you returning the progress values from the cli to your gui?

I'm writing my own specific app that uses handbrakecli.

Thanks.
alexn16
 
Posts: 2
Joined: Wed Nov 04, 2009 7:16 pm

Re: Simple Batch Encoding GUI For HB CLI

Postby s55 » Wed Nov 04, 2009 8:32 pm

He'll be redirecting the standard output into his app.

You should note, using the 0.9.3 cygwin handbrakecli and piping standard output into .NET will likely cause video corruption problems.
The MinGW handbrakecli from the snapshots does not appear to exhibit this issue.
s55
Developer
 
Posts: 3706
Joined: Sun Dec 24, 2006 2:05 pm

Re: Simple Batch Encoding GUI For HB CLI

Postby alexn16 » Fri Nov 06, 2009 7:04 pm

I guess I'm more interested in seeing some code that demonstrate how to do this. Pretty sure it uses Regex, but not clear how...
alexn16
 
Posts: 2
Joined: Wed Nov 04, 2009 7:16 pm

Re: Simple Batch Encoding GUI For HB CLI

Postby kiwijunglist » Sat Nov 14, 2009 5:55 am

I would also love for this to support other video files.
I have a directory full of .ts files recorded by mediaportal that i want to batch encode.

Regards
Kiwi
kiwijunglist
 
Posts: 7
Joined: Fri Nov 13, 2009 12:10 am


Return to CLI

Who is online

Users browsing this forum: Google [Bot] and 1 guest