Skip to content

Instantly share code, notes, and snippets.

@lisamelton
lisamelton / encode.sh
Last active March 31, 2024 21:13
This is the shell script I use to drive HandBrakeCLI to re-encode video files in a format suitable for playback on Apple TV, Roku 3, iOS, OS X, etc.
#!/bin/bash
# encode.sh
#
# Copyright (c) 2013 Don Melton
#
# This version published on June 7, 2013.
#
# Re-encode video files in a format suitable for playback on Apple TV, Roku 3,
# iOS, OS X, etc.
/**
* Allows "named" parameters for vprintf. You can use one of two ways to name the values
* in the string. Mixing and matching in the same string is supported.
*
* It also throws an error when you don't have a value in the array as expected.
*
* $a = array("lazy" => "z", "jmp" => "jumps", "qik" => "QUICK", "times" => 10.625);
*
* The following strings can all be used: %(name)s -- python || %name$s --php
*