README 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. UberZach Video Tools
  2. Copyright 2009-2012, Zach Kotlarek <zach@kotlarek.com>
  3. ======================================================
  4. The following readme applies primarily to the encode.pl script, formerly released as the Handbrake CLI Helper project.
  5. Additional documentation may follow as I have time/interest.
  6. ======================================================
  7. HandBrake CLI Helper is a fairly simple script intended to assist in automation of HandBrake-based encoding workflows. It is
  8. designed to automatically select appropriate HandBrake settings to produce output that:
  9. Copies all English (or unspecified) audio tracks unmodified
  10. Downmixes the first audio track to AAC-2.0 w/Dolby Pro Logic II encoding
  11. Copies all subtitle tracks
  12. Includes external SRT files in the same folder and with the same name
  13. Autocrops video, but overrides autocrop when it makes obviously wrong choices
  14. Invokes the detelecine and decomb filters in the default mode (i.e. auto-detect)
  15. The script can handle both single-title and multi-title video sources, and for multi-title sources can encode all titles or
  16. a specific, selected title.
  17. Both MKV and M4V wrapper formats are supported. M4V is prefered unless DTS audio is selected, in which case only MKV can be
  18. used. Use of MKV can be forced by invoking the script with an output file name ending in .mkv
  19. #==========================
  20. # Usage
  21. #==========================
  22. Usage is simple:
  23. encode.pl input_file [output_file] [title_number]
  24. The input file path is obviously required.
  25. The output file path can be provided, but a default based on the input file path will be automatically selected if
  26. necessary.
  27. The title number is only useful for multi-title sources, like TS_VIDEO folders or DVD ISOs. If provided the title number
  28. should match whatever number HandBrake shows for the title you want to encode. You can also use the title number "main" to
  29. select the longest title in the source.
  30. If you want to see what's actually happening, set the DEBUG enviornmental variable to something non-zero, like this:
  31. DEBUG=1 encode.pl <input_file>
  32. The script will then provide details about its decisions, and will also copy all output from HandBrake so you can see what
  33. it is doing. By default the script suppresses most HandBrake output to support use in automation systems.
  34. #==========================
  35. # Configuration
  36. #==========================
  37. You will need to tell the script where the HandBrakeCLI binary lives. Do that by adjusting the HB_EXEC parameter at the top
  38. of the script. The default is:
  39. ~/bin/video/HandBrakeCLI
  40. You can adjust a number of other parameters, including the default parameter string for HandBrake, the video encoding
  41. quality for both HD and SD sources, the cutoff point for what is considered an HD source, the prefered output format, and a
  42. of other more technical parameters. If you don't know what they mean you probably don't need to change them.