#!/usr/bin/env bash # # DESC: Transcode with ffmpeg the audio codecs of commonly used video media files # within specified directory. The original source files will be overwritten. # AUTHOR: Travis Runyard # DATE: 04-18-2020 # UPDATED: 09-18-2021 # WEB: quad0.com/ffmpeg-batch-transcode-audio/ # Exit script on any non-zero exit code set -e # Shell Options shopt -s globstar shopt -u nullglob # Declare indexed arrays (optional/only associative arrays require declaration) declare -a FILENAME declare -a LOG # Modify TEMPDIR and WORKDIR to suit your needs TEMPDIR="/mnt/pool0/p0ds0smb/temp/ffmpeg" WORKDIR="$TEMPDIR/.working" SCRIPT_NAME="$(basename "$0")" usage() { cat 1>&2 <