Skip to main content

Topic: R128GAIN: An EBU R128 compliant loudness scanner (Read 244864 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • pbelkner
  • [*][*][*][*]
R128GAIN: An EBU R128 compliant loudness scanner
Reply #325
Please forgive me if I missed it, but is there a command line environment variable provided for the actual LUFS value, e.g., %LUFS%?


Version 0.9.3 released:
[blockquote]Home: http://r128gain.sourceforge.net/
Download: http://sourceforge.net/projects/r128gain/files/[/blockquote]
What's new?
  • Provided four more environment variables for the command option:

    • %TL%: The track loudness relative to full scale.
    • %TLDB%: The track loudness relative to full scale in dB/LUFS.
    • %AL%: The album loudness relative to full scale.
    • %ALDB%: The album loudness relative to full scale in dB/LUFS.

  • gb24
  • [*]
R128GAIN: An EBU R128 compliant loudness scanner
Reply #326
  • Provided four more environment variables for the command option:
    • %TL%: The track loudness relative to full scale.
    • %TLDB%: The track loudness relative to full scale in dB/LUFS.
    • %AL%: The album loudness relative to full scale.
    • %ALDB%: The album loudness relative to full scale in dB/LUFS.

Excellent! Thank you for making this great tool available to the community.

  • Zao
  • [*][*][*][*][*]
  • Members (Donating)
R128GAIN: An EBU R128 compliant loudness scanner
Reply #327
You couldn't have chosen something slightly more unique for the environment variables?
At least put a prefix on them or something to avoid collisions.
Zao shang yong zao nong zao rang zao ren zao.
To, early in the morning, use a chisel to build a bathtub makes impatient people hot-tempered.

  • gb24
  • [*]
R128GAIN: An EBU R128 compliant loudness scanner
Reply #328
You couldn't have chosen something slightly more unique for the environment variables?
At least put a prefix on them or something to avoid collisions.

Is this causing a specific problem which you cannot work around? Is there a reason for your focus on this small detail given all the functionality of this free program?

  • gb24
  • [*]
R128GAIN: An EBU R128 compliant loudness scanner
Reply #329
One more I may have missed: is there a command line environment variable provided for the Loudness Range (LRA) in LU? 

With this additional data, the scanner would provide all three measures in R128.  For example, for a given track would the following be correct?
    • "Programme Loudness" in LUFS (%TLDB%)
    • "Loudness Range" in LU ( ? )
    • "True Peak Level" in dBTP (%TPDB%)
    [/li]

Thank you.
  • Last Edit: 23 January, 2012, 12:20:41 PM by gb24

  • pbelkner
  • [*][*][*][*]
R128GAIN: An EBU R128 compliant loudness scanner
Reply #330
One more I may have missed: is there a command line environment variable provided for the Loudness Range (LRA) in LU?

There's no range computing in R128GAIN yet, that's not only a matter of an environment variable.

With this additional data, the scanner would provide all three measures in R128.  For example, for a given track would the following be correct?
    • "Programme Loudness" in LUFS (%TLDB%)
    • "Loudness Range" in LU ( ? )
    • "True Peak Level" in dBTP (%TPDB%)
    [/li]

Thank you.[/quote]
On the other hand there's a LU measure: %TGDB% holds the gain (in dB / LU) you have to apply in order to correct the loundess to -23 LUFS.

  • gb24
  • [*]
R128GAIN: An EBU R128 compliant loudness scanner
Reply #331
Please consider adding Loudness Range (LRA).  The scanner would then provide all three R128 descriptors, for example:

- Programme Loudness (%TLDB%)
- Loudness Range ( ? )
- True Peak Level (is this %TPDB%?)

Thank you.

  • pbelkner
  • [*][*][*][*]
R128GAIN: An EBU R128 compliant loudness scanner
Reply #332
Please consider adding Loudness Range (LRA).  The scanner would then provide all three R128 descriptors

Yep.

But next in the pipeline is a GTK+ GUI for Linux. Here's some preview:


- True Peak Level (is this %TPDB%?)

Yes.

  • gepebril
  • [*]
R128GAIN: An EBU R128 compliant loudness scanner
Reply #333
Hi there,

I'm not realy an audio guru, but for a project we have to make audio EBU-R128 compliant.
As I favour Open source solutions I would like to use R128GAIN, what I don't understand from the documentation is:
1) Can R128GAIN process audio so the result is EBU-R128 compliant
2) If so. We have the following specifications, and can they be achieved with R128GAIN
Code: [Select]
Parameter                      Meterindication  Value
Integrated Loudness            I                 -23 LUFS
Maximum True Peak Level        dBTP              -1 dBTP
Maximum Momentary Loudness     M                 +8 LU
Maximum Short Term Loudness    S                 No limitation
Loudness Range                 LRA               No limitation

3) Can one file be made EBU-R128 complaint, or can it only be as range of files in e.g. a play-out list
4) What file formats can be used as input (format, bitrate, samplerate) and what can be output formats (format, bitrate, samplerate)
Thanks in advance.

Yours sincerely,

Albert
  • Last Edit: 01 February, 2012, 07:49:14 AM by gepebril

  • pbelkner
  • [*][*][*][*]
R128GAIN: An EBU R128 compliant loudness scanner
Reply #334
1) Can R128GAIN process audio so the result is EBU-R128 compliant

In principle yes, but currently not with respect to all measures (cf. answers to the following questions.)

2) If so. We have the following specifications, and can they be achieved with R128GAIN
Code: [Select]
Parameter                      Meterindication  Value
Integrated Loudness            I                 -23 LUFS
Maximum True Peak Level        dBTP              -1 dBTP
Maximum Momentary Loudness     M                 +8 LU
Maximum Short Term Loudness    S                 No limitation
Loudness Range                 LRA               No limitation

Integrated loudness: Yes, via the command feature and using the default sox-command.
Maximum True Peak: R128GAIN is able to measure true peak but has no build in way to correct it. But most likely in almost all cases you will see that after having normalized to -23 LUFS your true peak requirement is fulfilled.
Maximum Momentary Loudness is not measured yet.
Maximum Short Term Loudness is not measured yet.
Loudness Range is not measured yet but should be available sometimes soon (cf. request by gb24 above.)

3) Can one file be made EBU-R128 complaint, or can it only be as range of files in e.g. a play-out list

You can use it on a file by file basis as well as on a range of files.

4) What file formats can be used as input (format, bitrate, samplerate) and what can be output formats (format, bitrate, samplerate)

After having upgraded to full versions of SoX (http://sox.sourceforge.net/) and FFmpeg (http://ffmpeg.zeranoe.com/builds/win32/shared/) there should be no practical restriction.

  • pbelkner
  • [*][*][*][*]
R128GAIN: An EBU R128 compliant loudness scanner
Reply #335
Please consider adding Loudness Range (LRA).  The scanner would then provide all three R128 descriptors

Version 0.9.4 released:
[blockquote]Home: http://r128gain.sourceforge.net/
Download: http://sourceforge.net/projects/r128gain/files/[/blockquote]
What's new?
  • Implemented the EBU R128 loudness range (LRA) algorithm (not available for the ReplayGain and BS.1770 sequence algorithms.)
  • Provided four respective environment variables for the command option:
    • %TR%: The track loudness range.
    • %TRDB%: The track loudness range in dB/LU.
    • %AR%: The album loudness range.
    • %ARDB%: The album loudness range in dB/LU.
  • The API of LIB1770 (implementing the loudness range algorithm) has slightly changed in order to allow for providing the length of a block (either 400 ms or 3000 ms.)
Test cases for Loudness Range (tech3342.pdf):

Code: [Select]
$ r128gain ~/ebu-loudness-test-setv03/*3342*.wav
SoX successfully loaded.
FFmpeg successfully loaded.
analyzing ...
  seq-3341-2011-8_seq-3342-6-24bit-v02.wav (1/6): -23.0 LUFS, 0.0 LU (peak: 0.737823: -2.6 dBFS, range: 15.3 LU)
  seq-3341-7_seq-3342-5-24bit.wav (2/6): -23.0 LUFS, 0.0 LU (peak: 0.358340: -8.9 dBFS, range: 6.3 LU)
  seq-3342-1-16bit.wav (3/6): -23.0 LUFS, 0.0 LU (peak: 0.100088: -20.0 dBFS, range: 10.0 LU)
  seq-3342-2-16bit.wav (4/6): -23.0 LUFS, 0.0 LU (peak: 0.177971: -15.0 dBFS, range: 5.0 LU)
  seq-3342-3-16bit.wav (5/6): -23.0 LUFS, 0.0 LU (peak: 0.100088: -20.0 dBFS, range: 20.0 LU)
  seq-3342-4-16bit.wav (6/6): -23.0 LUFS, 0.0 LU (peak: 0.100073: -20.0 dBFS, range: 15.0 LU)
  ALBUM: -23.0 LUFS, 0.0 LU (peak: 0.737823: -2.6 dBFS, range: 17.1 LU)
  • Last Edit: 04 February, 2012, 01:13:14 PM by pbelkner

  • gb24
  • [*]
R128GAIN: An EBU R128 compliant loudness scanner
Reply #336
Thank you for incorporating LRA, Peter.  I think you now have a great tool for batch processing of audio files per EBU R128.

I am not aware of any other free or open source software which provides all this functionality.
  • Last Edit: 06 February, 2012, 01:30:00 PM by gb24

  • pbelkner
  • [*][*][*][*]
R128GAIN: An EBU R128 compliant loudness scanner
Reply #337
Version 0.9.5 (source / win32 binary) released:
[blockquote]Home: http://r128gain.sourceforge.net/
Download: http://sourceforge.net/projects/r128gain/files/[/blockquote]
What's new?
  • Fixed a bug in 0.9.4 that only either the loudness or the loudness range could be computed but not both together. The result was that in almost all practical cases the loudness defaulted to -23.0 LUFS.
The Linux binary will follow in a few days.

Test cases for Loudness Range (tech3342.pdf):

Code: [Select]
$ r128gain ~/ebu-loudness-test-setv03/*3342*.wav
SoX successfully loaded.
FFmpeg successfully loaded.
analyzing ...
  seq-3341-2011-8_seq-3342-6-24bit-v02.wav (1/6): -23.0 LUFS, 0.0 LU (peak: 0.737823: -2.6 dBFS, range: 15.3 LU)
  seq-3341-7_seq-3342-5-24bit.wav (2/6): -23.0 LUFS, 0.0 LU (peak: 0.358340: -8.9 dBFS, range: 6.3 LU)
  seq-3342-1-16bit.wav (3/6): -22.6 LUFS, -0.4 LU (peak: 0.100088: -20.0 dBFS, range: 10.0 LU)
  seq-3342-2-16bit.wav (4/6): -16.8 LUFS, -6.2 LU (peak: 0.177971: -15.0 dBFS, range: 5.0 LU)
  seq-3342-3-16bit.wav (5/6): -20.0 LUFS, -3.0 LU (peak: 0.100088: -20.0 dBFS, range: 20.0 LU)
  seq-3342-4-16bit.wav (6/6): -24.5 LUFS, 1.5 LU (peak: 0.100073: -20.0 dBFS, range: 15.0 LU)
  ALBUM: -21.2 LUFS, -1.8 LU (peak: 0.737823: -2.6 dBFS, range: 17.1 LU)


  • pbelkner
  • [*][*][*][*]
R128GAIN: An EBU R128 compliant loudness scanner
Reply #338
The Linux binary will follow in a few days.

The 0.9.5 Linux binary has been published.

  • pbelkner
  • [*][*][*][*]
R128GAIN: An EBU R128 compliant loudness scanner
Reply #339
Version 0.9.6 released:
[blockquote]Home: http://r128gain.sourceforge.net/
Download: http://sourceforge.net/projects/r128gain/files/[/blockquote]
What's new?
  • According to FFmpeg.org: FFmpeg development has gone into OVERDRIVE. As a consequence R128GAIN wasn't compiling any longer using the latest FFmpeg versions. This release ports R128GAIN to the latest FFmpeg API.
  • Added a command line and GUI option to allow choosing between the EBU R128-2 (current, dating from 2011) and EBU R128-1 (former, dating from 2010) standards.


  • The release requires "avformat-54.dll" and "avcodec-54.dll", and is now again in line with the latest FFmpeg builds from http://ffmpeg.zeranoe.com/builds/win32/shared/.
  • Last Edit: 11 February, 2012, 01:57:35 PM by pbelkner

R128GAIN: An EBU R128 compliant loudness scanner
Reply #340
With every ogg vorbis file i try to process i get "Application provided invalid, non monotonically increasing dts
to muxer in stream"
An example of a test ogg vorbis file encoded with aotuv 6.03:
Code: [Select]
SetDlgItemURL successfully loaded.
SoX successfully loaded.
FFmpeg successfully loaded.
[ogg @ 02197FE0] Format ogg probed with size=2048 and score=100
[ogg @ 02197FE0] Page at 58 is missing granule
[ogg @ 02197FE0] ti bytes of comment header remain
[ogg @ 02197FE0] All info found
[ogg @ 02197FE0] Format ogg probed with size=2048 and score=100
[ogg @ 02197FE0] Page at 58 is missing granule
[ogg @ 02197FE0] ti bytes of comment header remain
[ogg @ 02197FE0] All info found
analyzing ...
  test.ogg (1/1): -10.3 LUFS,
 -12.7 LU (peak: 1.097097: 0.8 dBFS, range: 7.6 LU)
  ALBUM: -10.3 LUFS, -12.7 LU (peak: 1.097097: 0.8 dBFS, range: 7.6 LU)
writing ...
  test.ogg (1/1) ... [ogg @ 0
220F9A0] Format ogg probed with size=2048 and score=100
[ogg @ 0220F9A0] Page at 58 is missing granule
[ogg @ 0220F9A0] ti bytes of comment header remain
[ogg @ 0220F9A0] All info found
[ogg @ 0220FE80] Application provided invalid, non monotonically increasing dts
to muxer in stream 0: 13760 >= 13760
error.
Done. Hit enter to continue ...
The resulting outputted file from the operation above is a 58 byte .ogg file with this content:
Code: [Select]
OggS         íôûÄ    çѱvorbis    D¬       ô     ¸


  • romor
  • [*][*][*][*][*]
R128GAIN: An EBU R128 compliant loudness scanner
Reply #341
Interestingly, I got same errors earlier today while doing DVD (M2V+LPCM) to MKV (x264+OGG) with Avidemux, which was handy at the moment. Result was fine thou, audio seemed fine after I checked, as I was surprised by misleading DTS errors
Seems like some ffmpeg issue

  • pbelkner
  • [*][*][*][*]
R128GAIN: An EBU R128 compliant loudness scanner
Reply #342
With every ogg vorbis file i try to process i get "Application provided invalid, non monotonically increasing dts
to muxer in stream"
An example of a test ogg vorbis file encoded with aotuv 6.03:
Code: [Select]
SetDlgItemURL successfully loaded.
SoX successfully loaded.
FFmpeg successfully loaded.
[ogg @ 02197FE0] Format ogg probed with size=2048 and score=100
[ogg @ 02197FE0] Page at 58 is missing granule
[ogg @ 02197FE0] ti bytes of comment header remain
[ogg @ 02197FE0] All info found
[ogg @ 02197FE0] Format ogg probed with size=2048 and score=100
[ogg @ 02197FE0] Page at 58 is missing granule
[ogg @ 02197FE0] ti bytes of comment header remain
[ogg @ 02197FE0] All info found
analyzing ...
  test.ogg (1/1): -10.3 LUFS,
 -12.7 LU (peak: 1.097097: 0.8 dBFS, range: 7.6 LU)
  ALBUM: -10.3 LUFS, -12.7 LU (peak: 1.097097: 0.8 dBFS, range: 7.6 LU)
writing ...
  test.ogg (1/1) ... [ogg @ 0
220F9A0] Format ogg probed with size=2048 and score=100
[ogg @ 0220F9A0] Page at 58 is missing granule
[ogg @ 0220F9A0] ti bytes of comment header remain
[ogg @ 0220F9A0] All info found
[ogg @ 0220FE80] Application provided invalid, non monotonically increasing dts
to muxer in stream 0: 13760 >= 13760
error.
This seems to be an FFmpeg error. FFmpeg is currently under heavy development.

A workaround is making FFmpeg unusable by e.g. renaming "avcodec.dll" from the "r128gain-tools" directory to "avcodec.dll.X". In this case R128GAIN will fall back to SoX.

  • pbelkner
  • [*][*][*][*]
R128GAIN: An EBU R128 compliant loudness scanner
Reply #343
With every ogg vorbis file i try to process i get "Application provided invalid, non monotonically increasing dts
to muxer in stream"

I've just uploaded a slightly modified version which should fix the issue (source code and win32 binary): http://sourceforge.net/projects/r128gain/files/

R128GAIN: An EBU R128 compliant loudness scanner
Reply #344
Vorbis files works fine for me now. 

  • pbelkner
  • [*][*][*][*]
R128GAIN: An EBU R128 compliant loudness scanner
Reply #345
I've just uploaded a slightly modified version which should fix the issue (source code and win32 binary): http://sourceforge.net/projects/r128gain/files/

Vorbis files works fine for me now. 

The Linux binary is now available as well.


  • pbelkner
  • [*][*][*][*]
R128GAIN: An EBU R128 compliant loudness scanner
Reply #346
Version 0.9.6-3 released:
[blockquote]Home: http://r128gain.sourceforge.net/
Download: http://sourceforge.net/projects/r128gain/files/[/blockquote]
What's new?
  • Fixes a bug that under certain circumstances a file was written twice.
  • Upgraded to SoX 14.4.0.

  • rojgreen
  • [*]
R128GAIN: An EBU R128 compliant loudness scanner
Reply #347
HI - new user. I don't mean to sound dumb, but is there a way to offset the resulting gain before it is written to a new file?

The reason I ask, is our company (TV broadcaster) has decided to adopt a reference of -24db based on itu1770 for mixed television programmes, and I was wondering if this tool would be of any use here. -23db is within our delivery spec, but out of curiosity (just me playing around)  i wondered if this tool could be used in our commercial suites to make a gain adjusted copy of the final .wav files that will comply with our delivery spec.

  • rojgreen
  • [*]
R128GAIN: An EBU R128 compliant loudness scanner
Reply #348
HI - new user. I don't mean to sound dumb, but is there a way to offset the resulting gain before it is written to a new file?

The reason I ask, is our company (TV broadcaster) has decided to adopt a reference of -24db based on itu1770 for mixed television programmes, and I was wondering if this tool would be of any use here. -23db is within our delivery spec, but out of curiosity (just me playing around)  i wondered if this tool could be used in our commercial suites to make a gain adjusted copy of the final .wav files that will comply with our delivery spec.



also, (again, newbie question) can I pass the full -sox comand line to the program (through windows .bat file or shortcut)? I tried --command=sox "%TRACK%" "%DN%\%BN%.wav" gain "%TGDB%" but all thouse quotes seem to  confuse the .bat file
  • Last Edit: 28 March, 2012, 02:36:18 PM by rojgreen

  • pbelkner
  • [*][*][*][*]
R128GAIN: An EBU R128 compliant loudness scanner
Reply #349
The reason I ask, is our company (TV broadcaster) has decided to adopt a reference of -24db based on itu1770 for mixed television programmes, and I was wondering if this tool would be of any use here. -23db is within our delivery spec, but out of curiosity (just me playing around)  i wondered if this tool could be used in our commercial suites to make a gain adjusted copy of the final .wav files that will comply with our delivery spec.

There's an undocumented "--preamp=<float>" option. The preamp is in dB relative to -23 LUFS. i.e. in your case -1.0.

also, (again, newbie question) can I pass the full -sox comand line to the program (through windows .bat file or shortcut)? I tried --command=sox "%TRACK%" "%DN%\%BN%.wav" gain "%TGDB%" but all thouse quotes seem to  confuse the .bat file

You should surround it by quotes, i.e. either[blockquote]'--command=sox "%TRACK%" "%DN%\%BN%.wav" gain "%TGDB%"'[/blockquote]or[blockquote]"--command=sox '%TRACK%' '%DN%\%BN%.wav' gain '%TGDB%'"[/blockquote]