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 |
![]() |
#61 | Link |
BeHappy/MeGUI developer
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
|
@tebasuna51
Great! Unfortunally I'm not DSP expert. Why not to use Normalize() BEFORE Dynamic Range Compression?
__________________
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 |
![]() |
![]() |
![]() |
#62 | Link | |
Moderator
![]() Join Date: Feb 2005
Location: Spain
Posts: 6,778
|
Quote:
We need, also, apply attenuation over the decoder output to compensate DialNorm (if distinct of -31 dB) for input correctly in DRC curves. The solution is make alternate curves with normalized output. I'm work about this. |
|
![]() |
![]() |
![]() |
#63 | 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 |
||
![]() |
![]() |
![]() |
#64 | Link |
BeHappy/MeGUI developer
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
|
fresh beta is out
__________________
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 |
![]() |
![]() |
![]() |
#65 | Link | |
I'm Dayvon, an MP4 addict
Join Date: Dec 2005
Location: Minneapolis
Posts: 238
|
Quote:
__________________
My Gear |
|
![]() |
![]() |
![]() |
#66 | Link |
Registered User
Join Date: Jan 2006
Posts: 141
|
Made some changes to the upmix extension I posted earlier...
Removed the option to use the avisynth equilizer because it is extremely slow in execution. I added a second upix option that tries to remove most of the dialog from the left, right and surround speakers and sends it just to the center speaker. Also, inverted the LFE, attenuated and delayed the surround speakers as before. Code:
<?xml version="1.0"?> <BeHappy.Extension xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://workspaces.gotdotnet.com/behappy"> <AudioDSP UniqueID="9579E57B-2D27-4583-99A4-921718E25B41"> <Plugin> <MultiOptionDSP Type="BeHappy.Extensions.MultiOptionDSP, BeHappy"> <TitleFormatString>{0}</TitleFormatString> <ScriptPrologue> # Store clip in variable Stereo_{2} = convertaudiotofloat(last) </ScriptPrologue> <Option> <Name>Upmix with equalizer adjustments</Name> <Value> # Sox filter using frequency selection, 20ms surround delay and attenuation Front_{2} = mixaudio(Stereo_{2}.soxfilter("filter 0-600"),mixaudio(Stereo_{2}.soxfilter("filter 600-1200"),Stereo_{2}.soxfilter("filter 1200-7000"),0.45,0.25),0.50,1) Back_{2} = mixaudio(Stereo_{2}.soxfilter("filter 0-600"),mixaudio(Stereo_{2}.soxfilter("filter 600-1200"),Stereo_{2}.soxfilter("filter 1200-7000"),0.35,0.15),0.40,1) fl_{2} = GetLeftChannel(Front_{2}) fr_{2} = GetRightChannel(Front_{2}) cc_{2} = ConvertToMono(stereo_{2}).SoxFilter("filter 625-24000") lfe_{2} = ConvertToMono(stereo_{2}).SoxFilter("lowpass 100","vol -0.5") sl_{2} = GetLeftChannel(Back_{2}) sr_{2} = GetRightChannel(Back_{2}) sl_{2} = DelayAudio(sl_{2},0.02) sr_{2} = DelayAudio(sr_{2},0.02) </Value> </Option> <Option> <Name>Upmix with center channel dialog</Name> <Value> # channel subtraction with sox filter, 20ms surround delay and attenuation left_{2} = stereo_{2}.GetLeftChannel() right_{2} = stereo_{2}.GetRightChannel() fl_{2} = mixaudio(left_{2}.soxfilter("filter 0-24000"),right_{2}.soxfilter("filter 0-24000"),0.6,-0.5) fr_{2} = mixaudio(right_{2}.soxfilter("filter 0-24000"),left_{2}.soxfilter("filter 0-24000"),0.6,-0.5) cc_{2} = ConvertToMono(stereo_{2}).SoxFilter("filter 625-24000") lfe_{2} = ConvertToMono(stereo_{2}).SoxFilter("lowpass 100","vol -0.5") sl_{2} = mixaudio(left_{2}.soxfilter("filter 0-24000"),right_{2}.soxfilter("filter 0-24000"),0.5,-0.4) sr_{2} = mixaudio(right_{2}.soxfilter("filter 0-24000"),left_{2}.soxfilter("filter 0-24000"),0.5,-0.4) sl_{2} = DelayAudio(sl_{2},0.02) sr_{2} = DelayAudio(sr_{2},0.02) </Value> </Option> <ScriptEpilogue> # Return result MergeChannels( fl_{2}, fr_{2}, cc_{2}, lfe_{2}, sl_{2}, sr_{2}) ConvertAudioTo16Bit() </ScriptEpilogue> </MultiOptionDSP> </Plugin> </AudioDSP> </BeHappy.Extension> Nice dynamic range compression extension. I agree that it would be nice to be able to use negative values in tweak. @Dimzon I tried this code but it executed extremely slowly Code:
left_{2} = last.GetLeftChannel() right_{2} = last.GetRightChannel() fl_{2} = mixaudio(left_{2},right_{2},0.6,-0.5) fr_{2} = mixaudio(right_{2},left_{2},0.6,-0.5) cc_{2} = ConvertToMono(stereo_{2}).SoxFilter("filter 625-24000") lfe_{2} = ConvertToMono(stereo_{2}).SoxFilter("lowpass 100","vol -0.5") sl_{2} = mixaudio(left_{2},right_{2},0.5,-0.4) sr_{2} = mixaudio(right_{2},left_{2},0.5,-0.4) sl_{2} = DelayAudio(sl_{2},0.02) sr_{2} = DelayAudio(sr_{2},0.02) |
![]() |
![]() |
![]() |
#67 | 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 |
|
![]() |
![]() |
![]() |
#69 | Link | |
BeHappy/MeGUI developer
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
|
Quote:
By the way - since BeHappy is avisynth based software maybe we can use portion of avisynth logo in it (just proposal, feel free not to do it)
__________________
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 |
|
![]() |
![]() |
![]() |
#70 | Link | |
I'm Dayvon, an MP4 addict
Join Date: Dec 2005
Location: Minneapolis
Posts: 238
|
Quote:
![]()
__________________
My Gear |
|
![]() |
![]() |
![]() |
#71 | Link |
Moderator
![]() Join Date: Feb 2005
Location: Spain
Posts: 6,778
|
@Dimzon
I get incorrect wav output (BlockAlign incorrect) with your last release (and also incorrect aac encodes). Maybe there are a bug in Encoder.cs (now there are 2 writeHeader routines) Code:
CORRECT: private void writeHeader(Stream target ) { ... target.Write(BitConverter.GetBytes(m_wavHeader.nBlockAlign),0,2); target.Write(BitConverter.GetBytes(m_wavHeader.wBitsPerSample),0,2); ... } INCORRECT: private void writeHeader(Stream target, AviSynthClip x ) { ... target.Write(BitConverter.GetBytes(x.BitsPerSample/8),0,2); // ????? target.Write(BitConverter.GetBytes(x.BitsPerSample),0,2); ... } BUG: BlockAlign = ChannelsCount * BitsPerSample/8 |
![]() |
![]() |
![]() |
#72 | Link |
Registered User
Join Date: Jan 2002
Posts: 112
|
Sanity Check
Can someone please give me a sanity check with this scheme? I like to cut out the opening and ending credits of my TV series encodes with something like Trim(90,6000)+Trim(9000,61000) for the video. Cutting, merging, and muxing the audio is ehh okay, but I've always struggled with some synch issues.
I'd like to try avisynth processing via BeHappy to see if I can use the same Trim statements to manipulate the audio as I do with the video so maybe I can avoid or eliminate the synch issues. I set up BeHappy to do an ac3 -> aac conversion and exported the avs to look at. I was wondering if this would work. Code:
audio = DirectShowSource("audio.ac3") audio = EnsureVBRMP3Sync(audio) # Above same as BeHappy Generated: video = MPEG2Source("video.d2v") AudioDeubEx(video, audio) # Use same trim arguments as in video encoding script: Trim(90,6000)+Trim(9000,61000) AudioDubEx(Tone(), last) # Below same as BeHappy Generated: AudioDubEx(BlankClip(length=Int(1000*AudioLengthF(last)/Audiorate(last)), width=320,height=32,pixel_type="RGB24",fps=1000), last) Normalize... Encode... Kill Video again... Is this a sane way to go about this task? Thanks! |
![]() |
![]() |
![]() |
#73 | Link |
Moderator
![]() Join Date: Feb 2005
Location: Spain
Posts: 6,778
|
You don't need:
AudioDubEx(BlankClip(length=Int(1000*AudioLengthF(last)/Audiorate(last)), width=320,height=32,pixel_type="RGB24",fps=1000), last) ... Kill Video again... Because this AudioDubEx sentence is only to use Trim in ms. (fps=1000), and Trim is used before based in video fps. If you want maintain the ac3 without re-encode there are other method to trim the audio with DelayCut: You want a first segment like this: Trim(90,6000) If fps is 25 (replace 25 with your appropriate fps) you want a segment between 90/25 = 3.6 sec and 6000/25 = 240 sec. Then open DelayCut and Cut your original ac3 between Start = 3600 and End = 240000 ms. For the second segment Cut between 360000 ms (9000/25 sec) and 2440000 ms. (61000/25 sec). After join the two segments with: > copy /B first.ac3 + second.ac3 full.ac3 |
![]() |
![]() |
![]() |
#74 | 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 |
|
![]() |
![]() |
![]() |
#76 | 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 |
|
![]() |
![]() |
![]() |
#77 | Link |
BeHappy/MeGUI developer
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
|
http://forum.doom9.org/showthread.php?t=83752 - additional info about 5.1 upmix
__________________
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 |
![]() |
![]() |
![]() |
#78 | Link |
Registered User
Join Date: Dec 2005
Location: Proxima Centauri
Posts: 315
|
Hi Dimzon. I have prepared the pseudosurround DLL for ya
![]() I cannot attach it to this post, cause it is to big. Please drop me an email: programmers AT aud-x.com and I will reply and send you the attachement. (ie. the DLL, and the complete project. Maybe it will be useful) After downloading, please let me know, and I will remove it. I will be happy to answer all your questions (if you have any).
__________________
Aud-X MP3 5.1 Format |
![]() |
![]() |
![]() |
#80 | Link |
Registered User
Join Date: Oct 2004
Location: Aix en Provence
Posts: 25
|
Dimzon, thanks a lot for this awsome tool !
I can now transcode audio from multiple avi quickly. Every thing works fine. I have noticed that nero aac encode works with or without neroipp.dll without any difference. Is this dll really necessary ? |
![]() |
![]() |
![]() |
Tags |
behappy |
Thread Tools | Search this Thread |
Display Modes | |
|
|