Advertisement
dvx3

FFMPEGp.sh

Mar 12th, 2020
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.69 KB | None | 0 0
  1. set -e
  2. clear
  3. printf " ============================\n|                            |\n|  Minimal FFMPEG Processor  |\n|  By Dvx3, Marco Filippone  |\n|                            |\n ============================\n\n"
  4. input_file=""
  5. printf "BEWARE: DON'T USE DIRECTORIES AND FILES WITH WHITESPACES (NEITHER USER DIRECTORIES)\n"
  6. printf "\nDrag and drop destination folder, and press enter: "
  7. read destination_folder
  8. if [ ! -d "$destination_folder" ]; then
  9.   printf "\nDirectory does NOT exist, exiting...\n"
  10.   exit 1
  11. fi
  12. touch /tmp/FFMPEGp.tmp
  13. while [ "$input_file" !=  "e" ]
  14. do
  15.   printf "\nDrag and drop file to be processed, and press enter (or press 'e' and enter to end entering files, and start processing): "
  16.   read input_file
  17.   if [ "$input_file" != "e" ]
  18.   then
  19.     if [ ! -f "$input_file" ]; then
  20.       printf "\nFile does NOT exist, exiting...\n"
  21.       exit 1
  22.     fi
  23.     echo "$input_file" | tee -a /tmp/FFMPEGp.tmp >/dev/null
  24.   fi
  25. done
  26. printf "\nProcessing..."
  27. temporary_file="/tmp/FFMPEGp.tmp"
  28. while IFS= read -r line
  29. do
  30.   basename=$(basename "$line")
  31.   full_dpath="$destination_folder/$basename"
  32.   ffmpeg -loglevel quiet -hwaccel auto -i "$line" -filter:a "crossfeed=strength=0.3:range=0.5","extrastereo=m=0.0:c=false","highpass=f=80:t=q:w=0.8","afftdn=nr=8.5:nt=c:bn=125|250|520|745|920","deesser=i=0.12","equalizer=f=110:t=q:w=1.12:g=2","equalizer=f=285:t=q:w=3:g=-3","equalizer=f=500:t=q:w=2.72:g=-4","equalizer=f=1030:t=q:w=1.95:g=2","highshelf=g=3:f=4250:t=q:w=0.6","loudnorm=i=-16:lra=14:tp=-0.8:dual_mono=true" -c:a aac -ab 320k -ar 48000 -c:v libx264 -coder ac -b:v 10000000 -x264-params keyint_min=15:b-bias=2 -preset slow "$full_dpath" -y
  33. done <"$temporary_file"
  34. rm /tmp/FFMPEGp.tmp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement