Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: R128GAIN: An EBU R128 compliant loudness scanner (Read 387846 times) previous topic - next topic
0 Members and 4 Guests are viewing this topic.

R128GAIN: An EBU R128 compliant loudness scanner

Reply #400
My comments were made to suggest an improvement to the labeling in the tool provided (which I think is great and will be very useful) and make those labels more technically correct. If you Google R128-1 or R128-2, these don't exist. This adds to the confusion and in my opinion, can unnecessarily make this tool look less professional. And that would be a shame as, like I said, this could be very, very useful to a lot of people - consumers and professionals alike.

For some intermediate time I'd prefer to have the two choices. Maybe it's of some advantage to re-label them to "R128-2010" and "R128-2011", respectively, in order to avoid confusion.

Indeed, the A/85 is unclear which BS.1770 standard it refers to and this has generated some confusion in the broadcast industry. However, my experience is opposite to yours. From what I've seen, broadcasters and manufacturers have concluded that A/85 refers to the original BS.1770 because that's what existed when the A/85 was published, and not BS.1770-2. But you could easily argue both cases, which is why I hope that the ATSC will revise A/85 document to make this explicit.

As far as I can see there is no practical difference between BS.1770 and BS.1770-1 w.r.t loudness measurement. Both versions have no concept of overlapping blocks and gating. There's also no obvious difference w.r.t true peak measurement.

Both, BS.1770-2 and BS.1770-3, have the same concept of loudness measurement using overlapping blocks and gating (as proposed by EBU R128-2010, but with different overlap and different gating threshold). The algorithm for true peak measurement has changed in both versions. BS.1770-3 makes a low pass filter mandatory and removes any DC processing.

As far as I can see ATSC A/85-2011 refers to BS.1770 and BS.1770-1, i.e. no overlapping and no gating. ATSC A/85-2011 defines the target loudness to -24 LKFS and the maximum peak level to -2 dB TP.

Unfortunately it is not possible yet to fully adjust R128GAIN according to ATSC A/85-2011. To some extend it is possible by setting "Partition" to 1 and "Gate" to some positive value. But there's no way to configure the target loudness using the GUI, the command line provides a "--preamp" option for achieving this. But, of course, R128GAIN's next version should provide options for switching off gating, choosing the target loudness, and for choosing a A/85-2011 profile similar to the options for choosing R128-2010 and R128-2011 profiles.

EDIT: Sorry for having overlooked the following:

ATSC A/85 does not mandate any specific version of BS-1770. It actually says "Users should utilize the current version of BS-1770 for measurements". This has resulted in some confusion as to whether gated measurement techniques should be used - but those in the broadcasting leading the efforts in this field are very clear that gated measurements as introduced in BS1770-2 should be used. I have heard that an update to ATSC A/85 is likely to be published shortly and expect this topic will be clarified.

This makes it a bit harder to provide a A/85-2011 profile then stated above, but it should be possible anyway.

R128GAIN: An EBU R128 compliant loudness scanner

Reply #401
Thank you very much for the Linux GTK version. I really appreciate it. While I'm writing I might as well ask how to make the new files keep tags they processed files had?

R128GAIN: An EBU R128 compliant loudness scanner

Reply #402
Regarding an ATSC A/85 - a revision is certainly in order. If you read section 5.2 it talks about how periods of quiet will impact the accuracy of an integrated measurement and that pausing or gating would improve this - and the fact that gating may be introduced into BS1770 'in the future' - the future is now !.

I would definitely like to see the option to define the target loudness as either -23 or -24, or some other user-definable value, since ATSC A/85 does not mandate -24, it simply recommends it in the absence of any defined in-house dialnorm value. While the defacto standard in the US has become -24 LKFS it's up to individual facilities and broadcasters to define their own standards - and then of course make everything match...

One feature which would be useful when examining long-form TV programming is some type of data export of loudness analysis trend. You can analyze a 10 minute segment of a show and get an integrated loudness value but it doesn't give you any indication of the quality of the mix. If the mix is good - i.e. the levels are consistent and well matched between scenes or presenters - then an adjustment to the overall level up or down will typically bring it to the target loudness. But if the mix is bad (poorly produced show and/or not mixed using loudness measurement techniques) then applying a scaling adjustment might make the 'number' right but it will still sound bad.

Being able to scan files and derive a report which assess their suitability to be normalized, or indicate if other processesing or even a remix is required would be very helpful.

R128GAIN: An EBU R128 compliant loudness scanner

Reply #403
Hello.

First of all thx for all your efforts. These are very much appreciated.

I do have some comments /questions.

I just tried the Linux 64bit and 32bit cli version Alpha 5 on Ubuntu 12.04.


1. I do have problems with the file management of flac files: 

r128gain <options>  --in-place    "indir"  -o  "indir" 
r128gain <options>  --in-place    *flac -o  .

the program tells me that the original files can not be overwritten, respectively generates a new directory even though --in-place is active.
I checked permissions - these are OK.

What am I doing wrong??

It works when choosing another directory as output directory


2. I can run the binary from command line,  but somehow it doesn't work when started from a bash script ( to run a batch conversion job)
    I tried to trace it - but there's not any output written.

3. --sox refers to a path. It might be more benefitial to use the actual library file.  The Ubuntu original sox library is e.g. called /usr/lib/libsox.so.1 

4. The program writes db-values and "LU" as a unit into the tags. I think it might be an idea - due to app-parser compatibility reasons - to stay with db as unit.
  After all  we're still talking about gain adjust in db.  This way compatibility issues with certain applications reading the full RPG tags can be avoided.

5. output mode quiet. I  tried --loglevel=0  --progress=off to get the app quietly working. Nothing wokred as expecetd. It seems that there'll always be output to stdout.
    Would be nice to have a working "-q" option in place.

6. Are those peak options
    --peak=[off|sample|true]

  and these

    --no-peak
    --sample-peak
    --true-peak

    redundant ?

  Maybe you could remove this redundancy to avoid confusion!!?

7. I'm also quite confused by

    --r128              Run in EBU R128-2 compliance mode (default).
    --r128-2            Run in EBU R128-2 compliance mode (default).
    --r128-1            Run in EBU R128-1 compliance mode.
    --rg                Run in ReplayGain compliance mode.
    --compliant=[r128-2|r128-1|rg]  Run in respective compliance mode.
    --r128-compatible  Calibrate output according to EBU R128.
      --rg-compatible    Calibrate output according to ReplayGain.

  There also seems to be some redundancy in above options.
  I think only  entries 2,3,4 should stay to avoid confusion - if I interprete the intention behind it correctly.


That's my initial feedback after an hour working with the app.

Looking forward to your feedback.

THX a lot.
SC

R128GAIN: An EBU R128 compliant loudness scanner

Reply #404
I do have some comments /questions.

Thanks a lot for the feedback.

1. I do have problems with the file management of flac files: 

r128gain <options>  --in-place    "indir"  -o  "indir" 
r128gain <options>  --in-place    *flac -o  .

the program tells me that the original files can not be overwritten, respectively generates a new directory even though --in-place is active.
I checked permissions - these are OK.

What am I doing wrong??

It works when choosing another directory as output directory

Probably you're right. Unfortunately I can't verify it right now because I don't have access to my development environment during the next few days.

2. I can run the binary from command line,  but somehow it doesn't work when started from a bash script ( to run a batch conversion job)
    I tried to trace it - but there's not any output written.

This sounds a bit strange. Unfortunately I can't verify it right now because I don't have access to my development environment during the next few days.

3. --sox refers to a path. It might be more benefitial to use the actual library file.  The Ubuntu original sox library is e.g. called /usr/lib/libsox.so.1
 
R128GAIN looks for "libsox.so". I should change this to "libsox.so.1". Changing the meaning of "--sox" would cause an inconsistency to the "--ffmpeg" switch.

4. The program writes db-values and "LU" as a unit into the tags. I think it might be an idea - due to app-parser compatibility reasons - to stay with db as unit.
  After all  we're still talking about gain adjust in db.  This way compatibility issues with certain applications reading the full RPG tags can be avoided.

I'm not very lucky with this myself. Having it this way is due to some discussions you'll find up this thread. The discussion was about whether R128GAIN is allowed or not to re-use the ReplayGain tags. Maybe R128GAIN should provide a "--db" switch forcing dB instead of LU, TP etc.

5. output mode quiet. I  tried --loglevel=0  --progress=off to get the app quietly working. Nothing wokred as expecetd. It seems that there'll always be output to stdout.
    Would be nice to have a working "-q" option in place.

"--loglevel" is the FFmpeg loglevel, it is just passed to FFmpeg. "--progress=off" suppresses the display of percentages. R128GAIN should provide a "--quiet" switch in order to suppress any output.

6. Are those peak options
    --peak=[off|sample|true]

  and these

    --no-peak
    --sample-peak
    --true-peak

    redundant ?

  Maybe you could remove this redundancy to avoid confusion!!?

They are redundant.

7. I'm also quite confused by

    --r128              Run in EBU R128-2 compliance mode (default).
    --r128-2            Run in EBU R128-2 compliance mode (default).
    --r128-1            Run in EBU R128-1 compliance mode.
    --rg                Run in ReplayGain compliance mode.
    --compliant=[r128-2|r128-1|rg]  Run in respective compliance mode.
    --r128-compatible  Calibrate output according to EBU R128.
      --rg-compatible    Calibrate output according to ReplayGain.

  There also seems to be some redundancy in above options.
  I think only  entries 2,3,4 should stay to avoid confusion - if I interprete the intention behind it correctly.

The "--*-compatible" switches are different from the others. The others produce output in full accordance with the respective standard. The "--*-compatible" switches modify the output w.r.t units (RG: dB, R128: LU/TP) and target loudness. I suspect that the command "r128gain --rg-compatible ..." is what is meant by ReplayGain2 (cf. http://www.hydrogenaudio.org/forums/index....showtopic=89841, http://wiki.hydrogenaudio.org/index.php?ti...0_specification), i.e. ITU BS.1770 with traditional RG reference level and units.

R128GAIN: An EBU R128 compliant loudness scanner

Reply #405
Thx for the feedback.

Some more thoughts

** I'd get along with  a tagunit switch --tagunit=[db|LU|TP]
** And a switch which refers to  a different LU reference base of -18LU or -23LU  --  this way you'd be able skip those IMO still confusing --*compatible options.

** sox and ffmpeg switches are both kind of inconsistant.  I think there need to be reference to the lib AND to the binary respectively the PATH.
    --sox=  --ffmpeg= could refer to the binary -- I might want to distinguish between the binaries as supplied by r128gain and my own and than the lib references  --soxlib= --ffmpeglib=



And one more:

If you'd introduce a "-i" switch you'd be consistant to the -o switch.


-o should not be required if --in-place is used ( though I'd rather call --in-place "--overwrite" to clearly show its impact)


Below my option wishlist summary for the cli implementation

--peak=[off|sample|true]            ## [default=true]
--tagunit=[db|LU|TP]                  ## units written to RPG tags [default=db]
--mode=[rg|128-1|128-2]            ## [default=128-2]
--reference=[-18|-23]                ## [default=-23]

--sox=                                      ##path to sox binary OR binary if specified [default=/usr/share/r128gain/bin] 
--ffmpeg=                                  ##path to ffmpeg binary OR binary if specified [default=/usr/share/r128gain/bin]
--libsox=                                    ##path to sox library OR library if specified [default=/usr/share/r128gain/lib]
--libffmpeg=                              ##path to ffmpeg library OR library if specified [default=/usr/share/r128gain/lib]

--> package should always be installed in /usr/share/r128gain the binary should be linked from /usr/local/bin to /usr/share/r128gain/bin ( you might change tools to bin)

--overwrite                                ## overwrites existings files respectively existing tags. Audio data remain untouched!!
-i                                              ## input file|filelist|directory  e.g.  track.flac|*flac|/music/CD1
-o                                              ## output base directory where "input file|filelist|directory" will be copied/saved -- not required in case --overwrite is used
--format=[flac|wav|bwf]              ## output format flac/wav/bwf -- not required if --overwrite if used. If not used  input format=output format

                                                  Note1: If flac en- or recoding takes place a Flac Compression Level option ( -C [0-8] ) -- see sox -- should be introduced.
                                                  Note2: the todays "flac" only  option would be obsolete with --format.

OPTIONAL:


--group=[list|dir|tag]              ## a new option that specifies what files are to be taken to calculate the "common" value.
                                                  Eg: If you've got  tons of files in one directory it might be better to read out the album tag and take that as the common denominator for applying album LU/RPG tags.
                                                        --group=list would cover e.g. *flac  --group=dir  would cover /music/CD1 




That'll be it for now.  Gotta run. 

Cheers
SC

R128GAIN: An EBU R128 compliant loudness scanner

Reply #406
Some more thoughts

Thank you for all the suggestions. Some of them are already under consideration, cf. some of the discussions above (e.g. defining the reference level).

Of most importance to me for further development of R128GAIN is to provide the ability of applying the gain to the output possibly including transcoding to a different format. Currently this is possible by using the "--command" option but I feel that it would be preferable to have R128GAIN supporting it natively. This would be a natural extension of the "--flac" option as already pointed out by you.

Regarding the command line I don't see any need to alter the general structure. The main idea is to have up to four sections:
  • a optional list of switches each of them prefixed by "--", followed by
  • a mandatory list of input files (possibly consisting of just one file), followed by
  • an optional output folder separated from the list of input files by "-o", followed by
  • an optional output format.
Viewed this way "-o" is a separator (between the mandatory list of input files and the optional output folder) rather a switch. Hence an "-i" option is not only not needed but would be rather confusing by suggesting a free order of the command line's arguments.

Regarding your proposal for grouping by tags I'm not considering it currently. I've thought about it at the beginning but came to the conclusion that it would contribute much to the program's ever growing complexity without a real need. Instead I'd like to encourage users to use their file system in a way that it is thought for, i.e. not having 1000's or even 10.000's files in one folder but instead grouping them in a natural way by using sub-folders. After all that's the reason why file systems usually provide the means of folders.

To wrap up, my priority is to extend the abilities with respect to the output (including applying the gain and transcoding) rather then re-arranging the command line. This will, of course, include a way for defining the quality / compression ratio as long as it is mappable to FFmpeg.

R128GAIN: An EBU R128 compliant loudness scanner

Reply #407
My last post looked a bit wild I guess.

I just tried to structure and make it a bit more consistant  -  based on my brief experiences with the app - the commands a little. You'll find similar  structures with sox etc.

It's meant to be just a sort of  a feedback.

I don't really ask for new features. Mainly everything is there. Just the help descriptions and command syntax could IMO use some more refinement..

The grouping of tags by album is a feature that dbPoweramp offers  for RPG tags. That's really an option.
I personally can't even make use of it.


However. I'd be happy if you could look into the problems related to overwriting existing files and the script problem.


Most of the other stuff I can introduce by myself by script (swapping LU with db is pretty easy to accomplish by metaflac and sed command etc.)

THX

Keep up the good work.

I do deliver stuff to the community FOC by myself. I know how it is. Probably life would have been easier to just offer
a simple commandline app.

R128GAIN: An EBU R128 compliant loudness scanner

Reply #408
Problem report:
################

I.

Case 1: all r128gain files are moved to one directory


./r128gain --sox="." --in-place --compliant=r128-2 --true-peak --tags=rg /tmp/music/CD1 -o /tmp/tmp

==error loading sox

###############

Case 2:  r128gain in /usr/local/bin, libs and tools are in the original directory structure


r128gain --sox="./r128gain-tools/" --in-place --compliant=r128-2 --true-peak --tags=rg /tmp/music/CD1 -o /tmp/tmp
or
r128gain --sox="/tmp/r128gain-1.0-alpha-5/r128gain-tools/" --in-place --compliant=r128-2 --true-peak --tags=rg /tmp/music/CD1 -o /tmp/tmp


==error loading sox

Case 3:  r128gain in original directory structure and libs and tools also in the original directory structure

./r128gain --sox="./r128gain-tools/" --in-place --compliant=r128-2 --true-peak --tags=rg /tmp/music/CD1 -o /tmp/tmp


That's the only way I get it to work.


I also tried other senarios -- e.g.

Case 4. set sox path to /usr/lib and linked libsox.so.1 to libsox.so

again same problem as above.


I am wondering if there's something wrong with the path references.

Or I am just to stupid.


Another one:

II.

I downloaded the 32bit CLI version. Could it be that it is the same as the 64bit CLI version?? The binary tells my "permission denied"


THX

R128GAIN: An EBU R128 compliant loudness scanner

Reply #409
I downloaded the 32bit CLI version. Could it be that it is the same as the 64bit CLI version?? The binary tells my "permission denied"

Why are you concluding that the two versions are the same? Obviously both versions behave differently: the 64 bit version executes on your 64 bit system, whereas the 32 bit version doesn't.

The versions are build using 32 bit and 64 bit Ubuntu running in respective VMs on Windows Vista.  The file name (containing "linux" vs. "linux64") is automatically derived from "uname -a" during the build.

Regarding the other questions: I'm not able to access my development environment during the next few days.

R128GAIN: An EBU R128 compliant loudness scanner

Reply #410
I downloaded the 32bit CLI version. Could it be that it is the same as the 64bit CLI version?? The binary tells my "permission denied"

Why are you concluding that the two versions are the same? Obviously both versions behave differently: the 64 bit version executes on your 64 bit system, whereas the 32 bit version doesn't.

The versions are build using 32 bit and 64 bit Ubuntu running in respective VMs on Windows Vista.  The file name (containing "linux" vs. "linux64") is automatically derived from "uname -a" during the build.

Regarding the other questions: I'm not able to access my development environment during the next few days.


I assumed they are different. But the 32 bit version didn't run on a 32 bit system. The 64bit version worked without
problems on a 64 bit system.

R128GAIN: An EBU R128 compliant loudness scanner

Reply #411
Version 1.0-alpha-6 released:
[blockquote]Home: http://r128gain.sourceforge.net/
Download: http://sourceforge.net/projects/r128gain/files/r128gain/1.0/[/blockquote]
What's new?
  • Added ATSC A/85 support.
  • Added ReplayGain2 support.
  • Added an option "--reference" in order to define the reference loudness (EBU R128: -23 LUFS).
  • Added an option "--db" in order to force dB as unit instead of LU/TP.
  • Added an option "--quiet" in order to suppress any writing to stdout.
  • Fixed loading "libsox.so.1".
  • Fixed overwriting of files.

Code: [Select]
$ r128gain --help
An EBU R128 (http://tech.ebu.ch/loudness) compliant loudness scanner.
For details refer to "http://r128gain.sourceforge.net/".

Usage: r128gain [options] (file|directory)+ [-o <directory> [flac|mkv]]
Options:
  --r128              Run in EBU R128-2011 compliance mode (default).
  --r128-2011         Run in EBU R128-2011 compliance mode (default).
  --r128-2010         Run in EBU R128-2010 compliance mode.
  --a85               Run in ATSC A/85:2011 compliance mode.
  --a85-2011          Run in ATSC A/85:2011 compliance mode.
  --rg2               Run in ReplayGain2 compliance mode.
  --rg                Run in ReplayGain compliance mode.
  --reference=<float>  Set reference loudness in LUFS.
  --r128-compatible   Calibrate output according to EBU R128.
  --rg-compatible     Calibrate output according to ReplayGain.
  --db                Use dB as unit rather then LU/TP.
  --partition=<int>   BS.1770 overlap
                      (overlap in % = (1 - 1/partition) * 100%,
                      default: 4, i.e. 75% overlap).
  --gate=<float>      BS.1770 gate (-10.0 .. -8.0, default: -10.0).
  --rg-calibration=<float>  Aequivalent to use for ReplayGain
                      loudness (default: -18.0).
  --no-peak
  --sample-peak
  --true-peak
  --range=on,--range  Calculate loudness range (default).
  --range=off,--no range  Don't calculate loudness range.
  --tags=[rg|bwf]     Write ReplayGain (default) or BWF tags.
  --fast              Switch off up-sampling and don't calculate
                      loudness range.
  --mono=off          Treat mono as stereo (default).
  --mono=on,--mono    Don't treat mono as stereo.
  --quiet             Supress output to stdout.
  --progress=on       Display progress (default).
  --progress=off      Don't display progress.
  --traditional       Format output traditionally.
  --command=<string>  Run command on each track.
  --overwrite         Overwrite already existing output files.
  --in-place          Overwrite original files.
  --loglevel=<integer>  Set FFmpeg loglevel.
  --regression        Calculate linear regression between EBU R128
                      and ReplayGain.
  --duration          Print out duration.
  --version           Display version information.
  --ffmpeg=<path>     Directory of the FFmpeg shared libraries.
  --sox=<path>        Directory of the SoX shared libraries.
  --help              Display this information.
$ _

R128GAIN: An EBU R128 compliant loudness scanner

Reply #412

Whow. Great. Thx a lot for considering some of my feedback.


Did you manage to replicate/solve my reported problems on the  PATH subject  in post #409 on the CLI version?


Q:

What is considered superior A/85 or R128.

By reading this

http://www.merging.com/uploads/assets/Merg...ambiguation.pdf


I'd guess it's probably better to stay with EBU.

Cheers

R128GAIN: An EBU R128 compliant loudness scanner

Reply #413
Whow. Great.

Thanks a lot

Thx a lot for considering some of my feedback.

Feedback is always very welcome

Did you manage to replicate/solve my reported problems on the  PATH subject  in post #409 on the CLI version?

Unfortunately I was not able to reproduce it, except regarding "libsox.so.1".

What is considered superior A/85 or R128.

Neither. Both are flavors of ITU BS.1770. EBU R128 is the European variant whereas ATSC A/85 is for the U.S. and Canada. The main difference between the two is the reference loudness, EBU R128: -23 LU, ATSC A/85: -24 dB.

I'd guess it's probably better to stay with EBU.

It depends on where you're located.

R128GAIN: An EBU R128 compliant loudness scanner

Reply #414
--reference=-23LUFS

is above how it has to look like? What means float here? -23.00?

THX.

R128GAIN: An EBU R128 compliant loudness scanner

Reply #415
--reference=-23LUFS

is above how it has to look like? What means float here? -23.00?

THX.

Just "--reference=-23" or "--reference=-23.0", if you like, without any unit.

EBU R128-2011 is the default and it's reference loudness is -23 LU, hence it shouldn't make any difference whether you supply "--reference=-23.0" or not.


R128GAIN: An EBU R128 compliant loudness scanner

Reply #417
I stiil don't get the cli app started from a bash script.

There seems to be  something going wrong with the environment/shell.

Do you want me to post the script?

R128GAIN: An EBU R128 compliant loudness scanner

Reply #418
I stiil don't get the cli app started from a bash script.

There seems to be  something going wrong with the environment/shell.

Do you want me to post the script?

I did the following:

Code: [Select]
peter@ubuntu:~$ ./hello
bash: ./hello: Permission denied
peter@ubuntu:~$ chmod +x hello
peter@ubuntu:~$ ./hello
SoX sucessfully loaded.
FFmpeg sucessfully loaded.
/h/TEMP/O
  analyzing ...
    [1/1] "01_oh_susannah.flac": -10.9 LUFS (-12.1 LU)
        peak: -0.2 TPFS, range: 6.2 LU
    [ALBUM]: -10.9 LUFS (-12.1 LU)
        peak: -0.2 TPFS, range: 6.2 LU
  done.
Done.
peter@ubuntu:~$ cat hello
r128gain /h/TEMP/O
peter@ubuntu:~$ uname -a
Linux ubuntu 3.0.0-26-generic #43-Ubuntu SMP Tue Sep 25 17:19:22 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
peter@ubuntu:~$

I first got the "Permission denied" from the script and not from "r128gain".

 

R128GAIN: An EBU R128 compliant loudness scanner

Reply #419
Enclosed some more subjects:


1. Script  - directory given as argument
##############################

Code: [Select]
#!/bin/bash -x

loop () {
find /tmp  -iname '*.flac' -printf '%h\n' | sort -u | while read "I"
do
  r128gain  --sox=/usr/lib  --r128-2011 --true-peak --reference=-27 --in-place --tags=rg --db "$I"
done
}

cli () {
r128gain  --sox=/usr/lib  --r128-2011 --true-peak --reference=-27 --in-place --tags=rg --db "$1"
}

#loop
cli $1

exit 0



the cli()  works, the loop() doesn't - that's my earlier reported problem.

######################################


2. Core Dump
#############################################################

While running above cli() , I experienced a core dump when r128gain accessed a sub-directory with no audio files. As argument $1 /tmp/ has been given.

Code: [Select]
./test.sh: line 10:  2140 Segmentation fault      (core dumped) r128gain --sox=/usr/lib --r128-2011 --true-peak --reference=-27 --in-place --tags=rg --db "$1"


Note: You should check if there are audio files in the directories -- see my above loop function

######################################

Beside that

* my PATH/lib and startup problems got solved
* db as unit into RG tags works
* --in-place works now
* Spaces in filenames and directories are also covered

Great progress.

Cheers

R128GAIN: An EBU R128 compliant loudness scanner

Reply #420
Now some words to the first tests related to R128 performance.

What I did in the past.

I
1. inroduced RG tags
2. introduced an audio system specific offset (differs from stereo to stereo)
3. introduced my own gain tag ( additional VC adjustments based on subjective listeningtests with 1. and 2. applied)

I ran the r128-2011 on some overcompressed and some "normal" and vocal material.

It's IMO better then the RG algorithm on the first glance.

It works quite good on my normal material. (pretty much in line with my own listening tests)
But on the overcompressed material it's still much too loud.
On my vocal music CD. The adjust is not high enough.  This one is also much too load.

Of course you can turn it also around. The normal music  would then be turned down too much in comparision to the compressed music.

What knobs would you guys recommend to adjust to get me closer to the real thing?? Basically my normal material can stay as it is and the "loud" material should be taken down.

Cheers

R128GAIN: An EBU R128 compliant loudness scanner

Reply #421

I'm wondering if/how the loudness range parameter gets accounted for within r128gain.


The results (RG tags)  seem to look much better, if I'd take the loudness range into account.

My "normal" test CDs come with a LR of ~17 and
my "loud" CDs with ~8. That's quite a difference. 
(There are also some in-betweens.)


Adding that LR difference of normalCD[LR]-loudCD[LR] - by taking my normal CDs as  a kind of reference -  I end up at  ~-8db additional attenuation on my "loud" tracks.

Guess what. That would bring them much further to my own listening tests results done on the RG tags.   

Does anybody got an opinion about that??

BTW: I also tested  r128-2010-g8 . The differences to r128-2011-g10 are neglectable compared to above mismatch at this stage.

Cheers

R128GAIN: An EBU R128 compliant loudness scanner

Reply #422
I just tried the RG2 algorithm as supplied by r128gain Alpha 6.

That's IMO worse then RG1.



They all seem to have severe difficulties to figure out the right album gain.

If I load the first track of an album, I don't need more than 10s to figure out if it is to loud or to low.
And than the volume control usually stays that way. I don't need to scan the full CD to figure it out.

Not any of the known algorithms can IMO accomplish that. They all still seem to be pretty far off target.

I'll keep trying for some more time. Otherwise I'm gonna keep my own RG method.

Cheers

R128GAIN: An EBU R128 compliant loudness scanner

Reply #423
Hello,
running the 2 versions of R128GAIN
  - R128GAIN v1.0.alpha5 and
  - R128GAIN v1.0.alpha6-2
on the EBU R128 test vector
the results are not the same, alpha 6-2 is giving wrong results.

How is that possible?
Thanks
Jean

Code: [Select]
R128GAIN v1.0.alpha5
DlgItemUrl sucessfully loaded.
SoX sucessfully loaded.
FFmpeg sucessfully loaded.
E:\R128GAIN Test\0-EBU Loudness Test Set v03 (wav)
E:\R128GAIN Test\0-EBU Loudness Test Set v03 (wav)\1
  analyzing ...
    [1/3] "1kHz Sine -20 LUFS-16bit.wav": -20.0 LUFS (-3.0 LU)
        peak: -19.9 TPFS, range: 0.0 LU
    [2/3] "1kHz Sine -26 LUFS-16bit.wav": -26.0 LUFS (3.0 LU)
        peak: -25.9 TPFS, range: 0.0 LU
    [3/3] "1kHz Sine -40 LUFS-16bit.wav": -40.0 LUFS (17.0 LU)
        peak: -39.8 TPFS, range: 0.0 LU
    [ALBUM]: -22.0 LUFS (-1.0 LU)
        peak: -19.9 TPFS, range: 20.0 LU
  done.
E:\R128GAIN Test\0-EBU Loudness Test Set v03 (wav)\2
  analyzing ...
    [1/9] "seq-3341-1-16bit.wav": -23.0 LUFS (-0.0 LU)
        peak: -22.9 TPFS, range: 0.0 LU
    [2/9] "seq-3341-2-16bit.wav": -33.0 LUFS (10.0 LU)
        peak: -32.7 TPFS, range: 0.0 LU
    [3/9] "seq-3341-2011-8_seq-3342-6-24bit-v02.wav": -23.0 LUFS (0.0 LU)
        peak: -2.6 TPFS, range: 15.3 LU
    [4/9] "seq-3341-3-16bit-v02.wav": -23.0 LUFS (0.0 LU)
        peak: -23.0 TPFS, range: 13.0 LU
    [5/9] "seq-3341-4-16bit-v02.wav": -23.0 LUFS (0.0 LU)
        peak: -23.0 TPFS, range: 13.0 LU
    [6/9] "seq-3341-5-16bit-v02.wav": -23.0 LUFS (-0.0 LU)
        peak: -20.0 TPFS, range: 6.0 LU
    [7/9] "seq-3341-6-5channels-16bit.wav": -23.0 LUFS (0.0 LU)
        peak: -24.0 TPFS, range: 0.0 LU
    [8/9] "seq-3341-6-6channels-WAVEEX-16bit.wav": -23.0 LUFS (0.0 LU)
        peak: -24.0 TPFS, range: 0.0 LU
    [9/9] "seq-3341-7_seq-3342-5-24bit.wav": -23.0 LUFS (-0.0 LU)
        peak: -8.9 TPFS, range: 4.8 LU
    [ALBUM]: -23.2 LUFS (0.2 LU)
        peak: -2.6 TPFS, range: 15.6 LU
  done.
E:\R128GAIN Test\0-EBU Loudness Test Set v03 (wav)\3
  analyzing ...
    [1/4] "seq-3342-1-16bit.wav": -22.6 LUFS (-0.4 LU)
        peak: -20.0 TPFS, range: 10.0 LU
    [2/4] "seq-3342-2-16bit.wav": -16.8 LUFS (-6.2 LU)
        peak: -15.0 TPFS, range: 5.0 LU
    [3/4] "seq-3342-3-16bit.wav": -20.0 LUFS (-3.0 LU)
        peak: -20.0 TPFS, range: 20.0 LU
    [4/4] "seq-3342-4-16bit.wav": -24.5 LUFS (1.5 LU)
        peak: -20.0 TPFS, range: 15.0 LU
    [ALBUM]: -19.2 LUFS (-3.8 LU)
        peak: -15.0 TPFS, range: 25.0 LU
  done.
Done.
Hit enter to continue ...


Code: [Select]
R128GAIN v1.0.alpha6-2
DlgItemUrl sucessfully loaded.
SoX sucessfully loaded.
FFmpeg sucessfully loaded.
E:\R128GAIN Test\0-EBU Loudness Test Set v03 (wav)
E:\R128GAIN Test\0-EBU Loudness Test Set v03 (wav)\1
  analyzing ...
    [1/3] "1kHz Sine -20 LUFS-16bit.wav": -20.6 LUFS (-2.4 LU)
        peak: -19.9 TPFS, range: 0.0 LU
    [2/3] "1kHz Sine -26 LUFS-16bit.wav": -26.6 LUFS (3.6 LU)
        peak: -25.9 TPFS, range: 0.0 LU
    [3/3] "1kHz Sine -40 LUFS-16bit.wav": -40.6 LUFS (17.6 LU)
        peak: -39.8 TPFS, range: 0.0 LU
    [ALBUM]: -22.6 LUFS (-0.4 LU)
        peak: -19.9 TPFS, range: 20.0 LU
  done.
E:\R128GAIN Test\0-EBU Loudness Test Set v03 (wav)\2
  analyzing ...
    [1/9] "seq-3341-1-16bit.wav": -23.6 LUFS (0.6 LU)
        peak: -22.9 TPFS, range: 0.0 LU
    [2/9] "seq-3341-2-16bit.wav": -33.6 LUFS (10.6 LU)
        peak: -32.7 TPFS, range: 0.0 LU
    [3/9] "seq-3341-2011-8_seq-3342-6-24bit-v02.wav": -21.9 LUFS (-1.1 LU)
        peak: -2.6 TPFS, range: 17.7 LU
    [4/9] "seq-3341-3-16bit-v02.wav": -23.4 LUFS (0.4 LU)
        peak: -23.0 TPFS, range: 13.0 LU
    [5/9] "seq-3341-4-16bit-v02.wav": -23.7 LUFS (0.7 LU)
        peak: -23.0 TPFS, range: 13.0 LU
    [6/9] "seq-3341-5-16bit-v02.wav": -23.6 LUFS (0.6 LU)
        peak: -20.0 TPFS, range: 6.0 LU
    [7/9] "seq-3341-6-5channels-16bit.wav": -23.2 LUFS (0.2 LU)
        peak: -24.0 TPFS, range: 0.0 LU
    [8/9] "seq-3341-6-6channels-WAVEEX-16bit.wav": -23.1 LUFS (0.1 LU)
        peak: -24.0 TPFS, range: 0.0 LU
    [9/9] "seq-3341-7_seq-3342-5-24bit.wav": -23.6 LUFS (0.6 LU)
        peak: -8.9 TPFS, range: 4.7 LU
    [ALBUM]: -23.0 LUFS (-0.0 LU)
        peak: -2.6 TPFS, range: 16.2 LU
  done.
E:\R128GAIN Test\0-EBU Loudness Test Set v03 (wav)\3
  analyzing ...
    [1/4] "seq-3342-1-16bit.wav": -23.2 LUFS (0.2 LU)
        peak: -20.0 TPFS, range: 10.0 LU
    [2/4] "seq-3342-2-16bit.wav": -17.5 LUFS (-5.5 LU)
        peak: -15.0 TPFS, range: 5.0 LU
    [3/4] "seq-3342-3-16bit.wav": -20.7 LUFS (-2.3 LU)
        peak: -20.0 TPFS, range: 20.0 LU
    [4/4] "seq-3342-4-16bit.wav": -25.2 LUFS (2.2 LU)
        peak: -20.0 TPFS, range: 15.0 LU
    [ALBUM]: -19.8 LUFS (-3.2 LU)
        peak: -15.0 TPFS, range: 25.0 LU
  done.
Done.
Hit enter to continue ...


R128GAIN: An EBU R128 compliant loudness scanner

Reply #424
Oh.

Just realized that I've been using alpha-6 and not alpha-6.2

jangk interesing findings.

magnitude looks almost like differences beween R128 - 2010 and 2011.

Have you tried explicitely setting mode, reference level and gate?