Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document a simple way to vlevel-ize an audio file #7

Open
boyska opened this issue Jan 13, 2024 · 2 comments
Open

Document a simple way to vlevel-ize an audio file #7

boyska opened this issue Jan 13, 2024 · 2 comments

Comments

@boyska
Copy link

boyska commented Jan 13, 2024

I'd like to apply vlevel to a file of mine. I'm pretty sure this will be simple enough to do, but could you provide some hints?

Use case: I download podcasts from the Internet, then I put them into USB sticks which I'll then plug into my car radio. I'd like to apply vlevel to that!

I'm pretty sure this would be possible (with some sox-magic, maybe?) but having some doc, or even a readymade script will be great! Bonus points if that preserves metadata :)

@mozlima
Copy link

mozlima commented Jan 15, 2024

You can utilize any LADSPA-compatible software, such as Audacity or ffmpeg.

  • Example ffmpeg: vlevel-max.sh
#!/bin/bash
set -euo pipefail
if [ "$#" -eq 0 ]; then
    echo "Usage: $0 <input_file1> [<input_file2> ...]"
    exit 1
fi

filters=(
	"ladspa=vlevel-ladspa:vlevel_stereo:0.30|0.78|1|10|0"
)
filter=$(IFS=,; printf "%s" "${filters[*]}")

for path in "$@"; do
	ffmpeg -i "$path" -af "$filter" -vcodec copy  "${path%.*}.out.${path##*.}"
done

Additionally, you can incorporate other filters into your script, like the following:

filters=(
	"ladspa=vlevel-ladspa:vlevel_stereo:0.30|0.78|1|10|0"
	"ladspa=fast_lookahead_limiter_1913:fastLookaheadLimiter:0|-10|0.50"
)

@boyska
Copy link
Author

boyska commented Jan 15, 2024

This works well!

While I agree this is pretty generic, and I could have come up with this on my own with some effort, I think it would be valuable to ship such a script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants