jiixyj / libebur128 Goto Github PK
View Code? Open in Web Editor NEWA library implementing the EBU R128 loudness standard.
License: MIT License
A library implementing the EBU R128 loudness standard.
License: MIT License
Thanks for the merge. At some point, it would be good to do a v1.1 release. When you do, I'll update the homebrew package to point at the newest version of libebur128. I'm not sure what other package managers have libebur128, but it'd likely be useful for them as well.
In my particular instance I want to "only" build static, might be nice to be a cmake option (or is there a way to do that already) thanks!
Is it possible to retrieve the "loudness so far" when computing the loudness of a stream?
For example, say I am sending buffers of size 1024 bytes to ebur128_add_frames_float
, and every time after I call that function, I want to know what is the loudness so far. Looking at the existing implementation, it looks like asking for the loudness before the stream is completely done processing would be prohibitively expensive.
On 1.2.2:
# minimal-example $FILE
==32671==WARNING: AddressSanitizer failed to allocate 0x14006ba9400 bytes
ASAN:DEADLYSIGNAL
=================================================================
==32671==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000008 (pc 0x00000050e24e bp 0x7fffb052b000 sp 0x7fffb052af00 T0)
==32671==The signal is caused by a READ memory access.
==32671==Hint: address points to the zero page.
#0 0x50e24d in main /var/tmp/portage/media-libs/libebur128-1.2.2/work/libebur128-1.2.2/test/minimal-example.c
#1 0x7f764792c680 in __libc_start_main /var/tmp/portage/sys-libs/glibc-2.23-r4/work/glibc-2.23/csu/../csu/libc-start.c:289
#2 0x419d58 in _start (/usr/bin/minimal-example+0x419d58)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /var/tmp/portage/media-libs/libebur128-1.2.2/work/libebur128-1.2.2/test/minimal-example.c in main
==32671==ABORTING
testcase attached
124.crashes.zip
Please add a pkg-config so that users of libebur128 can find the library using pkg-config.
Context: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=854340
The following code in ebur128_gated_loudness() is calling find_histogram_index() unconditionally (whether histogram mode is specified or not):
if (relative_threshold < histogram_energy_boundaries[0]) {
start_index = 0;
} else {
start_index = find_histogram_index(relative_threshold);
if (relative_threshold > histogram_energies[start_index]) {
++start_index;
}
}
As a local fix, I have moved this block of code so that the function is only called when histogram mode is specified:
for (i = 0; i < size; i++) {
if (!sts[i]) continue;
if (sts[i]->d->use_histogram) {
if (relative_threshold < m_dHistogramEnergyBoundaries[0]) {
start_index = 0;
} else {
start_index = find_histogram_index(relative_threshold);
if (relative_threshold > m_dHistogramEnergies[start_index]) {
++start_index;
}
}
for (j = start_index; j < 1000; ++j) {
gated_loudness += sts[i]->d->block_energy_histogram[j] * m_dHistogramEnergies[j];
above_thresh_counter += sts[i]->d->block_energy_histogram[j];
}
} else {
STAILQ_FOREACH(it, &sts[i]->d->block_list, entries) {
if (it->z >= relative_threshold) {
++above_thresh_counter;
gated_loudness += it->z;
}
}
}
}
Hello,
here's a small example (built against current master)
#include <stdlib.h>
#include "ebur128.h"
int main(int ac, const char *av[])
{
ebur128_state* st = malloc(sizeof(ebur128_state*));
st = ebur128_init(1, 48000, EBUR128_MODE_I);
ebur128_set_channel(st, 0, EBUR128_Mp060);
int samples[48000] = {0};
// this call will raise a segmentation fault
ebur128_add_frames_int(st, samples, 48000);
ebur128_destroy(&st);
free(st);
}
It seems it is related to the way the variable ci
is used in the EBUR128_FILTER
code.
See line 585 in ebur128.c : if channel_map[c]
is greater than 5, ci
will be greater than 4, and is then used as an index to a size 5 array.
Hi,
Is it possible to get not only the LRA, but also the actual high and lows? (I see they are computed in ebur128_loudness_range_multiple(), but then immediately subtracted.) I assume calling ebur128_loudness_global() and adding/subtracting half of the LRA won't give the correct range?
The reason I'm asking is that I'd like to visualize the range, similar to what ebumeter does (middle row of http://kokkinizita.linuxaudio.org/linuxaudio/ebumeter-doc/ebumeter.png), and I can't find a way to extract this information currently.
Thanks!
For some files, when scanning with -p all, I get true preak values that are (slightly) less than the sample peak values:
Loudness, LRA, Sample peak, True peak, True peak -26.0 LUFS, 7.4 LU, 0.294945, 0.294944, -10.6 dBTP, p1.wav -23.8 LUFS, 7.6 LU, 0.418935, 0.418934, -7.6 dBTP, p2.wav -20.6 LUFS, 10.6 LU, 0.904647, 0.904645, -0.9 dBTP, p3.wav
In my understanding, this runs counter to the idea of a “true” peak value. But perhaps it is just a problem of different rounding rules?
hi, i receive the following error after about 80% of my library (flac files) had been correctly scanned/tagged dies with several errors (about one per each directory in subtree is my guess):
(r128-scanner:16714): GLib-CRITICAL **: g_dir_read_name: assertion `dir != NULL' failed
command line for invocation is: r128-scanner -t album -r /mnt/2tbinternal/music/sbox/CDQ
when i use the script to traverse directories, all works fine:
find /data/music/sbox/CDQ/ -type d|
while read dir; do
./r128-scanner -t album "$dir/"*.flac
done
Hello,
This is more of a question. Is there a way to use libebur128 in ffprobe to output the loudness information that loundorm outputs within ffmpeg?
Here is what I am doing now:
ffmpeg -i in.aif -filter_complex "[0a]loudnorm=I=-5:TP=0:LRA=1:print_format=json[lna]; [lna]alimiter=limit=.8: level=disable[a_1]" -map "[a_1]" -b:a 48k -ar 16000 out.mp3
Outputting this:
{
"input_i" : "-10.26",
"input_tp" : "-1.05",
"input_lra" : "2.56",
"input_thresh" : "-20.34",
"output_i" : "-7.77",
"output_tp" : "+0.00",
"output_lra" : "2.09",
"output_thresh" : "-17.84",
"normalization_type" : "dynamic",
"target_offset" : "2.77"
}
What I would like to do is add that data to this command's output:
/usr/local/bin/ffprobe -i test.mp3 -v quiet -print_format json -show_format -show_streams
Thanks!
-D
On 1.2.2
# minimal-example $FILE
==19113==ERROR: AddressSanitizer: global-buffer-overflow on address 0x000000525df7 at pc 0x000000489786 bp 0x7ffcba5662d0 sp 0x7ffcba565a80
WRITE of size 268435456 at 0x000000525df7 thread T0
#0 0x489785 in __interceptor_memset.part.35 /var/tmp/portage/sys-libs/compiler-rt-sanitizers-5.0.0/work/compiler-rt-5.0.0.src/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:710
#1 0x7fab1e9c0dde in psf_memset /var/tmp/portage/media-libs/libsndfile-1.0.28-r1/work/libsndfile-1.0.28/src/common.c:1224
#2 0x7fab1e98cd88 in sf_readf_double /var/tmp/portage/media-libs/libsndfile-1.0.28-r1/work/libsndfile-1.0.28/src/sndfile.c:2042
#3 0x50e2a0 in main /var/tmp/portage/media-libs/libebur128-1.2.2/work/libebur128-1.2.2/test/minimal-example.c:44:30
#4 0x7fab1dac8680 in __libc_start_main /var/tmp/portage/sys-libs/glibc-2.23-r4/work/glibc-2.23/csu/../csu/libc-start.c:289
#5 0x419d58 in _start (/usr/bin/minimal-example+0x419d58)
0x000000525df7 is located 41 bytes to the left of global variable '<string literal>' defined in 'minimal-example.c:50:21' (0x525e20) of size 15
'<string literal>' is ascii string '%.2f LUFS, %s
'
0x000000525df7 is located 0 bytes to the right of global variable '<string literal>' defined in 'minimal-example.c:20:21' (0x525de0) of size 23
'<string literal>' is ascii string 'usage: %s FILENAME...
'
SUMMARY: AddressSanitizer: global-buffer-overflow /var/tmp/portage/sys-libs/compiler-rt-sanitizers-5.0.0/work/compiler-rt-5.0.0.src/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:710 in __interceptor_memset.part.35
Shadow bytes around the buggy address:
0x00008009cb60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00008009cb70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00008009cb80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00008009cb90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00008009cba0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x00008009cbb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00[07]f9
0x00008009cbc0: f9 f9 f9 f9 00 07 f9 f9 f9 f9 f9 f9 00 00 00 05
0x00008009cbd0: f9 f9 f9 f9 00 00 07 f9 f9 f9 f9 f9 00 00 00 00
0x00008009cbe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00008009cbf0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00008009cc00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==19113==ABORTING
Testcase attached
133.crashes.zip
It would be nice to expose the relative gating threshold value. I'm not sure, but I don't think there's any way to pull this value from ebur128_state_internal. Any idea? If not, I may add this and open a pull request. Thanks!
Hello,
there's an issue with the linking to libav on Ubuntu 13.
(Cannot reproduce on Debian 7 ...)
manu@mbp-207647:~$ git clone git://github.com/jiixyj/libebur128.git
Cloning into 'libebur128'...
remote: Counting objects: 3356, done.
remote: Compressing objects: 100% (1122/1122), done.
remote: Total 3356 (delta 2355), reused 3188 (delta 2188)
Receiving objects: 100% (3356/3356), 558.27 KiB | 673 KiB/s, done.
Resolving deltas: 100% (2355/2355), done.
manu@mbp-207647:~$ cd libebur128/
manu@mbp-207647:~/libebur128$ git submodule init
Submodule 'scanner/filetree' (git://github.com/jiixyj/filewalk.git) registered for path 'scanner/filetree'
manu@mbp-207647:~/libebur128$ git submodule update
Cloning into 'scanner/filetree'...
remote: Counting objects: 120, done.
remote: Compressing objects: 100% (51/51), done.
remote: Total 120 (delta 63), reused 118 (delta 61)
Receiving objects: 100% (120/120), 20.35 KiB, done.
Resolving deltas: 100% (63/63), done.
Submodule path 'scanner/filetree': checked out '9853a329797ef39f09351b3b976f5cd121bb005f'
manu@mbp-207647:~/libebur128$ mkdir build
manu@mbp-207647:~/libebur128$ cd build/
manu@mbp-207647:~/libebur128/build$ cmake ..
-- The C compiler identification is GNU 4.7.3
-- The CXX compiler identification is GNU 4.7.3
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.26")
-- checking for module 'speexdsp'
-- found speexdsp, version 1.2rc1
-- checking for module 'glib-2.0'
-- found glib-2.0, version 2.36.0
-- checking for module 'gmodule-2.0'
-- found gmodule-2.0, version 2.36.0
-- Found SNDFILE: /usr/lib/x86_64-linux-gnu/libsndfile.so
-- Could NOT find MPG123 (missing: MPG123_LIBRARY MPG123_INCLUDE_DIR)
-- Could NOT find MPCDEC (missing: MPCDEC_LIBRARY MPCDEC_INCLUDE_DIR)
-- checking for module 'libavformat'
-- found libavformat, version 53.21.1
-- checking for module 'gstreamer-app-0.10'
-- package 'gstreamer-app-0.10' not found
-- checking for module 'gstreamer-audio-0.10'
-- package 'gstreamer-audio-0.10' not found
-- checking for module 'gthread-2.0'
-- found gthread-2.0, version 2.36.0
-- Found TAGLIB: /usr/lib/x86_64-linux-gnu/libtag.so
-- Found Freetype: /usr/lib/x86_64-linux-gnu/libfreetype.so (found version "2.4.11")
-- Found GTK2_GTK: /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so
-- checking for module 'librsvg-2.0'
-- package 'librsvg-2.0' not found
qmake: could not find a Qt installation of ''
-- Could NOT find Qt4 (missing: QT_QMAKE_EXECUTABLE QT_MOC_EXECUTABLE QT_RCC_EXECUTABLE QT_INCLUDE_DIR QT_LIBRARY_DIR QT_QTGUI_INCLUDE_DIR QT_QTGUI_LIBRARY QT_QTSVG_INCLUDE_DIR QT_QTSVG_LIBRARY QT_UIC_EXECUTABLE)
-- status found / disabled --
-- queue.h: yes using system copy of queue.h
-- speexdsp: yes no
-- glib-2.0: yes no
-- gthread-2.0: yes no
-- sndfile: yes no
-- taglib: yes no
-- mpg123: no no
-- mpcdec: no no
-- gstreamer: no no
-- ffmpeg: yes no
-- rsvg2: no no
-- gtk2: yes no
-- qt4: no no
-- Configuring done
-- Generating done
-- Build files have been written to: /home/manu/libebur128/build
manu@mbp-207647:~/libebur128/build$ make
Scanning dependencies of target ebur128
[ 5%] Building C object ebur128/CMakeFiles/ebur128.dir/ebur128.c.o
Linking C shared library ../libebur128.so
[ 5%] Built target ebur128
Scanning dependencies of target ebur128_static
[ 11%] Building C object ebur128/CMakeFiles/ebur128_static.dir/ebur128.c.o
Linking C static library ../libebur128.a
[ 11%] Built target ebur128_static
Scanning dependencies of target scanner-common
[ 16%] Building C object scanner/scanner-common/CMakeFiles/scanner-common.dir/parse_args.c.o
[ 22%] Building C object scanner/scanner-common/CMakeFiles/scanner-common.dir/nproc.c.o
[ 27%] Building C object scanner/scanner-common/CMakeFiles/scanner-common.dir/scanner-common.c.o
/home/manu/libebur128/scanner/scanner-common/scanner-common.c: In function ‘scanner_init_common’:
/home/manu/libebur128/scanner/scanner-common/scanner-common.c:27:9: attention : ‘g_mutex_new’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:272) [-Wdeprecated-declarations]
/home/manu/libebur128/scanner/scanner-common/scanner-common.c:30:9: attention : ‘g_cond_new’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:276) [-Wdeprecated-declarations]
/home/manu/libebur128/scanner/scanner-common/scanner-common.c: In function ‘process_files’:
/home/manu/libebur128/scanner/scanner-common/scanner-common.c:341:5: attention : ‘g_thread_create’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:100): Use 'g_thread_new' instead [-Wdeprecated-declarations]
Linking C static library ../../libscanner-common.a
[ 27%] Built target scanner-common
Scanning dependencies of target scanner-tag
[ 33%] Building C object scanner/scanner-tag/CMakeFiles/scanner-tag.dir/scanner-tag.c.o
[ 38%] Building CXX object scanner/scanner-tag/CMakeFiles/scanner-tag.dir/rgtag.cpp.o
Linking CXX static library ../../libscanner-tag.a
[ 38%] Built target scanner-tag
Scanning dependencies of target filetree
[ 44%] Building C object scanner/filetree/CMakeFiles/filetree.dir/filetree.c.o
Linking C static library ../../libfiletree.a
[ 44%] Built target filetree
Scanning dependencies of target scanner-lib
[ 50%] Building C object scanner/CMakeFiles/scanner-lib.dir/scanner-scan.c.o
[ 55%] Building C object scanner/CMakeFiles/scanner-lib.dir/scanner-dump.c.o
Linking C static library ../libscanner-lib.a
[ 55%] Built target scanner-lib
Scanning dependencies of target input
[ 61%] Building C object scanner/inputaudio/CMakeFiles/input.dir/input.c.o
Linking C static library ../../libinput.a
[ 61%] Built target input
Scanning dependencies of target loudness
[ 66%] Building C object scanner/CMakeFiles/loudness.dir/scanner.c.o
/home/manu/libebur128/scanner/scanner.c: In function ‘main’:
/home/manu/libebur128/scanner/scanner.c:151:5: attention : ‘g_thread_init’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:260) [-Wdeprecated-declarations]
Linking CXX executable ../loudness
[ 66%] Built target loudness
Scanning dependencies of target input_sndfile
[ 72%] Building C object scanner/inputaudio/sndfile/CMakeFiles/input_sndfile.dir/input_sndfile.c.o
[ 77%] Building C object scanner/inputaudio/sndfile/CMakeFiles/input_sndfile.dir/__/input_helper.c.o
Linking C shared module ../../../libinput_sndfile.so
[ 77%] Built target input_sndfile
Scanning dependencies of target input_ffmpeg
[ 83%] Building C object scanner/inputaudio/ffmpeg/CMakeFiles/input_ffmpeg.dir/input_ffmpeg.c.o
/home/manu/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c: In function ‘ffmpeg_open_file’:
/home/manu/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c:58:3: attention : ‘g_static_mutex_get_mutex_impl’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:149): Use 'GMutex' instead [-Wdeprecated-declarations]
/home/manu/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c:63:5: attention : ‘g_static_mutex_get_mutex_impl’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:149): Use 'GMutex' instead [-Wdeprecated-declarations]
/home/manu/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c:66:3: attention : ‘av_find_stream_info’ is deprecated (declared at /usr/include/libavformat/avformat.h:1412) [-Wdeprecated-declarations]
/home/manu/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c:68:5: attention : ‘g_static_mutex_get_mutex_impl’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:149): Use 'GMutex' instead [-Wdeprecated-declarations]
/home/manu/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c:84:5: attention : ‘g_static_mutex_get_mutex_impl’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:149): Use 'GMutex' instead [-Wdeprecated-declarations]
/home/manu/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c:95:5: attention : ‘g_static_mutex_get_mutex_impl’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:149): Use 'GMutex' instead [-Wdeprecated-declarations]
/home/manu/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c:107:3: attention : ‘avcodec_open’ is deprecated (declared at /usr/include/libavcodec/avcodec.h:4035) [-Wdeprecated-declarations]
/home/manu/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c:109:5: attention : ‘g_static_mutex_get_mutex_impl’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:149): Use 'GMutex' instead [-Wdeprecated-declarations]
/home/manu/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c:112:3: attention : ‘g_static_mutex_get_mutex_impl’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:149): Use 'GMutex' instead [-Wdeprecated-declarations]
/home/manu/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c:119:3: attention : ‘g_static_mutex_get_mutex_impl’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:149): Use 'GMutex' instead [-Wdeprecated-declarations]
/home/manu/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c:120:3: attention : ‘av_close_input_file’ is deprecated (declared at /usr/include/libavformat/avformat.h:1580) [-Wdeprecated-declarations]
/home/manu/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c:121:3: attention : ‘g_static_mutex_get_mutex_impl’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:149): Use 'GMutex' instead [-Wdeprecated-declarations]
/home/manu/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c: In function ‘ffmpeg_read_one_packet’:
/home/manu/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c:190:3: attention : ‘avcodec_decode_audio3’ is deprecated (declared at /usr/include/libavcodec/avcodec.h:4131) [-Wdeprecated-declarations]
/home/manu/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c: In function ‘ffmpeg_close_file’:
/home/manu/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c:267:3: attention : ‘g_static_mutex_get_mutex_impl’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:149): Use 'GMutex' instead [-Wdeprecated-declarations]
/home/manu/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c:269:3: attention : ‘av_close_input_file’ is deprecated (declared at /usr/include/libavformat/avformat.h:1580) [-Wdeprecated-declarations]
/home/manu/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c:270:3: attention : ‘g_static_mutex_get_mutex_impl’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:149): Use 'GMutex' instead [-Wdeprecated-declarations]
[ 88%] Building C object scanner/inputaudio/ffmpeg/CMakeFiles/input_ffmpeg.dir/mp3_padding.c.o
[ 94%] Building C object scanner/inputaudio/ffmpeg/CMakeFiles/input_ffmpeg.dir/mp4_padding.c.o
[100%] Building C object scanner/inputaudio/ffmpeg/CMakeFiles/input_ffmpeg.dir/__/input_helper.c.o
Linking C shared module ../../../libinput_ffmpeg.so
[100%] Built target input_ffmpeg
manu@mbp-207647:~/libebur128/build$ ./loudness scan ~/ebu-loudness-test-setv03/seq-3341-2011-8_seq-3342-6-24bit-v02.wav
./loudness: symbol lookup error: ./libinput_ffmpeg.so: undefined symbol: av_register_all
manu@mbp-207647:~/libebur128/build$ ldd libinput_ffmpeg.so
linux-vdso.so.1 => (0x00007fffc15fe000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f5532224000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f5531e5c000)
/lib64/ld-linux-x86-64.so.2 (0x00007f553265b000)
It seems libav is not properly linked to ffmpeg scanner.
If I roll back to commit 1c0e8da, I dont have this issue.
manu@mbp-207647:~/libebur128/build$ make clean
manu@mbp-207647:~/libebur128/build$ cd ..
manu@mbp-207647:~/libebur128$ git reset --hard 1c0e8dac8d1a2f1ce07bee469d26ccfbb2688247
HEAD is now at 1c0e8da avoid race condition when starting progress bar thread
manu@mbp-207647:~/libebur128$ cd build/
manu@mbp-207647:~/libebur128/build$ cmake ..
-- Found GLIB: /usr/lib/x86_64-linux-gnu/libglib-2.0.so
-- Could NOT find RSVG2 (missing: RSVG2_LIBRARY RSVG2_INCLUDE_DIR)
-- Could NOT find MPG123 (missing: MPG123_LIBRARY MPG123_INCLUDE_DIR)
-- Could NOT find MPCDEC (missing: MPCDEC_LIBRARY MPCDEC_INCLUDE_DIR)
-- Found SPEEXDSP: /usr/lib/x86_64-linux-gnu/libspeexdsp.so
-- Found AVFORMAT: /usr/lib/x86_64-linux-gnu/libavformat.so
-- Could NOT find LibXml2 (missing: LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR)
-- Could NOT find GSTREAMER (missing: GSTREAMER_INCLUDE_DIR GSTREAMER_LIBRARY GSTAPP_LIBRARY GSTBASE_LIBRARY GSTAUDIO_LIBRARY)
qmake: could not find a Qt installation of ''
-- Could NOT find Qt4 (missing: QT_QMAKE_EXECUTABLE QT_MOC_EXECUTABLE QT_RCC_EXECUTABLE QT_INCLUDE_DIR QT_LIBRARY_DIR QT_QTGUI_INCLUDE_DIR QT_QTGUI_LIBRARY QT_QTSVG_INCLUDE_DIR QT_QTSVG_LIBRARY QT_UIC_EXECUTABLE)
-- status found / use --
-- glib-2.0: yes yes
-- gtk-2.0: yes yes
-- rsvg2: no no
-- libsndfile: yes yes
-- libmpg123: no no
-- libmpcdec: no no
-- speexdsp: yes yes
-- ffmpeg: yes yes
-- taglib: yes yes
-- gstreamer: no no
-- qt4: no no
-- Configuring done
-- Generating done
-- Build files have been written to: /home/manu/libebur128/build
manu@mbp-207647:~/libebur128/build$ make
Scanning dependencies of target ebur128
[ 5%] Building C object ebur128/CMakeFiles/ebur128.dir/ebur128.c.o
Linking C shared library ../libebur128.so
[ 5%] Built target ebur128
Scanning dependencies of target ebur128_static
[ 10%] Building C object ebur128/CMakeFiles/ebur128_static.dir/ebur128.c.o
Linking C static library ../libebur128.a
[ 10%] Built target ebur128_static
Scanning dependencies of target filetree
[ 15%] Building C object scanner/filetree/CMakeFiles/filetree.dir/filetree.c.o
Linking C static library ../../libfiletree.a
[ 15%] Built target filetree
Scanning dependencies of target input
[ 21%] Building C object scanner/inputaudio/CMakeFiles/input.dir/input.c.o
Linking C static library ../../libinput.a
[ 21%] Built target input
Scanning dependencies of target scanner-common
[ 26%] Building C object scanner/scanner-common/CMakeFiles/scanner-common.dir/parse_args.c.o
[ 31%] Building C object scanner/scanner-common/CMakeFiles/scanner-common.dir/nproc.c.o
[ 36%] Building C object scanner/scanner-common/CMakeFiles/scanner-common.dir/scanner-common.c.o
/home/manu/libebur128/scanner/scanner-common/scanner-common.c: In function ‘scanner_init_common’:
/home/manu/libebur128/scanner/scanner-common/scanner-common.c:33:9: attention : ‘g_mutex_new’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:272) [-Wdeprecated-declarations]
/home/manu/libebur128/scanner/scanner-common/scanner-common.c:36:9: attention : ‘g_cond_new’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:276) [-Wdeprecated-declarations]
/home/manu/libebur128/scanner/scanner-common/scanner-common.c: In function ‘process_files’:
/home/manu/libebur128/scanner/scanner-common/scanner-common.c:335:5: attention : ‘g_thread_create’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:100): Use 'g_thread_new' instead [-Wdeprecated-declarations]
Linking C static library ../../libscanner-common.a
[ 36%] Built target scanner-common
Scanning dependencies of target scanner-tag
[ 42%] Building C object scanner/scanner-tag/CMakeFiles/scanner-tag.dir/scanner-tag.c.o
[ 47%] Building CXX object scanner/scanner-tag/CMakeFiles/scanner-tag.dir/rgtag.cpp.o
Linking CXX static library ../../libscanner-tag.a
[ 47%] Built target scanner-tag
Scanning dependencies of target scanner-lib
[ 52%] Building C object scanner/CMakeFiles/scanner-lib.dir/scanner-scan.c.o
[ 57%] Building C object scanner/CMakeFiles/scanner-lib.dir/scanner-dump.c.o
Linking C static library ../libscanner-lib.a
[ 57%] Built target scanner-lib
Scanning dependencies of target loudness
[ 63%] Building C object scanner/CMakeFiles/loudness.dir/scanner.c.o
/home/manu/libebur128/scanner/scanner.c: In function ‘main’:
/home/manu/libebur128/scanner/scanner.c:158:5: attention : ‘g_thread_init’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:260) [-Wdeprecated-declarations]
Linking CXX executable ../loudness
[ 63%] Built target loudness
Scanning dependencies of target input_sndfile
[ 68%] Building C object scanner/inputaudio/sndfile/CMakeFiles/input_sndfile.dir/input_sndfile.c.o
[ 73%] Building C object scanner/inputaudio/sndfile/CMakeFiles/input_sndfile.dir/__/input_helper.c.o
Linking C shared module ../../../libinput_sndfile.so
[ 73%] Built target input_sndfile
Scanning dependencies of target input_ffmpeg
[ 78%] Building C object scanner/inputaudio/ffmpeg/CMakeFiles/input_ffmpeg.dir/input_ffmpeg.c.o
/home/manu/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c: In function ‘ffmpeg_open_file’:
/home/manu/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c:78:3: attention : ‘g_static_mutex_get_mutex_impl’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:149): Use 'GMutex' instead [-Wdeprecated-declarations]
/home/manu/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c:90:5: attention : ‘g_static_mutex_get_mutex_impl’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:149): Use 'GMutex' instead [-Wdeprecated-declarations]
/home/manu/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c:93:3: attention : ‘av_find_stream_info’ is deprecated (declared at /usr/include/libavformat/avformat.h:1412) [-Wdeprecated-declarations]
/home/manu/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c:95:5: attention : ‘g_static_mutex_get_mutex_impl’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:149): Use 'GMutex' instead [-Wdeprecated-declarations]
/home/manu/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c:118:5: attention : ‘g_static_mutex_get_mutex_impl’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:149): Use 'GMutex' instead [-Wdeprecated-declarations]
/home/manu/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c:133:5: attention : ‘g_static_mutex_get_mutex_impl’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:149): Use 'GMutex' instead [-Wdeprecated-declarations]
/home/manu/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c:145:3: attention : ‘avcodec_open’ is deprecated (declared at /usr/include/libavcodec/avcodec.h:4035) [-Wdeprecated-declarations]
/home/manu/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c:147:5: attention : ‘g_static_mutex_get_mutex_impl’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:149): Use 'GMutex' instead [-Wdeprecated-declarations]
/home/manu/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c:150:3: attention : ‘g_static_mutex_get_mutex_impl’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:149): Use 'GMutex' instead [-Wdeprecated-declarations]
/home/manu/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c:173:3: attention : ‘g_static_mutex_get_mutex_impl’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:149): Use 'GMutex' instead [-Wdeprecated-declarations]
/home/manu/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c:174:3: attention : ‘av_close_input_file’ is deprecated (declared at /usr/include/libavformat/avformat.h:1580) [-Wdeprecated-declarations]
/home/manu/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c:175:3: attention : ‘g_static_mutex_get_mutex_impl’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:149): Use 'GMutex' instead [-Wdeprecated-declarations]
/home/manu/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c: In function ‘ffmpeg_read_one_packet’:
/home/manu/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c:259:9: attention : ‘avcodec_decode_audio3’ is deprecated (declared at /usr/include/libavcodec/avcodec.h:4131) [-Wdeprecated-declarations]
/home/manu/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c: In function ‘ffmpeg_close_file’:
/home/manu/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c:394:3: attention : ‘g_static_mutex_get_mutex_impl’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:149): Use 'GMutex' instead [-Wdeprecated-declarations]
/home/manu/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c:396:3: attention : ‘av_close_input_file’ is deprecated (declared at /usr/include/libavformat/avformat.h:1580) [-Wdeprecated-declarations]
/home/manu/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c:397:3: attention : ‘g_static_mutex_get_mutex_impl’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:149): Use 'GMutex' instead [-Wdeprecated-declarations]
[ 84%] Building C object scanner/inputaudio/ffmpeg/CMakeFiles/input_ffmpeg.dir/mp3_padding.c.o
[ 89%] Building C object scanner/inputaudio/ffmpeg/CMakeFiles/input_ffmpeg.dir/mp4_padding.c.o
[ 94%] Building C object scanner/inputaudio/ffmpeg/CMakeFiles/input_ffmpeg.dir/__/input_helper.c.o
Linking C shared module ../../../libinput_ffmpeg.so
[ 94%] Built target input_ffmpeg
Scanning dependencies of target r128-test-library
[100%] Building C object test/CMakeFiles/r128-test-library.dir/tests.c.o
Linking C executable ../r128-test-library
[100%] Built target r128-test-library
manu@mbp-207647:~/libebur128/build$ ./loudness scan --force-plugin=ffmpeg ~/ebu-loudness-test-setv03/seq-3341-2011-8_seq-3342-6-24bit-v02.wav
Loudness
-23.0 LUFS, seq-3341-2011-8_seq-3342-6-24bit-v02.wav
-------------------------------------------------------------------------------
-23.0 LUFS
manu@mbp-207647:~/libebur128/build$
Something has happened during the cmake cleaning ;-).
Thanks,
Manuel
Hello,
using commit 0bf8339 on Mac OS 10.9.5, cmake and speexdsp installed with MacPorts.
$ which cmake
/opt/local/bin/cmake
$ cmake -version
cmake version 3.3.2
$ cd libebur128/build/
$ cmake ..
[snip]
-- Found PkgConfig: /opt/local/bin/pkg-config (found version "0.28")
-- checking for module 'speexdsp'
-- found speexdsp, version 1.2rc1
-- Status found / disabled --
-- queue.h: yes using system copy of queue.h
-- speexdsp: yes no
-- build static library and shared library!
-- not building tests, set ENABLE_TESTS to ON to enable
-- Configuring done
[/snip]
$ make
Scanning dependencies of target ebur128
[ 25%] Building C object ebur128/CMakeFiles/ebur128.dir/ebur128.c.o
[ 50%] Linking C shared library ../libebur128.dylib
ld: library not found for -lspeexdsp
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [libebur128.1.0.3.dylib] Error 1
make[1]: *** [ebur128/CMakeFiles/ebur128.dir/all] Error 2
make: *** [all] Error 2
After looking around libebur128/ebur128/CMakeLists.txt
, I found where the issue comes from on my system : the SPEEXDSP_LIBRARIES
variable used on line 65 is equal to speexdsp
and does not include full path to the library.
I found a workaround after searching on sample cmake files around the web, although I cannot test possible regressions on other systems. Add two lines after line 51 :
find_library(SPEEXDSP_LIBRARY speexdsp
HINTS ${SPEEXDSP_LIBDIR} ${SPEEXDSP_LIBRARY_DIRS})
set(SPEEXDSP_LIBRARIES ${SPEEXDSP_LIBRARY})
Is it worth a pull request ?
Starting from commit 'c864653e61b9fa3699d981d8b1d31b14b2adfb05' (Dec 23) these linking errors occur:
Linking CXX executable ../loudness-drop-gtk
/usr/bin/ld: ../libinput_gstreamer.a(input_gstreamer.c.o): undefined reference to symbol 'gst_parse_launch'
/usr/bin/ld: note: 'gst_parse_launch' is defined in DSO /usr/lib/libgstreamer-0.10.so.0 so try adding it to the linker command line
/usr/lib/libgstreamer-0.10.so.0: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make[2]: *** [loudness-drop-gtk] Error 1
make[1]: *** [scanner/CMakeFiles/loudness-drop-gtk.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Linking CXX executable ../loudness
/usr/bin/ld: ../libinput_gstreamer.a(input_gstreamer.c.o): undefined reference to symbol 'gst_parse_launch'
/usr/bin/ld: note: 'gst_parse_launch' is defined in DSO /usr/lib/libgstreamer-0.10.so.0 so try adding it to the linker command line
/usr/lib/libgstreamer-0.10.so.0: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make[2]: *** [loudness] Error 1
make[1]: *** [scanner/CMakeFiles/loudness.dir/all] Error 2
Linking CXX executable ../loudness-drop-qt
/usr/bin/ld: /usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../lib/libQtGui.so: undefined reference to symbol 'g_object_set'
/usr/bin/ld: note: 'g_object_set' is defined in DSO /usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../lib/libgobject-2.0.so so try adding it to the linker command line
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../lib/libgobject-2.0.so: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make[2]: *** [loudness-drop-qt] Error 1
make[1]: *** [scanner/CMakeFiles/loudness-drop-qt.dir/all] Error 2
make: *** [all] Error 2
==> ERROR: A failure occurred in build().
Aborting...
Since commit '027cdadb39c669a97ef4e916eb205d890eb523ad' (Feb 16) those errors are fixed. The executables are built and they work fine. However, after 'make install' loudness stops working - just throws Warning: no plugins found!
and quits.
I compared the code up to commit '5f9eb2fc073fe950e8de13f5dec9f71b254cfda7' (last with no problems) to the latest git. They both build the same type of files and the installed ones are the same pick. However, loudness seems to be linked differently:
commit 5f9eb2f :
$ ldd /usr/bin/loudness
linux-vdso.so.1 => (0x00007fffa4bff000)
libebur128.so.1 => /usr/lib/libebur128.so.1 (0x00007fd44b900000)
libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x00007fd44b60b000)
libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0x00007fd44b406000)
libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0x00007fd44b202000)
libtag.so.1 => /usr/lib/libtag.so.1 (0x00007fd44af66000)
libgstreamer-0.10.so.0 => /usr/lib/libgstreamer-0.10.so.0 (0x00007fd44ac7d000)
libgstapp-0.10.so.0 => /usr/lib/libgstapp-0.10.so.0 (0x00007fd44aa71000)
libgstaudio-0.10.so.0 => /usr/lib/libgstaudio-0.10.so.0 (0x00007fd44a839000)
libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x00007fd44a5e9000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007fd44a2e5000)
libm.so.6 => /lib/libm.so.6 (0x00007fd449ff0000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007fd449ddb000)
libc.so.6 => /lib/libc.so.6 (0x00007fd449a3a000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007fd44981e000)
libspeexdsp.so.1 => /usr/lib/libspeexdsp.so.1 (0x00007fd44960c000)
libpcre.so.1 => /usr/lib/libpcre.so.1 (0x00007fd4493b2000)
librt.so.1 => /lib/librt.so.1 (0x00007fd4491aa000)
libdl.so.2 => /lib/libdl.so.2 (0x00007fd448fa6000)
libz.so.1 => /usr/lib/libz.so.1 (0x00007fd448d90000)
libxml2.so.2 => /usr/lib/libxml2.so.2 (0x00007fd448a35000)
libgstbase-0.10.so.0 => /usr/lib/libgstbase-0.10.so.0 (0x00007fd4487e1000)
libgstpbutils-0.10.so.0 => /usr/lib/libgstpbutils-0.10.so.0 (0x00007fd4485bd000)
libgstinterfaces-0.10.so.0 => /usr/lib/libgstinterfaces-0.10.so.0 (0x00007fd4483ab000)
libffi.so.5 => /usr/lib/libffi.so.5 (0x00007fd4481a3000)
/lib/ld-linux-x86-64.so.2 (0x00007fd44bb09000)
$
latest git:
$ ldd /usr/bin/loudness
linux-vdso.so.1 => (0x00007fff153ff000)
libebur128.so.1 => /usr/lib/libebur128.so.1 (0x00007fa23962d000)
libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x00007fa239338000)
libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0x00007fa239133000)
libtag.so.1 => /usr/lib/libtag.so.1 (0x00007fa238e97000)
libsndfile.so.1 => /usr/lib/libsndfile.so.1 (0x00007fa238c31000)
libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0x00007fa238a2d000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007fa238729000)
libm.so.6 => /lib/libm.so.6 (0x00007fa238434000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007fa23821f000)
libc.so.6 => /lib/libc.so.6 (0x00007fa237e7e000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007fa237c62000)
libspeexdsp.so.1 => /usr/lib/libspeexdsp.so.1 (0x00007fa237a50000)
libpcre.so.1 => /usr/lib/libpcre.so.1 (0x00007fa2377f6000)
librt.so.1 => /lib/librt.so.1 (0x00007fa2375ee000)
libz.so.1 => /usr/lib/libz.so.1 (0x00007fa2373d8000)
libFLAC.so.8 => /usr/lib/libFLAC.so.8 (0x00007fa23718d000)
libvorbisenc.so.2 => /usr/lib/libvorbisenc.so.2 (0x00007fa236cbe000)
libvorbis.so.0 => /usr/lib/libvorbis.so.0 (0x00007fa236a91000)
libogg.so.0 => /usr/lib/libogg.so.0 (0x00007fa23688b000)
libdl.so.2 => /lib/libdl.so.2 (0x00007fa236687000)
/lib/ld-linux-x86-64.so.2 (0x00007fa239836000)
$
And now when out of the build directory, loudness does not work.
One tiny thing regarding scanner output: When displaying LRA, the "LRA" header and all following ("Sample peak", etc.) aren't aligned properly with the data columns below, but shifted to the right by one character:
Loudness, LRA, Sample peak, True peak, True peak -27.1 LUFS, 15.7 LU, 0.803200, 0.803818, -1.9 dBTP, k.flac ------------------------------------------------------------------------------- -27.1 LUFS, 15.7 LU, 0.803200, 0.803818, -1.9 dBTP
To correct this, it should be sufficient to remove one space from the string in scanner/scanner-scan.c line 106:
if (lra) fprintf(stderr, ", LRA");
If the minimal-example test is scanning something that is not a conformed file, does a divide-by-zero
==37824==ERROR: AddressSanitizer: FPE on unknown address 0x7fdcfa45cd66 (pc 0x7fdcfa45cd66 bp 0x7ffe6e200c30 sp 0x7ffe6e200b80 T0)
#0 0x7fdcfa45cd65 in ebur128_init /var/tmp/portage/media-libs/libebur128-1.2.2/work/libebur128-1.2.2/ebur128/ebur128.c:381:32
#1 0x50e112 in main /var/tmp/portage/media-libs/libebur128-1.2.2/work/libebur128-1.2.2/test/minimal-example.c:30:14
#2 0x7fdcf932a680 in __libc_start_main /var/tmp/portage/sys-libs/glibc-2.23-r4/work/glibc-2.23/csu/../csu/libc-start.c:289
#3 0x419d58 in _start (/usr/bin/minimal-example+0x419d58)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: FPE /var/tmp/portage/media-libs/libebur128-1.2.2/work/libebur128-1.2.2/ebur128/ebur128.c:381:32 in ebur128_init
==37824==ABORTING
It is obviously visible via gdb too.
With EBUR128_MODE_TRUE_PEAK | EBUR128_MODE_I (I want global LUFS and True Peak) version 1.20 is working with 44.1KHz and 96KHz, however at 192KHz I get a crash.
Access violation writing location 0x00000000.
Call stack is:
ebur128_realative_threshold()
ebur128_add_frames_float()
I will review the size of memory I am reserving with malloc but things were working with only EBUR128_MODE_I at all sample rates.
Since the download tarballs somehow went away, I settled to compiling from current git instead. Works in principle; cmake doesn't find taglib, but that's apparently meant to be optional. Subsequently however, the linker fails:
Linking C executable ../loudness
CMakeFiles/loudness.dir/scanner-tag.c.o: In function tag_file': scanner-tag.c:(.text+0x48c): undefined reference to
set_rg_info'
collect2: ld returned 1 exit status
That's because scanner/CMakeLists.txt excludes rgtag.cpp from the list of files to be compiled, but scanner-tag.c still uses the functions defined in it.
As a workaround (since I didn't want to tag anyway, just scan), I could make it work by excluding scanner-tag.c also and removing the calls to loudness_tag_parse() and loudness_tag() from scanner.c.
Hi :)
Thanks for the great library that you have built :) I have built another open source project that uses your software: http://freelcs.sourceforge.net/
However I may have found a bug in libebur128 program 'loudness'.
Bug description: 'loudness scan' sometimes hangs when processing short files (file duration 1 seconds).
Operating system: Ubuntu 12.04 32 bit, Linux Mint 13 Maya 32 bit.
Although this bug might only concern marginal cases, it might present a problem in libebur128 or one of the libraries it uses that might come to haunt us in some other form :)
Sorry for not being able to give more info, my lack of C - knowledge prevents me from trying to debug this my self :)
Mikael Hartzell
localhost:libebu-30-06-12 audionuma$ git clone https://github.com/jiixyj/libebur128
Cloning into 'libebur128'...
remote: Counting objects: 3132, done.
remote: Compressing objects: 100% (1019/1019), done.
remote: Total 3132 (delta 2200), reused 2999 (delta 2067)
Receiving objects: 100% (3132/3132), 527.83 KiB | 285 KiB/s, done.
Resolving deltas: 100% (2200/2200), done.
localhost:libebu-30-06-12 audionuma$ cd libebur128/
localhost:libebur128 audionuma$ git submodule init
Submodule 'scanner/filetree' (git://github.com/jiixyj/filewalk.git) registered for path 'scanner/filetree'
localhost:libebur128 audionuma$ git submodule update
Cloning into 'scanner/filetree'...
remote: Counting objects: 117, done.
remote: Compressing objects: 100% (67/67), done.
remote: Total 117 (delta 62), reused 97 (delta 42)
Receiving objects: 100% (117/117), 19.73 KiB, done.
Resolving deltas: 100% (62/62), done.
Submodule path 'scanner/filetree': checked out 'c9ae91558baa7da144ee98d692b88d69cab15123'
localhost:libebur128 audionuma$ mkdir build
localhost:libebur128 audionuma$ cd build/
localhost:build audionuma$ cmake ..
-- The C compiler identification is GNU 4.2.1
-- The CXX compiler identification is GNU 4.2.1
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found PKG_CONFIG: /opt/local/bin/pkg-config (found version "0.26")
-- Found GLIB: /opt/local/lib/libglib-2.0.dylib
-- Found Freetype: /opt/local/lib/libfreetype.dylib (found version "2.4.9")
-- Found GTK2_GTK: /opt/local/lib/libgtk-x11-2.0.dylib
-- Found RSVG2: /opt/local/lib/librsvg-2.dylib
-- Found SNDFILE: /opt/local/lib/libsndfile.dylib
-- Could NOT find MPG123 (missing: MPG123_LIBRARY MPG123_INCLUDE_DIR)
-- Could NOT find MPCDEC (missing: MPCDEC_LIBRARY MPCDEC_INCLUDE_DIR)
-- Found SPEEXDSP: /opt/local/lib/libspeexdsp.dylib
-- Found AVFORMAT: /opt/local/lib/libavformat.dylib
-- Found TAGLIB: /opt/local/lib/libtag.dylib
-- Found LibXml2: /opt/local/lib/libxml2.dylib (found version "2.7.8")
-- Found GSTREAMER: /opt/local/include/gstreamer-0.10
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - not found.
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found.
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found.
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - found
-- Looking for QT_MAC_USE_COCOA
-- Looking for QT_MAC_USE_COCOA - found
-- Found Qt4: /opt/local/bin/qmake (found version "4.8.2")
-- status found / use --
-- glib-2.0: yes yes
-- gtk-2.0: yes yes
-- rsvg2: yes yes
-- libsndfile: yes yes
-- libmpg123: no no
-- libmpcdec: no no
-- speexdsp: yes yes
-- ffmpeg: yes yes
-- taglib: yes yes
-- gstreamer: yes yes
-- qt4: yes yes
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/audionuma/libebu-30-06-12/libebur128/build
localhost:build audionuma$ make
Scanning dependencies of target ebur128
[ 4%] Building C object ebur128/CMakeFiles/ebur128.dir/ebur128.c.o
In file included from /usr/llvm-gcc-4.2/bin/../lib/gcc/i686-apple-darwin11/4.2.1/include/xmmintrin.h:45,
from /Users/audionuma/libebu-30-06-12/libebur128/ebur128/ebur128.c:405:
/usr/llvm-gcc-4.2/bin/../lib/gcc/i686-apple-darwin11/4.2.1/include/mm_malloc.h: In function ‘_mm_malloc’:
/usr/llvm-gcc-4.2/bin/../lib/gcc/i686-apple-darwin11/4.2.1/include/mm_malloc.h:42: error: ‘errno’ undeclared (first use in this function)
/usr/llvm-gcc-4.2/bin/../lib/gcc/i686-apple-darwin11/4.2.1/include/mm_malloc.h:42: error: (Each undeclared identifier is reported only once
/usr/llvm-gcc-4.2/bin/../lib/gcc/i686-apple-darwin11/4.2.1/include/mm_malloc.h:42: error: for each function it appears in.)
make[2]: *** [ebur128/CMakeFiles/ebur128.dir/ebur128.c.o] Error 1
make[1]: *** [ebur128/CMakeFiles/ebur128.dir/all] Error 2
make: *** [all] Error 2
localhost:build audionuma$
Hello,
ITU R BS 1770 has recently been revised to version 3 whose major modification is to give filter coefficients for the oversampling filter used in the true peak measurement.
http://www.itu.int/rec/R-REC-BS.1770-3-201208-I/en
It would be very nice to have the true-peak measurement implemented directly into libebur128 instead of using the external speex oversampler.
Regards,
Manuel
See tests.c:150
and tests.c:201
Since commit fa5dcc8 ebur128_set_max_window
always fails with EBUR128_ERROR_NOMEM
and ebur128_loudness_window
fails with EBUR128_ERROR_INVALID_MODE
. This is caused by the compile-time-constant VALIDATE_MAX_WINDOW
evaluating to 3
, i.e. the maximum allowed window size is a mere 3ms.
It seems that VALIDATE_MAX_WINDOW
is at least missing a factor one thousand to convert from seconds to milliseconds. Even then, VALIDATE_MAX_WINDOW
is relatively small -- rightly so, since for the given maximum sample rate and channel count one second of audio requires almost one gigabyte of data.
I propose one of the following solutions:
#define VALIDATE_MAX_WINDOW \
((3000ull << 30) / st->samplerate / st->channels / sizeof(double))
I think the latter solution is the way to go. However, it may be beneficial to store the max window size in the state struct for performance reasons.
Hi,
With the latest version from the repo, I get build errors. I run "cmake .." from the build dir which executes correctly. On running "make" I get the following error:
$ make
[ 6%] Building C object ebur128/CMakeFiles/ebur128.dir/ebur128.c.o
In file included from /usr/lib/gcc/i686-apple-darwin10/4.2.1/include/xmmintrin.h:45,
from /Users/chrisp/Documents/Code/3rdParty/libebur128/ebur128/ebur128.c:405:
/usr/lib/gcc/i686-apple-darwin10/4.2.1/include/mm_malloc.h: In function ‘_mm_malloc’:
/usr/lib/gcc/i686-apple-darwin10/4.2.1/include/mm_malloc.h:42: error: ‘errno’ undeclared (first use in this function)
/usr/lib/gcc/i686-apple-darwin10/4.2.1/include/mm_malloc.h:42: error: (Each undeclared identifier is reported only once
/usr/lib/gcc/i686-apple-darwin10/4.2.1/include/mm_malloc.h:42: error: for each function it appears in.)
make[2]: *** [ebur128/CMakeFiles/ebur128.dir/ebur128.c.o] Error 1
make[1]: *** [ebur128/CMakeFiles/ebur128.dir/all] Error 2
make: *** [all] Error 2
Any idea what the issue is? My friend got the same error when she tried it.
While the sources for the tests are included, the wav files required to actually run them are not.
Seems like it might be a good idea to do a v1.2 release now. I can update the package managers as soon as this is done. Thanks!
Hello,
I have an issue building the ffmpeg scanner (Linux Mint 14 64 bits) :
ffmpeg installed following the guide : https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide
manu@manu-mint14 ~ $ ffmpeg -version
ffmpeg version git-2013-03-24-01a334e
built on Mar 24 2013 06:08:15 with gcc 4.7 (Ubuntu/Linaro 4.7.2-2ubuntu1)
configuration: --enable-gpl --enable-libass --enable-libfaac --enable-libfdk-aac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libspeex --enable-librtmp --enable-libtheora --enable-libvorbis --enable-libvpx --enable-x11grab --enable-libx264 --enable-nonfree --enable-version3 --enable-libopus
libavutil 52. 22.101 / 52. 22.101
libavcodec 55. 1.100 / 55. 1.100
libavformat 55. 0.100 / 55. 0.100
libavdevice 55. 0.100 / 55. 0.100
libavfilter 3. 48.100 / 3. 48.100
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
manu@manu-mint14 ~ $
Here's the full libebur128 installation output :
manu@manu-mint14 ~ $ uname -a
Linux manu-mint14 3.5.0-17-generic #28-Ubuntu SMP Tue Oct 9 19:31:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
manu@manu-mint14 ~ $ cd sources/
manu@manu-mint14 ~/sources $ git clone https://github.com/jiixyj/libebur128
Cloning into 'libebur128'...
remote: Counting objects: 3155, done.
remote: Compressing objects: 100% (1056/1056), done.
remote: Total 3155 (delta 2216), reused 2990 (delta 2053)
Receiving objects: 100% (3155/3155), 530.81 KiB | 426 KiB/s, done.
Resolving deltas: 100% (2216/2216), done.
manu@manu-mint14 ~/sources $ cd libebur128/
manu@manu-mint14 ~/sources/libebur128 $ git submodule init
Submodule 'scanner/filetree' (git://github.com/jiixyj/filewalk.git) registered for path 'scanner/filetree'
manu@manu-mint14 ~/sources/libebur128 $ git submodule update
Cloning into 'scanner/filetree'...
remote: Counting objects: 117, done.
remote: Compressing objects: 100% (49/49), done.
remote: Total 117 (delta 62), reused 115 (delta 60)
Receiving objects: 100% (117/117), 19.82 KiB, done.
Resolving deltas: 100% (62/62), done.
Submodule path 'scanner/filetree': checked out 'c9ae91558baa7da144ee98d692b88d69cab15123'
manu@manu-mint14 ~/sources/libebur128 $ mkdir build
manu@manu-mint14 ~/sources/libebur128 $ cd build
manu@manu-mint14 ~/sources/libebur128/build $ cmake ..
-- The C compiler identification is GNU 4.7.2
-- The CXX compiler identification is GNU 4.7.2
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.26")
-- Found GLIB: /usr/lib/x86_64-linux-gnu/libglib-2.0.so
-- Found Freetype: /usr/lib/x86_64-linux-gnu/libfreetype.so (found version "2.4.10")
-- Found GTK2_GTK: /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so
-- Found RSVG2: /usr/lib/x86_64-linux-gnu/librsvg-2.so
-- Found SNDFILE: /usr/lib/x86_64-linux-gnu/libsndfile.so
-- Could NOT find MPG123 (missing: MPG123_LIBRARY MPG123_INCLUDE_DIR)
-- Could NOT find MPCDEC (missing: MPCDEC_LIBRARY MPCDEC_INCLUDE_DIR)
-- Found SPEEXDSP: /usr/lib/x86_64-linux-gnu/libspeexdsp.so
-- Found AVFORMAT: /usr/local/lib/libavformat.a
-- Found TAGLIB: /usr/lib/x86_64-linux-gnu/libtag.so
-- Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.so (found version "2.8.0")
-- Found GSTREAMER: /usr/include/gstreamer-0.10
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - found
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found.
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found.
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found.
-- Found Qt4: /usr/bin/qmake (found version "4.8.3")
-- status found / use --
-- glib-2.0: yes yes
-- gtk-2.0: yes yes
-- rsvg2: yes yes
-- libsndfile: yes yes
-- libmpg123: no no
-- libmpcdec: no no
-- speexdsp: yes yes
-- ffmpeg: yes yes
-- taglib: yes yes
-- gstreamer: yes yes
-- qt4: yes yes
-- Configuring done
-- Generating done
-- Build files have been written to: /home/manu/sources/libebur128/build
manu@manu-mint14 ~/sources/libebur128/build $ make
Scanning dependencies of target ebur128
[ 4%] Building C object ebur128/CMakeFiles/ebur128.dir/ebur128.c.o
Linking C shared library ../libebur128.so
[ 4%] Built target ebur128
Scanning dependencies of target ebur128_static
[ 8%] Building C object ebur128/CMakeFiles/ebur128_static.dir/ebur128.c.o
Linking C static library ../libebur128.a
[ 8%] Built target ebur128_static
Scanning dependencies of target input
[ 13%] Building C object scanner/inputaudio/CMakeFiles/input.dir/input.c.o
Linking C static library ../../libinput.a
[ 13%] Built target input
Scanning dependencies of target filetree
[ 17%] Building C object scanner/filetree/CMakeFiles/filetree.dir/filetree.c.o
Linking C static library libfiletree.a
[ 17%] Built target filetree
Scanning dependencies of target scanner-common
[ 21%] Building C object scanner/scanner-common/CMakeFiles/scanner-common.dir/parse_args.c.o
[ 26%] Building C object scanner/scanner-common/CMakeFiles/scanner-common.dir/nproc.c.o
[ 30%] Building C object scanner/scanner-common/CMakeFiles/scanner-common.dir/scanner-common.c.o
/home/manu/sources/libebur128/scanner/scanner-common/scanner-common.c: In function ‘scanner_init_common’:
/home/manu/sources/libebur128/scanner/scanner-common/scanner-common.c:33:9: attention : ‘g_mutex_new’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:271) [-Wdeprecated-declarations]
/home/manu/sources/libebur128/scanner/scanner-common/scanner-common.c:36:9: attention : ‘g_cond_new’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:275) [-Wdeprecated-declarations]
/home/manu/sources/libebur128/scanner/scanner-common/scanner-common.c: In function ‘process_files’:
/home/manu/sources/libebur128/scanner/scanner-common/scanner-common.c:335:5: attention : ‘g_thread_create’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:100): Use 'g_thread_new' instead [-Wdeprecated-declarations]
Linking C static library ../../libscanner-common.a
[ 30%] Built target scanner-common
Scanning dependencies of target scanner-tag
[ 34%] Building C object scanner/scanner-tag/CMakeFiles/scanner-tag.dir/scanner-tag.c.o
[ 39%] Building CXX object scanner/scanner-tag/CMakeFiles/scanner-tag.dir/rgtag.cpp.o
Linking CXX static library ../../libscanner-tag.a
[ 39%] Built target scanner-tag
Scanning dependencies of target scanner-lib
[ 43%] Building C object scanner/CMakeFiles/scanner-lib.dir/scanner-scan.c.o
[ 47%] Building C object scanner/CMakeFiles/scanner-lib.dir/scanner-dump.c.o
Linking C static library ../libscanner-lib.a
[ 47%] Built target scanner-lib
Scanning dependencies of target loudness
[ 52%] Building C object scanner/CMakeFiles/loudness.dir/scanner.c.o
/home/manu/sources/libebur128/scanner/scanner.c: In function ‘main’:
/home/manu/sources/libebur128/scanner/scanner.c:158:5: attention : ‘g_thread_init’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:259) [-Wdeprecated-declarations]
Linking CXX executable ../loudness
[ 52%] Built target loudness
Scanning dependencies of target input_sndfile
[ 56%] Building C object scanner/inputaudio/sndfile/CMakeFiles/input_sndfile.dir/input_sndfile.c.o
[ 60%] Building C object scanner/inputaudio/sndfile/CMakeFiles/input_sndfile.dir/__/input_helper.c.o
Linking C shared module ../../../libinput_sndfile.so
[ 60%] Built target input_sndfile
Scanning dependencies of target input_ffmpeg
[ 65%] Building C object scanner/inputaudio/ffmpeg/CMakeFiles/input_ffmpeg.dir/input_ffmpeg.c.o
/home/manu/sources/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c:16:21: erreur: ‘AVCODEC_MAX_AUDIO_FRAME_SIZE’ undeclared here (not in a function)
/home/manu/sources/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c: In function ‘ffmpeg_open_file’:
/home/manu/sources/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c:93:3: attention : ‘av_find_stream_info’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:1514) [-Wdeprecated-declarations]
/home/manu/sources/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c:174:3: attention : ‘av_close_input_file’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:1690) [-Wdeprecated-declarations]
/home/manu/sources/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c: In function ‘ffmpeg_read_one_packet’:
/home/manu/sources/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c:259:9: attention : ‘avcodec_decode_audio3’ is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:3608) [-Wdeprecated-declarations]
/home/manu/sources/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c: In function ‘ffmpeg_close_file’:
/home/manu/sources/libebur128/scanner/inputaudio/ffmpeg/input_ffmpeg.c:396:3: attention : ‘av_close_input_file’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:1690) [-Wdeprecated-declarations]
make[2]: *** [scanner/inputaudio/ffmpeg/CMakeFiles/input_ffmpeg.dir/input_ffmpeg.c.o] Erreur 1
make[1]: *** [scanner/inputaudio/ffmpeg/CMakeFiles/input_ffmpeg.dir/all] Erreur 2
make: *** [all] Erreur 2
manu@manu-mint14 ~/sources/libebur128/build $
Wondering if my ffmpeg build is too recent for libebur128 ?
Any ideas ?
Thanks
Hi there. I'm having trouble compiling minimal-example.c. I was hoping that someone might be able to shed some light on to why this might be. libebur128 and libsndfile are both installed and linked and I'm on OSX. Here's the output from gcc:
Kyles-MacBook-Air-2% gcc /Users/kyleswanson/Desktop/libebur128/test/minimal-example.c
Undefined symbols for architecture x86_64:
"_ebur128_add_frames_double", referenced from:
_main in minimal-example-923394.o
"_ebur128_destroy", referenced from:
_main in minimal-example-923394.o
"_ebur128_init", referenced from:
_main in minimal-example-923394.o
"_ebur128_loudness_global", referenced from:
_main in minimal-example-923394.o
"_ebur128_loudness_global_multiple", referenced from:
_main in minimal-example-923394.o
"_ebur128_set_channel", referenced from:
_main in minimal-example-923394.o
"_sf_close", referenced from:
_main in minimal-example-923394.o
"_sf_open", referenced from:
_main in minimal-example-923394.o
"_sf_readf_double", referenced from:
_main in minimal-example-923394.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Any ideas? I'm driving myself mad over here. Thanks!
Hello
I am a little confused about how loudness is calculated for a mono audio track.
If I only have a 1-speaker sound system, which mono mode is the correct one to use: left or right, center, or dual?
I believe by default libebur128 treats a mono track as a left channel mono track. You can of course explicitly set the channel to the other modes as well.
Here is my normalization example:
Start with a 2-channel stereo audio track
Convert it to mono using the standard median method
Measure the EBUR128 integrated loudness using the default libebur128 channel configuration: left channel
a. Let's assume the integrated loudness measured is -20 LUFS
Calculate the gain adjustment
a. Let's use a target reference of -16 LUFS
b. Then, the gain adjustment is +4 LU (dB)
Apply gain adjustment
a. So now the mono version will have an integrated loudness of -16 LUFS
Save mono track to as a f32le wav file.
If I then measure the integrated loudness using FFMPEG's ebur128 filter, I get -16 LUFS.
However, if I use libebur128 with the default channel configuration of left channel mono, I will get a value that is below -19 LUFS (-3 LU less).
If I use libebur128 and explicitly set the channel to dual mono channel configuration mode instead, I get -16 LUFS.
So this is where I am confused.
Shouldn't I have gotten -16 LUFS under the default libebur128 channel configuration for mono (left channel)?
Why does setting to dual mono give me the expected result of -16 LUFS?
Thanks!
Hello,
while working on a c++ project, I ended trying to implement a lightweight c++11 wrapper for libebur128.
The result can be seen here : audionuma@c6cd6e6
Before submitting a pull request, I thought that it would be nice if some c++ expert (which I am not) could check for bad design.
It you feel that it is worth merging into the upstream repo, I'll be glad to submit a pull request.
Cheers,
Manuel
Hi there ...
How about compiling on OS X ?? Did anyone have success with it ?
i just tried it - getting all the dependencies via fink (well, not all)
And i got this error...
-- Could NOT find RSVG2 (missing: RSVG2_LIBRARY RSVG2_INCLUDE_DIR)
-- Could NOT find MPG123 (missing: MPG123_LIBRARY MPG123_INCLUDE_DIR)
-- Could NOT find MPCDEC (missing: MPCDEC_LIBRARY MPCDEC_INCLUDE_DIR)
-- Could NOT find TAGLIB (missing: TAGLIB_LIBRARY TAGLIB_INCLUDE_DIR)
-- Could NOT find GSTREAMER (missing: GSTREAMER_INCLUDE_DIR GSTREAMER_LIBRARY GSTAPP_LIBRARY GSTBASE_LIBRARY GSTAUDIO_LIBRARY)
-- Could NOT find Qt4 (missing: QT_MOC_EXECUTABLE QT_RCC_EXECUTABLE QT_UIC_EXECUTABLE) (found version "4.6.0")
-- status found / use --
-- glib-2.0: yes yes
-- gtk-2.0: yes no
-- rsvg2: no no
-- libsndfile: yes yes
-- libmpg123: no no
-- libmpcdec: no no
-- speexdsp: yes yes
-- ffmpeg: yes yes
-- taglib: no no
-- gstreamer: no no
-- qt4: no no
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/gigi/Desktop/git_libebu/libebur128/build
Gigi-MacBook:build gigi$ make
[ 5%] Built target ebur128
[ 11%] Built target ebur128_static
[ 17%] Built target input
[ 23%] Built target filetree
[ 41%] Built target scanner-common
[ 52%] Built target scanner-lib
[ 58%] Built target loudness
[ 70%] Built target input_sndfile
Linking C shared module ../../../libinput_ffmpeg.so
Undefined symbols:
"_uncompress", referenced from:
_decode_frame in libavcodec.a(cscd.o)
_ff_id3v2_read in libavformat.a(id3v2.o)
_svq3_decode_init in libavcodec.a(svq3.o)
_decode_frame in libavcodec.a(exr.o)
_mov_read_cmov in libavformat.a(mov.o)
_decode_frame in libavcodec.a(dxa.o)
"inflateInit", referenced from:
_decode_init in libavcodec.a(lcldec.o)
_matroska_decode_buffer in libavformat.a(matroskadec.o)
_swf_read_header in libavformat.a(swfdec.o)
_decode_frame in libavcodec.a(pngdec.o)
_flashsv_decode_init in libavcodec.a(flashsv.o)
_flashsv2_decode_init in libavcodec.a(flashsv.o)
_zerocodec_decode_init in libavcodec.a(zerocodec.o)
_decode_init in libavcodec.a(zmbv.o)
_decode_init in libavcodec.a(tscc.o)
_tiff_unpack_strip in libavcodec.a(tiff.o)
"_BZ2_bzDecompressInit", referenced from:
_matroska_decode_buffer in libavformat.a(matroskadec.o)
"_deflateEnd", referenced from:
_flashsv_decode_frame in libavcodec.a(flashsv.o)
_flashsv_decode_frame in libavcodec.a(flashsv.o)
_encode_end in libavcodec.a(lclenc.o)
_flashsv_encode_end in libavcodec.a(flashsvenc.o)
_encode_frame in libavcodec.a(pngenc.o)
_encode_block in libavcodec.a(flashsv2enc.o)
_encode_end in libavcodec.a(zmbvenc.o)
"_CFDictionarySetValue", referenced from:
_ff_vda_create_decoder in libavcodec.a(vda.o)
_ff_vda_create_decoder in libavcodec.a(vda.o)
_ff_vda_create_decoder in libavcodec.a(vda.o)
_ff_vda_create_decoder in libavcodec.a(vda.o)
_ff_vda_create_decoder in libavcodec.a(vda.o)
_ff_vda_create_decoder in libavcodec.a(vda.o)
"_BZ2_bzDecompress", referenced from:
_matroska_decode_buffer in libavformat.a(matroskadec.o)
"_inflateEnd", referenced from:
_decode_end in libavcodec.a(lcldec.o)
_matroska_decode_buffer in libavformat.a(matroskadec.o)
_matroska_decode_buffer in libavformat.a(matroskadec.o)
_swf_read_close in libavformat.a(swfdec.o)
_decode_frame in libavcodec.a(pngdec.o)
_flashsv_decode_end in libavcodec.a(flashsv.o)
_flashsv2_decode_end in libavcodec.a(flashsv.o)
_zerocodec_decode_close in libavcodec.a(zerocodec.o)
_zerocodec_decode_init in libavcodec.a(zerocodec.o)
_decode_end in libavcodec.a(zmbv.o)
_decode_end in libavcodec.a(tscc.o)
_tiff_unpack_strip in libavcodec.a(tiff.o)
"_CFDictionaryCreate", referenced from:
_ff_vda_decoder_decode in libavcodec.a(vda.o)
"___CFConstantStringClassReference", referenced from:
cfstring=FF_VDA_DECODER_PTS_KEY in libavcodec.a(vda.o)
"_deflateReset", referenced from:
_encode_frame in libavcodec.a(lclenc.o)
_encode_frame in libavcodec.a(zmbvenc.o)
"_inflateReset", referenced from:
_zlib_decomp in libavcodec.a(lcldec.o)
_flashsv_decode_frame in libavcodec.a(flashsv.o)
_flashsv_decode_frame in libavcodec.a(flashsv.o)
_zerocodec_decode_frame in libavcodec.a(zerocodec.o)
_decode_frame in libavcodec.a(zmbv.o)
_decode_frame in libavcodec.a(tscc.o)
"_CVPixelBufferGetPixelFormatType", referenced from:
_vda_decoder_callback in libavcodec.a(vda.o)
"_crc32", referenced from:
_png_write_chunk in libavcodec.a(pngenc.o)
_png_write_chunk in libavcodec.a(pngenc.o)
_png_write_chunk in libavcodec.a(pngenc.o)
"_CVPixelBufferRetain", referenced from:
_vda_decoder_callback in libavcodec.a(vda.o)
"_kVDADecoderConfiguration_avcCData", referenced from:
_ff_vda_create_decoder in libavcodec.a(vda.o)
"_kCFTypeDictionaryKeyCallBacks", referenced from:
_ff_vda_decoder_decode in libavcodec.a(vda.o)
_ff_vda_create_decoder in libavcodec.a(vda.o)
"_compress", referenced from:
_encode_strip in libavcodec.a(tiffenc.o)
(maybe you meant: _ff_mp3_header_compress_bsf)
"_BZ2_bzDecompressEnd", referenced from:
_matroska_decode_buffer in libavformat.a(matroskadec.o)
_matroska_decode_buffer in libavformat.a(matroskadec.o)
"_kCVPixelBufferIOSurfacePropertiesKey", referenced from:
_ff_vda_create_decoder in libavcodec.a(vda.o)
"_deflate", referenced from:
_flashsv_decode_frame in libavcodec.a(flashsv.o)
_encode_frame in libavcodec.a(lclenc.o)
_encode_frame in libavcodec.a(lclenc.o)
_encode_frame in libavcodec.a(pngenc.o)
_encode_frame in libavcodec.a(pngenc.o)
_encode_frame in libavcodec.a(pngenc.o)
_encode_block in libavcodec.a(flashsv2enc.o)
_encode_block in libavcodec.a(flashsv2enc.o)
_encode_frame in libavcodec.a(zmbvenc.o)
"_CFNumberCreate", referenced from:
_ff_vda_decoder_decode in libavcodec.a(vda.o)
_ff_vda_create_decoder in libavcodec.a(vda.o)
_ff_vda_create_decoder in libavcodec.a(vda.o)
_ff_vda_create_decoder in libavcodec.a(vda.o)
_ff_vda_create_decoder in libavcodec.a(vda.o)
"_CVPixelBufferRelease", referenced from:
_ff_vda_release_vda_frame in libavcodec.a(vda.o)
_ff_vda_destroy_decoder in libavcodec.a(vda.o)
"_CFDataCreate", referenced from:
_ff_vda_decoder_decode in libavcodec.a(vda.o)
_ff_vda_create_decoder in libavcodec.a(vda.o)
_ff_vda_create_decoder in libavcodec.a(vda.o)
"_kCFTypeDictionaryValueCallBacks", referenced from:
_ff_vda_decoder_decode in libavcodec.a(vda.o)
_ff_vda_create_decoder in libavcodec.a(vda.o)
"_kVDADecoderConfiguration_SourceFormat", referenced from:
_ff_vda_create_decoder in libavcodec.a(vda.o)
"_VDADecoderDestroy", referenced from:
_ff_vda_destroy_decoder in libavcodec.a(vda.o)
"_CFRelease", referenced from:
_ff_vda_decoder_decode in libavcodec.a(vda.o)
_ff_vda_decoder_decode in libavcodec.a(vda.o)
_ff_vda_decoder_decode in libavcodec.a(vda.o)
_ff_vda_create_decoder in libavcodec.a(vda.o)
_ff_vda_create_decoder in libavcodec.a(vda.o)
_ff_vda_create_decoder in libavcodec.a(vda.o)
_ff_vda_create_decoder in libavcodec.a(vda.o)
_ff_vda_create_decoder in libavcodec.a(vda.o)
_ff_vda_create_decoder in libavcodec.a(vda.o)
_ff_vda_create_decoder in libavcodec.a(vda.o)
_ff_vda_create_decoder in libavcodec.a(vda.o)
"_VDADecoderDecode", referenced from:
_ff_vda_decoder_decode in libavcodec.a(vda.o)
"_inflateSync", referenced from:
_flashsv_decode_frame in libavcodec.a(flashsv.o)
"_inflate", referenced from:
_zlib_decomp in libavcodec.a(lcldec.o)
_matroska_decode_buffer in libavformat.a(matroskadec.o)
_zlib_refill in libavformat.a(swfdec.o)
_decode_frame in libavcodec.a(pngdec.o)
_flashsv_decode_frame in libavcodec.a(flashsv.o)
_flashsv_decode_frame in libavcodec.a(flashsv.o)
_flashsv_decode_frame in libavcodec.a(flashsv.o)
_flashsv_decode_frame in libavcodec.a(flashsv.o)
_zerocodec_decode_frame in libavcodec.a(zerocodec.o)
_decode_frame in libavcodec.a(zmbv.o)
_decode_frame in libavcodec.a(tscc.o)
_tiff_unpack_strip in libavcodec.a(tiff.o)
"_CFNumberGetValue", referenced from:
_vda_decoder_callback in libavcodec.a(vda.o)
"_deflateBound", referenced from:
_flashsv_decode_frame in libavcodec.a(flashsv.o)
_encode_frame in libavcodec.a(lclenc.o)
_encode_frame in libavcodec.a(pngenc.o)
"_VDADecoderCreate", referenced from:
_ff_vda_create_decoder in libavcodec.a(vda.o)
"_kVDADecoderConfiguration_Height", referenced from:
_ff_vda_create_decoder in libavcodec.a(vda.o)
"_compress2", referenced from:
_flashsv_encode_frame in libavcodec.a(flashsvenc.o)
_encode_block in libavcodec.a(flashsv2enc.o)
"_CFDictionaryCreateMutable", referenced from:
_ff_vda_create_decoder in libavcodec.a(vda.o)
_ff_vda_create_decoder in libavcodec.a(vda.o)
_ff_vda_create_decoder in libavcodec.a(vda.o)
"_kCFAllocatorDefault", referenced from:
_ff_vda_decoder_decode in libavcodec.a(vda.o)
_ff_vda_create_decoder in libavcodec.a(vda.o)
_ff_vda_create_decoder in libavcodec.a(vda.o)
_ff_vda_create_decoder in libavcodec.a(vda.o)
_ff_vda_create_decoder in libavcodec.a(vda.o)
_ff_vda_create_decoder in libavcodec.a(vda.o)
_ff_vda_create_decoder in libavcodec.a(vda.o)
_ff_vda_create_decoder in libavcodec.a(vda.o)
_ff_vda_create_decoder in libavcodec.a(vda.o)
_ff_vda_create_decoder in libavcodec.a(vda.o)
"_kVDADecoderConfiguration_Width", referenced from:
_ff_vda_create_decoder in libavcodec.a(vda.o)
"_kCVPixelBufferPixelFormatTypeKey", referenced from:
_ff_vda_create_decoder in libavcodec.a(vda.o)
"deflateInit2", referenced from:
_encode_frame in libavcodec.a(pngenc.o)
"_CFDictionaryGetValue", referenced from:
_vda_decoder_callback in libavcodec.a(vda.o)
"deflateInit", referenced from:
_flashsv_decode_frame in libavcodec.a(flashsv.o)
_flashsv_decode_frame in libavcodec.a(flashsv.o)
_encode_init in libavcodec.a(lclenc.o)
_encode_block in libavcodec.a(flashsv2enc.o)
_encode_init in libavcodec.a(zmbvenc.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[2]: *** [libinput_ffmpeg.so] Error 1
make[1]: *** [scanner/inputaudio/ffmpeg/CMakeFiles/input_ffmpeg.dir/all] Error 2
make: *** [all] Error 2
Is it worth trying at all ??
I was just curious and experimenting a little bit
Cheers Luigi
Hi :)
This is as much a wish as it is a bug :)
There is no way to get the 'loudness' - program print out a version number and this makes impossible to know if a client that has libebur128 installed has a buggy old version or a newer updated version.
This is a problem when my software (FreeLCS) tries during installation figure out whether to reinstall libebur128 or not.
Executable time stamp gives some hint but there is no way to now if it is recently build from old or new source. I can not always just download and build the newest version either since I need to test every change before I can support it :)
It would be nice to have funtionality like this:
loudness --version
1.20
M. Hartzell
Trying to build libebur128 on Mac OS X.7.3, dependancies installed with MacPorts.
$git log
commit 0e3f359
Author: Jan Kokemüller [email protected]
Date: Fri Jan 20 13:16:54 2012 +0100
$ cmake ..
[snip]
-- status --
-- glib-2.0: TRUE
-- gtk-2.0: true
-- libsndfile: TRUE
-- libmpg123: FALSE
-- libmpcdec: FALSE
-- speexdsp: TRUE
-- ffmpeg: TRUE
-- taglib: TRUE
-- gstreamer: TRUE
-- qt4: TRUE
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/audionuma/libebur128/build
$ make
[snip]
[ 58%] Building CXX object scanner/CMakeFiles/loudness-drop-gtk.dir/rgtag.cpp.o
Linking CXX executable ../loudness-drop-gtk
Undefined symbols for architecture x86_64:
"_g_thread_init", referenced from:
_main in scanner-drop.c.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[2]: *** [loudness-drop-gtk] Error 1
make[1]: *** [scanner/CMakeFiles/loudness-drop-gtk.dir/all] Error 2
make: *** [all] Error 2
After a few searches, found some links mentioning that g_thread_init() has been deprecated since glib 2.24 and replaced by g_type_init().
Edit scanner-drop.c, line 561 replace g_thread_init(NULL) by g_type_init().
$ make clean
$ cmake ..
$ make
[snip]
[100%] Built target r128-test-library
$ ./loudness scan -l -p dbtp some/audiofile.wav
seems ok now.
Thanks for the great library.
Hallo!
I am using "loudness scan" and am not able to compile it with true peak measurement support using your latest revision (648fa12).
It seems to be related with this commit:
a3f9b19
Now I used the revision before this commit (b8330c3) and it works again!
I have installed all necessary libraries, but cmake doesn't seem set the EBUR128_USE_SPEEX_RESAMPLER define correctly!
(Tested on latest ubuntu)
pretty please?
Hi :)
I've been actively beta testing my software (freelcs.sourceforge.net) and I may have found a small problem in libebur128 program scanner :)
EBU document 3341 ( download here: http://tech.ebu.ch/webdav/site/tech/shared/tech/tech3341.pdf ) has a couple of loudness calculation test cases on page 9. In test case 6 a 5.0 test file is created using sine waves. The loudness calculation result for this file should be -23.0 LUFS, but I get a result of -23.7 LUFS.
If add a silent channel to this 5.0 testfile as channel 4, then the loudness calculation gets the correct result of -23.0 LUFS.
sox -n sine_-28_dBFS.wav synth 20 sine 1000 gain -28
sox -n sine_-24_dBFS.wav synth 20 sine 1000 gain -24
sox -n sine_-30_dBFS.wav synth 20 sine 1000 gain -30
sox sine_-28_dBFS.wav sine_-28_dBFS.wav sine_-24_dBFS.wav sine_-30_dBFS.wav sine_-30_dBFS.wav testcase-6-channels-5.0.wav -M
loudness scan -l testcase-6-channels-5.0.wav
There are also ready made testfiles available from the EBU website here : http://tech.ebu.ch/webdav/site/tech/shared/testmaterial/ebu-loudness-test-setv03.zip
These are testfiles discussed in EBU documents 3341 and 3342 (documents downloadable here: http://tech.ebu.ch/loudness).
The files in this zip named:
seq-3341-6-5channels-16bit.wav
seq-3341-6-6channels-WAVEEX-16bit.wav
should produce the same result -23.0 LUFS. The first one is a 5.0 channel file and the second the same as the first but with a silent .1 channel added as channel number 4.
I suspect the cause of the problem might be that 'loudness' makes a static 'assumption' of which channels are rear channels and which are LFE and this assumption doesn't work with channel counts from 3 to 5.
One of my coworkers took part to the PLOUD group that formulated the EBU R128 standard and I asked him what channel counts and channel orders are supported by EBU R128 and he replied that the standard does not care about channel orders, it only defines that rear channel gain is 1.4 compared to front channels and LFE channels are ignored in calculations. As there is no correct channel order for EBU R128 then the user must tell the loudness meter the type of channels that are processed.
May I humbly suggest a solution to the problem :)
As the calculation only needs to know which channels are front channels, which are rear and which are LFE, then two commandline switches might be used to define the type of all channels, like this:
loudness scan -l surround-channels=5,6 lfe-channel=4 multichannel_5.1.wav
All channel numbers that are not defined in the commandline are front channels.
Commands for processing channel counts from 6 to 3 channels could look like these:
loudness scan -l surround-channels=5,6 lfe-channel=4 multichannel_5.1.wav
loudness scan -l surround-channels=4,5 multichannel_5.0.wav
loudness scan -l surround-channels=3,4 multichannel_4.0.wav
loudness scan -l multichannel_3.0.wav
Sorry that I am not able to send this as a patch, but learning C is still on my todo list and not yet a reality :)
Another possibility to solve the problem might be static channel orders for channels counts from 1 to 6. Flac file format uses very good channel order defaults that I think might work for 90% of the users all the time. Flac site says these channel orders are taken from some SMPTE/ITU-R recommendation, but does not say which document. Flac header definition with default channel orders is here:
http://flac.cvs.sourceforge.net/viewvc/flac/flac/doc/html/format.html#frame_header
The problem with static channel maps is that they won't work in all of the cases.
Mikael Hartzell
Finnish Broadcasting Company (YLE)
CMake Error at test/CMakeLists.txt:6 (find_pkg_config):
Unknown CMake command "find_pkg_config".
find_pkg_config
was removed in 93111d9.
There are no packages (source/compiled) for download. Only the git tree is available. Please add packages for 0.40.0 snapshot or whatever version the project is right now.
Hi,
It seems that the MLT project has spotted and fixed a memory leak in libebur128: mltframework/mlt@9d35a6b
On 1.2.2
# minimal-example $FILE
ASAN:DEADLYSIGNAL
=================================================================
==11037==ERROR: AddressSanitizer: SEGV on unknown address 0x000000002588 (pc 0x7f37372f4bc3 bp 0x627000000100 sp 0x7ffdf22b2e80 T0)
==11037==The signal is caused by a WRITE memory access.
#0 0x7f37372f4bc2 in uc2d_array /var/tmp/portage/media-libs/libsndfile-1.0.28-r1/work/libsndfile-1.0.28/src/pcm.c:494
#1 0x7f37372f4bc2 in pcm_read_uc2d /var/tmp/portage/media-libs/libsndfile-1.0.28-r1/work/libsndfile-1.0.28/src/pcm.c:1267
#2 0x7f37372bad35 in sf_readf_double /var/tmp/portage/media-libs/libsndfile-1.0.28-r1/work/libsndfile-1.0.28/src/sndfile.c:2055
#3 0x50e2a0 in main /var/tmp/portage/media-libs/libebur128-1.2.2/work/libebur128-1.2.2/test/minimal-example.c:44:30
#4 0x7f37363f6680 in __libc_start_main /var/tmp/portage/sys-libs/glibc-2.23-r4/work/glibc-2.23/csu/../csu/libc-start.c:289
#5 0x419d58 in _start (/usr/bin/minimal-example+0x419d58)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /var/tmp/portage/media-libs/libsndfile-1.0.28-r1/work/libsndfile-1.0.28/src/pcm.c:494 in uc2d_array
==11037==ABORTING
Testcase attached
396.crashes.zip
After the batch of updates from 2013-04-04, libebur128 fails at 'make install'.
It builds fine, but throws
make: *** No rule to make target
install'. Stop.`
when I do 'make install' after that.
Hi ,
I have a RAW PCM Sample (also know its Sample rate , and number of channels).
How do i use this library to measure loudness .
All the examples seem to use sound library that works with WAV,FLAC and other audio formats . Not with RAW files .
Kindly help
I have cloned the git repository (head) this morning and built libebur128. (Ubuntu)
Unfortunately running r128-test-library fails on the true peak tests, appearing to return an unchanging value.
Interestingly putting a usleep(10000) before each call to test_true_peak() in tests.c improves things.
Any suggestions?
Steps to reproduce:
git clone https://github.com/jiixyj/libebur128.git
Cloning into 'libebur128'...
remote: Counting objects: 3683, done.
remote: Total 3683 (delta 0), reused 0 (delta 0), pack-reused 3683
Receiving objects: 100% (3683/3683), 1.03 MiB | 0 bytes/s, done.
Resolving deltas: 100% (2034/2034), done.
Checking connectivity... done.
cd libebur128
mkdir build
cd build
cmake -D ENABLE_TESTS=ON ..
-- The C compiler identification is GNU 4.8.4
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.26")
-- checking for module 'sndfile'
-- found sndfile, version 1.0.27
-- sndfile library dirs: /usr/local/lib
-- sndfile cflags:
-- sndfile include dirs: /usr/local/include
-- sndfile libraries: sndfile
-- sndfile ldflags:
-- Status found / disabled --
-- queue.h: yes using system copy of queue.h
-- build static library and shared library!
-- building tests!
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ant/libebur128/build
make
Scanning dependencies of target ebur128
[ 25%] Building C object ebur128/CMakeFiles/ebur128.dir/ebur128.c.o
/home/ant/avnatek/loudness/libebur128/ebur128/ebur128.c:498:2: warning: #warning "manual FTZ is being used, please enable SSE2 (-msse2 -mfpmath=sse)" [-Wcpp]
#warning "manual FTZ is being used, please enable SSE2 (-msse2 -mfpmath=sse)"
^
Linking C shared library ../libebur128.so
[ 25%] Built target ebur128
Scanning dependencies of target ebur128_static
[ 50%] Building C object ebur128/CMakeFiles/ebur128_static.dir/ebur128.c.o
/home/ant/avnatek/loudness/libebur128/ebur128/ebur128.c:498:2: warning: #warning "manual FTZ is being used, please enable SSE2 (-msse2 -mfpmath=sse)" [-Wcpp]
#warning "manual FTZ is being used, please enable SSE2 (-msse2 -mfpmath=sse)"
^
Linking C static library ../libebur128.a
[ 50%] Built target ebur128_static
Scanning dependencies of target minimal-example
[ 75%] Building C object test/CMakeFiles/minimal-example.dir/minimal-example.c.o
Linking C executable ../minimal-example
[ 75%] Built target minimal-example
Scanning dependencies of target r128-test-library
[100%] Building C object test/CMakeFiles/r128-test-library.dir/tests.c.o
Linking C executable ../r128-test-library
[100%] Built target r128-test-library
cd ~/ebu-loudness-test-setv05
../libebur128/build/r128-test-library
Note: the tests do not have to pass with EXACT_PASSED.
Passing these tests does not mean that the library is 100% EBU R 128 compliant!
PASSED, EXACT_FAILED - seq-3341-1-16bit.wav: -2.2953554851425000e+01
PASSED, EXACT_FAILED - seq-3341-2-16bit.wav: -3.2959858907728382e+01
PASSED, EXACT_FAILED - seq-3341-3-16bit-v02.wav: -2.3014141652732853e+01
PASSED, EXACT_FAILED - seq-3341-4-16bit-v02.wav: -2.3014141652732764e+01
PASSED, EXACT_FAILED - seq-3341-5-16bit-v02.wav: -2.2979029141010766e+01
PASSED, EXACT_FAILED - seq-3341-6-5channels-16bit.wav: -2.3017156275010684e+01
PASSED, EXACT_FAILED - seq-3341-6-6channels-WAVEEX-16bit.wav: -2.3017156275010684e+01
PASSED, EXACT_FAILED - seq-3341-7_seq-3342-5-24bit.wav: -2.2986158805040809e+01
PASSED, EXACT_FAILED - seq-3341-2011-8_seq-3342-6-24bit-v02.wav: -2.2997820241224584e+01
PASSED, EXACT_FAILED - seq-3342-1-16bit.wav: 1.0001105488327648e+01
PASSED, EXACT_FAILED - seq-3342-2-16bit.wav: 4.9993734051514487e+00
PASSED, EXACT_FAILED - seq-3342-3-16bit.wav: 1.9995064067783257e+01
PASSED, EXACT_FAILED - seq-3342-4-16bit.wav: 1.4999273937724611e+01
PASSED, EXACT_FAILED - seq-3341-7_seq-3342-5-24bit.wav: 4.9747585877600446e+00
PASSED, EXACT_FAILED - seq-3341-2011-8_seq-3342-6-24bit-v02.wav: 1.4993218571631635e+01
FAILED - seq-3341-15-24bit.wav.wav: 2.3517897443964703e+01
FAILED - seq-3341-16-24bit.wav.wav: 2.3517897443964703e+01
FAILED - seq-3341-17-24bit.wav.wav: 2.3517897443964703e+01
FAILED - seq-3341-18-24bit.wav.wav: 2.3517897443964703e+01
FAILED - seq-3341-19-24bit.wav.wav: 2.3517897443964703e+01
FAILED - seq-3341-20-24bit.wav.wav: 2.3517897443964703e+01
FAILED - seq-3341-21-24bit.wav.wav: 2.3517897443964703e+01
FAILED - seq-3341-22-24bit.wav.wav: 2.3517897443964703e+01
FAILED - seq-3341-23-24bit.wav.wav: 2.3517897443964703e+01
There's a patch at https://github.com/christophgysin/libebur128/blob/master/libebur128-1.0.1-speex-stdint.patch which fixes build for me.
On 1.2.2
# minimal-example $FILE
==947==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6150000004e0 at pc 0x7ff54458561a bp 0x7ffedb2069d0 sp 0x7ffedb2069c8
WRITE of size 8 at 0x6150000004e0 thread T0
#0 0x7ff544585619 in ebur128_filter_double /var/tmp/portage/media-libs/libebur128-1.2.2/work/libebur128-1.2.2/ebur128/ebur128.c:596:1
#1 0x7ff544582456 in ebur128_add_frames_double /var/tmp/portage/media-libs/libebur128-1.2.2/work/libebur128-1.2.2/ebur128/ebur128.c:926:1
#2 0x50e319 in main /var/tmp/portage/media-libs/libebur128-1.2.2/work/libebur128-1.2.2/test/minimal-example.c:46:7
#3 0x7ff543440680 in __libc_start_main /var/tmp/portage/sys-libs/glibc-2.23-r4/work/glibc-2.23/csu/../csu/libc-start.c:289
#4 0x419d58 in _start (/usr/bin/minimal-example+0x419d58)
0x6150000004e0 is located 0 bytes to the right of 480-byte region [0x615000000300,0x6150000004e0)
allocated by thread T0 here:
#0 0x4d7f48 in malloc /var/tmp/portage/sys-libs/compiler-rt-sanitizers-5.0.0/work/compiler-rt-5.0.0.src/lib/asan/asan_malloc_linux.cc:67
#1 0x7ff544572d9e in ebur128_init /var/tmp/portage/media-libs/libebur128-1.2.2/work/libebur128-1.2.2/ebur128/ebur128.c:387:33
#2 0x50e112 in main /var/tmp/portage/media-libs/libebur128-1.2.2/work/libebur128-1.2.2/test/minimal-example.c:30:14
#3 0x7ff543440680 in __libc_start_main /var/tmp/portage/sys-libs/glibc-2.23-r4/work/glibc-2.23/csu/../csu/libc-start.c:289
SUMMARY: AddressSanitizer: heap-buffer-overflow /var/tmp/portage/media-libs/libebur128-1.2.2/work/libebur128-1.2.2/ebur128/ebur128.c:596:1 in ebur128_filter_double
Shadow bytes around the buggy address:
0x0c2a7fff8040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c2a7fff8050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c2a7fff8060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c2a7fff8070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c2a7fff8080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c2a7fff8090: 00 00 00 00 00 00 00 00 00 00 00 00[fa]fa fa fa
0x0c2a7fff80a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c2a7fff80b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c2a7fff80c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c2a7fff80d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c2a7fff80e0: 00 00 00 00 00 00 00 00 00 00 00 00 fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==947==ABORTING
testcase attached
10.crashes.zip
Hi,
I just did:
git clone https://github.com/jiixyj/libebur128.git
taking care of all dependencies on Ubuntu 11.04 and following install instructions from README file
on make
I stuck here:
...
Scanning dependencies of target loudness
[ 43%] Building C object scanner/CMakeFiles/loudness.dir/scanner.c.o
/src/libebur128/scanner/scanner.c:11:22: fatal error: filetree.h: No such file or directory
compilation terminated.
make[2]: *** [scanner/CMakeFiles/loudness.dir/scanner.c.o] Error 1
make[1]: *** [scanner/CMakeFiles/loudness.dir/all] Error 2
make: *** [all] Error 2
It seems like this file should be in scanner
folder or maybe not?
Hi,
just found this library today, and I have been trying to build a shared library for Win32 to use it in a Delphi project (I will port the header files manually).
I have VS C++ 2008 Express installed. Is VC the preferred build environment under Windows? Or should I go for MinGW? I must admit that I'm not an expert for either toolchain.
CMake generated several VS project files, but I can't get them to compile. First problem was, VC did not find sys/queue.h, so I had to add the "queue" directory manually to the includes in the project config.
Now the compiler is complaining:
1>.\ebur128.c(413) : fatal error C1021: invalid preprocessor command 'warning'
Which points to the following line:
#warning "manual FTZ is being used, please enable SSE2 (-msse2 -mfpmath=sse)"
So it seems that SSE2 was not turned on. After a Google search, I found that I have to set "Enable Enhanced Instruction Set" to "SSE2", but I still get the same error. Looks like the SSE2 defines are different on Windows?
Has anyone has any luck compiling a Windows DLL from this? Are there possibly any binaries available somewhere? Or can you give me some hints about the above problems?
Thanks,
Torben
In my app's test suite I occasionally get a true peak like 2.1267647932558654E+38, which is obviously not correct (should be 1.014152). Doesn't happen with sample peaks, and like I said it is intermittent (about 1 time in 20).
I don't believe its a race condition or anything as this is an "album" with only 1 track, and my tests do not run in parallel.
I've seen it with 44.1 kHz, 48 kHz and 96 kHz versions of the same file.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.