Bug#962236: normalize-audio: "normalize-ogg -b -n -v" shows less info than "normalize-audio -b -n -v"

2020-06-05 Thread Francesco Poli
Control: tags -1 + patch


On Fri, 5 Jun 2020 20:58:43 +0200 Joachim Reichel wrote:

> tag 962236 + upstream
> forwarded 962236
> https://savannah.nongnu.org/bugs/index.php?58504
> thanks
> 
> Hi Francesco,

Hello Joachim,

> 
> thanks for your report.

Thanks for your prompt reply!   :-)

> I forwarded it as bug (or rather feature request) #58504.

Great!

I managed to better understand the Perl code that handles the
interaction between normalize-ogg and normalize-audio.

I have just prepared a patch that fixes the bug.
I am attaching it to this message.
It's simple enough and should therefore not be covered by copyright.
In case it turns out to be copyrighted, it's released under the same
terms as normalize-ogg (that is to say: GNU GPL v2 or later).

With my patch applied, I get:

  $ normalize-ogg -a -7.5dBFS --tmpdir /dev/shm -b -n -v -v *.ogg
  Decoding track01.ogg...
  Decoding track02.ogg...
  Decoding track03.ogg...
  Decoding track04.ogg...
  Decoding track05.ogg...
  Decoding track06.ogg...
  Decoding track07.ogg...
  Decoding track08.ogg...
  Decoding track09.ogg...
  Decoding track10.ogg...
  Decoding track11.ogg...
  Decoding track12.ogg...
  Running normalize...
  Computing levels...
levelpeak
  -6.8533dBFS  0.dBFS   /dev/shm/track01.ogg.11643.wav
  -8.0583dBFS  0.dBFS   /dev/shm/track02.ogg.11643.wav
  -7.1047dBFS  0.dBFS   /dev/shm/track03.ogg.11643.wav
  -7.2339dBFS  0.dBFS   /dev/shm/track04.ogg.11643.wav
  -7.7699dBFS  0.dBFS   /dev/shm/track05.ogg.11643.wav
  -7.1890dBFS  0.dBFS   /dev/shm/track06.ogg.11643.wav
  -8.0084dBFS  0.dBFS   /dev/shm/track07.ogg.11643.wav
  -7.6048dBFS  0.dBFS   /dev/shm/track08.ogg.11643.wav
  -7.4123dBFS  0.dBFS   /dev/shm/track09.ogg.11643.wav
  -7.5195dBFS  0.dBFS   /dev/shm/track10.ogg.11643.wav
  -8.1773dBFS  0.dBFS   /dev/shm/track11.ogg.11643.wav
  -7.5512dBFS  0.dBFS   /dev/shm/track12.ogg.11643.wav
  Standard deviation is 0.39 dB
  -7.5314dBFS  average level
  0.031363dB   volume adjustment

which is what I wanted to see.

Please note that I had to pass the "-v" option twice, since
normalize-ogg adds the "--frontend" option, thus decreasing the default
verbosity of normalize-audio.

By the way, maybe the same modification could be applied even for the
code that deals with the "not mix or batch mode", around line 765...

Please test the patch and forward it upstream, if you agree.
Thank you so much for your kind help!



-- 
 http://www.inventati.org/frx/
 There's not a second to spare! To the laboratory!
. Francesco Poli .
 GnuPG key fpr == CA01 1147 9CD2 EFDF FB82  3925 3E1C 27E1 1F69 BFFE


normalize-ogg_showstats.diff.gz
Description: application/gzip


pgp4f19OmtEgj.pgp
Description: PGP signature


Bug#962236: normalize-audio: "normalize-ogg -b -n -v" shows less info than "normalize-audio -b -n -v"

2020-06-05 Thread Joachim Reichel
forwarded 962236 https://savannah.nongnu.org/bugs/index.php?58504
thanks



Bug#962236: normalize-audio: "normalize-ogg -b -n -v" shows less info than "normalize-audio -b -n -v"

2020-06-05 Thread Joachim Reichel
tag 962236 + upstream
forwarded 962236
https://savannah.nongnu.org/bugs/index.php?58504
thanks

Hi Francesco,

thanks for your report. I forwarded it as bug (or rather feature request) 
#58504.

Best regards,
  Joachim



Bug#962236: normalize-audio: "normalize-ogg -b -n -v" shows less info than "normalize-audio -b -n -v"

2020-06-04 Thread Francesco Poli (wintermute)
Package: normalize-audio
Version: 0.7.7-15
Severity: normal

Hello and thanks for maintaining this nice program in Debian!


I wanted to run normalize (in batch mode) on a group of audio files
with the --no-adjust option, in order to analyze the files, without
altering them in any way.

I can do this on a group of .wav files with

  $ normalize-audio --amplitude=-7.5dBFS -b -n -v *.wav

and it seems to work as intended.

However, if I want to do it on a group of .ogg files, I get
per-track info, but not the standard deviation, average, or
per-album adjustment data.

  $ normalize-ogg -a -7.5dBFS --tmpdir /dev/shm -b -n -v *.ogg
  Decoding track01.ogg...
  Decoding track02.ogg...
  Decoding track03.ogg...
  Decoding track04.ogg...
  Decoding track05.ogg...
  Decoding track06.ogg...
  Decoding track07.ogg...
  Decoding track08.ogg...
  Decoding track09.ogg...
  Decoding track10.ogg...
  Decoding track11.ogg...
  Decoding track12.ogg...
  Running normalize...
  Computing levels...
levelpeak
  -6.8533dBFS  0.dBFS   /dev/shm/track01.ogg.16607.wav   
  -8.0583dBFS  0.dBFS   /dev/shm/track02.ogg.16607.wav
  -7.1047dBFS  0.dBFS   /dev/shm/track03.ogg.16607.wav
  -7.2339dBFS  0.dBFS   /dev/shm/track04.ogg.16607.wav
  -7.7699dBFS  0.dBFS   /dev/shm/track05.ogg.16607.wav
  -7.1890dBFS  0.dBFS   /dev/shm/track06.ogg.16607.wav
  -8.0084dBFS  0.dBFS   /dev/shm/track07.ogg.16607.wav
  -7.6048dBFS  0.dBFS   /dev/shm/track08.ogg.16607.wav
  -7.4123dBFS  0.dBFS   /dev/shm/track09.ogg.16607.wav
  -7.5195dBFS  0.dBFS   /dev/shm/track10.ogg.16607.wav
  -8.1773dBFS  0.dBFS   /dev/shm/track11.ogg.16607.wav
  -7.5512dBFS  0.dBFS   /dev/shm/track12.ogg.16607.wav

This is weird, since normalize-ogg decodes the .ogg files into
.wav files and then runs normalize-audio on them.
Hence, I would expect the same output...

Yet, if I manually run normalize-audio on the decoded files,
I also get the final data I am interested in:

  $ normalize-audio --amplitude=-7.5dBFS -b -n -v /dev/shm/*.wav
  Computing levels...
levelpeak
  -6.8533dBFS  0.dBFS   /dev/shm/track01.ogg.16607.wav
  -8.0583dBFS  0.dBFS   /dev/shm/track02.ogg.16607.wav
  -7.1047dBFS  0.dBFS   /dev/shm/track03.ogg.16607.wav
  -7.2339dBFS  0.dBFS   /dev/shm/track04.ogg.16607.wav
  -7.7699dBFS  0.dBFS   /dev/shm/track05.ogg.16607.wav
  -7.1890dBFS  0.dBFS   /dev/shm/track06.ogg.16607.wav
  -8.0084dBFS  0.dBFS   /dev/shm/track07.ogg.16607.wav
  -7.6048dBFS  0.dBFS   /dev/shm/track08.ogg.16607.wav
  -7.4123dBFS  0.dBFS   /dev/shm/track09.ogg.16607.wav
  -7.5195dBFS  0.dBFS   /dev/shm/track10.ogg.16607.wav
  -8.1773dBFS  0.dBFS   /dev/shm/track11.ogg.16607.wav
  -7.5512dBFS  0.dBFS   /dev/shm/track12.ogg.16607.wav
  Standard deviation is 0.39 dB
  -7.5314dBFS  average level
  0.031363dB   volume adjustment

I cannot understand why normalize-ogg seems to suppress the
final output lines (which include interesting data about
standard deviation, average, and per-album adjustment!).

I took a look at the normalize-ogg code, but my knowledge
about Perl is just a smattering, and, in addition, it is rusty.
Hence, I failed to understand the tricky part (with exec()
and pipe handling, I think...).

How can normalize-ogg be fixed to show all the output
of normalize-audio?
Please fix this bug and/or forward my bug report upstream,
as appropriate.

Thanks for your time!
Bye.


-- System Information:
Debian Release: bullseye/sid
  APT prefers testing
  APT policy: (800, 'testing'), (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.6.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages normalize-audio depends on:
ii  libaudiofile1  0.3.6-5
ii  libc6  2.30-8
ii  libmad00.15.1b-10
ii  perl   5.30.2-1

Versions of packages normalize-audio recommends:
ii  flac  1.3.3-1
ii  vorbis-tools  1.4.0-11

Versions of packages normalize-audio suggests:
pn  mpg321  

-- no debconf information