Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #set -x
- #trap read debug
- # init
- shopt -s extglob
- scriptname="$(realpath $0)"
- function editscript(){
- echo "scriptname: $scriptname"
- if [[ "$1" == "edit" ]]; then
- (/usr/bin/nano "$scriptname")
- exit
- fi
- }
- function pause(){
- read -p "$*"
- }
- editscript "$1"
- if [ -n "$1" ];
- then
- # ffmpeg -n -nostdin -hide_banner -loglevel error -stats -i "$1" -acodec libopus -b:a 17k "${1%.*}".opus
- ffmpeg -n -nostdin -hide_banner -loglevel error -stats -i "$1" -filter_complex "compand=attacks=0:decays=0.12:points=-70/-900|-40/-90|-35/-37|-21/-18|1/-1|20/-1:soft-knee=0.03:gain=1.00:volume=-90, firequalizer=gain_entry='entry(0,-99);entry(140,0);entry(1000,0);entry(8000,1);entry(10500,4);entry(12000,5);entry(14500,-4);entry(19000,-20)', volume=1.0" -c:a libopus -b:a 17k -frame_duration:a 60 "${1%.*}".opus
- else
- for file in *.@(flac|mp3|wav|m4?|ogg) ; do
- # ffmpeg -n -nostdin -hide_banner -loglevel error -stats -i "$file" -acodec libopus -b:a 17k "${file%.*}".opus
- # ffmpeg -n -nostdin -hide_banner -loglevel error -stats -i "$file" -filter_complex "compand=attacks=0:decays=0.12:points=-70/-900|-40/-90|-35/-37|-21/-18|1/-1|20/-1:soft-knee=0.03:gain=1.00:volume=-90, firequalizer=gain_entry='entry(0,-99);entry(140,0);entry(1000,0);entry(8000,1);entry(10500,4);entry(12000,5);entry(14500,-4);entry(19000,-20)', volume=1.0" -c:a libopus -b:a 16384 -frame_duration:a 60 -application voip "${file%.*}".opus
- # ffmpeg -n -nostdin -hide_banner -loglevel error -stats -i "$file" -filter_complex "compand=attacks=0:decays=0.12:points=-70/-900|-40/-90|-35/-37|-21/-18|1/-1|20/-1:soft-knee=0.03:gain=1.00:volume=-90, firequalizer=gain_entry='entry(0,-99);entry(140,0);entry(1000,0);entry(8000,1);entry(10500,4);entry(12000,5);entry(14500,-4);entry(19000,-20)', volume=1.0" -c:a libopus -b:a 17k -frame_duration:a 60 -application voip "${file%.*}".opus
- ffmpeg -n -nostdin -hide_banner -loglevel error -stats -i file:"$file" -filter_complex "compand=attacks=0:decays=0.12:points=-70/-900|-40/-90|-35/-37|-21/-18|1/-1|20/-1:soft-knee=0.03:gain=1.00:volume=-90, firequalizer=gain_entry='entry(0,-99);entry(140,0);entry(1000,0);entry(8000,1);entry(10500,4);entry(12000,5);entry(14500,-4);entry(19000,-20)', volume=1.0" -c:a libopus -b:a 17k file:"${file%.*}".opus
- # ffmpeg -n -nostdin -hide_banner -loglevel error -stats -i file:"$file" -c:a libopus -b:a 17k file:"${file%.*}".opus
- # ffmpeg -n -i "$file" -acodec libopus -b:a 17k "${file%.*}".opus
- # ffmpeg -n -i "$file" -acodec libopus -ar 16000 -b:a 24k "${file%.*}".opus
- done
- fi
- if [ -n "$1" ];
- then
- echo mediaduration "${1#*.}" `mediaduration "${1#*.}"`
- echo mediaduration opus `mediaduration opus`
- else
- echo mediaduration "${file#*.}" `mediaduration "${file#*.}"`
- echo -e "mediaduration opus `mediaduration opus`\n"
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement