View Full Version : BeHappy - AviSynth based audio transcoding tool (UPD 19-07-2006)
tebasuna51
2nd August 2009, 09:34
What bitdepth does NicAc3Source return? Does it depend on the AC3 file? What bitdepths is NicAc3Source capable of putting out?
Always 32 bit float.
If you want other you need use like last DSP (because other DSP funcitions can use also 32 bit float) a 'Convert sample to ...'
cobo
2nd August 2009, 13:26
Thanks. That's what I thought I read, but when I open an .avs with VirtualDub it says 16bit, so I thought I'd double check in case I got it wrong. I want to do the least number of conversions as SoftEncode will accept 32bit float as well.
Wilbert
3rd August 2009, 18:46
If the sample type is float, when AviSynth has to output the data, it will be converted to 16 bit, since float cannot be passed as valid AVI data.
source: http://avisynth.org/mediawiki/Internal_filters
You can circumvent that by setting
global OPT_AllowFloatAudio = True
at the start of your script.
tebasuna51
3rd August 2009, 23:39
You can circumvent that by setting
global OPT_AllowFloatAudio = True
at the start of your script.
Yes the:
global OPT_AllowFloatAudio = True
is needed if you want use Bepipe or Wavi to decode an avs audio script with 32 bit float output.
If you use the SoundOut AviSynth plugin, MeGUI or BeHappy is not needed.
With MeGUI and BeHappy is because the modified AvisynthWrapper.dll
EpheMeroN
12th September 2009, 20:49
Is there like a new build of BeHappy all inclusive with all updated plugins somewhere on here? I don't wanna hunt through all 43 pages for updates and I really miss BeHappy!!!
tebasuna51
13th September 2009, 03:00
Bass lib's, encoders like NeroAacEnc and others can't be distributed with BeHappy, you need download yourself.
In BeHappy 0.2.2.30338 there are Readme files with links.
EpheMeroN
13th September 2009, 21:10
I took the "Shon3i BeHappy package (2007-03-24) with installer and many plugins" and installed it, and then replaced the main BeHappy executable with the one from CodePlex (BeHappy r18658.rar) and every time I try to run a conversion I get errors.
Can anyone help? I used to have BeHappy working, but reinstalled Windows and can't recall what I had to do.
Here's the error output:
Starting job audio.wav->audio_04cf46ab95d148d3bcf3701639dd26ee.wav
Error: System.EntryPointNotFoundException: Unable to find an entry point named 'dimzon_avs_init_2' in DLL 'AvisynthWrapper'.
at BeHappy.AviSynthClip.dimzon_avs_init_2(IntPtr& avs, String func, String arg, AVSDLLVideoInfo& vi, AviSynthColorspace& originalColorspace, AudioSampleType& originalSampleType, String cs)
at BeHappy.AviSynthClip..ctor(String func, String arg, AviSynthColorspace forceColorspace, AviSynthScriptEnvironment env)
at BeHappy.Encoder.encode()
tebasuna51
14th September 2009, 02:24
I took the "Shon3i BeHappy package (2007-03-24) with installer and many plugins" and installed it, and then replaced the main BeHappy executable with the one from CodePlex (BeHappy r18658.rar) and every time I try to run a conversion I get errors.
Can anyone help?
Of course, you can't mix the last version with a old package.
If you preserve the old BeHappy.exe the application run, but without the last two year changes.
BeHappy is a portable package and not need a install, only AviSynth, if you want preserve your installation you need download BeHappy 0.2.2.30338 (http://behappy.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=14812#DownloadId=37805) and:
1) Replace AvisynthWrapper.dll, (the culprit of the error message)
2) Replace the files in extensions folder
3) Replace the files in encoder folder and search the last versions for:
aften.exe
flac.exe
lame.exe
neroAacEnc.exe
oggenc2.exe
(Maybe if you have MeGUI you can use the included in Tools subfolder)
4) Replace the dll in plugins folder to the AviSynth plugins folder, and search for bass*.dll (version 2.4) in http://www.un4seen.com/bass.html
tebasuna51
12th October 2009, 11:08
New BeHappy version
2009-10-12 (Tebasuna) v0.2.4.20767 (Change Set 28802)
+ Now encAacPlus need libmp4v2.dll (Winamp folder) instead MP4Box/MP4Mux to output .mp4/.m4a files.
+ Recover the low limit for CT encAacPlus to 8 Kb/s, available for mono audio, and the option to force MPEG4 AAC streams.
- Delete the obsolete option to select NeroAacEnc SSE.
+ Add info over Header option.
There are also a new full release:
BeHappy20091012 (http://behappy.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=34300#DownloadId=87266)
with last enc_aacplus, nicaudio, bassaudio and ssrc options.
elguaxo
27th December 2009, 15:56
I've just updated BeHappy and the encoders, but I have problems with encAacPlus. I got enc_aacplus.dll and libmp4v2.dll from the latest Winamp v5.571. nscrt.dll is no longer installed with winamp, so I guess it's no longer needed?
When I try to encode something with it I get this:
Starting job audio.ac3->audio.mp4
Found Audio Stream
Channels=2, BitsPerSample=16 int, SampleRate=48000Hz
encoder\enc_aacPlus.exe - "H:\audio.mp4" --rawpcm 48000 2 16 --br 96000 --he
Writing PCM data to encoder's StdIn
Error: System.IO.IOException: The pipe has been ended.
Any hints? TIA!
tebasuna51
27th December 2009, 21:26
Yes, seems Winamp v5.57 CT libraries enc_aacPlus don't work with the encoder enc_aacPlus.exe.
I always use NeroAacEnc (with new version now) but if somebody know how work with new v5.57 please put the solution
elguaxo
27th December 2009, 21:38
I always use NeroAacEnc (with new version now)
Me too! I was just curious why enc_aacPlus wasn't working.
Thanks for the quick replay. :)
b66pak
25th January 2010, 20:11
do you plan to support the new qtaacenc CLI tool?
http://tmkk.hp.infoseek.co.jp/qtaacenc/
_
P.S. a little omission in BeHappy...if you select BassAudio the .ac3 is not listed as supported extension...
_
tebasuna51
25th January 2010, 21:08
do you plan to support the new qtaacenc CLI tool?
Only work with mono/stereo audio.
You need install QuickTime 7.6.5, then I never can test this.
You can create a file qtaacenc.extension with this:
<?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">
<AudioEncoder Name="QT AAC Encoder" UniqueID="58cf5690-09e8-11df-8a39-0800200c9a66">
<Plugin>
<MultiOptionEncoder Type="BeHappy.Extensions.MultiOptionEncoder, BeHappy">
<Script>32==Audiobits(last)?ConvertAudioTo24bit(last):last</Script>
<ExecutableFileName>qtaacenc.exe</ExecutableFileName>
<TitleFormatString>QTaacEnc M4A @ {0}</TitleFormatString>
<SupportedFileExtension>m4a</SupportedFileExtension>
<Option>
<Name>cbr 192 kbps</Name>
<Value>--cbr 192 - "{0}"</Value>
</Option>
<Option>
<Name>abr 128 kbps</Name>
<Value>--abr 128 - "{0}"</Value>
</Option>
<Option>
<Name>cvbr 160 kbps</Name>
<Value>--cvbr 160 - "{0}"</Value>
</Option>
<Option>
<Name>tvbr 64</Name>
<Value>--tvbr 64 - "{0}"</Value>
</Option>
</MultiOptionEncoder>
</Plugin>
</AudioEncoder>
</BeHappy.Extension>
Put the encoder at BeHappy\encoder folder and test.
Of course you can put other bitrates.
If all is fine we can think a more complex GUI with sliders and other encoder options.
P.S. a little omission in BeHappy...if you select BassAudio the .ac3 is not listed as supported extension...
In my first test the ac3 bass decoder don't work fine, and the ac3 is supported well with NicAudio.
Maybe last bass versions work, test yourself.
Add the ac3 in the list is easy:
edit BassAudio.extension and add a new line
<SupportedFileExtension>ac3</SupportedFileExtension>
b66pak
27th January 2010, 21:11
ok...i have done some tests...here are the results...
the qtaacenc encoder accepts wav's up to 32float (mono or stereo ONLY)...
if found that is limited (an old apple flaw!!!) to maximum 186 minutes for a 32float@48000hz wav or 279 minutes for a 24bit@48000hz wav and 327 minutes for a 16bit@48000hz wav!!!
_
P.S. @tebasuna51 the extension work great...could you make one similar to nero's aacenc?
_
shon3i
27th January 2010, 21:50
P.S. @tebasuna51 the extension work great...could you make one similar to nero's aacenc?Why? it's alredy included in behappy without extension.
tebasuna51
28th January 2010, 00:58
the qtaacenc encoder accepts wav's up to 32float (mono or stereo ONLY)...
To test 32 bit (int/float) I supose you remove the line:
<Script>32==Audiobits(last)?ConvertAudioTo24bit(last):last</Script>
I put the limit based in the Foobar2000 integration image
if found that is limited (an old apple flaw!!!) to maximum 186 minutes for a 32float@48000hz wav or 279 minutes for a 24bit@48000hz wav and 327 minutes for a 16bit@48000hz wav!!!
Seems the encoder need a parameter like -ignorelength for NeroAacEnc or -readtoeof 1 for Aften.
If you use wav file input I hope you use RaWawSource instead WavSource (limited to 4GB).
P.S. @tebasuna51 the extension work great...could you make one similar to nero's aacenc?
NeroAacEnc is already supported.
If you want test any encoder with STDIN input you can create your own file.extension
You have some samples, remember only change the UUID, get a new one here: http://kruithof.xs4all.nl/uuid/uuidgen
b66pak
28th January 2010, 18:26
@tebasuna51 the extension work great...could you make one similar to nero's aacenc?
i was talking about qtaacenc extension you made...i was trying to make it look like nero's extension (with radio buttons, sliders, checkboxes, dropdown menus, a nice image) but i suppose is built in because i don't find it in the extensions folder...that is why i ask if you could make the qtaacenc extension look more like nero's extension...i hope i was clear...
yes, i removed the "ConvertAudioTo24bit" line...
the 4gb limit is on apple side of the encoder...i test it using the STDIN input by feeding a +8hrs .ac3 file with 16, 24, 32, 32float bits...
_
P.S. what can i do to make bepipe/wavi to output 32float from an .avs (ex: --script "NicAc3Source(^sample.ac3^)"
_
tebasuna51
29th January 2010, 10:56
The integrated GUI for qtaacenc need more work and a new BeHappy release. New item for my TODO list.
To pipe Bepipe/wavi you only need the the pipe command '|':
bepipe --script "NicAc3Source(^sample.ac3^)" | qtaacenc -parameters - "output.m4a"
wavi need a physical .avs file
wavi "sample.avs" - | qtaacenc -parameters - "output.m4a"
b66pak
29th January 2010, 18:29
what can i do to make bepipe/wavi to output 32float from an .avs?
here is what i mean:
input 16bit > output 16bit
F:\>bepipe --script "NicAc3Source(^F:\sample.ac3^).ConvertAudioTo16bit()" | Wavfix - sample.wav
***************************************
BePipe by dimzon
***************************************
Script used:
# BEGIN
NicAc3Source("F:\sample.ac3").ConvertAudioTo16bit()
# END
Scanning for Audio Stream...
Found Audio Stream
Channels=6, BitsPerSample=16, SampleRate=48000Hz
Writing Header...
Writing Data...
Done!
input 24bit > output 24bit
F:\>bepipe --script "NicAc3Source(^F:\sample.ac3^).ConvertAudioTo24bit()" | Wavfix - sample.wav
***************************************
BePipe by dimzon
***************************************
Script used:
# BEGIN
NicAc3Source("F:\3\sample.ac3").ConvertAudioTo24bit()
# END
Scanning for Audio Stream...
Found Audio Stream
Channels=6, BitsPerSample=24, SampleRate=48000Hz
Writing Header...
Writing Data...
Done!
input 32bit > output 32bit
F:\>bepipe --script "NicAc3Source(^F:\sample.ac3^).ConvertAudioTo32bit()" | Wavfix - sample.wav
***************************************
BePipe by dimzon
***************************************
Script used:
# BEGIN
NicAc3Source("F:\3\sample.ac3").ConvertAudioTo32bit()
# END
Scanning for Audio Stream...
Found Audio Stream
Channels=6, BitsPerSample=32, SampleRate=48000Hz
Writing Header...
Writing Data...
Done!
input 32float > output 16bit
F:\>bepipe --script "NicAc3Source(^F:\sample.ac3^).ConvertAudioToFloat()" | Wavfix - sample.wav
***************************************
BePipe by dimzon
***************************************
Script used:
# BEGIN
NicAc3Source("F:\sample.ac3").ConvertAudioToFloat()
# END
Scanning for Audio Stream...
Found Audio Stream
Channels=6, BitsPerSample=16, SampleRate=48000Hz
Writing Header...
Writing Data...
Done!
_
tebasuna51
30th January 2010, 16:42
Sorry I don't see the float32 requirement.
In AviSynth you need enable the float output, default is False, with:
global OPT_AllowFloatAudio=True
Then we need make a physical sample.avs with:
global OPT_AllowFloatAudio=True
NicAc3Source("F:\sample.ac3")
Here you don't need ConvertAudioToFloat() because the NicAc3Source is already 32 float.
Now you can use Bepipe with:
bepipe --script "Import(^F:\sample.avs^)" | Wavfix - sample.wav
If you use BeHappy (or MeGUI) the global OPT_AllowFloatAudio=True isn't needed because the special AvisynthWrapper.dll
b66pak
30th January 2010, 18:24
global OPT_AllowFloatAudio=True
i did not know that...thanks a lot...
another problem is with rawavsource and 32float wav/dat/raw...
here is BeHappy's generated .avs:
########################################
#Created by BeHappy v0.2.4.20767
#Creation timestamp: 1/30/2010 7:17:06 PM
########################################
#Source FileName:E:\_audio.dat
#Target FileName:E:\_audio.wav
########################################
########################################
# [Source: RaWav 48000Hz, 32float, 6ch]
########################################
RaWavSource("E:\_audio.dat", 48000, 0, 6)
########################################
# [Encoder: Wav Writer]
########################################
and the error:
Starting job _audio.dat->_audio.wav
Error: BeHappy.AviSynthException: m2RaWavSource: unsupported sample precision
it should be:
RaWavSource("E:\_audio.dat", 48000, 33, 6)
_
L.E. also .dat is not listed as valid extension for RaWavSource...
_
Cozmec
30th January 2010, 21:45
I am trying to convert an .acc file to a .ac3 and i get the following error:
Error: BeHappy.AviSynthException: unexpected character ""
σε BeHappy.AviSynthClip..ctor(String func, String arg, AviSynthColorspace forceColorspace, AviSynthScriptEnvironment env)
σε BeHappy.Encoder.encode()
I am using the ffmpeg ac3
tebasuna51
31st January 2010, 00:48
...
it should be:
RaWavSource("E:\_audio.dat", 48000, 33, 6)
_
L.E. also .dat is not listed as valid extension for RaWavSource...
_
You are right, please edit the NicAudio.extension file until next release.
tebasuna51
31st January 2010, 01:08
I am trying to convert an .acc file to a .ac3 and i get the following error:
Error: BeHappy.AviSynthException: unexpected character ""
I am using the ffmpeg ac3
I don't know what is the problem.
Please use the 'Export AviSynth Script' and post here the script.
b66pak
31st January 2010, 16:35
here is the edited NicAudio.extension...
_
Lincoln Burrows
3rd February 2010, 09:52
Any idea how to fix this problem?
Starting job audiofile2.wav->audiofile2best.m4a
Found Audio Stream
Channels=2, BitsPerSample=16 int, SampleRate=44100Hz
encoder\ffmpeg.exe -i - -y -acodec aac -ab 128 "C:\Documents and Settings\Core Quad 9450\Desktop\audiofile2best.m4a"
Error: System.ApplicationException: Can't start encoder: System cannot find the specified file ---> System.ComponentModel.Win32Exception: System cannot find the specified file
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
tebasuna51
3rd February 2010, 13:24
Put ffmpeg.exe in Behappy encoder folder
Lincoln Burrows
3rd February 2010, 14:57
Where are most BeHappy encoders? Did they come in the original BeHappy package? Ffmpeg.exe is not here, that's what this message is about. If I recall correctly, I had to download lame.exe myself to work. Not sure where I can find the rest BeHappy uses.
b66pak
3rd February 2010, 18:28
from readme.txt in BeHappy "encoder" folder:
The files in this folder can be included in BeHappy folder or in a subfolder called 'encoder'.
If the subfolder 'encoder' exists, all the encoders must be inside it.
Some files are interfaces created by BeHappy team and are included here, but the rest must be obtained from the authors.
Some special versions with STDIN input are included also, when the old link don't work.
There are also Bepipe.7z with the command line Bepipe.exe and some sample.
Here are the last know url to download the encoders and the last version tested:
WavSplit.exe (Included. Author Tebasuna, to split in mono/stereo wav's instead multichannel output)
-- lossless encoders
flac.exe (free lossless FLAC encoder http://www.rarewares.org/lossless.php, v1.2.1b)
ttaenc.exe (free lossless TTA True Audio encoder, special v3.4.1 with STDIN input, included)
wavpack.exe (free lossless WV WavPack encoder http://www.rarewares.org/lossless.php, http://www.wavpack.com/ v4.60)
-- lossy multichannel encoders
neroAacEnc.exe (free AAC-MP4 encoder from Nero, http://www.nero.com/eng/technologies-aac-codec.html)
aften.exe (free AC3 encoder by Justin Ruggles, in http://code.google.com/p/wavtoac3encoder/downloads/list or http://kurtnoise.free.fr/MeGUI)
oggenc2.exe (free OGG encoder, http://www.rarewares.org/ogg-oggenc.php v2.85)
enc_aacPlus.exe (Included. Author Dimzon and BeHappy team, interface for enc_aacplus.dll)
enc_aacplus.dll (free AAC CT encoder v1.27, from full Winamp)
nscrt.dll (needed for enc_aacplus.dll, from full Winamp)
libmp4v2.dll (needed for enc_aacplus.dll mp4 output, from full Winamp)
ffmpeg.exe (many options, maybe: http://ffdshow.faireal.net/mirror/ffmpeg/, v?.?)
enc_AudX_CLI.exe (Included. Author Dimzon, interface for audxlib.dll)
audxlib.dll (free MP3 encoder with surround features, http://www.aud-x.com/)
mp3sEncoder.exe (free MP3 Fraunhofer encoder, http://www.all4mp3.com/tools/sw_fhg_cl.html)
-- lossy only stereo encoders
lame.exe (free MP3 encoder http://www.rarewares.org/mp3-lame-bundle.php, v3.98)
twolame.exe (free MP2 encoder, version from rarewares don't work, included v0.3.10b)
mppenc.exe (free MPC MusePack encoder, http://www.musepack.net, v1.16)
Notes:
------
The GUI's to capture the encoder parameters are implemented in the main BeHappy.exe or in *.extensions files in the 'extensions' subfolder.
The *.extensions files can be edited with Notepad or similar to change a not supported option.
To change parameters to GUI encoder included in BeHappy.exe you need change the sources *.cs and compile.
The files in 'extensions' subfolder can also be placed at BeHappy folder.
The *.extension files can implement also DSP functions (ConvertSample, DownMix, DuplicateChannels, SSRC and UpMix), and AviSynth decoders (BassAudio.extension).
The mppenc v1.16 (SV7) was deprecated and the new MusePack encoder SV8 is named mpcenc.exe (actually v1.30) if you want use it you need edit MusePack.extension file.
_
b66pak
9th February 2010, 18:29
new version for qtaacenc (qtaacenc-20100210):
http://tmkk.hp.infoseek.co.jp/qtaacenc/
2010/2/10
* Added --ignorelength option
* This option lets qtaacenc ignore the size of data chunk of the input wave stream when encoding from pipe. This will be useful when you want to pass a huge (>4GB) wave stream using pipe. Note that if the data chunk size is set to zero, qtaacenc reads the stream until EOF without this option. Write max bitrate info and encoding parameter metadata (iTunes compatible)
_
Chumbo
8th August 2010, 16:52
@tebasuna51,
Have you had a chance to merge my changes per changeset 18658? They're still not in the latest and I'm no longer on the developers list so I can't access TFS.
tebasuna51
21st August 2010, 02:40
@tebasuna51,
Have you had a chance to merge my changes per changeset 18658? They're still not in the latest and I'm no longer on the developers list so I can't access TFS.
Added your changes in 18658 (deleted in 19601) to new Change Set 49787.
Chumbo
21st August 2010, 03:37
Added your changes in 18658 (deleted in 19601) to new Change Set 49787.
Great, thank you.
NoX1911
28th August 2010, 06:14
Anyone tested with NET Framework 4.0? It just crashes here on win7.
tebasuna51
28th August 2010, 09:55
No, I use NET 2.0, XP SP3 32 bits.
What version of AviSynth do you have installed?
Just crashes on open or when you make some job?
NoX1911
28th August 2010, 16:17
Wtf... it works now. Don't know what was wrong. Error was something with '2.0 CLR'. Error message came immediately after doublelclicking the exe.
Max_Cady
20th October 2010, 21:58
how to encode DTS-HD to DTS with this application? i dont see any option for DTS encoding.
tebasuna51
21st October 2010, 00:04
Because doesn't exist any free DTS encoder.
And there are better alternatives, AC3 is more efficient and more compatible, and AAC is even more efficient (but less compatible).
With less bitrate you can obtain the same quality than DTS.
BTW, you needn't encode DTS-HD to DTS, is enough extract the 'core' with eac3to, for instance:
eac3to input.dtshd output.dts -core
Chumbo
21st October 2010, 01:38
To add to what tebasuna51 already said, you can also use tsmuxer which can remux a dts-hd track to the core dts track.
DVDBob
31st October 2010, 19:02
I have some audio files from DVDs, and i want to use them to some MKV files from blurays.
So can i use this software to only TimeStretch 25 > 23,976???
tebasuna51
31st October 2010, 20:57
Yes, there are two methods:
- with SSRC (same than use eac3to), change the pitch. More accurate.
- with TimeStretch, if you use Tempo the pitch is preserved.
DVDBob
31st October 2010, 21:09
I just tried hour stretch but it reports errors immediately I press start.
I do not know whether it is best to use AviSynth, DirectShow source or NicAc3Source.
tebasuna51
31st October 2010, 23:50
NicAc3Source.
You need NicAudio.dll in your Avisynth plugin folder and Aften.exe in BeHappy Encoder subfolder.
DVDBob
1st November 2010, 00:16
Thanks it works now.
TDiTP_
17th December 2010, 15:01
One question
Why BeHappy's DPLII downmix matrix:
Lt = L + 0.7071 C + 0.7071 LFE + 0.866 BL + 0.5 BR
Rt = R + 0.7071 C + 0.7071 LFE - 0.5 BL - 0.866 BR
when at the same time here (http://forum.doom9.org/showthread.php?t=57988):
Lt = L + 0.7071 C + 0.7071 LFE - 0.866 BL - 0.5 BR
Rt = R + 0.7071 C + 0.7071 LFE + 0.5 BL + 0.866 BR
(azid and AC3Filter use such matrix: "-" surround with Lt and "+" surround with Rt)
tebasuna51
17th December 2010, 19:38
One question
Why BeHappy's DPLII downmix matrix:
...
Basically because I found than using (simplified coefficients):
M1 (like BeSweet/Azid)
LT = L + 0.7 C - 0.8 BL - 0.5 BR
RT = R + 0.7 C + 0.5 BL + 0.8 BR
M3 (with inverted signs for back channels)
LT = L + 0.7 C + 0.8 BL + 0.5 BR
RT = R + 0.7 C - 0.5 BL - 0.8 BR
I get, using DPL II upmix with Cyberlink PowerDVD 6, Audio Effect dsf (software decode, also tested with my hardware decoder)
M1 decoded in Movie mode
L' = 0.7 L
R' = 0.7 R
C' = 0.6 C
SL' = - 0.7 SL
SR' = - 0.7 SR
M3 decoded in Movie mode
L' = 0.7 L
R' = 0.7 R
C' = 0.6 C
SL' = 0.7 SL
SR' = 0.7 SR
Reference threads:
http://forum.doom9.org/showthread.php?t=111603
http://forum.doom9.org/showthread.php?t=112122
Then seems the original matrix mix produce inverted surround channels (difficult to listen the difference).
TDiTP_
20th December 2010, 08:29
tebasuna51
Thanks
What matrix do you recommend to use when downmix 7.1 and 6.1 -> 5.1 ? And what script i must use in BeHappy?
eac3to mix surround like:
Sur = 1.0 x Back + 0.7 x Side
and I can't understand why such coefficients.
if not difficult, I would want to know the theoretical explanation :)
---------------------
Upd. May be like this (http://forum.doom9.org/showthread.php?p=1144930#post1144930).
7.1/7.0:
B = 0,395 x Su -> Su1 = 2,53 x B
S = 0,742 x Su -> Su2 = 1,35 x S
=> Su = Su1 + Su2 = 2,53 x B + 1,35 x S
but we must normalize to the max signal, i.e. "B", then:
Su = B + 0,53 x S
sqrt:
Su = B + 0,73 x S
6.1/6.0:
BC is in 0,5 in left and 0,5 in right speaker
if we 6.1->5.1 we need add BC in Su: Su' = Su + 0,5 x BC
sqrt:
Su' = Su + 0,707 x BC
The right solution?
Remembering angle accuracy it may be close with what eac3to do - link (http://www.hydrogenaudio.org/forums/index.php?showtopic=59068).
tebasuna51
20th December 2010, 16:17
What matrix do you recommend to use when downmix 7.1 and 6.1 -> 5.1 ? And what script i must use in BeHappy?...
To avoid overflow, first convert to float, mix, Normalize and convert to desired output.
# Downmix 7.1 to 5.1
RaWavSource("341.wav") # or 341.w64
a = ConvertAudiotofloat()
fl = Getchannel(a,1)
fr = Getchannel(a,2)
fc = Getchannel(a,3)
lf = Getchannel(a,4)
bl = Getchannel(a,5)
br = Getchannel(a,6)
sl = Getchannel(a,7)
sr = Getchannel(a,8)
sul = Mixaudio(sl, bl, 1.0, 1.0)
sur = Mixaudio(sr, br, 1.0, 1.0)
Mergechannels(fl, fr, fc, lf, sul, sur)
Normalize()
#ConvertaudiotoX() # not needed to encode to ac3/aac
With:
sul = sl + bl
sur = sr + br
We preserve the acustic power relation between all channels. Don't mistake upmix (we need divide a channel in two, angle related) with downmix (we add channels and both must have the same contribution)
For 6.1
# Downmix 6.1 to 5.1
RaWavSource("331.wav") # or 331.w64, with channelmask like eac3to output, else alternate sintax
a = ConvertAudiotofloat()
fl = Getchannel(a,1)
fr = Getchannel(a,2)
fc = Getchannel(a,3)
lf = Getchannel(a,4)
bc = Getchannel(a,5) # bl = Getchannel(a,5)
sl = Getchannel(a,6) # br = Getchannel(a,6)
sr = Getchannel(a,7) # bc = Getchannel(a,7)
sul = Mixaudio(sl, bc, 1.0, 0.707) # Mixaudio(bl, bc, 1.0, 0.707)
sur = Mixaudio(sr, bc, 1.0, 0.707) # Mixaudio(br, bc, 1.0, 0.707)
Mergechannels(fl, fr, fc, lf, sul, sur)
Normalize()
#ConvertaudiotoX() # not needed to encode to ac3/aac
With:
sul = sl + 0.707xbc
sur = sr + 0.707xbc
Here the acustic power of bc must be divided in two channel. Like acustic power is proportional to bc^2:
bc^2 = ( 0.707xbc)^2 + (0.707xbc)^2
TDiTP_
20th December 2010, 16:32
we add channels and both must have the same contribution
=> eac3to's downmix 7.1->5.1 isn't correct?
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.