#!/bin/zsh

source="$1"
dest="$2"
if [[ -e "$dest" ]]; then
    # echo "$source -> $dest (skipped, exists)"
else
    echo "$source -> $dest"
    # echo HandBrakeCLI --preset=\'iPad\' -e x264 --main-feature --markers -i \'$source\' -o \'$dest\'
    noglob HandBrakeCLI --preset='iPad' -e x264 --main-feature --markers -i "$source" -o "$dest" >>'/var/log/encode.log' 2>>'/var/log/encode.err'
fi
