IPB

Welcome Guest ( Log In | Register )

8 Pages V  < 1 2 3 4 5 > »   
Reply to this topicStart new topic
libebur128 - (yet another) EBU R 128 implementation
Raiden
post Jan 24 2011, 23:50
Post #51





Group: Developer
Posts: 224
Joined: 14-September 04
Member No.: 17002



I've uploaded 0.1.8:
- Some improvements to the tagging script (r128-tag.py): better error handling, multiprocessing module is optional.
- Fixed building and running on FreeBSD.

Download
Go to the top of the page
+Quote Post
kode54
post Jan 26 2011, 06:25
Post #52





Group: Admin
Posts: 4500
Joined: 15-December 02
Member No.: 4082



I've made my own preliminary foo_r128scan component almost from scratch, based on your library. Congratulations, it's as fast as foo_rgscan. And that's without any of the assembly SSE optimizations that foo_rgscan has. (Well, except for the SSE accelerated peak scanning function imported from the audio_math class in shared.dll.)

Except if I enable the optional "true" peak scanning, which uses the foobar2000 resampler service to resample the audio to 192KHz, but only uses that resampled audio for peak scanning, it slows down to less than half as fast. Good thing I decided to leave that disabled.

I'm not sure if I want to release it to the general public in its current form, however. It doesn't implement much of the GUI niceties of foo_rgscan, or the RG data editor. It does, however, implement automatic multi-threaded scanning, as well as RG tag removal which is redundant to the same option in foo_rgscan.

EDIT: I just implemented finer grained scanning progress reporting. I think I may actually be ready for a public release.

FURTHER EDIT: Blammo.
Go to the top of the page
+Quote Post
Raiden
post Jan 28 2011, 12:14
Post #53





Group: Developer
Posts: 224
Joined: 14-September 04
Member No.: 17002



I've uploaded 0.1.9. This is mostly a library update:
- renamed ebur128_gated_loudness_* to ebur128_loudness_* for consistency with the other loudness functions.
- when starting a new segment, the current unfinished block is now discarded. This fixes the bug where "./r128-sndfile foo.wav foo.wav" returned two slightly different values.
- new function ebur128_set_channel to make channel setting easier.
- new function ebur128_change_parameters to change samplerate and channels of a state. This will discard the current unfinished block though.
- merged ebur128_loudness_global_multiple from kode54. This function takes multiple states (e.g. one per track of an album) and returns the global loudness. I've adjusted it a bit, so that it can take states with different samplerates! This should make resampling in scanners unnecessary.
- minor library fixes.

http://www-public.tu-bs.de:8080/~y0035293/libebur128.html
Go to the top of the page
+Quote Post
kode54
post Jan 29 2011, 02:58
Post #54





Group: Admin
Posts: 4500
Joined: 15-December 02
Member No.: 4082



You made a mistake in ebur128_change_parameters:

