Skip to content
HaveAGitGat edited this page Jun 3, 2019 · 28 revisions

HBBatchBeast Wiki

Source folders

This is the source folder which will be scanned for media. The folder needs to be entered with no trailing slash. For example:

Windows:

C:\Users\HaveAGitGat\Desktop\Input

Linux:

/home/haveagitgat/Desktop/Input

macOS:

/Users/haveagitgat/Desktop/Input

The source folder path box is expandable (press enter to create a new line). If you want to specify multiple source folders, make sure each source folder path is on its own line.

Batch conversion & Folder watching

Temporary conversion folder

If "Temporary conversion folder?" is checked, then Handbrake will convert files into that folder. Once the conversion is finished, the file will be moved into your "Destination folder". You'll need to specify as many temporary conversion folders as source folders. Your first source folder will be converted into your first temporary conversion folder, your second source folder into your second temporary conversion folder and so on.

Destination folder

You'll then to specify destination folder paths. Again, you'll need to specify as many destination folders as source folders. Files from your first source folder will end up in your first destination folder, your second source folder files in your second destination folder and so on.

First source folder ---------> First temporary conversion folder ---------> First destination folder

Second source folder ---------> Second temporary conversion folder ---------> Second destination folder

etc

HBBB won't work properly if you set the destination folder the same as, or within, the source folder. Please check this if you're looking to replace files in the source folder.

HandBrake / FFmpeg

HBBB can be used with both HandBrake and FFmpeg, the only difference is that conversion percentages are not given when using FFmpeg.

FFprobe is used with both HandBrake mode and FFmpeg mode to extract file property information such as codec, resolution etc for the 'Health check' feature and for excluding/including file properties.

Standard preset

Select the HandBrake preset you'd like to convert your files with. If "Standard preset" is selected, then all files in the folders selected will be converted using the specified Handbrake preset. You can find more about HandBrake presets here:

https://handbrake.fr/docs/en/latest/workflow/select-preset.html

Custom preset

If "Custom preset" then you need to enter your own custom preset. HBBB covers the "HandBrakeCLI -i source -o destination" part of the HandBrakeCLI input so you need to enter the conversion parameters. For example:

-e x264 -q 20 -B

-Z "Very Fast 1080p30"

-Z "Very Fast 480p30"

If using FFmpeg, you need to separate the input and output parameters with a comma. Such as:

-r 1,-r 24

You can also link to a custom preset that's been exported from the official HandBrake GUI application for example:

--preset-import-file "C:\Users\HaveAGitGat\Desktop\testpreset.json" -Z "My Preset"

If you're having trouble with custom presets, it may be due to a known bug with the HandBrakeCLI (will be fixed in next HandBrakeCLI release). Please see this for a temporary solution: Remove '"PictureRotate": "0:0"' from the JSON preset.

Each custom preset needs to be on its own line and, similar to the folders, there need to be as many custom presets as source folders.

First source folder ---------> First temporary conversion folder ---------> First destination folder @ Custom preset 1

Second source folder ---------> Second temporary conversion folder ---------> Second destination folder @ Custom preset 2

etc

See the following image for guidance:
https://imgur.com/a/2tl8dIw

If using graphics card encoding (such as NVENC), then you may need to reduce the number of HandBrake instances (try 2 or fewer) due to memory limitations.

Container

Select the container you'd like the output file to have. You can find out more about containers at: https://handbrake.fr/docs/en/latest/technical/containers.html

Enable periodic scanning?

HBBB can monitor your source folders and run scans for new files at a specified interval. The interval time is in seconds with the default being 300 seconds (5 minutes). If this option is selected, then when you press "Scan and convert", the program will convert any new files and then a countdown timer will begin. This will loop infinitely until stopped. The scan interval is in the advanced settings section.

Enable daily scanning?

Instead of periodic scanning, you can choose for a scan to be run once a day. The scan time is entered in the advanced settings section in hh:mm format. Once "Scan and convert" is selected, the program will wait until the specified time until running a scan and conversion process. Again, this will loop infinitely until stopped.

Delete source files after conversion?

If this is selected, then if a conversion attempt is successful, the source file will be deleted.

Advanced settings

Include these file types:

Enter the file types to scan for. Each type needs to be separated by a comma. The default entry is:

mp4,mkv,mov,m4v,mpg,mpeg,avi,flv,webm,wmv,vob,evo,mts,m2ts,ts,iso,

Exclude file names which include any of these words:

Enter keywords to be filtered out when scanning for files. For example, if "720p" is entered, then any files with "720p" in the title will not be converted. Again, keywords need to be separated by a comma. For example, enter the following in the filter box:

720p,Sample,Trailer

Include files with any or all of these properties:

Here you can input video and audio properties that files must have in order to be converted (info extracted using FFPROBE). The properties must be separated by a comma. Use the media info viewer tool to help determine what properties you'd like to include. Make sure to put a comma after the last property. For example, to only convert files which are encoded using h264 and aac stereo audio:

