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. |
|
|
Thread Tools | Search this Thread | Display Modes |
1st March 2006, 17:50 | #101 | Link |
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 6,915
|
No progress. I make many test, but there are unpredictable peaks in sudden volume changes and are clipped with normaliced curves.
After a DRC film standard (with a theoretic max output -20 dB) is sure amplify +10 dB, but some sources go to 0 dB and others remains at -10 dB or less. For ac3 decode, this problem (Normalize don't work after a DRC based in Sox filter), and don't now Dialog Normalization and DRC recommended in ac3 stream, make unusable this function. If we need DRC decoding ac3 we can use ffdshow (with DirectShowSource). The output is equivalent to BeSweet-azid settings: -azid( -n1 -c normal) After we can use Normalize without problems. |
1st March 2006, 17:52 | #102 | Link |
BeHappy/MeGUI developer
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
|
@tebasuna51
brrr... seems like i realy misunderstood... maybe i need to read theoretical materials? or i need step-by step explanation in easy english
__________________
BeHappy - AviSynth-based audio transcoding tool Audio encoding via AviSynth On2 VP7 is great in quality but it is unusable for long-term video backup puposes! Sincerely Yours, MCPD/MCTS |
1st March 2006, 18:10 | #103 | Link | |
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 6,915
|
Quote:
|
|
1st March 2006, 18:15 | #104 | Link | |
BeHappy/MeGUI developer
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
|
Quote:
Can you comment this post: http://forum.doom9.org/showthread.ph...680#post792680
__________________
BeHappy - AviSynth-based audio transcoding tool Audio encoding via AviSynth On2 VP7 is great in quality but it is unusable for long-term video backup puposes! Sincerely Yours, MCPD/MCTS |
|
1st March 2006, 19:15 | #105 | Link | |
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 6,915
|
Quote:
"This transformation will increase volume for low-volume samples and keep volume untoched for hi-value samples." is not exact, can be: Low-volume increased, certain mid-range untouched and hi-volume decreased. The Dolby defined curves are these. These curves are implemented in my initial post and can be used. But there are problems: - The mid-range untouched is defined by Dialog Normalization in ac3 header: the input audio (x-axis) must be attenuated before by 31 - (DialNorm) dB. For instance if DialNorm = -27 dB we need apply a Amplify(-4 dB) before use the appropriate curve. - We don't know the appropriate curve. In ac3 stream each audio block have the needed amplify (+ or -) or donīt have nothing because this audio stream don't need DRC (option None in encoder). - The theoretic max output is -20 dB (10% maxint, music & film standard), too low for standard audio equipments. And Normalize don't work after compand Sox function. My first attempt to do "normalized" curves is similar to your curve: 100% (0 dB) input -> 100% output, "untouched for hi-value samples". Then I get another problem: "unpredictable peaks in sudden volume changes are clipped with normaliced curves". To explain this problem a need a image. Maybe in other post. Last edited by tebasuna51; 1st March 2006 at 19:19. |
|
1st March 2006, 19:24 | #106 | Link | |||
BeHappy/MeGUI developer
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
|
Quote:
Quote:
Quote:
__________________
BeHappy - AviSynth-based audio transcoding tool Audio encoding via AviSynth On2 VP7 is great in quality but it is unusable for long-term video backup puposes! Sincerely Yours, MCPD/MCTS |
|||
1st March 2006, 19:37 | #107 | Link | |
BeHappy/MeGUI developer
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
|
Quote:
__________________
BeHappy - AviSynth-based audio transcoding tool Audio encoding via AviSynth On2 VP7 is great in quality but it is unusable for long-term video backup puposes! Sincerely Yours, MCPD/MCTS |
|
1st March 2006, 20:18 | #108 | Link | |
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 6,915
|
Quote:
Imagine you have the dialog at -10 dB and apply the curve directly (20:1 near horizontal line), then the dialog are distorted. If you apply before -21 dB the dialog go to linear part and is not distorted (output at -31 dB). Well, I don't like this obsolete Dolby system based in normalize the audio dialog at -31 dB, but ... work so. The goal is maintain constant the volume across any source, but don't work because cheap audio equipment don't support this wide dynamic range and other sources (mp3, CD Audio, commercials in TV, ...) works with narrow dynamic range near the 0 dB. |
|
1st March 2006, 20:22 | #109 | Link | |
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 6,915
|
Quote:
"After a DRC film standard (with a theoretic max output -20 dB) is sure amplify +10 dB, but some sources go to 0 dB and others remains at -10 dB or less." This is the peaks problem, be patient. |
|
1st March 2006, 21:30 | #110 | Link | |
BeHappy/MeGUI developer
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
|
Quote:
Code:
Normalize() DrcFilmStandard()
__________________
BeHappy - AviSynth-based audio transcoding tool Audio encoding via AviSynth On2 VP7 is great in quality but it is unusable for long-term video backup puposes! Sincerely Yours, MCPD/MCTS |
|
2nd March 2006, 08:05 | #112 | Link |
BeHappy/MeGUI developer
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
|
@tebasuna51
ok, i realize the problem, seems like i need to perform modification of NicAc3Source in order to implement build-in DRC control... Shit, I hate C/C++ and I have not enought knowledge about AC3... Will You help me with theory/math ? Edit: Will try to asc Nic first: http://forum.doom9.org/showthread.php?t=108066
__________________
BeHappy - AviSynth-based audio transcoding tool Audio encoding via AviSynth On2 VP7 is great in quality but it is unusable for long-term video backup puposes! Sincerely Yours, MCPD/MCTS Last edited by dimzon; 2nd March 2006 at 10:01. |
2nd March 2006, 13:48 | #113 | Link | |
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 6,915
|
Quote:
Maybe is easy modify NicAudio.dll: From a52dec-0.7.4/doc/liba52.txt Code:
Dynamic range compression ------------------------- void a52_dynrng (a52_state_t * state, sample_t (* call) (sample_t, void *), void * data); This function is purely optional. If you dont call it, liba52 will provide the default behaviour, which is to apply the full dynamic range compression as specified in the A/52 stream. This basically makes the loud sounds softer, and the soft sounds louder, so you can more easily listen to the stream in a noisy environment without disturbing anyone. If you do call this function and set a NULL callback, this will totally disable the dynamic range compression and provide a playback more adapted to a movie theater or a listening room. If you call this function and specify a callback function, this callback might be called up to once for each block, with two arguments: the compression factor 'c' recommended by the bitstream, and the private data pointer you specified in a52_dynrng(). The callback will then return the amount of compression to actually use - typically pow(c,x) where x is somewhere between 0 and 1. More elaborate compression functions might want to use a different value for 'x' depending wether c>1 or c<1 - or even something more complex if this is what you want. Code:
bool m2AudioAC3Source::DecodeFrame() { ... // Dynamic range compression a52_dynrng(State, 0, 0); For test pourpose, only if you comment the a52_dynrng line and compile NicAudio.dll, I can test if default DRC from liba52 works ok. After we can add a new parameter to NicAc3Source call, like DRC true/false and use: if (!DRC) { a52_dynrng(State, 0, 0) }; |
|
2nd March 2006, 14:10 | #114 | Link |
BeHappy/MeGUI developer
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
|
__________________
BeHappy - AviSynth-based audio transcoding tool Audio encoding via AviSynth On2 VP7 is great in quality but it is unusable for long-term video backup puposes! Sincerely Yours, MCPD/MCTS |
2nd March 2006, 14:41 | #115 | Link |
BeHappy/MeGUI developer
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
|
btw
now I have perfect sample how to write AviSynth input audio plugins... Maybe I can join yet another MPASource into nicaudio and even add somethig like faadSource
__________________
BeHappy - AviSynth-based audio transcoding tool Audio encoding via AviSynth On2 VP7 is great in quality but it is unusable for long-term video backup puposes! Sincerely Yours, MCPD/MCTS |
2nd March 2006, 16:59 | #117 | Link |
BeHappy/MeGUI developer
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
|
btw
there are Code:
// Dynamic range compression dts_dynrng(State, 0, 0); what does you know about DRC for DTS ?
__________________
BeHappy - AviSynth-based audio transcoding tool Audio encoding via AviSynth On2 VP7 is great in quality but it is unusable for long-term video backup puposes! Sincerely Yours, MCPD/MCTS |
2nd March 2006, 17:56 | #118 | Link | |
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 6,915
|
Quote:
First test with new NicAc3Source: the DRC info in ac3 stream is applied, now work exactly like BeSweet -azid( -c normal ) Seems OK. |
|
2nd March 2006, 19:23 | #119 | Link | ||
BeHappy/MeGUI developer
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
|
Quote:
Quote:
__________________
BeHappy - AviSynth-based audio transcoding tool Audio encoding via AviSynth On2 VP7 is great in quality but it is unusable for long-term video backup puposes! Sincerely Yours, MCPD/MCTS |
||
2nd March 2006, 21:26 | #120 | Link | |
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 6,915
|
Quote:
"If you call this function and specify a callback function, this callback might be called up to once for each block, with two arguments ..." But I think is not necesary, now work like ffdshow, Cyberlink PowerDVD 6, ... |
|
Tags |
behappy |
|
|