Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Audio encoding
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 13th February 2017, 16:05   #121  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,079
The only time when this option can possibly make a difference is when the input is a WAV file which has extra data chunks (like a cover artwork) AFTER the main WAV data. WAV files which have been created as intermediate temporary WAV files (or WAV streams when using a pipe) will never have these extra chunks after the WAV data, so the "ignorelength" parameter will not make any difference in this case.

Cheers
manolito
manolito is offline   Reply With Quote
Old 14th February 2017, 18:06   #122  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,829
Maybe a mod can split this off into a new thread if it's in the way here, but because I didn't know the hack was a hack until very recently, I played around a little more.

From a GUI perspective again, where the audio is always decoded by the GUI, a couple of encoders seem to assume "ignore length" for stdin and don't have an "ignore length" option (that I could find). They were LAME and MusePack. I'm not sure about the latter but for LAME stdin seems to assume the hack unless you specifically tell it the input is raw.
FFmpeg's "ignore length" probably fits into the above category too, simply because it's not well documented.

For the encoders with an "ignore length" option, many still seem to apply the same rule for stdin. The following encoders produced output files with the correct number of samples either way. FDKAAC, FFmpeg, FhGAC, Flac, Ogg, Opus, QAAC, WMAEncode.
The only anomaly I found there was the Flac file size was slightly larger without it's version of "ignore length" in the command line, yet according to foobar2000 the bitrate, sample count, and audio md5 were the same.

The encoders that failed without it were Aften, ffdcaenc, NeroAAC, and WavPack.
Fortunately though, encoders either exited with an error or they encoded normally, there seemed to be no middle ground, so from that perspective it's a good thing.

Not being able to encode with Nero if I used stdin without "ignore length" (a temporary input wave file worked fine) I tried with Audacity to see what would happen, but I must have been using the wrong incantation, because the progress meter would get to the halfway point each time and Audacity would stop responding, but I'm quite interested to learn why NeroAAC just exits with an error for foobar2000 if I use stdin without "ignore length", if it'll encode for Audacity, however I need to find out why it's not working at all first (I had an older Audacity installed so I upgraded to the latest but the result was the same).

The command line for Audacity I'm using:
"C:\Program Files\foobar2000\encoders\neroAacEnc.exe" -q 0.40 -ignorelength -if - -of %f

Last edited by hello_hello; 14th February 2017 at 18:11.
hello_hello is offline   Reply With Quote
Old 19th February 2017, 20:57   #123  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
FWIW, here is a new Test version with Python bindings included:
https://sourceforge.net/projects/mul...L.zip/download
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 14th April 2017 at 21:17.
LoRd_MuldeR is offline   Reply With Quote
Old 14th April 2017, 21:07   #124  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Dynamic Audio Normalizer v2.10
https://github.com/lordmulder/Dynami...eases/tag/2.10
https://www.mediafire.com/folder/flr...dio_Normalizer
https://bitbucket.org/muldersoft/dyn...izer/downloads

Quote:
Changelog:
• Core library: Added process() function, i.e. an "out-of-place" version of processInplace()
• Implemented Python API → Dynamic Audio Normalizer can be used in, e .g., Python-based applications
• CLI front-end: Added new CLI option -t to explicitly specify the desired output format
• CLI front-end: Added new CLI option -d to explicitly specify the desired input library
• CLI front-end: Added support for decoding input files via libmpg123 library
• CLI front-end: Implemented automatic/heuristic selection of the suitable input library
• CLI front-end: Properly handle input files that provide more (or less) samples than what was projected
• Windows binaries: Updated the included libsndfile version to 1.0.27 (2016-06-19)
• Windows binaries: Updated build environment to Visual Studio 2015 (MSVC 14.0)
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊
LoRd_MuldeR is offline   Reply With Quote
Old 12th June 2017, 04:37   #125  |  Link
kolamorx
Registered User
 
Join Date: Jun 2017
Posts: 47
Hello.
I've been experimenting with FFmpeg's dynaudnorm filter recently (on movies), and the results are good.
However, the loud parts (music, effects) are sometimes slightly louder than the quiet parts (dialogue).
My goal is to get a completely constant volume, with no need to raise and lower the volume at all.
What options and settings should I use in order to achieve this goal?
kolamorx is offline   Reply With Quote
Old 12th June 2017, 15:51   #126  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Quote:
Originally Posted by kolamorx View Post
Hello.
I've been experimenting with FFmpeg's dynaudnorm filter recently (on movies), and the results are good.
However, the loud parts (music, effects) are sometimes slightly louder than the quiet parts (dialogue).
My goal is to get a completely constant volume, with no need to raise and lower the volume at all.
What options and settings should I use in order to achieve this goal?
First of all, it is possible that the "quiet" part is so quiet, compared to the "loud" parts, that the maximum gain factor (default: 10×) doesn't suffice to bring it up to the same volume. So you can try increasing the maximum gain factor.

