This is a simple command line tool in Bash tailored for encoding all files in a directory tree, mirroring the folder structure in a different location.
Prerequisites:
- Bash
- ffmpeg
Input:
./encode-dirs-mirrored.sh <input_dir> <output_dir> <opts>
<opts> include:
--copy-on-error: if an error occurs, copy the file to the new location, e.g. when you want to preserve metadata/subtitle files etc
e.g.
./endode-dirs-mirrored.sh ./original/ ./encoded/
./endode-dirs-mirrored.sh /home/user/videos/original/ /mnt/external/encoded/
This script uses GNU utils, not BSD utils. If you are running on a mac, you must ensure that the following utils are aliased or overridden correctly to their GNU variants
- readlink