codec_name: 'h264',codec_name: 'aac',channel_layout: 'stereo',

It's worth nothing that this property check is done once the conversion process starts (to save time while building the queue), so although files may appear in the conversion queue, they will be skipped/included if the correct conditions are met.

If FFprobe is able to extract properties, then an 'OK' will appear in the "FFPROBE" column in the queue view.

Exclude files with any or all of these properties:

The opposite of the above.

Media info viewer tool

This is a small tool to analyse file properties with in order to help you determine which properties you'd like to include/exclude in the above options. It uses FFprobe to return information. Drag and drop files into the grey box to analyse them. For example, dropping in a test file might return the following:

index: '0'

codec_name: 'h264'

codec_long_name: 'H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10'

profile: 'Main'

codec_type: 'video'

codec_time_base: '72001/180000'

codec_tag_string: 'avc1'

codec_tag: '0x31637661'

width: '32'

height: '32'

If you're looking to exclude files like this from being converted, then you can put several file properties into the "Exclude files with any or all of these properties" box and check the checkbox next to 'all' instead of 'any', like so:

codec_name: 'h264',codec_long_name: 'H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10',

Screenshot

Copy filtered files to destination?

If you select this option, then files which have been excluded from conversion will be copied directly to the destination folder. This applies to the following three filters:

Exclude file names which include any of these words

Include files with any or all of these properties

Exclude files with any or all of these properties

Note this also applies to files excluded because they don't meet the "Include" property conditions of the above so don't accidentally copy you're entire library when you're only trying to convert a few files.

The copy feature does not apply to the following filters:

Include these file types

Exclude files smaller than (MB)

Exclude files larger than (MB)

Replace original file if converted file is smaller?(Compress attempt)?

Please check this when using this feature. In essence, make sure your destination folder is not the same as/or within, your source folder or it won't work properly.

Select this checkbox if you'd like HBBB to automatically replace the original source file if the new file is smaller. If the new file is not smaller, then it will be left in the destination folder.

Once HBBB has attempted to compress a specific file, it will add that file path to a cache so that it won't be attempted again in future. You can view/edit/clear the cache using the yellow buttons.

Replace original file always?

Again, please check this when using this feature. In essence, make sure your destination folder is not the same as/or within, your source folder or it won't work properly.

The original file will be replaced regardless of whether the new file is larger or smaller.

Copy subtitle (srt) files to destination?

Automatically create temp/destination folders if they don't exist?

HBBB will automatically create temporary and destination folders if they don't exist. An error message will appear if the folders can't be created.

Custom bat path to run after each conversion (leave blank if not using):

Input the path to a custom batch file which you'd like to execute after each conversion. For example:

C:\Users\HaveAGitGat\Desktop\Input\CopyToBackupDrive.bat

Batch files with timeout statements won't work (more on this here https://comm.support.ca.com/kb/the-timeout-command-in-batch-script-job-results-in-error-input-redirection-is-not-supported-exiting-the-process-immediately/kb000029524)

Leave box completely empty if you do not wish to use this option (make sure there are no hidden characters in the box).

Save config button

Save the current configuration settings on all tabs. This is automatically done whenever a health check, scan or conversion process is run.

Scan only button

Produce a file list showing information on what HBBB will attempt to do with the source files based on the configuration settings selected. No conversion is done when this is pressed.

Scan and convert button

This first carries out the "Scan only" step and will then proceed with converting/skipping/copying files based on what HBBB has been configured to do.

Video health check

This feature can scan for corrupt video files using HandBrake's '--scan' feature, although this is not always accurate. It also uses FFprobe to provide a second reference point. If both FFprobe and HandBrake fail then there is a high chance that the file is corrupt.

Note that HandBrake often incorrectly identifies MPEG files as corrupt, but FFprobe should show these files are fine.

Move corrupt files into the following folder?

If checked, then any files which give errors will be moved into the specified folder.

Healthy file cache

To save on processing power, HBBB saves a list of any files which have already been scanned as "Healthy". Clear the cache to perform a fresh scan on all files.

System settings

Number of simultaneous Handbrake instances to use?

This setting applies to both the "Video health check" and "Scan and convert" processes. Specify how many HandBrake threads to use. There is no maximum although it's recommended not to use more than 4. A higher amount may freeze your computer if it's not very powerful

Queue size view limit

Large queue sizes can make the interface lag and impact performance. To combat this, HBBB can be set to automatically hide queues larger than the specified limit (default 1000 items).

Email settings

Fill in details to receive email notifications if an error is encountered during a health check or conversion/folder watching. Won't work with accounts that require 2FA. You need to enable access to less secure apps on Gmail accounts. See more here: https://support.google.com/a/answer/6260879?hl=en

For example:

Email: e.g. example@exampleemail.com

Password: Is not saved for security purposes.

SMTP server: e.g. smtp.gmail.com