You are not logged in.
Hi all. Recently migrated from Debian stable, simply because my laptop is getting a little outdated but wanted to stick with the stability of Debian, plus I use openbox anyway. Anyway, there's one little problem I've run into. I do A LOT of audio conversion using normalize-audio (specifically normalize-ogg). After installing normalize-audio in crunchbang, I've attempted to run my standard conversion of:
normalize-ogg --ogg --bitrate 500 -b -v *.FILE_EXTENSIONonly to get the following response:
[0137][neil:CD1]$ normalize-ogg --ogg --bitrate 500 -b -v 01_Losing_All.mp3
normalize-ogg: 01_Losing_All.mp3: no decoder available
Running normalize...
Usage: normalize-audio [OPTION]... [FILE]...
Try `normalize-audio --help' for more information.
Error during normalize, stopped at /usr/bin/normalize-ogg line 587.As far as I know I have all the necessary packages installed to do this conversion. Soundconverter works just fine doing the exact same thing. However, I much prefer to use the CLI for this type of stuff just because it's so much quicker and more flexible. Does anyone know if this package is broken? I know that Wheezy was just moved to stable. Maybe something not right with the newer version.
These are the packages I currently have installed related to mp3 libraries and such:
[0126][neil:~]$ dpkg -l | grep [Mm][Pp]3
ii gstreamer0.10-fluendo-mp3 0.10.15.debian-1 amd64 Fluendo mp3 decoder GStreamer plugin
ii lame 3.99.5+repack1-3 amd64 MP3 encoding library (frontend)
ii libmp3lame0:amd64 1:3.99.5-dmo2 amd64 Shared libraries for MP3 encoding.
ii libmp3splt0 0.7.2-2 amd64 library for splitting MP3 and Ogg Vorbis files
ii libmp3splt0-mp3 0.7.2-2 amd64 MP3 plugin for mp3splt
ii libmp3splt0-ogg 0.7.2-2 amd64 Ogg Vorbis plugin for mp3splt
ii libshout3:amd64 2.2.2-8 amd64 MP3/Ogg Vorbis broadcast streaming library
ii mp3splt 2.4.2-2 amd64 command line interface to split MP3 and Ogg Vorbis files without reencoding
ii normalize-audio 0.7.7-11 amd64 adjusts the volume of WAV, MP3 and OGG files to a standard volume levelI've also got libmad0 v-0.15.1b-7 installed as well. Any help or suggestions would be greatly appreciated. 
Oh, and please spare me the lecture on converting lossy to lossy. I realize the consequence of degradation. I just don't want my music in a proprietary format.
Thanks.
Last edited by strungoutfan78 (2013-07-13 13:37:09)
Offline
apt-cache depends normalize-audio ?
Other than that, the notice: "normalize is a tool for adjusting the volume of audio files to a standard level." is incredibly vague, so i hope you know what this thing does exactly.
Last edited by brontosaurusrex (2013-07-13 13:17:56)
Offline
God. Thank you. I completely forgot about apt-cache depends. It suggested mpg321, which is exactly what I was missing. Yeah I know that description is very vague. Just like the error/warning messages this thing spits out. It's just a simple little audio conversion tool. You can check out the project here: http://www.google.com/url?sa=t&rct=j&q= … 5608,d.cGE
Offline
p.s. Seems like last update was in 2005, meantime we got a fully-featured loudness standard - ebu r128, and the scanner is already a part of ffmpeg, and if you wanna play around to check already "normalized" tracks, try
http://crunchbang.org/forums/viewtopic.php?pid=303398
(Just saying, if the old thingy is working fine for you, then by all means just use it)
Offline
That's extremely intriguing. I'm definitely going to have to play with it. Although normalize-audio has worked great for what I have needed I was always under the impression that ogg could not actually be normalized. I mostly use it as more of a converter than anything else. The volume levels do come out uneven, but I didn't realize there was anything that could actually do it. Does r128 handle all types of audio? Sorry if the link mentions it, I only briefly perused it before going to sleep. Thanks for the info. 
Offline
Practicality of actually changing the levels is pretty much the same as it was, for specific lossy formats you would have to use a specific tool that changes the internal levels (If you want to avoid transcoding) or depend on the meta-tagging (which is not supported by all players) or use both (in that order: 1. internal, 2. meta-tags) to be supported all over the place.
The r128 lib in ffmpeg can calculate pretty much any audio (actually i use it for videos with audio) due to high amount of decoders built into ffmpeg itself (aac, mp3, flac, ogg, you name it).
(And yes, the final levels will be different, since we are dealing with a loudness calculus, which is basically frequency dependant and the scanners of this type are basically a model of a human ear. Some more or less interesting papers/test samples are here http://tech.ebu.ch/loudness )
Last edited by brontosaurusrex (2013-07-14 13:25:56)
Offline
Hmmm. I guess my last post didn't make it through. I looked into the ebur128 thing and it's apparently not a feature in the stable version of ffmpeg? I really don't feel like compiling a newer version of ffmpeg
. What I managed to do though was write a small bash script to handle my issue after examining the normalize-audio man page. I found an option to examine current db levels and apply gain accordingly, so I just used the script to find all files in a given folder with the extension .ogg, write the results to a file, then parse the file for original db levels, calculate the amount I needed to adjust to bring everything up to -7db, which sounded good to me on some test files, and perform the operation as a batch. It works great. It's running right now and I'll finally have all my music at approximately the same loudness.
My original issue was that the automatic "normalizing" would normalize everything to such a low db level that I would have to crank up the volume much louder than normal, and not all my tracks would come out the same. It aggravates me to no end to hit shuffle and have to adjust the volume from one song to the next because of horrible variances in loudness levels.
Thanks for your info on r128. I look forward to using it once it's included in stable.
Here's the script, for what it's worth. Just in case someone ever comes across the same issue.
#!/bin/bash
find "$1" -iname '*.ogg' > $HOME/file_list
cat $HOME/file_list | while read line; do
# echo "$line"
orig_gain="$(normalize-ogg -n "$line" | cut -d 'd' -f1)"
larger=$(echo "$orig_gain"'>'-7 | bc)
if [[ larger ]]
then
gain_difference=$(echo "$orig_gain"*-1-7 | bc)
else
gain_difference=$(echo "$orig_gain"-7 | bc)
fi
echo "Gain Difference will be: $gain_difference""db"
normalize-ogg -g "$gain_difference""db" "$line"
doneOffline
Just an update to this script. I've found that -7 is too high and induces clipping. I've modified it to normalize everything to -12db which is perfect (for me anyway). I've also added arguments so that you can specify directory, file extension, and bitrate. Usage is as such:
db_adjust <dir> <file extension> <bitrate>Works flawlessly.
Hope this may be useful to someone. Here's the code:
#!/bin/bash
find "$1" -iname "*.""$2" > $HOME/file_list
cat $HOME/file_list | while read line; do
# echo "$line"
orig_gain="$(normalize-ogg -n "$line" | cut -d 'd' -f1)"
larger=$(echo "$orig_gain"'>'-12 | bc)
if [[ larger ]]
then
gain_difference=$(echo "$orig_gain"*-1-12 | bc)
else
gain_difference=$(echo "$orig_gain"-12 | bc)
fi
echo "Gain Difference will be: $gain_difference""db"
normalize-ogg --ogg --bitrate "$3" -g "$gain_difference""db" -v "$line"
doneFor some reason though normalizing mp3 files gives an error:
tcgetattr(): Invalid argumentEverything converts just fine though. It may be a version mismatch with an mp3 related package. Not really sure.
Last edited by strungoutfan78 (2013-10-20 10:53:55)
Offline
Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.