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 389169 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

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.

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.

 

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.
Stay sane, exile.

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?

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.

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.

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.


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

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.

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)

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.

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)



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/.

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¬       ô     ¸


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

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.


R128GAIN: An EBU R128 compliant loudness scanner

Reply #344
Vorbis files works fine for me now. 



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.

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

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]