CODE
  if ((size_t) samplerate != st->channels) {
Go to the top of the page
+Quote Post
C.R.Helmrich
post Jan 29 2011, 17:13
Post #55





Group: Developer
Posts: 681
Joined: 6-December 08
From: Erlangen Germany
Member No.: 64012



And in ebur128.h it says:

QUOTE
/* Get short-term loudness (last 3s). Will return NaN if mode does not contain
* EBUR128_MODE_S or EBUR128_MODE_S. */

Other than that it looks more like a version 1.0 than a 0.1.x to me smile.gif Great work from the both of you!

Chris


--------------------
If I don't reply to your reply, it means I agree with you.
Go to the top of the page
+Quote Post
Raiden
post Jan 30 2011, 21:04
Post #56





Group: Developer
Posts: 224
Joined: 14-September 04
Member No.: 17002



Thank you for the bug reports!
I've uploaded 0.1.10 with the following changes:

Library:
- Added ebur128_loudness_range_multiple which takes many library states as input and calculates the loudness range (LRA).
- Removed code duplication in ebur128_loudness_global_multiple/ebur128_loudness_global.
- Fixed typos.

Scanner:
- Parallelized the scanning tools (r128-*) on track level, using GLib and GThread. This makes them use all cores when scanning just one album.
- Refactored scanners into one scanner.c and many input_*.c files for audio input.

http://www-public.tu-bs.de:8080/~y0035293/libebur128.html
Go to the top of the page
+Quote Post
gjgriffith
post Jan 31 2011, 02:33
Post #57





Group: Members
Posts: 7
Joined: 31-January 11
Member No.: 87795



Is SSE2 required to run this tool? The only version that works on my old PC (Athlon XP) is 0.1.6.

Thanks for you efforts.
Go to the top of the page
+Quote Post
Raiden
post Jan 31 2011, 09:51
Post #58





Group: Developer
Posts: 224
Joined: 14-September 04
Member No.: 17002



Here are non SSE builds:
http://www-public.tu-bs.de:8080/~y0035293/...in32-no-sse.zip
http://www-public.tu-bs.de:8080/~y0035293/...x-no-sse.tar.gz
Go to the top of the page
+Quote Post
gjgriffith
post Jan 31 2011, 19:34
Post #59





Group: Members
Posts: 7
Joined: 31-January 11
Member No.: 87795



QUOTE (Raiden @ Jan 31 2011, 09:51) *

Thanks!
Go to the top of the page
+Quote Post
nucelar
post Feb 3 2011, 11:47
Post #60





Group: Members
Posts: 6
Joined: 3-February 11
Member No.: 87885



QUOTE (gjgriffith @ Jan 31 2011, 19:34) *


Hi all,
First of all congratulations for the library, Raiden. I'm no pro programmer but to me it seems you are making this with great attention to detail,
I'm new to the forum but quite familiar with R128. I tested the executable on some wav files and it worked great. But I have a couple of questions: When you say it's referenced to -18 LU what do you mean exactly? what does this imply?
I'm working in the context of broadcast TV (not music tracks) and thus handling with very long files (more than 1 hour). Just as a suggestion two things would be useful:
-progress indication smile.gif
- it would be VERY cool if you could log the short-term loudnesses to a text file for further detailed analysis. I know this is part of the program itself, not the library, but is there a chance you could add this?
Thanks very much!
Go to the top of the page
+Quote Post
googlebot
post Feb 3 2011, 12:31
Post #61





Group: Members
Posts: 698
Joined: 6-March 10
Member No.: 78779



The R128 spec defines a measurement of short-term loudness. It is constantly updated over a 3 sec window. Would that better serve your needs?
Go to the top of the page
+Quote Post
nucelar
post Feb 3 2011, 12:48
Post #62





Group: Members
Posts: 6
Joined: 3-February 11
Member No.: 87885



QUOTE (googlebot @ Feb 3 2011, 12:31) *
The R128 spec defines a measurement of short-term loudness. It is constantly updated over a 3 sec window. Would that better serve your needs?

Yes, that's exactly what I mean. A text file that would show the loudness of the consecutive 3sec windows. Thanks!
Go to the top of the page
+Quote Post
Raiden
post Feb 3 2011, 20:55
Post #63





Group: Developer
Posts: 224
Joined: 14-September 04
Member No.: 17002



QUOTE (nucelar @ Feb 3 2011, 11:47) *
First of all congratulations for the library, Raiden.

Thank you!

QUOTE (nucelar @ Feb 3 2011, 11:47) *
I'm new to the forum but quite familiar with R128. I tested the executable on some wav files and it worked great. But I have a couple of questions: When you say it's referenced to -18 LU what do you mean exactly? what does this imply?

It is just the ReplayGain tagger that uses -18 LUFS as a reference level. The library and scanners return a loudness value in LUFS.

QUOTE (nucelar @ Feb 3 2011, 11:47) *
I'm working in the context of broadcast TV (not music tracks) and thus handling with very long files (more than 1 hour). Just as a suggestion two things would be useful:
-progress indication smile.gif
- it would be VERY cool if you could log the short-term loudnesses to a text file for further detailed analysis. I know this is part of the program itself, not the library, but is there a chance you could add this?
Thanks very much!

I will do it for the next version!
Go to the top of the page
+Quote Post
nucelar
post Feb 4 2011, 12:03
Post #64





Group: Members
Posts: 6
Joined: 3-February 11
Member No.: 87885



QUOTE (Raiden @ Feb 3 2011, 20:55) *
It is just the ReplayGain tagger that uses -18 LUFS as a reference level. The library and scanners return a loudness value in LUFS.

I will do it for the next version!

That's just GREAT! Later this month I'm participating at a conference about loudness in TV. I'll do a summary of R128 tools available. Do you mind if I mention your initative ?
Thanks!
Go to the top of the page
+Quote Post
Raiden
post Feb 5 2011, 18:42
Post #65





Group: Developer
Posts: 224
Joined: 14-September 04
Member No.: 17002



QUOTE (nucelar @ Feb 4 2011, 12:03) *
Later this month I'm participating at a conference about loudness in TV. I'll do a summary of R128 tools available. Do you mind if I mention your initative ?
Thanks!

Not at all. Please go ahead! There are also a few other open-source implementations:
R128Gain by pbelkner: http://www.hydrogenaudio.org/forums/index....showtopic=85978
ebu_r128 by staale: http://labs.radionova.no/2011/01/07/ebu-r128-library/
and two foobar2000 plugins by kode54 that use libebur128:
http://www.hydrogenaudio.org/forums/index....c=86404&hl=
http://www.hydrogenaudio.org/forums/index....c=86444&hl=
Go to the top of the page
+Quote Post
Raiden
post Feb 5 2011, 18:51
Post #66





Group: Developer
Posts: 224
Joined: 14-September 04
Member No.: 17002



I've uploaded 0.1.11. There are no changes to the library, but two new options for the scanner:
- Use "-m" or "-s" to enable logging of momentary or short-term loudness to standard output. Example:
CODE
./r128-sndfile -s 0.1 foo.wav

This prints the short-term loudness every 0.1 seconds to stdout. You can pipe it to a file:
CODE
./r128-sndfile -s 0.1 foo.wav > loudness

It also supports multiple input files, even if they have different channels and/or samplerates. If there is digital silence, the resulting output line will be "-inf".

Download:
http://www-public.tu-bs.de:8080/~y0035293/libebur128.html

This post has been edited by Raiden: Feb 5 2011, 19:35
Go to the top of the page
+Quote Post
kode54
post Feb 6 2011, 08:50
Post #67





Group: Admin
Posts: 4500
Joined: 15-December 02
Member No.: 4082



You may want to take a look at the silly changes I made to the library for those two functions. I changed them so that they require EBUR128_MODE_I, and call the gated loudness function for the past 1 or 8 blocks. Then I added a function that will delete all blocks from the block list except for at least the last N which are above threshold. Probably beyond the scope of your library, though.
Go to the top of the page
+Quote Post
googlebot
post Feb 6 2011, 09:15
Post #68





Group: Members
Posts: 698
Joined: 6-March 10
Member No.: 78779



QUOTE (kode54 @ Feb 6 2011, 08:50) *
You may want to take a look at the silly changes I made to the library for those two functions. I changed them so that they require EBUR128_MODE_I, and call the gated loudness function for the past 1 or 8 blocks.


By specification the I and S mode must not use gating.
Go to the top of the page
+Quote Post
Raiden
post Feb 6 2011, 11:42
Post #69





Group: Developer
Posts: 224
Joined: 14-September 04
Member No.: 17002



QUOTE (kode54 @ Feb 6 2011, 08:50) *
You may want to take a look at the silly changes I made to the library for those two functions. I changed them so that they require EBUR128_MODE_I, and call the gated loudness function for the past 1 or 8 blocks. Then I added a function that will delete all blocks from the block list except for at least the last N which are above threshold. Probably beyond the scope of your library, though.

What functions do you mean? In which source file?
QUOTE (googlebot @ Feb 6 2011, 09:15) *
By specification the I and S mode must not use gating.

I suppose you mean M and S modes, and yes, they don't use gating.

Tech 3341 also mentions a integrated mode 'live meter', but does not go into detail. How should that work? Does it simply recalculate and print the integrated loudness as new samples are added? Or is it more sophisticated?
Go to the top of the page
+Quote Post
googlebot
post Feb 6 2011, 11:46
Post #70





Group: Members
Posts: 698
Joined: 6-March 10
Member No.: 78779



QUOTE (Raiden @ Feb 6 2011, 11:42) *
I suppose you mean M and S modes


Yes, it's a typo.

QUOTE (Raiden @ Feb 6 2011, 11:42) *
Tech 3341 also mentions a integrated mode 'live meter', but does not go into detail. How should that work? Does it simply recalculate and print the integrated loudness as new samples are added? Or is it more sophisticated?


PS An integrated mode live meter basically doesn't do anything different than a track based I-mode calculation. It has start, stop, and reset buttons to delimit the range. The best design approach would probably be decoupling of calculation and printing. Calculation is done as new samples are pushed, results are made available asynchronously by a (thread safe) pull based interface. Optionally one could include signaling when updated results are available.

PPS You don't have to redo the whole calculation each time. The absolute gating threshold does not change and must only be compared once per block. The relative gating threshold must be updated and re-applied after every new block. You may hit a drawback of using plain ANSI C, though. C++ would allow comfortable storing of block energies of virtually infinite number in dynamically growing memory structures like vectors or lists. It's not trivial to match the latter in performance/maintainability by hand coding in plain C. But when you've come so far, I'm sure you are going to find a solution.

This post has been edited by googlebot: Feb 6 2011, 12:23
Go to the top of the page
+Quote Post
pbelkner
post Feb 6 2011, 11:59
Post #71





Group: Members
Posts: 412
Joined: 13-June 10
Member No.: 81467



QUOTE (Raiden @ Feb 6 2011, 11:42) *
Tech 3341 also mentions a integrated mode 'live meter', but does not go into detail. How should that work? Does it simply recalculate and print the integrated loudness as new samples are added? Or is it more sophisticated?

I would expect them during playback rather than scanning.
Go to the top of the page
+Quote Post
leirbag
post Feb 6 2011, 12:28
Post #72





Group: Members
Posts: 5
Joined: 6-February 11
Member No.: 87965



Hi,

I have just tested last version (libebur128-0.1.11-win64) and LRA doesn't match with the intended target LRA =15 +-1LU.
The EBU test file was seq-3341-8_seq-3342-6-24bit and the command and result was:

C:\Users\Gabriel\Desktop\Sonoridad\libebur128-0.1.11-win64>"C:\Users\Gabriel\Des
ktop\Nueva carpeta\libebur128-0.1.11-win32-sse2\r128-sndfile.exe" -r -t C:\Users
\Gabriel\Desktop\Sonoridad\ebu-loudness-test-setv01\seq-3341-8_seq-3342-6-24bit.
wav
global loudness: -23.01 LUFS
LRA: 2.24
5.00907772 0.71829414 5.00907772 0.71829414


Have I done something wrong or there is a bug?

Gabriel
Go to the top of the page
+Quote Post
Raiden
post Feb 6 2011, 13:38
Post #73





Group: Developer
Posts: 224
Joined: 14-September 04
Member No.: 17002



Thanks for the report! It was a bug in the comparison function to qsort (ebur128_double_cmp). This resulted in a list of loudness blocks that were not properly sorted, using Microsofts qsort implementation.

I've uploaded 0.1.12, which fixes this bug. No other changes!
Downloads

This post has been edited by Raiden: Feb 6 2011, 13:46
Go to the top of the page
+Quote Post
leirbag
post Feb 6 2011, 14:14
Post #74





Group: Members
Posts: 5
Joined: 6-February 11
Member No.: 87965



QUOTE (Raiden @ Feb 6 2011, 13:38) *
Thanks for the report! It was a bug in the comparison function to qsort (ebur128_double_cmp). This resulted in a list of loudness blocks that were not properly sorted, using Microsofts qsort implementation.

I've uploaded 0.1.12, which fixes this bug. No other changes!
Downloads


Thank you very much Raiden. I'll test right now! smile.gif
Go to the top of the page
+Quote Post
leirbag
post Feb 6 2011, 14:19
Post #75





Group: Members
Posts: 5
Joined: 6-February 11
Member No.: 87965



QUOTE (Raiden @ Feb 6 2011, 13:38) *
Thanks for the report! It was a bug in the comparison function to qsort (ebur128_double_cmp). This resulted in a list of loudness blocks that were not properly sorted, using Microsofts qsort implementation.

I've uploaded 0.1.12, which fixes this bug. No other changes!
Downloads


C:\Users\Gabriel\Desktop\Sonoridad\libebur128-0.1.12-win64>C:\Users\Gabriel\Desk
top\Sonoridad\libebur128-0.1.12-win64\r128-sndfile.exe -r -t C:\Users\Gabriel\De
sktop\Sonoridad\ebu-loudness-test-setv01\seq-3341-8_seq-3342-6-24bit.wav
global loudness: -23.01 LUFS
LRA: 14.99
5.00907772 0.71829414 5.00907772 0.71829414


Raiden, It works flawlessly! Well done! (Can you feel you make me happy today?)

Sincerely,

Gabriel
Go to the top of the page
+Quote Post

8 Pages V  < 1 2 3 4 5 > » 
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 19th April 2014 - 05:56