You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12345678910111213141516171819
  1. #!/usr/bin/env bash
  2. #
  3. # pbrisbin 2013 - wrap handbrake to handle commonly needed scenarios.
  4. #
  5. ###
  6. if (( $# < 2 )); then
  7. printf "usage: hb [rip <name>|convert <file>] [options]\n" >&2
  8. exit 1
  9. fi
  10. case "$1" in
  11. rip) src='/dev/sr0'
  12. dst="$2.m4v" ;;
  13. convert) src="$2"
  14. dst="$(basename "${src%.*}").m4v" ;;
  15. esac
  16. shift 2
  17. HandBrakeCLI -Z "High Profile" "$@" -i "$src" -o "/mnt/media/Movies/$dst"