C library for generating audio fingerprints used by AcoustID

Overview

Chromaprint

Chromaprint is an audio fingerprint library developed for the AcoustID project. It's designed to identify near-identical audio and the fingerprints it generates are as compact as possible to achieve that. It's not a general purpose audio fingerprinting solution. It trades precision and robustness for search performance. The target use cases are full audio file identifcation, duplicate audio file detection and long audio stream monitoring.

Building

The most common way to build Chromaprint is like this:

$ cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TOOLS=ON .
$ make
$ sudo make install

This will build Chromaprint as a shared library and also include the fpcalc utility (which is used by MusicBrainz Picard, for example). For this to work, you will need to have the FFmpeg libraries installed.

See below for other options.

FFT Library

Chromaprint can use multiple FFT libraries -- FFmpeg, FFTW3, KissFFT or vDSP (macOS).

FFmpeg is preferred on all systems except for macOS, where you should use the standard vDSP framework. These are the fastest options.

FFTW3 can be also used, but this library is released under the GPL license, which makes also the resulting Chromaprint binary GPL licensed.

KissFFT is the slowest option, but it's distributed with a permissive license and it's very easy to build on platforms that do not have packaged versions of FFmpeg or FFTW3. We ship a copy of KissFFT, so if the build system is unable to find another FFT library it will use that as a fallback.

You can explicitly set which library to use with the FFT_LIB option. For example:

$ cmake -DFFT_LIB=kissfft .

FFmpeg

FFmpeg is as a FFT library and also for audio decoding and resampling in fpcalc. If you have FFmpeg installed in a non-standard location, you can use the FFMPEG_ROOT option to specify where:

$ cmake -DFFMPEG_ROOT=/path/to/local/ffmpeg/install .

While we try to make sure things work also with libav, FFmpeg is preferred.

API Documentation

You can use Doxygen to generate a HTML version of the API documentation:

$ make docs
$ $BROWSER docs/html/index.html

Unit Tests

The test suite can be built and run using the following commands:

$ cmake -DBUILD_TESTS=ON .
$ make check

In order to build the test suite, you will need the sources of the Google Test library.

Related Projects

Bindings, wrappers and reimplementations in other languages:

Integrations:

If you know about a project that is not listed here, but should be, please let me know.

Standing on the Shoulders of Giants

I've learned a lot while working on this project, which would not be possible without having information from past research. I've read many papers, but the concrete ideas implemented in this library are based on the following papers:

Comments
  • How to create release builds?

    How to create release builds?

    Hi Lukáš,

    I've been experimenting with compiling fpcalc for different platforms myself. Which scripts or compiler options are you using to create the release packages?

    The official (release binaries)[https://acoustid.org/chromaprint] are all a few MB large. But when I compile myself with the instructions on the README.md it's barely 100 KB so I'm probably missing some static dependencies but I'm not sure which compiler options I need to include all of those in the binary.

    Cheers, Reinhard

    opened by rednoah 15
  • Issue with fingerprinting MP3

    Issue with fingerprinting MP3

    Hi Lukas,

    I try to compute fingerprint the following MP3 file with fpcalc but without success (rename ZIP to MP3): chromaprint_issue.mp3.zip

    fpcalc returns nothing in the console. And the chromaprint library fails after calling the avcodec_decode_audio4 function.

    However, the file seems to be perfectly playable and ffprobe doesn't report any issue.

    Do you know why the file cannot be fingerprinted by chromaprint?

    Thanks.

    opened by CyberSinh 7
  • "string iterator not incrementable" issue with the chromaprint_decode_fingerprint() function

    Hi Lukas,

    I'm trying to use the chromaprint_decode_fingerprint function but I get the following error message at runtime:

    Debug Assertion Failed! Program: MSVCP140D.DLL File: VC\include\xstring Line: 106 Expression: string iterator not incrementable

    Do you know why?

    Thanks.

    You will find below a sample repro:

    uint32_t *fp;
    int length, algorithm;
    
    char *encoded = "AQABz9GSJEkkKYmS4Tp6xvjx-tBpXMfRpUP1w3yGHmUPcWTwhnhgiYNeeBcu5HhbxA2PZuEFnSd-9FECq-gJPbtQ_fiLfkf3wvnRl9AO__jxCj7-QjzyoFek4xcmPnA2-qjUDz9yTsR56PFRJp4GP8ePLj2qY-NRfkL2oXEx6cFThPCh7_iRVnzQbX9wHc0UT0I_5Duao1KVGOsPlpdQLcqFHxf5oqfRFVpySvjR_Ch7_NCO87h05ChL7Do65vDIFC2H8zhyKnhqXJ6GdsuLw4c276h-TGEcfAfjmWgeYzy6HT6u5UhvhCceZSp0PD5iZzka9Zh05NOEZmsgxZTx50ifa8hxpRv0E1vHKciFHk0cFY0moRKzabgbDb3gH_2RH8k3lGuEKc_x3_hRPehX5ODRfDX6JCtOIVyOMFyP-4XyHWkaF9fRt0VzD7sOJlUkHX2Q9Ed-9PnR8EpwijfCJJFi9PmhLySPhmOC-sIZiI8m_ML3INJ3pI6UknCNnkHzyNDEpchz400d9IN99PiSo9kyDf0xXTrS_HCC79D64Tx4o1YSIReeCKH84Q0ORT7CNMKPmQma62inD7xoodlEJNOJXEHzo3qCMEn4omWg_UPKqBN69EYz5kPyDrkeCb2OKd2i4RJ6PB3CQ5Wo5shTMUH7Hf6IHsd5NNcQnjFGo8oP__DJQz8OJk9s5BROotERSmSOjyaUv0LqsziV4zmaK5jIFLXAxEk0xIfeIcyFqiEVXL_hGLnQUOXRJ8SHSLnRr_jx5IU35CH0N0gfHtdQ_Wj0ZniT7ENZXPDRrijZIMxn7Dkqo0nIoG_QVDsO_mi6yOibDJqyHf6DSiX2fdAyVEyCXDyqhD2aRyf2H09EMJkchE-g60GYK3grNHHwHE9I9DrSMoJ2ZMd7_Ch7WEftI24DqTrCEteio9ePLxIVIj-uW1CjK6goVoYnhYZuuElwNDfyIT4e4lGWKWhEyUF5XKic47xQ0ZygO0XXhAgTMzP-FN_x4_lQiynCxBlxPgivIEyNL0e64zu-hCR-fMzBieLxIzy0MEZ-MNcc-Bqc53gYUfCPh0c6MmFI6DWaijk-K8g_PNXRhKjTD72UBSXzgT_-YIx27EsUJ6iThkJTZUd-aM_R03iaCk-CUwITPUcPVVfwLA8m0UbTrLgSHR3-Y8-DUsKVB6EkJWh-_HgPTv3AZs_R23CcBfWRM1B1hB1K63iipLg9XETcZ0I3jynO8PiF64YtH1klhDvxhThXzFex3kG1HPZu9Dmu47mh5UGtHKp1POjyUMWfDJo6of8Gtgvy5EDfo1bgnWiX6wCGhEEAKADJIUAbILJzTAgDBDBCAgQQMEQQJABBwgJgBBMAAGaEAMwAh5wAikDkhQBGCIGkAgQASghihAmlEBDEMCOUAYYJ4pRVwhAEAiXEYWAUMchQBpQVhkwhgDUMAQAoMkgxJRUwjgFBBRBCEGM0BgBAAIhQRBJkkALCCAUMQIAIIQBQRDGDBAECAAGY4MYQIhSgBCEkKAHEggG8cAIYJIgUwJAHpCHAMAaEQEYo6IgAADgEAUIIBAQcMEIgYBkECEABCEYKAYYcA4oowBBABAAvBJJKMGIAEAYwA5QADAAGCINMaAKQJcQYjCCzxBBACAcGMM4II8IQKIghgFgABTOEUAegMQQ4wYCBSjgAiAFCEGCAYwZIIAA0QChAhBROUAQAEo4YR4AQhhhliAAMEAQUBtooAg5xjCADgCGAOCQIQgQghigwQAikBBAEAA";
    
    chromaprint_decode_fingerprint(encoded, strlen(encoded), &fp, &length, &algorithm, 1); // string iterator not incrementable       
    
    opened by CyberSinh 7
  • Building chromaprint-1.4.2 fails

    Building chromaprint-1.4.2 fails

    Building chromaprint-1.4.2 fails with the following message:

    -- Using swresample for audio conversion
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /tmp/SBo/chromaprint-1.4.2/build
    Scanning dependencies of target chromaprint_objs
    [  4%] Building CXX object src/CMakeFiles/chromaprint_objs.dir/fft_lib_avfft.cpp.o
    In file included from /tmp/SBo/chromaprint-1.4.2/src/fft_lib_avfft.h:14:0,
                     from /tmp/SBo/chromaprint-1.4.2/src/fft_lib_avfft.cpp:4:
    /tmp/SBo/chromaprint-1.4.2/src/utils.h: In function ‘void chromaprint::PrepareHammingWindow(RandomAccessIterator, RandomAccessIterator, double)’:
    /tmp/SBo/chromaprint-1.4.2/src/utils.h:40:8: warning: ‘auto’ will change meaning in C++0x; please remove it
    /tmp/SBo/chromaprint-1.4.2/src/utils.h:40:13: error: ‘size’ does not name a type
    /tmp/SBo/chromaprint-1.4.2/src/utils.h:42:61: error: ‘size’ was not declared in this scope
    /tmp/SBo/chromaprint-1.4.2/src/utils.h: In function ‘void chromaprint::ApplyWindow(InputIt, InputIt, WindowIt&, OutputIt&)’:
    /tmp/SBo/chromaprint-1.4.2/src/utils.h:49:2: warning: ‘auto’ will change meaning in C++0x; please remove it
    /tmp/SBo/chromaprint-1.4.2/src/utils.h:49:7: error: ‘input’ does not name a type
    /tmp/SBo/chromaprint-1.4.2/src/utils.h:50:9: error: ‘input’ was not declared in this scope
    /tmp/SBo/chromaprint-1.4.2/src/fft_lib_avfft.cpp: In member function ‘void chromaprint::FFTLib::Load(const int16_t*, const int16_t*, const int16_t*, const int16_t*)’:
    /tmp/SBo/chromaprint-1.4.2/src/fft_lib_avfft.cpp:27:2: warning: ‘auto’ will change meaning in C++0x; please remove it
    /tmp/SBo/chromaprint-1.4.2/src/fft_lib_avfft.cpp:27:7: error: ‘window’ does not name a type
    /tmp/SBo/chromaprint-1.4.2/src/fft_lib_avfft.cpp:28:2: warning: ‘auto’ will change meaning in C++0x; please remove it
    /tmp/SBo/chromaprint-1.4.2/src/fft_lib_avfft.cpp:28:7: error: ‘output’ does not name a type
    /tmp/SBo/chromaprint-1.4.2/src/fft_lib_avfft.cpp:29:22: error: ‘window’ was not declared in this scope
    /tmp/SBo/chromaprint-1.4.2/src/fft_lib_avfft.cpp:29:30: error: ‘output’ was not declared in this scope
    /tmp/SBo/chromaprint-1.4.2/src/fft_lib_avfft.cpp: In member function ‘void chromaprint::FFTLib::Compute(chromaprint::FFTFrame&)’:
    /tmp/SBo/chromaprint-1.4.2/src/fft_lib_avfft.cpp:35:2: warning: ‘auto’ will change meaning in C++0x; please remove it
    /tmp/SBo/chromaprint-1.4.2/src/fft_lib_avfft.cpp:35:7: error: ‘input’ does not name a type
    /tmp/SBo/chromaprint-1.4.2/src/fft_lib_avfft.cpp:36:2: warning: ‘auto’ will change meaning in C++0x; please remove it
    /tmp/SBo/chromaprint-1.4.2/src/fft_lib_avfft.cpp:36:7: error: ‘output’ does not name a type
    /tmp/SBo/chromaprint-1.4.2/src/fft_lib_avfft.cpp:37:2: error: ‘output’ was not declared in this scope
    /tmp/SBo/chromaprint-1.4.2/src/fft_lib_avfft.cpp:37:14: error: ‘input’ was not declared in this scope
    make[2]: *** [src/CMakeFiles/chromaprint_objs.dir/fft_lib_avfft.cpp.o] Error 1
    make[1]: *** [src/CMakeFiles/chromaprint_objs.dir/all] Error 2
    make: *** [all] Error 2
    root@stinkpad:/home/ftp/MIX/chromaprint# 
    

    I'm building in my custom Slackware 13.37 x86_64 with GCC 4.5.2 against ffmpeg 3.0.7, FFTW 3.3.4 and cmake 3.5.2. I'm not a programmer but I can build my own packages, let me know what I may try to help debug this issue. Cheers, t0mg

    opened by real-t0mg 6
  • fix deprecated API in fpcalc.c for building against ffmpeg-0.11

    fix deprecated API in fpcalc.c for building against ffmpeg-0.11

    In ffmpeg-0.11, several API calls which were previously deprecated have been entirely removed; to get fpcalc.c to build against it, one needs to replace calls to avformat_open_input by avformat_open_input, to av_get_bits_per_sample_format by av_get_bytes_per_sample, and SAMPLE_FMT_S16 by AV_SAMPLE_FMT_S16.

    opened by vesath 6
  • Port to ffmpeg 5.0

    Port to ffmpeg 5.0

    Replace removed functionality like accessing the codec context from an AVStream and avcodec_decode_audio4()

    Signed-off-by: Bernhard Rosenkränzer [email protected] Fixes: https://github.com/acoustid/chromaprint/issues/78

    opened by berolinux 5
  • Apple Silicon (arm64) support

    Apple Silicon (arm64) support

    • [x] Support for building fpcalc for arm64 and publishing x86_64+arm64 universal binaries.

    @lalinsky I'd be happy to hire you to work on M1 support for chromaprint tools.

    opened by rednoah 5
  • Can't install, FFmpeg not found

    Can't install, FFmpeg not found

    Hi, I'm trying to install chromaprint on Ubuntu 16.04 but CMake keeps telling me that FFmpeg can't be found. I'm certain ffmpeg is installed andwhich ffmpeg returns /usr/local/bin/ffmpeg

    Any solution ? Thanks.

    opened by NabilEL 5
  • Latest fpcalc utility doesn't compile against current FFmpeg

    Latest fpcalc utility doesn't compile against current FFmpeg

    Thank you for recent changes.

    Against current FFmpeg, the fpcalc utility does not compile. Could there be an API difference? Here is the compile log.

    In summary:

    In file included from /home/john/src/chromaprint/src/cmd/fpcalc.cpp:7:
    /home/john/src/chromaprint/src/audio/ffmpeg_audio_reader.h:164:55: error: ‘AVStream’ {aka ‘struct AVStream’} has no member named ‘codec’
      164 |  m_codec_ctx = m_format_ctx->streams[m_stream_index]->codec;
          |                                                       ^~~~~
    In file included from /home/john/src/chromaprint/src/cmd/fpcalc.cpp:7:
    /home/john/src/chromaprint/src/audio/ffmpeg_audio_reader.h:281:9: error: ‘avcodec_decode_audio4’ was not declared in this scope; did you mean ‘avcodec_decode_subtitle2’?
      281 |   ret = avcodec_decode_audio4(m_codec_ctx, m_frame, &m_got_frame, &m_packet);
          |         ^~~~~~~~~~~~~~~~~~~~~
          |         avcodec_decode_subtitle2
    make[2]: *** [src/cmd/CMakeFiles/fpcalc.dir/build.make:85: src/cmd/CMakeFiles/fpcalc.dir/fpcalc.cpp.o] Error 1
    make[2]: Leaving directory '/home/john/src/chromaprint'
    make[1]: *** [CMakeFiles/Makefile2:248: src/cmd/CMakeFiles/fpcalc.dir/all] Error 2
    make[1]: Leaving directory '/home/john/src/chromaprint'
    make: *** [Makefile:152: all] Error 2
    

    Now, here is the full log:

    [ 95%] Building CXX object src/cmd/CMakeFiles/fpcalc.dir/fpcalc.cpp.o
    cd /home/john/src/chromaprint/src/cmd && /usr/bin/c++ -DHAVE_CONFIG_H -D_GLIBCXX_DEBUG -D_SCL_SECURE_NO_WARNINGS -D_USE_MATH_DEFINES -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -I/home/john/src/chromaprint -I/home/john/src/chromaprint/src -fpermissive -Wall -g -fvisibility=hidden -fvisibility-inlines-hidden -std=gnu++11 -o CMakeFiles/fpcalc.dir/fpcalc.cpp.o -c /home/john/src/chromaprint/src/cmd/fpcalc.cpp
    In file included from /home/john/src/chromaprint/src/cmd/fpcalc.cpp:7:
    /home/john/src/chromaprint/src/audio/ffmpeg_audio_reader.h: In constructor ‘chromaprint::FFmpegAudioReader::FFmpegAudioReader()’:
    /home/john/src/chromaprint/src/audio/ffmpeg_audio_reader.h:102:26: warning: ‘void av_init_packet(AVPacket*)’ is deprecated [-Wdeprecated-declarations]
      102 |  av_init_packet(&m_packet);
          |                          ^
    In file included from /usr/local/include/libavcodec/avcodec.h:45,
                     from /home/john/src/chromaprint/src/audio/ffmpeg_audio_reader.h:18,
                     from /home/john/src/chromaprint/src/cmd/fpcalc.cpp:7:
    /usr/local/include/libavcodec/packet.h:506:6: note: declared here
      506 | void av_init_packet(AVPacket *pkt);
          |      ^~~~~~~~~~~~~~
    In file included from /home/john/src/chromaprint/src/cmd/fpcalc.cpp:7:
    /home/john/src/chromaprint/src/audio/ffmpeg_audio_reader.h: In member function ‘bool chromaprint::FFmpegAudioReader::SetInputFormat(const char*)’:
    /home/john/src/chromaprint/src/audio/ffmpeg_audio_reader.h:117:36: warning: invalid conversion from ‘const AVInputFormat*’ to ‘AVInputFormat*’ [-fpermissive]
      117 |  m_input_fmt = av_find_input_format(name);
          |                ~~~~~~~~~~~~~~~~~~~~^~~~~~
          |                                    |
          |                                    const AVInputFormat*
    /home/john/src/chromaprint/src/audio/ffmpeg_audio_reader.h: In member function ‘bool chromaprint::FFmpegAudioReader::Open(const string&)’:
    /home/john/src/chromaprint/src/audio/ffmpeg_audio_reader.h:138:29: warning: ‘void av_init_packet(AVPacket*)’ is deprecated [-Wdeprecated-declarations]
      138 |     av_init_packet(&m_packet);
          |                             ^
    In file included from /usr/local/include/libavcodec/avcodec.h:45,
                     from /home/john/src/chromaprint/src/audio/ffmpeg_audio_reader.h:18,
                     from /home/john/src/chromaprint/src/cmd/fpcalc.cpp:7:
    /usr/local/include/libavcodec/packet.h:506:6: note: declared here
      506 | void av_init_packet(AVPacket *pkt);
          |      ^~~~~~~~~~~~~~
    In file included from /home/john/src/chromaprint/src/cmd/fpcalc.cpp:7:
    /home/john/src/chromaprint/src/audio/ffmpeg_audio_reader.h:157:70: warning: invalid conversion from ‘AVCodec**’ to ‘const AVCodec**’ [-fpermissive]
      157 |  ret = av_find_best_stream(m_format_ctx, AVMEDIA_TYPE_AUDIO, -1, -1, &codec, 0);
          |                                                                      ^~~~~~
          |                                                                      |
          |                                                                      AVCodec**
    In file included from /home/john/src/chromaprint/src/audio/ffmpeg_audio_reader.h:19,
                     from /home/john/src/chromaprint/src/cmd/fpcalc.cpp:7:
    /usr/local/include/libavformat/avformat.h:2162:41: note:   initializing argument 5 of ‘int av_find_best_stream(AVFormatContext*, AVMediaType, int, int, const AVCodec**, int)’
     2162 |                         const AVCodec **decoder_ret,
          |                         ~~~~~~~~~~~~~~~~^~~~~~~~~~~
    In file included from /home/john/src/chromaprint/src/cmd/fpcalc.cpp:7:
    /home/john/src/chromaprint/src/audio/ffmpeg_audio_reader.h:164:55: error: ‘AVStream’ {aka ‘struct AVStream’} has no member named ‘codec’
      164 |  m_codec_ctx = m_format_ctx->streams[m_stream_index]->codec;
          |                                                       ^~~~~
    In file included from /home/john/src/chromaprint/src/cmd/fpcalc.cpp:7:
    /home/john/src/chromaprint/src/audio/ffmpeg_audio_reader.h: In member function ‘bool chromaprint::FFmpegAudioReader::Read(const int16_t**, size_t*)’:
    /home/john/src/chromaprint/src/audio/ffmpeg_audio_reader.h:259:28: warning: ‘void av_init_packet(AVPacket*)’ is deprecated [-Wdeprecated-declarations]
      259 |    av_init_packet(&m_packet);
          |                            ^
    In file included from /usr/local/include/libavcodec/avcodec.h:45,
                     from /home/john/src/chromaprint/src/audio/ffmpeg_audio_reader.h:18,
                     from /home/john/src/chromaprint/src/cmd/fpcalc.cpp:7:
    /usr/local/include/libavcodec/packet.h:506:6: note: declared here
      506 | void av_init_packet(AVPacket *pkt);
          |      ^~~~~~~~~~~~~~
    In file included from /home/john/src/chromaprint/src/cmd/fpcalc.cpp:7:
    /home/john/src/chromaprint/src/audio/ffmpeg_audio_reader.h:281:9: error: ‘avcodec_decode_audio4’ was not declared in this scope; did you mean ‘avcodec_decode_subtitle2’?
      281 |   ret = avcodec_decode_audio4(m_codec_ctx, m_frame, &m_got_frame, &m_packet);
          |         ^~~~~~~~~~~~~~~~~~~~~
          |         avcodec_decode_subtitle2
    make[2]: *** [src/cmd/CMakeFiles/fpcalc.dir/build.make:85: src/cmd/CMakeFiles/fpcalc.dir/fpcalc.cpp.o] Error 1
    make[2]: Leaving directory '/home/john/src/chromaprint'
    make[1]: *** [CMakeFiles/Makefile2:248: src/cmd/CMakeFiles/fpcalc.dir/all] Error 2
    make[1]: Leaving directory '/home/john/src/chromaprint'
    make: *** [Makefile:152: all] Error 2
    /usr/bin/cmake -S/home/john/src/chromaprint -B/home/john/src/chromaprint --check-build-system CMakeFiles/Makefile.cmake 0
    /usr/bin/cmake -E cmake_progress_start /home/john/src/chromaprint/CMakeFiles /home/john/src/chromaprint//CMakeFiles/progress.marks
    make  -f CMakeFiles/Makefile2 all
    make[1]: Entering directory '/home/john/src/chromaprint'
    make  -f src/CMakeFiles/chromaprint_objs.dir/build.make src/CMakeFiles/chromaprint_objs.dir/depend
    make[2]: Entering directory '/home/john/src/chromaprint'
    cd /home/john/src/chromaprint && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/john/src/chromaprint /home/john/src/chromaprint/src /home/john/src/chromaprint /home/john/src/chromaprint/src /home/john/src/chromaprint/src/CMakeFiles/chromaprint_objs.dir/DependInfo.cmake --color=
    make[2]: Leaving directory '/home/john/src/chromaprint'
    make  -f src/CMakeFiles/chromaprint_objs.dir/build.make src/CMakeFiles/chromaprint_objs.dir/build
    make[2]: Entering directory '/home/john/src/chromaprint'
    make[2]: Nothing to be done for 'src/CMakeFiles/chromaprint_objs.dir/build'.
    make[2]: Leaving directory '/home/john/src/chromaprint'
    [ 81%] Built target chromaprint_objs
    make  -f src/CMakeFiles/chromaprint.dir/build.make src/CMakeFiles/chromaprint.dir/depend
    make[2]: Entering directory '/home/john/src/chromaprint'
    cd /home/john/src/chromaprint && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/john/src/chromaprint /home/john/src/chromaprint/src /home/john/src/chromaprint /home/john/src/chromaprint/src /home/john/src/chromaprint/src/CMakeFiles/chromaprint.dir/DependInfo.cmake --color=
    make[2]: Leaving directory '/home/john/src/chromaprint'
    make  -f src/CMakeFiles/chromaprint.dir/build.make src/CMakeFiles/chromaprint.dir/build
    make[2]: Entering directory '/home/john/src/chromaprint'
    make[2]: Nothing to be done for 'src/CMakeFiles/chromaprint.dir/build'.
    make[2]: Leaving directory '/home/john/src/chromaprint'
    [ 90%] Built target chromaprint
    make  -f src/cmd/CMakeFiles/fpcalc.dir/build.make src/cmd/CMakeFiles/fpcalc.dir/depend
    make[2]: Entering directory '/home/john/src/chromaprint'
    cd /home/john/src/chromaprint && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/john/src/chromaprint /home/john/src/chromaprint/src/cmd /home/john/src/chromaprint /home/john/src/chromaprint/src/cmd /home/john/src/chromaprint/src/cmd/CMakeFiles/fpcalc.dir/DependInfo.cmake --color=
    make[2]: Leaving directory '/home/john/src/chromaprint'
    make  -f src/cmd/CMakeFiles/fpcalc.dir/build.make src/cmd/CMakeFiles/fpcalc.dir/build
    make[2]: Entering directory '/home/john/src/chromaprint'
    [ 95%] Building CXX object src/cmd/CMakeFiles/fpcalc.dir/fpcalc.cpp.o
    cd /home/john/src/chromaprint/src/cmd && /usr/bin/c++ -DHAVE_CONFIG_H -D_GLIBCXX_DEBUG -D_SCL_SECURE_NO_WARNINGS -D_USE_MATH_DEFINES -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -I/home/john/src/chromaprint -I/home/john/src/chromaprint/src -fpermissive -Wall -g -fvisibility=hidden -fvisibility-inlines-hidden -std=gnu++11 -o CMakeFiles/fpcalc.dir/fpcalc.cpp.o -c /home/john/src/chromaprint/src/cmd/fpcalc.cpp
    In file included from /home/john/src/chromaprint/src/cmd/fpcalc.cpp:7:
    /home/john/src/chromaprint/src/audio/ffmpeg_audio_reader.h: In constructor ‘chromaprint::FFmpegAudioReader::FFmpegAudioReader()’:
    /home/john/src/chromaprint/src/audio/ffmpeg_audio_reader.h:102:26: warning: ‘void av_init_packet(AVPacket*)’ is deprecated [-Wdeprecated-declarations]
      102 |  av_init_packet(&m_packet);
          |                          ^
    In file included from /usr/local/include/libavcodec/avcodec.h:45,
                     from /home/john/src/chromaprint/src/audio/ffmpeg_audio_reader.h:18,
                     from /home/john/src/chromaprint/src/cmd/fpcalc.cpp:7:
    /usr/local/include/libavcodec/packet.h:506:6: note: declared here
      506 | void av_init_packet(AVPacket *pkt);
          |      ^~~~~~~~~~~~~~
    In file included from /home/john/src/chromaprint/src/cmd/fpcalc.cpp:7:
    /home/john/src/chromaprint/src/audio/ffmpeg_audio_reader.h: In member function ‘bool chromaprint::FFmpegAudioReader::SetInputFormat(const char*)’:
    /home/john/src/chromaprint/src/audio/ffmpeg_audio_reader.h:117:36: warning: invalid conversion from ‘const AVInputFormat*’ to ‘AVInputFormat*’ [-fpermissive]
      117 |  m_input_fmt = av_find_input_format(name);
          |                ~~~~~~~~~~~~~~~~~~~~^~~~~~
          |                                    |
          |                                    const AVInputFormat*
    /home/john/src/chromaprint/src/audio/ffmpeg_audio_reader.h: In member function ‘bool chromaprint::FFmpegAudioReader::Open(const string&)’:
    /home/john/src/chromaprint/src/audio/ffmpeg_audio_reader.h:138:29: warning: ‘void av_init_packet(AVPacket*)’ is deprecated [-Wdeprecated-declarations]
      138 |     av_init_packet(&m_packet);
          |                             ^
    In file included from /usr/local/include/libavcodec/avcodec.h:45,
                     from /home/john/src/chromaprint/src/audio/ffmpeg_audio_reader.h:18,
                     from /home/john/src/chromaprint/src/cmd/fpcalc.cpp:7:
    /usr/local/include/libavcodec/packet.h:506:6: note: declared here
      506 | void av_init_packet(AVPacket *pkt);
          |      ^~~~~~~~~~~~~~
    In file included from /home/john/src/chromaprint/src/cmd/fpcalc.cpp:7:
    /home/john/src/chromaprint/src/audio/ffmpeg_audio_reader.h:157:70: warning: invalid conversion from ‘AVCodec**’ to ‘const AVCodec**’ [-fpermissive]
      157 |  ret = av_find_best_stream(m_format_ctx, AVMEDIA_TYPE_AUDIO, -1, -1, &codec, 0);
          |                                                                      ^~~~~~
          |                                                                      |
          |                                                                      AVCodec**
    In file included from /home/john/src/chromaprint/src/audio/ffmpeg_audio_reader.h:19,
                     from /home/john/src/chromaprint/src/cmd/fpcalc.cpp:7:
    /usr/local/include/libavformat/avformat.h:2162:41: note:   initializing argument 5 of ‘int av_find_best_stream(AVFormatContext*, AVMediaType, int, int, const AVCodec**, int)’
     2162 |                         const AVCodec **decoder_ret,
          |                         ~~~~~~~~~~~~~~~~^~~~~~~~~~~
    In file included from /home/john/src/chromaprint/src/cmd/fpcalc.cpp:7:
    /home/john/src/chromaprint/src/audio/ffmpeg_audio_reader.h:164:55: error: ‘AVStream’ {aka ‘struct AVStream’} has no member named ‘codec’
      164 |  m_codec_ctx = m_format_ctx->streams[m_stream_index]->codec;
          |                                                       ^~~~~
    In file included from /home/john/src/chromaprint/src/cmd/fpcalc.cpp:7:
    /home/john/src/chromaprint/src/audio/ffmpeg_audio_reader.h: In member function ‘bool chromaprint::FFmpegAudioReader::Read(const int16_t**, size_t*)’:
    /home/john/src/chromaprint/src/audio/ffmpeg_audio_reader.h:259:28: warning: ‘void av_init_packet(AVPacket*)’ is deprecated [-Wdeprecated-declarations]
      259 |    av_init_packet(&m_packet);
          |                            ^
    In file included from /usr/local/include/libavcodec/avcodec.h:45,
                     from /home/john/src/chromaprint/src/audio/ffmpeg_audio_reader.h:18,
                     from /home/john/src/chromaprint/src/cmd/fpcalc.cpp:7:
    /usr/local/include/libavcodec/packet.h:506:6: note: declared here
      506 | void av_init_packet(AVPacket *pkt);
          |      ^~~~~~~~~~~~~~
    In file included from /home/john/src/chromaprint/src/cmd/fpcalc.cpp:7:
    /home/john/src/chromaprint/src/audio/ffmpeg_audio_reader.h:281:9: error: ‘avcodec_decode_audio4’ was not declared in this scope; did you mean ‘avcodec_decode_subtitle2’?
      281 |   ret = avcodec_decode_audio4(m_codec_ctx, m_frame, &m_got_frame, &m_packet);
          |         ^~~~~~~~~~~~~~~~~~~~~
          |         avcodec_decode_subtitle2
    make[2]: *** [src/cmd/CMakeFiles/fpcalc.dir/build.make:85: src/cmd/CMakeFiles/fpcalc.dir/fpcalc.cpp.o] Error 1
    make[2]: Leaving directory '/home/john/src/chromaprint'
    make[1]: *** [CMakeFiles/Makefile2:248: src/cmd/CMakeFiles/fpcalc.dir/all] Error 2
    make[1]: Leaving directory '/home/john/src/chromaprint'
    make: *** [Makefile:152: all] Error 2
    
    opened by Warblefly 4
  • fpcalc canot be notarized on MacOS because uses an SDK older than the 10.9 SDK

    fpcalc canot be notarized on MacOS because uses an SDK older than the 10.9 SDK

    Apple tightened the restrictions on notarization on Feb 5th 2020 and this includes not being able to notarize any executable built against and SDK earlier then 10.9 - https://developer.apple.com/documentation/xcode/notarizing_macos_software_before_distribution/resolving_common_notarization_issues

    The latest version of fpcalc (1.4.3) fails with this error

    Below see output of failed notarization attempt with SongKong bundle due to the fpcalc executable, (if this is removed from the bundle then notarize passes).

    { "logFormatVersion": 1, "jobId": "8ce78f08-9981-4b89-b653-1fba82c9a8d2", "status": "Invalid", "statusSummary": "Archive contains critical validation errors", "statusCode": 4000, "archiveFilename": "songkong-osx.dmg", "uploadDate": "2020-04-14T10:41:21Z", "sha256": "dfbd6cc6933e1a017978870512ccfb306b847c22563b84cd20c2120fe2043e9f", "ticketContents": null, "issues": [ { "severity": "error", "code": null, "path": "songkong-osx.dmg/SongKong.app/Contents/MacOS/fpcalc", "message": "The binary uses an SDK older than the 10.9 SDK.", "docUrl": null, "architecture": "x86_64" } ] }

    Could you please rebuild and release fpcalc against later MacOS

    opened by ijabz 4
  • Does Chromaprint detect

    Does Chromaprint detect "similar sounding" music recordings?

    Please resolve a question about Chromaprint.

    A developer has suggested that Chromaprint is capable of comparing a set of song recordings and determining:

    (1) That two different recordings are different renditions of the same song, and

    (2) That two different recordings of different songs "sound similar" due to acoustic similarities - presumably properties like similar tempo, similar pitch, shared musical features, similar voice / lyrics / instruments, playing technique, etc.

    The developer believes that Chromaprint has these capabilities because it incorporates "perceptual hashing," and that Chromaprint "makes some assumptions about content of the audio - that it will be a song, or some tune, etc." The developer wishes to use it to analyze the developer's own recordings over a span of several years to detect "similarities" among the recordings.

    Another developer believes that Chromaprint is limited to detecting similar (but non-identical) binary representations of identical content, such as would be useful for de-duplication - but that recordings of different songs, or of different renditions of the same song, would generate completely dissimilar fingerprints even though they "sound similar" or are perceived similarly by humans.

    Can you please comment?

    opened by sfsdfd 4
  • Add depended on libraries and C++ runtime to link to in pkg-config file

    Add depended on libraries and C++ runtime to link to in pkg-config file

    When linking statically with chromaprint the app needs to know which libraries to link with. It also needs the C++ runtime if the calling code doesn't have any C++.

    opened by robUx4 5
  • An Idea of a possible usage

    An Idea of a possible usage

    I have two sounds recorded with different cameras at the same scene, therefore they contain the same music. The first camera started recording at position 0, the second camera started recording at position 2 (e.g.). The actual sound begins at position 5, so first camera has 5 seconds silence and second camer has 3.

    I could use silence detection, but this may be not accurate.

    Would chromaprint be able to generate the same fingerprint from the two recordings if I shift them manually to the correct position and would it generate a different fingerprint if they are not shifted?

    So I could use it for automatic audio alignment.

    Best & good job.

    opened by WindowsNT 0
  • Building v1.5.1, test fails

    Building v1.5.1, test fails

    Hello,

    While building version 1.5.1 from source, one of the tests fails:

    Make command:

    cmake \
          -DCMAKE_BUILD_TYPE=Release \
          -DBUILD_TOOLS=ON \
          -DBUILD_TESTS=ON \
          -DGTEST_SOURCE_DIR=/src/googletest/googletest \
          -DGTEST_INCLUDE_DIR=/src/googletest/googletest/include
    

    Failing test:

    [----------] 1 test from FFmpegAudioReaderTest
    [ RUN      ] FFmpegAudioReaderTest.ReadRaw
    /src/chromaprint/src/audio/ffmpeg_audio_reader_test.cpp:11: Failure
    Value of: reader.SetInputFormat("s16le")
      Actual: false
    Expected: true
    [  FAILED  ] FFmpegAudioReaderTest.ReadRaw (0 ms)
    [----------] 1 test from FFmpegAudioReaderTest (0 ms total)
    

    Building using Ubuntu 18.04.

    Please let me know if you need any more information, thanks.

    opened by mikenye 0
  • cmake: Fix pkgconfig variables for mingw

    cmake: Fix pkgconfig variables for mingw

    This fixes Libs and Cflags variables in pkgconfig file for mingw. pkgconf can not relocate path if it starts with prefix. By using already defined libdir and includedir, the issue can be solved.

    opened by Biswa96 0
  • How to map the index of the fingerprint to the timestamp without the original audio duration?

    How to map the index of the fingerprint to the timestamp without the original audio duration?

    How to map the index of the fingerprint to the timestamp? Note that, In my case, I can't get the original audio duration.

    Is there a mapping formula? I found the length of the fingerprint and that of the audio are not linear.

    opened by mathfinder 0
Releases(v1.5.1)
Owner
AcoustID
AcoustID
An assortment of commonly used algorithms and data structures implemented with C++.

Algorithms-And-Data-Structures This repo contains C++ implementations of common algorithms and data structures, grouped by topics. The list will be sp

Tony Sheng 23 Nov 9, 2021
A collection of multiple types of lists used during pentesting, collected in one place. List types include usernames, passwords, combos, wordlist and may more..

Access list is a collection of multiple types of lists used during pentesting, collected in one place, created by Undercode This list include a collec

UNDERCODE UTILITIES 10 Nov 21, 2022
A tree-sitter grammar for HCL (HashiCorp Configuration Language), used by projects such as Terraform.

tree-sitter-hcl tree-sitter grammar for HCL (HashiCorp Configuration Language) files. HCL is the configuration format used by projects such as Terrafo

Mitchell Hashimoto 65 Nov 29, 2022
Va1 is a simple character converter. It converts characters into nums, might be used in encryption protocols or as independent algorithm.

Va1 What is it? Va1 is a simple character converter. It converts characters into nums, might be used in encryption protocols or as independent algorit

Mr.Red 1 Dec 22, 2021
A lightweight library of Behavior Trees Library in C++.

A lightweight behavior tree library in C++. NEWS! ?? Thanks to Davide Faconti there is now a more sophisticated version of the library. The new versio

Michele Colledanchise 168 Dec 21, 2022
A library of generic data structures.

Collections-C A library of generic data structures including a list, array, hashtable, deque etc.. Examples Building and Installing Using the library

Srđan Panić 2.5k Jan 8, 2023
A simple C library for working with KD-Trees

kdtree Overview kdtree is a simple, easy to use C library for working with kd-trees. Kd-trees are an extension of binary search trees to k-dimensional

John Tsiombikas 348 Dec 28, 2022
Library of generic and type safe containers in pure C language (C99 or C11) for a wide collection of container (comparable to the C++ STL).

M*LIB: Generic type-safe Container Library for C language Overview M*LIB (M star lib) is a C library enabling to use generic and type safe container i

PpHd 571 Jan 5, 2023
Linear Linked List Library

list.h Implementations for singly-linked and doubly-linked list functions. Basic Working Example #include <stdio.h> #include <stdlib.h> #include "list

Nick Bulischeck 46 Dec 28, 2022
C header library for typed lists (using macros and "template" C).

vector.h C header library for typed lists (using macros and "template" C). Essentially, this is a resizable array of elements of your choosing that is

Christopher Swenson 33 Dec 19, 2022
Directed Acyclic Graph Execution Engine (DAGEE) is a C++ library that enables programmers to express computation and data movement, as task graphs that are scheduled concurrently and asynchronously on both CPUs and GPUs.

Directed Acyclic Graph Execution Engine (DAGEE) is a C++ library that enables programmers to express computation and data movement, as tasks in a graph structure, where edges represent task dependencies

null 28 Dec 18, 2022
nanoplan is a header-only C++11 library for search-based robot planning.

nanoplan is a header-only C++11 library for search-based robot planning. The primary design goals are correctness, ease-of-use, and efficiency (in tha

Jordan Ford 14 May 17, 2022
libsais is a library for linear time suffix array and burrows wheeler transform construction based on induced sorting algorithm.

libsais libsais is a library for fast (see Benchmarks below) linear time suffix array and Burrows-Wheeler transform construction based on induced sort

Ilya Grebnov 112 Dec 22, 2022
An open source library for C

Eric O Meehan C Library Introduction Eric O Meehan's C Library is an open source collection of tools for the C programming language. The project is in

Eric O Meehan 115 Dec 11, 2022
Wonderful library with lots of useful functions, algorithms and data structures in C, link it with -l9wada

Lib9wada Wonderful library with lots of useful functions, algorithms and data structures in C, link it with -l9wada Usage Compile the library with mak

Lprogrammers Lm9awdine 53 Nov 21, 2022
Experimental managed C-strings library

Stricks Managed C strings library. ?? API Why ? Because handling C strings is tedious and error-prone. Appending while keeping track of length, null-t

Francois Alcover 88 Oct 10, 2022
Wonderful library with lots of useful functions, algorithms and data structures in C, link it with -l9wada

LibC+ Wonderful library with lots of useful functions, algorithms and data structures in C, link it with -lC+ Better than C, not as much as c++ Usage

BnademOverflow 53 Nov 21, 2022
Simple C++ Genetic Algorithm library

crsGA: Simple C++ Genetic Algorithm library crsGA is a simple C++ template library for developing genetic algorithms, plus some other utilities (Logge

Rafael Gaitán 6 Apr 24, 2022
A library of type safe sets over fixed size collections of types or values, including methods for accessing, modifying, visiting and iterating over those.

cpp_enum_set A library of type safe sets over fixed size collections of types or values, including methods for accessing, modifying, visiting and iter

Carl Dehlin 22 Jun 16, 2022