update script
This commit is contained in:
parent
e636d182a8
commit
0c378db90b
1 changed files with 5 additions and 4 deletions
|
@ -21,21 +21,22 @@ I ran into a couple gotchas.
|
||||||
|
|
||||||
Here is the script:
|
Here is the script:
|
||||||
|
|
||||||
|
`process-audio.sh`
|
||||||
```bash
|
```bash
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
if [ "$#" == "0" ]; then
|
if [ "$#" == "0" ]; then
|
||||||
echo "Error: no arguments provided."
|
echo "Error: no arguments provided."
|
||||||
echo "Usage: $0 file1 file2 file3 ..."
|
echo "Usage: $0 file1 file2 file3 ..."
|
||||||
echo " or: $0 *.ext"
|
echo "or $0 *.ext"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
trap "exit" INT
|
trap "exit" INT
|
||||||
|
|
||||||
while [ "$#" != "0" ]; do
|
while [ "$#" != "0" ]; do
|
||||||
base="${1%%.*}"
|
path="${1%/*}"
|
||||||
ext="${1##*.}"
|
file="${1##*/}"
|
||||||
outfile="./normalized--$base.$ext"
|
outfile="./normalized--$file"
|
||||||
if [ ! -f "$outfile" ]; then
|
if [ ! -f "$outfile" ]; then
|
||||||
echo "Processing $1"
|
echo "Processing $1"
|
||||||
ffmpeg -i "$1" -v warning -ac 1 -af "compand=attacks=0.3:decays=0.3:delay=0.15:points=-80/-300|-45/-25|-27/-15|0/-12|20/-12,anlmdn=s=10,highpass=f=500" -threads 4 "$outfile"
|
ffmpeg -i "$1" -v warning -ac 1 -af "compand=attacks=0.3:decays=0.3:delay=0.15:points=-80/-300|-45/-25|-27/-15|0/-12|20/-12,anlmdn=s=10,highpass=f=500" -threads 4 "$outfile"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue