Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #
- # DESCRIPTION:
- # Very simple script to read the contents of the working
- # directory and encode all .avi files to .m4v for adding
- # to iTunes.
- #
- # USES:
- # * HandBrakeCLI to encode the files
- # * Rsync to copy encoded files to their final destination
- # so that progress can be tracked.
- #
- # TODO:
- # * Find a way to make HandBrakeCLI run silently
- #
- output_destination="[PATH/TO/SHARE]"
- for input in *.avi; do
- output=$(echo $input|sed "s/.avi/.m4v/g")
- HandBrakeCLI -i "$input" -o "$output" --preset="AppleTV 2"
- rsync -az --progress "$output" "$output_destination"
- rm "$output"
- rm "$input"
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement