lordmulder / DynamicAudioNormalizer

Dynamic Audio Normalizer
Other
251 stars 36 forks source link

Normalization outpus a 44bytes file #2

Closed daniel-onisoru closed 9 years ago

daniel-onisoru commented 9 years ago

I have compiled the latest version on a ubuntu machine and i have tried normalizing 2 wav files extracted from some mp4 videos using ffmpeg (ffmpeg -i raw/test.mp4 -acodec pcm_s16le -ac 2 -ar 44100 test.wav)

One of the files is normalized correctly but the second file produces a 44byte wav file.

The output says that everything is ok:

---------------------------------------------------------------------------
Dynamic Audio Normalizer, Version 2.07-3, Shared
Copyright (c) 2014 LoRd_MuldeR <mulder2@gmx.de>. Some rights reserved.
Built on Jan  8 2015 at 20:19:28 with GCC 4.8.2 for Linux-x64.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License <http://www.gnu.org/>.
Note that this program is distributed with ABSOLUTELY NO WARRANTY.
---------------------------------------------------------------------------

Using libsndfile-1.0.25, by Erik de Castro Lopo <erikd@mega-nerd.com>.

SourceFile: test.wav
OutputFile: test_n.wav

Properties: 2 channels, 44100 Hz, 16 bit/sample (Duration: 0:00:14.997)

Normalization in progress: 100.0% [*]
Finished.

--------------

Everything completed successfully :-)

Operation took 0.0 seconds.

The problematic wav file can be downloaded from: https://dl.dropboxusercontent.com/u/3200231/test.wav

lordmulder commented 9 years ago

The file is too short, i.e. shorter than the (default) window size. Of course this case should be handled gracefully, so I will try to figure out what happens and fix it.

daniel-onisoru commented 9 years ago

You are right. Specifying -f 100 solved the problem.

One other suggestion I have. Please add some options for the makefile to just compile the needed components. I had to install 1.5GB of software to compile it when I just wanted the CLI version.

Thank you.

lordmulder commented 9 years ago

Okay, I think I found what was causing this. Should be fixed in a3a5a21ae23992935774d9106291cad1d77ace06 and 17995789260418507d0400642e50cc1d9913110d.

I have also put up a new Test build here: DynamicAudioNormalizer.2015-01-07.Testbuild-2.zip


About the Makefile issue, I will try to come up with something. In the meantime, just edit the line...

BUILD_PROJECTS = $(addprefix DynamicAudioNormalizer,API CLI GUI JNI)

...so that it looks like this:

BUILD_PROJECTS = $(addprefix DynamicAudioNormalizer,API CLI)

Then it will build only the API and CLI, but neither the GUI nor the JNI wrapper.

lordmulder commented 9 years ago

I have added a new Makefile option MODE in 3cd2df0b69725a6285b72ca8e0de9d111573b32b.

You can now do make MOD=no-gui or make MOD=minimal, in order to get rid of most dependencies.

Missing Pandoc will be tolerated by the Makefile now too.

daniel-onisoru commented 9 years ago

There is something wrong with the makefile.

[root@v2 DynamicAudioNormalizer]# make MOD=minimal Makefile:57: *\ missing separator. Stop.

daniel-onisoru commented 9 years ago

The make version is causing the problem. undefine was added in make 3.82 and the latest version on Centos 6.5 is 3.81. Maybe cange it to MY_PROJECTS := '' ?

Also, is JAVA really required for the minimal mode ?

lordmulder commented 9 years ago

undefine was added in make 3.82 and the latest version on Centos 6.5 is 3.81.

Okay, so I will get rid of "undefine" in order to improve compatibility.

Also, is JAVA really required for the minimal mode ?

Well, the "problem" is that the "C side" of the JNI/JAVA interface is in the core library. And this needs the JDK header files. I want to avoid moving the JNI stuff into (yet another) separate library. But maybe we can add some define to enable/disable the JNI code, depending on whether the JDK headers are present.

lordmulder commented 9 years ago

The make version is causing the problem.
undefine was added in make 3.82 and the latest version on Centos 6.5 is 3.81.
Maybe cange it to MY_PROJECTS := '' ?
Also, is JAVA really required for the minimal mode ?

This should be fixed in c6189cc12f96e3c2f81982828fe8df5ba58c52d7 and 0f95b29a4eda42177a387e796d3b440b1bb5d19a. Please try again and report back...