Secondly, it is possible that the "quiet" part is shortly after a "loud" part and the filter takes a moment to adapt. Keep in mind that the filter adapts slowly and smoothly, in order to avoid nasty "volume pumping" effect. Anyway, you can try using a smaller Gaussian filter window size (default: 31) to make the filter adapter faster.

Finally, it is possible that the "quiet" part simply has more dynamics compared to the "loud" part. What it means is that the "quiet" part contains a few signal peaks that prevent it from being amplified even further (without clipping), even though the average amplitude is relatively low. In this case you can give RMS mode a try. Or you can try adding some input compression. Or both

See also:
http://muldersoft.com/docs/dyauno_re...#configuration
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 12th June 2017 at 16:04.
LoRd_MuldeR is offline   Reply With Quote
Old 13th June 2017, 04:14   #127  |  Link
kolamorx
Registered User
 
Join Date: Jun 2017
Posts: 47
Since I'm not going to check this options for every movie, what I'm looking for is the best general settings to cover these options.

Quote:
Originally Posted by LoRd_MuldeR View Post
Secondly, it is possible that the "quiet" part is shortly after a "loud" part and the filter takes a moment to adapt. Keep in mind that the filter adapts slowly and smoothly, in order to avoid nasty "volume pumping" effect. Anyway, you can try using a smaller Gaussian filter window size (default: 31) to make the filter adapter faster.
I changed it already, (g=11) and it improved the results.
Quote:
Originally Posted by LoRd_MuldeR View Post
Finally, it is possible that the "quiet" part simply has more dynamics compared to the "loud" part. What it means is that the "quiet" part contains a few signal peaks that prevent it from being amplified even further (without clipping), even though the average amplitude is relatively low. In this case you can give RMS mode a try. Or you can try adding some input compression. Or both
RMS - I haven't tried it much.
input compression - tried it already, and it causes FFmpeg to freeze right at the beginning. (I use rogerdpack version for XP.)
kolamorx is offline   Reply With Quote
Old 15th June 2017, 22:52   #128  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,829
kolamorx,
Try just reducing the frame size. For ffmpeg:

-af dynaudnorm=f=150

or even f=75 and g=11 if it doesn't result in too much "pumping".

Edit see post #133 regarding the compression option and a newer version of ffmpeg (XP friendly)

Last edited by hello_hello; 16th June 2017 at 22:31.
hello_hello is offline   Reply With Quote
Old 16th June 2017, 01:48   #129  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Quote:
Originally Posted by kolamorx View Post
input compression - tried it already, and it causes FFmpeg to freeze right at the beginning. (I use rogerdpack version for XP.)
FFmpeg actually doesn't use my "original" code/library, but they re-implemented everything.

So, if you get "freeze" with FFmpeg and DynAudNorm when input compression is enabled, I suggest you try it with the "standalone" version of DynAudNorm:
https://github.com/lordmulder/Dynami...eleases/latest

If you can re-produce the "freeze" with that, please send my a sample file and your exact options. Otherwise, please send a bug-report to the FFmpeg developers.
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 16th June 2017 at 02:30.
LoRd_MuldeR is offline   Reply With Quote
Old 16th June 2017, 11:53   #130  |  Link
hydra3333
Registered User
 
Join Date: Oct 2009
Location: crow-land
Posts: 540
Quote:
Originally Posted by LoRd_MuldeR View Post
FFmpeg actually doesn't use my "original" code/library, but they re-implemented everything.
<snip>
... Otherwise, please send a bug-report to the FFmpeg developers.
Goodness me.
How to they deal with updates you may produce from time to time ?
hydra3333 is offline   Reply With Quote
Old 16th June 2017, 12:28   #131  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
Quote:
Originally Posted by hello_hello View Post
kolamorx,
Try just reducing the frame size. For ffmpeg:

-af dynaudnorm=f=150

or even f=75 and g=11 if it doesn't result in too much "pumping".
Does anybody know where I can find the documentation for this?

edit:

To answer my own question after going through the thread: https://ffmpeg.org/ffmpeg-filters.html#dynaudnorm

Last edited by stax76; 16th June 2017 at 13:43.
stax76 is offline   Reply With Quote
Old 16th June 2017, 12:52   #132  |  Link
richardpl
Registered User
 
Join Date: Jan 2012
Posts: 271
Quote:
Originally Posted by hydra3333 View Post
Goodness me.
How to they deal with updates you may produce from time to time ?
There had be no updates to core for very long time. And relevant changes are committed when they appear.
richardpl is offline   Reply With Quote
Old 16th June 2017, 22:30   #133  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,829
Quote:
Originally Posted by kolamorx View Post
RMS - I haven't tried it much.
input compression - tried it already, and it causes FFmpeg to freeze right at the beginning. (I use rogerdpack version for XP.)
As I don't normally use the compression option I didn't remember straight away, but I now recall someone at VideoHelp mentioning the same problem.
I tested with the following ffmpeg command line myself and it works fine using this version of ffmpeg, which is probably more recent than the version you're using and it runs on XP.

-af dynaudnorm=f=75:g=11:s=12
hello_hello is offline   Reply With Quote
Old 17th June 2017, 10:11   #134  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,079
If you have trouble getting the desired results with DynAudNorm you can try the "Loudnorm" filter which comes with current versions of FFmpeg, Muxson wrote a nicle little GUI for it:
http://www.muxson.com/winloud


Cheers
manolito
manolito is offline   Reply With Quote
Old 17th June 2017, 21:07   #135  |  Link
kolamorx
Registered User
 
Join Date: Jun 2017
Posts: 47
Quote:
Originally Posted by hello_hello View Post
I tested with the following ffmpeg command line myself and it works fine using this version of ffmpeg, which is probably more recent than the version you're using and it runs on XP.

-af dynaudnorm=f=75:g=11:s=12
Thanks.
Any other suggestions for general settings?
kolamorx is offline   Reply With Quote
Old 23rd June 2017, 04:20   #136  |  Link
v0lt
Registered User
 
Join Date: Dec 2008
Posts: 1,970
@LoRd_MuldeR
I have a sound in float format, in which the range is higher than [-1.0, +1.0]. DynamicAudioNormalizer (FFmpeg implementation) can reduce the sound level to [-1.0, +1.0]?

Last edited by v0lt; 23rd June 2017 at 04:23.
v0lt is offline   Reply With Quote
Old 23rd June 2017, 15:16   #137  |  Link
richardpl
Registered User
 
Join Date: Jan 2012
Posts: 271
Quote:
Originally Posted by v0lt View Post
@LoRd_MuldeR
I have a sound in float format, in which the range is higher than [-1.0, +1.0]. DynamicAudioNormalizer (FFmpeg implementation) can reduce the sound level to [-1.0, +1.0]?
See alimiter filter documentation.
richardpl is offline   Reply With Quote
Old 23rd June 2017, 19:24   #138  |  Link
raffriff42
Retried Guesser
 
raffriff42's Avatar
 
Join Date: Jun 2012
Posts: 1,373
From the ffmpeg source, it looks like all audio filtering is done at double-precision floating point, with nominal +1/-1 range - but no clipping outside that range. FFmpeg dynaudnorm default peak volume is 0.95 (-0.4 dB on a +1/-1 scale). It looks to me like it'll normalize any input range without problems; you'll have to try it for yourself though.
raffriff42 is offline   Reply With Quote
Old 29th July 2017, 20:12   #139  |  Link
kolamorx
Registered User
 
Join Date: Jun 2017
Posts: 47
Quote:
Originally Posted by LoRd_MuldeR View Post
First of all, it is possible that the "quiet" part is so quiet, compared to the "loud" parts, that the maximum gain factor (default: 10×) doesn't suffice to bring it up to the same volume. So you can try increasing the maximum gain factor.
In some movies, the dialogue is so quiet that even a maximum gain factor of 100× (20 dB) doesn't suffice.
What should I do in this case?

Last edited by kolamorx; 29th July 2017 at 20:19.
kolamorx is offline   Reply With Quote
Old 29th July 2017, 21:15   #140  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Quote:
Originally Posted by kolamorx View Post
In some movies, the dialogue is so quiet that even a maximum gain factor of 100× (20 dB) doesn't suffice.
What should I do in this case?
If the original source was encoded in AC3/EAC3 (Dolby Digital) from, then you may try enabling the DRC (Dynamic Range Compression) feature of the AC3/EAC3 decoder already.

Apart from that, you can try the "--compress" option of the DynamicAudioNormalizer. See the manual for details...
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊
LoRd_MuldeR is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 17:48.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.