Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#! /bin/bash
askYesNo() {
local answer=
while [ "$answer" != "y" ] && [ "$answer" != "n" ]; do
read -e -n 1 -p "$1 (y/n) " answer
done
if [ "$answer" != "y" ]; then
return 1
fi
}
cd "$1"
ls *.mp4
if askYesNo "Transcode AAC audio to Linear PCM audio and rewrap as .mov for the above files?"; then
for i in *.mp4; do ffmpeg -i "$i" -c:v copy -c:a pcm_s16le "${i%.mp4}.mov"; done
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment