Skip to content

Instantly share code, notes, and snippets.

@oxagast
Last active February 11, 2022 03:04
Show Gist options
  • Save oxagast/0170eb2226d8445286c4b7cf3ba2ba39 to your computer and use it in GitHub Desktop.
Save oxagast/0170eb2226d8445286c4b7cf3ba2ba39 to your computer and use it in GitHub Desktop.
movdir="/var/storage/Video/Movies/";
outdir="/var/usb_backup/Conv/"
cd $outdir;
for movf in $(cd $movdir;ls -1 -A | sed -e s'/\.\///');
do name=$(echo $movf | sed -e 's/\.*\....$//')
echo N | ffmpeg -i "$movdir$name".* -strict -2 -vcodec libx265 -crf 36 -c:a ac3 -ab 120k -ac 2 "${name}.mp4"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment