Skip to content

Instantly share code, notes, and snippets.

@dulyanov
Created April 14, 2014 00:35
Show Gist options
  • Save dulyanov/10608208 to your computer and use it in GitHub Desktop.
Save dulyanov/10608208 to your computer and use it in GitHub Desktop.
Re-encode video files using avconvert
#!/bin/bash
dir="x/1"
for file in `find "$dir" -iname "*.mov"`
do
echo "Start processing $file"
file_orig="${file/%.mov/.original.mov}"
file_conv="${file/%.mov/.converted.mov}"
avconvert --preset Preset1920x1080 -q --source "$file" --output "$file_conv" && mv "$file" "$file_orig"
echo "Finished processing $file"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment