View Full Version : BeHappy - AviSynth based audio transcoding tool (UPD 19-07-2006)


Pages : 1 [2]

Reino
10th February 2012, 21:07
tebasuna has already explained in post #995 why this will not work:My apologies.
The working directory will be the one containing the script, not the audio file.Having tak_deco_lib.dll in either directory won't let you decode tak-files. Just tested it.

To summarize the workarounds to decode OptimFROG or TAK that do work:
- put OptimFROG.dll and tak_deco_lib.dll in the app's directory (MPC-HC's directory for instance if you open the Avisynth script with it).
- put OptimFROG.dll and tak_deco_lib.dll in the Windows\System32 directory.
- add the plugins directory to the Windows Environment System Variables, so Windows can search that directory if external libraries are needed and will use them automatically. (Windows key+Pause, "Advanced"-tab, "Environment Variables", "System Variables", click "Path", Edit, at the end add the full path of the plugins directory with a preceding semicolon (';'))
- use tsp's LoadDll Avisynth plugin (http://www.avisynth.org/tsp/LoadDll.zip). Insert LoadDll("path\tak_deco_lib.dll") before Loadplugin("path\BassAudio.dll")!

tebasuna51
11th February 2012, 12:04
...
However, I'm not sure what you (tebasuna) mean by "AviSynth set the working directory to the directory of the sample to decode". The working directory will be the one containing the script, not the audio file.

You are rigth, maybe I simplified the explain because the problem is the same, to have the ext dll's in .avs directory or sample file directory don't help CoRoNe requirements.

With my test with wavi and a .avs file, work fine with a ext-dll copy in "plugins" directory and other in .avs directory or in sample file directory.

And using BeHappy the .avs is created in a temp user directory (GetTempPath), under user Documents and Settigns, more difficult to use than sample directory.

BTW, I edit my previous post to be more exact.

Reino
15th February 2012, 14:00
I'm resigning myself with this issue. LoadDll it's gonna be until someday perhaps bass_ofr.dll and bass_tak.dll will search for external Dlls in the plugins directory first.

Something completely different now...

In the past I've always used BeSweet in combination with BeLight to do 5.1 AC3 to DPLII <audio-format> conversions. Lately I've been experimenting with Foobar, foo_input_avs (to load Avisynth scripts) and several DSPs, but I wasn't satisfied with the results. Before Foobar I already knew BeHappy could do the same thing more or less, but yesterday I really dug into it;

I noticed BeHappy uses another DPLII matrix (http://forum.doom9.org/showthread.php?p=1464705#post1464705), compared to the official one (https://en.wikipedia.org/wiki/Matrix_decoder#Dolby_Pro_Logic_II_matrix_encoding_.282:5.29), which has been discussed here (http://forum.doom9.org/showthread.php?t=105869) amongst other threads.
Now if I understand correctly how to derive a DPLII matrix's coefficients (http://forum.doom9.org/showthread.php?p=145721#post145721), and I did my calculations correctly in the draft below, those numbers have to correspond with the official DPLII matrix, don't they?

Draft with calculations I made in notepad yesterday:
BeHappy DPL2 matrix:
Lt = 1.0L + 0.7071(√½)*C + 0.8660(√¾)*Ls + 0.5000(√¼)*Rs 1 + 0.7071 + 0.8660 + 0.5000 = 3.0731
Rt = 1.0R + 0.7071(√½)*C - 0.5000(√¼)*Ls - 0.8660(√¾)*Rs 1 / 3.0731 = 0.3254

function Dmix6Dpl2(clip a) {
flr = GetChannel(a, 1, 2)
fcc = GetChannel(a, 3, 3)
lrc = MixAudio(flr, fcc, 0.3254, 0.2301) 0.3254, (0.3254*0.7071)
bl = GetChannel(a, 5)
br = GetChannel(a, 6)
sl = MixAudio(bl, br, 0.2818, 0.1627) (0.3254* 0.8660), (0.3254* 0.5000)
sr = MixAudio(bl, br, -0.1627, -0.2818) (0.3254*-0.5000), (0.3254*-0.8660)
blr = MergeChannels(sl, sr)
return MixAudio(lrc, blr, 1.0, 1.0)
}
=====================================================================================================
Official DPL2 matrix:
Lt = 1.0L + 0.7071(√½)*C - 0.8165(√⅔)*Ls - 0.5774(√⅓)*Rs 1 + 0.7071 + 0.8165 + 0.5774 = 3.1010
Rt = 1.0R + 0.7071(√½)*C + 0.5774(√⅓)*Ls + 0.8165(√⅔)*Rs 1 / 3.1010 = 0.3225

function Dmix6Dpl2(clip a) {
flr = GetChannel(a, 1, 2)
fcc = GetChannel(a, 3, 3)
lrc = MixAudio(flr, fcc, 0.3225, 0.2280) 0.3225, (0.3225*0.7071)
bl = GetChannel(a, 5)
br = GetChannel(a, 6)
sl = MixAudio(bl, br, -0.2633, -0.1862) (0.3225*-0.8165), (0.3225*-0.5774)
sr = MixAudio(bl, br, 0.1862, 0.2633) (0.3225* 0.5774), (0.3225* 0.8165)
blr = MergeChannels(sl, sr)
return MixAudio(lrc, blr, 1.0, 1.0)
}
=======================================================================================================================
Official DPL2+LFE matrix:
Lt = 1.0L + 0.7071(√½)*C + 0.7071(√½)*LFE - 0.8165(√⅔)*Ls - 0.5774(√⅓)*Rs 1 + 2*0.7071 + 0.8165 + 0.5774 = 3.8081
Rt = 1.0R + 0.7071(√½)*C + 0.7071(√½)*LFE + 0.5774(√⅓)*Ls + 0.8165(√⅔)*Rs 1 / 3.8081 = 0.2626

function Dmix6Dpl2Lfe(clip a) {
flr = GetChannel(a, 1, 2)
fcc = GetChannel(a, 3, 3)
lrc = MixAudio(flr, fcc, 0.2626, 0.1857) 0.2626, (0.2626*0.7071)
lfe = GetChannel(a, 4, 4)
lrc = MixAudio(lrc, lfe, 1.0, 0.1857) (0.2626*0.7071)
bl = GetChannel(a, 5)
br = GetChannel(a, 6)
sl = MixAudio(bl, br, -0.2144, -0.1516) (0.2626*-0.8165), (0.2626*-0.5774)
sr = MixAudio(bl, br, 0.1516, 0.2144) (0.2626* 0.5774), (0.2626* 0.8165)
blr = MergeChannels(sl, sr)
return MixAudio(lrc, blr, 1.0, 1.0)
}

Now, as I'm unsatisfied with Foobar's Dynamics Compressor, I'd like to do BeSweet.exe -azid(-s dplii -c normal -L -3db --maximize) -ota(-hybridgain) (which I've been using a lot in the past if I remember correctly) with Avisynth. Please tell me, am I getting close?:
NicDTSSource("FileName.dts", DRC=1) # -azid(-c normal)
ConvertAudioToFloat()

flr = GetChannel(1, 2)
fc = GetChannel(3, 3)
lrc = MixAudio(flr, fc, 0.2626, 0.1857)
lfe = GetChannel(4, 4)
lrc = MixAudio(lrc, lfe, 1.0, 0.1857)
-----------------------------------------
lfe = GetChannel(4, 4).AmplifydB(-3.0) # -azid(-L -3db), or would this totally screw-up the DPLII-matrix?
lrc = MixAudio(lrc, lfe, 1.0, 1.0)
-----------------------------------------
bl = GetChannel(5)
br = GetChannel(6)
sl = MixAudio(bl, br, -0.2144, -0.1516)
sr = MixAudio(bl, br, 0.1516, 0.2144)
blr = MergeChannels(sl, sr)
MixAudio(lrc, blr, 1.0, 1.0) # -azid(-s dplii)

Normalize() # -azid(--maximize)
AmplifydB(10) # -ota(hybridgain), I just picked a number (dB), because I don't
# know what would be equivalent to hybridgain.

P.s. Although I believe this (https://en.wikipedia.org/wiki/Matrix_decoder#Dolby_Pro_Logic_II_matrix_encoding_.282:5.29) is the official DPLII matrix, it's strange this (https://en.wikipedia.org/wiki/Dolby_Pro_Logic#Dolby_encoding_matrices) one is also mentioned on wikipedia...

tebasuna51
16th February 2012, 01:54
I'd like to do BeSweet.exe -azid(-s dplii -c normal -L -3db --maximize) -ota(-hybridgain) with Avisynth.

Here -hybridgain do nothing because the audio was already normalized by azid parameter --maximize.

Please tell me, am I getting close?:
...
lfe = GetChannel(4, 4)
lrc = MixAudio(lrc, lfe, 1.0, 0.1857)
-----------------------------------------
lfe = GetChannel(4, 4).AmplifydB(-3.0) # -azid(-L -3db), or would this totally screw-up the DPLII-matrix?
lrc = MixAudio(lrc, lfe, 1.0, 1.0)
-----------------------------------------

You can't add two times LFE, the first one is enough to complain -azid(-L -3db)


...
Normalize() # -azid(--maximize)
AmplifydB(10) # -ota(hybridgain), I just picked a number (dB), because I don't
# know what would be equivalent to hybridgain.

Like I say before -ota(hybridgain) do nothing with a normalized audio. With this syntax you clip all sound over -10 dB and distort the output.

Reino
16th February 2012, 13:01
It was only just a draft, not heeding the syntax that much. Perhaps I should've put brackets in front of it, because obviously I didn't mean to invoke both LFE lines at the same time:
lfe = GetChannel(4, 4)
lrc = MixAudio(lrc, lfe, 1.0, 0.1857)
#-----------------------------------------
#lfe = GetChannel(4, 4).AmplifydB(-3.0) # -azid(-L -3db), or would this totally screw-up the DPLII-matrix?
#lrc = MixAudio(lrc, lfe, 1.0, 1.0)
#-----------------------------------------But if you say, -azid(-L -3dB) is already incorporated in the matrix, then I'll just delete the line of course.

Strange, as far as I can remember, there was a guide years ago, that recommended that specific BeSweet command-line, and a lot of people used that guide. Strange then, because I can indeed confirm it doesn't do anything (filesize stays the same) when I remove -ota(hybridgain) from BeSweet's command-line. In that case, I think it's save to use the following script for AC3 audio then:
NicAC3Source("FileName.ac3", DRC=1) NicDTSSource("FileName.dts", DRC=1) # -azid(-c normal)
ConvertAudioToFloat() ConvertAudioToFloat()

flr = GetChannel(a, 1, 2) flr = GetChannel(a, 1, 2)
fc = GetChannel(a, 3, 3) fc = GetChannel(a, 3, 3)
lrc = MixAudio(flr, fc, 0.2626, 0.1857) lrc = MixAudio(flr, fc, 0.2626, 0.1857)
lfe = GetChannel(a, 4, 4) lfe = GetChannel(a, 4, 4)
lrc = MixAudio(lrc, lfe, 1.0, 0.1857) lrc = MixAudio(lrc, lfe, 1.0, 0.1857) # -azid(-L -3db)
bl = GetChannel(a, 5) bl = GetChannel(a, 5)
br = GetChannel(a, 6) br = GetChannel(a, 6)
sl = MixAudio(bl, br, -0.2144, -0.1516) sl = MixAudio(bl, br, 0.2144, 0.1516) # Phase Shift for DTS(?)
sr = MixAudio(bl, br, 0.1516, 0.2144) sr = MixAudio(bl, br, -0.1516, -0.2144)
blr = MergeChannels(sl, sr) blr = MergeChannels(sl, sr)
MixAudio(lrc, blr, 1.0, 1.0) MixAudio(lrc, blr, 1.0, 1.0) # -azid(-s dplii)

Normalize() Normalize() # -azid(--maximize)http://www.ld-host.de/uploads/thumbnails/5eb323c177234a06887e6879e2816c3f.png (http://www.ld-host.de/show/5eb323c177234a06887e6879e2816c3f.png)
(Foobar Downmix AC3/DTS to DPL2 plugin)
And what about 90° Phase Shifting for DTS audio? I noticed BeHappy uses the same matrix for AC3 and DTS, but shouldn't I apply the code above to DTS audio, or is this completely wrong and unnecessary?

P.s. I assume my matrix calculations earlier were correct :p

tebasuna51
17th February 2012, 05:00
- You don't need ConvertAudioToFloat(), The output from NicAc3/DtsSource is already float.

- Dolby don't recommend use LFE in DPL II

- I don't recommend use Phase Shift with encoded data source (even DTS). Change the signs is not equivalent to use Phase Shift.
I don't know any AviSynth function to change audio phase.

- You are free to try any downmix that you want. But if you ask me the correct downmix matrix is the included already in BeHappy.

Reino
17th February 2012, 18:11
AudioDub(Blankclip(),NicDtsSource("test.dts"))
b = (IsAudioFloat==true) ? String(" float") : String(" int")
Subtitle(String(AudioBits) + "bit" + b)
- "32bit float" indeed. :p Didn't know that.

- I've read about it, yes. Though I believe everyone does it anyway, right?

- BeSweet doesn't have PhaseShift settings either I believe. It's only the Downmix AC3/DTS to DPL2 plugin for Foobar, so I guess it's not that important.

- I'll certainly give it a try.
Btw, I just came to realize; you mentioned "downmix matrix"...

Lt = 1.0*L + 0.7071*C + 0.7071*LFE - 0.8165*Ls - 0.5774*Rs
Rt = 1.0*R + 0.7071*C + 0.7071*LFE + 0.5774*Ls + 0.8165*Rs

Lt = 0.2626*L + 0.1857*C + 0.1857*LFE - 0.2144*Ls - 0.1516*Rs
Rt = 0.2626*R + 0.1857*C + 0.1857*LFE + 0.1516*Ls + 0.2144*Rs

Then the first one is probably called "upmix matrix"?

======================================================

Something different (again)...
Yesterday I noticed that for PAL,NTSC conversions BeHappy uses (AudioRate()*1001+480)/960) instead of the imo more obvious (AudioRate()*1001/24000)*25), so I (again) did some testing:
#NicDtsSource("test.dts") #48000Hz 6ch 1536kbps, 32bit float | NTSC->PAL, 2:00.075s->1:55.157s

#AssumeSampleRate(last, (AudioRate()*1001/24000)*25).SSRC(AudioRate(last)) #48000->50050.0000 | 50050 (1:55.157s)
#AssumeSampleRate(last, (AudioRate()*1001+480)/960).SSRC(AudioRate(last)) #48000->50050.5000 | 50050 (1:55.157s)


#NicAc3Source("test.ac3") #48000Hz 6ch 448kbps, 32bit float | PAL->NTSC, 2:00.000s->2:05.125s

#SSRC(last, (AudioRate()*1001/24000)*25).AssumeSampleRate(AudioRate(last)) #48000->50050.0000 | 50050 (2:05.125s)
#SSRC(last, (AudioRate()*1001+480)/960).AssumeSampleRate(AudioRate(last)) #48000->50050.5000 | 50050 (2:05.125s)


#WavSource("test_dts.wav") #44100Hz 2ch 1411kbps, 16bit int | NTSC->PAL, 2:00.075s->1:55.157s

#AssumeSampleRate(last, (AudioRate()*1001/24000)*25).SSRC(AudioRate(last)) #44100->45983.4375 | 45975 (1:55.178s)
#AssumeSampleRate(last, (AudioRate()*1001+480)/960).SSRC(AudioRate(last)) #44100->45983.9375 | 45983 (1:55.158s)


WavSource("test_ac3.wav") #44100Hz 2ch 1411kbps, 16bit int | PAL->NTSC, 2:00.000s->2:05.125s ¹
ConvertAudioToFloat()
#SSRC(last, (AudioRate()*1001/24000)*25).AssumeSampleRate(AudioRate(last)) #44100->45983.4375 ² | 45975 (2:05.102s) ³
SSRC(last, (AudioRate()*1001+480)/960).AssumeSampleRate(AudioRate(last)) #44100->45983.9375 | 45983 (2:05.124s)
¹ <original length> -> <length it should be after conversion>
² <original frequency> -> <frequency it should be after conversion, without SSRC()>
³ <reported frequency> <reported length> (by Foobar and foo_input_avs)

Both formulas produce the same result for DTS and AC3, but for 44.1kHz 2ch 1411kbps WAV it's a whole different story!
Both aren't millisecond accurate, not even (AudioRate()*1001+480)/960), but I really don't understand the reported 45975Hz in the first place! At first I thought the 16bit int could be the reason, but inserting a ConvertAudioToFloat() didn't make a difference.
Is this some Avisynth shortcoming? And if so, how did you even come up with (AudioRate()*1001+480)/960)?!

tebasuna51
17th February 2012, 20:15
Then the first one is probably called "upmix matrix"?

Both are "downmix matrix" -> the output have less channels than input.

The first one is a "not-normalized" matrix and the second one is a "normalized" matrix (the output can't have values greater than 1.0)

If you use float values, and after normalize, you can use both.
But the function must work also with integer values, then you need use the "normalized matrix" to avoid clip.

And if so, how did you even come up with (AudioRate()*1001+480)/960)?!

The SSRC function only support integer values, then the operations are truncatted to int values.

Like: 25/ (24000/1001) = 1001 * (25/24000)= 1001 * (1/960) = 1001/960

Is more exact let the division to last operation, (instead multiply the error by 25):

(AudioRate()*1001)/960

And the '+ 480' factor (480/960 = 0.5) is to round to the next integer
int(45983.4 +0.5) -> 45983
int(45983.6 +0.5) -> 45984

For instance:

(44100*1001/24000)*25 = (1839) * 25 = 45975
far of 45983.4375

(44100*1001+480)/960 = 45983
near to 45983.4375

Reino
17th February 2012, 21:49
Ah, mathematics. Nice! I understand now.

I realized not only SSRC is integer only, but AudioRate() and AssumeSampleRate() as well and that's why ConvertAudioToFloat() wouldn't make a difference.
With 48000Hz is just so happens to be all integer...

AudioRate(48000*1001/24000=2002) --> AssumeSampleRate(2002*25=50050)

...unlike 44100, where the truncation already begins with AudioRate()...

AudioRate(44100*1001/24000=1839.3375) --> AssumeSampleRate(1839*25=45975)

While with (AudioRate()*1001+480)/960) the truncation is 1 step later...

AudioRate(48000*1001+480=48048480) --> AssumeSampleRate(48048480/960=50050.50) --> 50050

...and...

AudioRate(44100*1001+480=44144580) --> AssumeSampleRate(44144580/960=45983.9375) --> 45983

Ingenious, really! :p Thanks for all the info, tebasuna51! :goodpost:

kolak
17th February 2012, 23:07
Is it possible to add generic (numbered) files/channels naming in wavsplit:

audio_1
audio_2
audio_3

etc

instead of

audio_L
audio_R
audio_C
...


Thanks

tebasuna51
18th February 2012, 04:31
Is possible but I don't like the idea.

EDIT: This is a modified version:

kolak
18th February 2012, 14:53
:thanks::thanks:

Could wavsplit extract wav directly from AVI or do I have to always use BeHAppy for this?

tebasuna51
18th February 2012, 20:26
wavsplit can't extract audio from avi.

BeHappy can' extract wav from avi, but can decode any audio from avi using DirectShowSource/AviSource

kolak
18th February 2012, 20:47
wavsplit can't extract audio from avi.

BeHappy can' extract wav from avi, but can decode any audio from avi using DirectShowSource/AviSource

Yes- that's what I'm using now- directshow source as it's 8 channels 24bit wav- so mostly >4GB. Only this works.

Xplorer4x4
7th July 2012, 10:32
Has any one managed to get BeHappy working under Wine? If so can any one tell me or link me to an explanation of how they did it?

LigH
27th July 2012, 21:39
There is now also an Opus plugin (http://www.un4seen.com/forum/?topic=13870.0) for BassAudio.

Thanks to CoRoNe on HydrogenAudio for telling me.

Reino
9th August 2012, 21:39
tebasuna51, could you please have a look at BassAudio in combination with the latest Bass 2.4.9.0? Somehow the libraries aren't unloaded/killed upon exit, because MPC-HC (which I always use for *.avs) remains active in the background (task manager)! Or just close the file (Ctrl+C) in MPC-HC and it will freeze. This was not the case with Bass 2.4.8.1.

And could you check if it all still works in Foobar (foo_input_avs)? I'm still facing all the before mentioned issues, but with Bass 2.4.9.0 Foobar completely hangs upon dragging an avs-file into the playlist. This happens even only with bass.dll.


I still don't understand why I can't use BassAudio with foo_input_avs...
- Anything but BassAudio (like NicAC3Source or WavSource) works fine in Foobar.
- Dragging an avs-file with BassAudioSource(wav/aiff/mp3/mp2/mp1/ogg) into Foobar results in a big crash; Application Error. The instruction at "0x084107f1" referenced memory at "0x084107f1".
- Dragging an avs-file with BassAudioSource(aac/flac/wv/tak), any format that requires a bass_xxx.dll, into Foobar doesn't make it crash, but it simply won't load.
I can't believe I'm the only one having this issue with Foobar.

tebasuna51
10th August 2012, 14:02
Yes, seems the last Bass.dll version 2.4.9 don't work at all with the interface to AviSynth BassAudio.dll.
We need remain with 2.4.8 version.

And BassAudio works for me with Foobar2000.

Reino
10th August 2012, 17:46
You can't update BassAudio to make it work with Bass 2.4.9.0?

tebasuna51
11th August 2012, 09:21
With big version changes (2.2 -> 2.3 -> 2.4) there are info than help me to change BassAudio.dll, but this change (2.4.8 -> 2.4.9) don't have the needed info, maybe is a bug, or I need wait until a new big change (2.4 -> 2.5), or never can change BassAudio to be compatible (with my poor knowledge of course, the source is open and included with BeHappy if you want try).

Sorry.

Reino
12th August 2012, 13:16
No problem, it's not urgent or anything.

But uh,...another question:
I wanted to see if the foo_input_avs-issues I face on my WinXP machine, would also bring me headaches on a Win7 laptop (of a friend), but I just can't get BassAudio to work.
LoadPlugin: unable to load: "<path>\BassAudio.dll", error=0x7e
Now, the only related post I could find it this one:
The 0x7e error indicates that one or more dependent dlls are missing from the system.

make sure you have the Visual Studio 2010 runtime (http://www.microsoft.com/download/en/details.aspx?id=5555) installed, as the plugin requires it.
Installing that one, nor the 1st servicepack made a difference. .NET Framework 2, 3 and 3.5 are not compatible with Win7, but installing .NET Framework 4 wasn't rewarding either.
Do you have any idea what I'm doing wrong and how to get BassAudio.dll working on Win7?

tebasuna51
12th August 2012, 19:10
BassAudio.dll (v2.4 2008) was compiled with Visual C++ Express 2005.

I make a new compile with Visual C++ Express 2010, with a more recent version of AviSynth.h and the last Bass.h (with Bass.dll 2.4.9).
Work for me (XP SP3) with Bass.dll 2.4.8 but still not work with 2.4.9

I can't test W 7. Please see if there are any difference with previous version.

Reino
12th August 2012, 20:42
Thanks. Once I get a hold of my friend's laptop I'll let you know.

Reino
18th August 2012, 16:49
Okay, earlier this week I've used a family member's Win7 laptop and everything went fine with MPC-HC and Foobar.
Yesterday I had the chance to test BassAudio on my friends Win7 laptop again, but surprisingly everything went fine too. I guess I made some mistakes last time. The old BassAudio.dll as well as the new one worked fine. After that I even quickly installed Avisynth and Foobar on my mother's old WinXP laptop, but even that one could play it all.
Now that was really frustrating! Eventually I even monitored Foobar's every single move on my computer with Sysinternals Process Monitor, in the hope I could find an answer for the issue I faced. But then I suddenly realized; I had been using Foobar 1.1.14-b3 to test BassAudio on the other computers while my own computer still had 1.1.10 installed. And what'd you know, after updating to 1.1.14 yesterday I could suddenly open all bass_xx.dll audio formats in Foobar! Not my computer, not BassAudio and neither foo_input_avs is to blame, but me still using an old version of Foobar... http://www.hydrogenaudio.org/forums/style_emoticons/default/headbang.gif
Everything is fine now. Sorry for the trouble, tebasuna51.

Mackan
30th December 2012, 11:10
DynRanComp: New <AudioDSP> Dynamic Range Compression based in compand function from Sox.
Compression curves based in Anex C from Dolby Digital Professional Encoding Guidelines. There are a link for this document and graphs in:
http://forum.doom9.org/showthread.php?t=56020

This is a test release for discussion about the following problems:

1) The DSP function, outside the ac3 decoder, can't know the original ac3 Dialog Normalization and DRC method, then must be supplied by the user.
The DRC method can be selected in DSP configure, but the DialNorm can be set with:
- Another DSP multioption (31) to use before DynRanComp.
- With the 'Tweak' Amplify, but don't work with negative values (? to Dimzon).
- Editing DynRanComp.extension before run BeHappy. Method selected in this test release.

2) The Normalize() function don't work after Sox compand, maybe because:
"compand is very hard to control, and doesn't support restarts (crash)"
(in "Sox Audio Effect Filter for AviSynth" doc.)
Then maybe we need another set of 'normalized' curves to avoid the low volume problem.

3) The compand function don't work fine with segments 20:1.
For segment (-21,-21)-(0,-20) I obtain a output (-21,-21)-(0,-18)

4) The compand parameters (attack1,decay1,...,delay) may need optimization.

The DynRanComp.extension file is:
<?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="934f5ce0-9203-11da-a72b-0800200c9a66">
<Plugin>
<MultiOptionDSP Type="BeHappy.Extensions.MultiOptionDSP, BeHappy">
<TitleFormatString>DynRanComp - {0}</TitleFormatString>
<ScriptPrologue>
# Dialog Normalization. Amplify by: -31 -(DialNorm), 0 for DN=-31, -4 for DN=-27, -11 for DN=-20 ...
# AmplifydB(-4.0)
# Define transformation function
</ScriptPrologue>
<Option>
<Name>Film Standard</Name>
<Value>
# Film Standard. Segments: (Noise) +6dB 2:1 = 20:1
# Points: ------- ------- ------- ------- ------- -----
SoxFilter("compand 0.1,0.3 -90,-90,-70,-64,-43,-37,-31,-31,-21,-21,0,-20 0 0 0.1")
</Value>
</Option>
<Option>
<Name>Film Light</Name>
<Value>
# Film Light Segments: (Noise) +6dB 2:1 = 20:1
# Points: ------- ------- ------- ------- ------- -----
SoxFilter("compand 0.1,0.3 -90,-90,-70,-64,-53,-47,-41,-41,-21,-21,0,-20 0 0 0.1")
</Value>
</Option>
<Option>
<Name>Music Standard</Name>
<Value>
# Music Standard Segments: (Noise) +12dB 2:1 = 20:1
# Points: ------- ------- ------- ------- ------- -----
SoxFilter("compand 0.1,0.3 -90,-90,-70,-58,-55,-43,-31,-31,-21,-21,0,-20 0 0 0.1")
</Value>
</Option>
<Option>
<Name>Music Light</Name>
<Value>
# Music Light Segments: (Noise) +12dB 2:1 = 2:1
# Points: ------- ------- ------- ------- ------- -----
SoxFilter("compand 0.1,0.3 -90,-90,-70,-58,-65,-53,-41,-41,-21,-21,0,-11 0 0 0.1")
</Value>
</Option>
<Option>
<Name>Speech</Name>
<Value>
# Speech Segments: (Noise) +15dB 5:1 = 20:1
# Points: ------- ------- ------- ------- ------- -----
SoxFilter("compand 0.1,0.3 -90,-90,-70,-55,-50,-35,-31,-31,-21,-21,0,-20 0 0 0.1")
</Value>
</Option>
<ScriptEpilogue>
# Normalize recommended because volume is always less than -20 dB (except Music Light -11)
# Normalize() # But Normalize don't work after SoxFilter("compand...")
# SoxFilter work with 32 bit integer, and at last wav output is send 32 bit. Then maybe...:
# ConvertAudioTo16Bit()
</ScriptEpilogue>
</MultiOptionDSP>
</Plugin>
</AudioDSP>
</BeHappy.Extension>

Sorry to quote this whole thing, from a long time ago. But I had a look at the Sox compand function for your Film Standard DRC, and it seems to me that it doesn't produce the expected DRC curve from Dolby. I did a plot of it with gnuplot, from Sox.

I tried to modify it to make it look like the expected curve, and this one did seemed to do the trick.

Film Standard:

compand 0.1,0.3 -90,-84,-43,-37,-31,-31,-26,-26,-16,-21,0,-20.25 0 0 0.1

I don't know why Dolby mentions the final cut range to go from 16dB... to +4dB in their documents, since 0 dBFS is our limit to work with. Also, the dial norm of -31dB doesn't seem to be symmetric in the the null band for this DRC profile, while for Film Light it is. That's something I also don't understand.

Maybe you have a comment on this, after all these years? ;)

Reino
7th April 2013, 17:41
Yes, seems the last Bass.dll version 2.4.9 don't work at all with the interface to AviSynth BassAudio.dll.
We need remain with 2.4.8 version.What about BASS 2.4.10?

Could you let the next BassAudio version accept original BASS add-on filenames? At the moment it seems BassAudio only accepts BASS add-ons with an underscore in their filename (bass_xxx.dll, like the 3th-party add-ons). BASS' own add-ons; basswma, basscd, bassflac, basswv and bassopus, don't have an underscore in their original filename. You'd have to add one manualy for BassAudio to work.

Jenyok
7th April 2013, 19:21
tebasuna51
.
Where could I find algorithm "A real time audio upmixing method from stereo to 7.1 channel audio" ?
Discription of this algorithm.
.
Thanks.
.

tebasuna51
7th April 2013, 20:06
What about BASS 2.4.10?

Still untested. Work for you?

Could you let the next BassAudio version accept original BASS add-on filenames?
...
You'd have to add one manualy for BassAudio to work.

Maybe in next version. But is really easy, or not?

Where could I find algorithm "A real time audio upmixing method from stereo to 7.1 channel audio"?
Sorry I don't know.
Maybe is better use receivers DSP's to do this job.

Jenyok
8th April 2013, 06:18
tebasuna51
.
One more question to you.
.
What string parameters in SoxFilter(...) function for AVISynth could I use to achive following result "Concert Hall Light, No combine sourse Left аnd Right" ?
.
Thanks.
.

tebasuna51
8th April 2013, 12:58
What is "Concert Hall Light, No combine sourse Left аnd Right"?
A DSP function of a receiver?

Sorry but I can't help you with your questions.

Jenyok
8th April 2013, 13:18
New improvments and changes.
.
There are some functions to convert MONO audio signal to PSEUDO STEREO.
There are some functions to convert STEREO audio signal to 5.1 audio signal.
Added new functions to script.
.
Version 1.5 .
.
See description in code section.
See attached RAR file.
.

#
# File: Stereo.avsi
#
#
# Date: 08.04.2013 year
# Version: 1.5
#
#
# License: GNU GENERAL PUBLIC LICENSE
#
#
# Author: Jenyok (Evgeniy Gurovskikh, Russia, Moscow)
# E-Mail: e_gurovskikh@mail.ru
#
#
# Functions (pseudo Stereo and other sound functions) for AVISynth
#
# For all occasions of life (На все случаи жизни) ...
#
#
# Plugin and Import
#
# SoxFilter.dll
#
#
#
# function GetLeftChannel(clip clp)
# function GetRightChannel(clip clp)
# function Phase180(clip clp)
#
#
# function PhaseDelay(clip clp, float "freq", float "phi") Shift (rotate) phase of audio to a different angle
# function PhaseShift(clip clp, float "freq", float "phi") Shift (rotate) phase of audio to a different angle
# function PhaseShift2(clip clp, float "freq", float "freq2", float "phi") Shift (rotate) phase of audio to a different angle
#
# function MonoToStereo(clip clp) Convert MONO audio to STEREO audio
# function PseudoStereo1(clip clp, int "Channel", float "Delay") Only DELAY between channels, Delay in Sec
# function PseudoStereo12(clip clp, int "Channel", float "Delay", float "KMix") DELAY, L=L*k1+R*k2, R=R*k1+L*k2 (Addition)
# function PseudoStereo13(clip clp, int "Channel", float "Delay", float "KMix") DELAY, L=L*k1-R*k2, R=R*k1-L*k2 (Substraction)
#
# function PseudoStereo2(clip clp, int "Channel", float "LowFreq", float "HighFreq", bool "isDelay")
#
# function PseudoStereo3(clip clp, int "Channel", bool "isDelay") Described: Magazine "Radio" № 6, 1985 year, page 62 (USSR, Russia)
# function PseudoStereo33(clip clp, int "Channel", bool "isDelay") Described: Magazine "Radio" № 6, 1985 year, page 62 (USSR, Russia)
#
# function PseudoStereo4(clip clp, int "Channel", bool "isDelay") US Patent No 6,636,608 B1
# function PseudoStereo43(clip clp, int "Channel", bool "isDelay") US Patent No 6,636,608 B1
#
# function PseudoStereo5(clip clp, int "Channel", bool "isDelay") Analog: Philips chip TDA3810 (sound porcessor)
# function PseudoStereo52(clip clp, int "Channel", bool "isDelay") Analog: Philips chip TDA3810 (sound porcessor)
#
#
# function StereoEnhancer(clip clp) Analog: Philips chip TDA3810 (sound porcessor)
#
#
# function StereoTo51(clip clp, bool "is24bit", bool "isStereo") Convert STEREO to 5.1 audio, 24 bits output
#
# function UpDialog(clip clp) Convert STEREO to 5.1 audio
# function UpDialog2(clip clp) Convert STEREO to 5.1 audio
# function UpAction(clip clp) Convert STEREO to 5.1 audio
# function UpAction2(clip clp) Convert STEREO to 5.1 audio
# function UpGerzen(clip clp) Convert STEREO to 5.1 audio
# function UpFarina(clip clp) Convert STEREO to 5.1 audio
# function UpMultisonic(clip clp) Convert STEREO to 5.1 audio
# function UpSoundOnSound(clip clp) Convert STEREO to 5.1 audio
#
#
# function Dmix3Stereo(clip a) Downmix sound functions
# function Dmix3Dpl(clip a) Downmix sound functions
# function Dmix4lStereo(clip a) Downmix sound functions
# function Dmix4qStereo(clip a) Downmix sound functions
# function Dmix4sDpl(clip a) Downmix sound functions
# function Dmix5Stereo(clip a) Downmix sound functions
# function Dmix5Dpl(clip a) Downmix sound functions
# function Dmix5Dpl2(clip a) Downmix sound functions
# function Dmix6Stereo(clip a) Downmix sound functions
# function Dmix6Dpl(clip a) Downmix sound functions
# function Dmix6Dpl2(clip a) Downmix sound functions
# function Dmix6StereoLfe(clip a) Downmix sound functions
# function Dmix6StereoLfe2(clip a) Downmix sound functions
# function Dmix6DplLfe(clip a) Downmix sound functions
# function Dmix6Dpl2Lfe(clip a) Downmix sound functions
#
#

.

LigH
9th April 2013, 07:47
@ tebasuna51:

"Concert Hall" is probably a reverb model. There is a brief explanation in a webpage about a Lexicon reverb filter (http://www.lexiconpro.com/en/products/pcm-native-concert-hall-reverb). I don't know if there is any kind of parametrical implementation; modern reverb filters will probably use "convolution" impulse response models (applying the recorded echo of a sharp impulse in a real sample room to the input sound).

Jenyok
10th April 2013, 14:32
New improvments and changes.
.
There are some functions to convert MONO audio signal to PSEUDO STEREO.
There are some functions to convert STEREO audio signal to 5.1 audio signal.
Added new functions to script.
.
Version 1.6 .
.
See description in code section.
See attached RAR file.
.

#
# File: Stereo.avsi
#
#
# Date: 10.04.2013 year
# Version: 1.6
#
#
# License: GNU GENERAL PUBLIC LICENSE
#
#
# Author: Jenyok (Evgeniy Gurovskikh, Russia, Moscow)
# E-Mail: e_gurovskikh@mail.ru
#
#
# Functions (pseudo Stereo and other sound functions) for AVISynth
#
# For all occasions of life (На все случаи жизни) ...
#
#
# Plugin and Import
#
# SoxFilter.dll
#
#
#
# function GetLeftChannel(clip clp)
# function GetRightChannel(clip clp)
# function Phase180(clip clp)
#
#
# function PhaseDelay(clip clp, float "freq", float "phi") Shift (rotate) phase of audio to a different angle
# function PhaseShift(clip clp, float "freq", float "phi") Shift (rotate) phase of audio to a different angle
# function PhaseShift2(clip clp, float "freq", float "freq2", float "phi") Shift (rotate) phase of audio to a different angle
#
# function MonoToStereo(clip clp, int "Channel") Simple convert MONO audio to STEREO audio
# function PseudoStereo1(clip clp, int "Channel", float "Delay") Only DELAY between channels, Delay in Sec
# function PseudoStereo12(clip clp, int "Channel", float "Delay", float "KMix") DELAY, L=L*k1+R*k2, R=R*k1+L*k2 (Addition)
# function PseudoStereo13(clip clp, int "Channel", float "Delay", float "KMix") DELAY, L=L*k1-R*k2, R=R*k1-L*k2 (Substraction)
#
# function PseudoStereo2(clip clp, int "Channel", float "LowFreq", float "HighFreq", bool "isDelay")
# function PseudoStereo22(clip clp, int "Channel", bool "isDelay")
# function PseudoStereo23(clip clp, int "Channel", bool "isDelay")
#
# function PseudoStereo3(clip clp, int "Channel", bool "isDelay") Described: Magazine "Radio" № 6, 1985 year, page 62 (USSR, Russia)
# function PseudoStereo33(clip clp, int "Channel", bool "isDelay") Described: Magazine "Radio" № 6, 1985 year, page 62 (USSR, Russia)
#
# function PseudoStereo4(clip clp, int "Channel", bool "isDelay") US Patent No 6,636,608 B1
# function PseudoStereo43(clip clp, int "Channel", bool "isDelay") US Patent No 6,636,608 B1
#
# function PseudoStereo5(clip clp, int "Channel", bool "isDelay") Analog: Philips chip TDA3810 (sound porcessor)
# function PseudoStereo52(clip clp, int "Channel", bool "isDelay") Analog: Philips chip TDA3810 (sound porcessor)
#
#
# function StereoEnhancer(clip clp) Analog: Philips chip TDA3810 (sound porcessor)
#
#
# function StereoTo51(clip clp, bool "is24bit", bool "isStereo") Convert STEREO to 5.1 audio, 24 bits output
#
# function UpDialog(clip clp) Convert STEREO to 5.1 audio
# function UpDialog2(clip clp) Convert STEREO to 5.1 audio
# function UpAction(clip clp) Convert STEREO to 5.1 audio
# function UpAction2(clip clp) Convert STEREO to 5.1 audio
# function UpGerzen(clip clp) Convert STEREO to 5.1 audio
# function UpFarina(clip clp) Convert STEREO to 5.1 audio
# function UpMultisonic(clip clp) Convert STEREO to 5.1 audio
# function UpSoundOnSound(clip clp) Convert STEREO to 5.1 audio
#
#
# function Dmix3Stereo(clip a) Downmix sound functions
# function Dmix3Dpl(clip a) Downmix sound functions
# function Dmix4lStereo(clip a) Downmix sound functions
# function Dmix4qStereo(clip a) Downmix sound functions
# function Dmix4sDpl(clip a) Downmix sound functions
# function Dmix5Stereo(clip a) Downmix sound functions
# function Dmix5Dpl(clip a) Downmix sound functions
# function Dmix5Dpl2(clip a) Downmix sound functions
# function Dmix6Stereo(clip a) Downmix sound functions
# function Dmix6Dpl(clip a) Downmix sound functions
# function Dmix6Dpl2(clip a) Downmix sound functions
# function Dmix6StereoLfe(clip a) Downmix sound functions
# function Dmix6StereoLfe2(clip a) Downmix sound functions
# function Dmix6DplLfe(clip a) Downmix sound functions
# function Dmix6Dpl2Lfe(clip a) Downmix sound functions
#
#

.

tebasuna51
13th April 2013, 11:24
See my opinion about 2.0 -> 5.1 conversions in this post (http://forum.doom9.org/showthread.php?p=1623979#post1623979).

XeoneR
23rd May 2013, 22:21
One of the greatest tool ever..

Any chance of the opus support?

LigH
24th May 2013, 07:26
Yes, there is an Opus plugin supported in BASS. Getting it supported in the AviSynth BassAudio plugin has been discussed already, I am just not sure if here or in the HydrogenAudio forum...

tebasuna51
24th May 2013, 15:55
Yes, to decode a opus file you need download bassopus.dll from http://www.un4seen.com/ , rename it to bass_opus.dll and put it with BassAudio.dll and Bass.dll suplied with BeHappy at the default AviSynth-plugin folder.

Richard1485
6th November 2013, 22:22
Behappy appears unable to downmix AC-3 4.0 to 2.0 with NicAC3Source(). It attempts to downmix it as if were a six-channel mix and uses GetChannel() on non-existent channels.

tebasuna51
8th November 2013, 00:26
BeHappy have only a few pre-definned downmix functions, see DownMix.extension.

The users can modify DownMix.extension or load the .avs than make the correct downmix.

Kempy72
26th November 2013, 02:29
link (http://www.openurls.org/)

LigH
4th January 2014, 14:53
As far as I can read the sources, not really being a C coder (m2audio_lpcm.cpp / m2audio_rawav.cpp):

"NicLPCMSource" is for headerless integer PCM audio which requires all attributes explicitly; Motorola (Big Endian) order – as usual for DVD and Blu-ray PCM – is supported by negative sample bits, it may also support the (4LSB-interleaved) 20-bit sample format in DVD Video LPCM streams.

"RaWavSource" is for uncompressed intel (Litte Endian) integer and IEEE float PCM content in WAV and W64 container, it contains a RIFF / RF64 chunk parser.

Wilbert
5th January 2014, 13:55
Yes i saw that when reading the sources (that's why i deleted my post, must have crossed your reply). Thanks anyway!

siella
27th January 2014, 22:56
All extensions update as last versions of encoders. i added dts encoder and fgh aac encoder estensions. Also I added logo.
All extensions is start with @ now
http://109.imagebam.com/download/Tuz449s2JwDKC6IoF8eJpQ/30429/304289834/8.png

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.3)
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.70)

-- lossy multichannel encoders
neroAacEnc.exe (free AAC-MP4 encoder from Nero, http://www.nero.com/eng/technologies-aac-codec.html v1.5.4.0)
aften.exe (free AC3 encoder by Justin Ruggles, in http://code.google.com/p/wavtoac3encoder/downloads/list v)
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 http://www.un4seen.com/filez/4/enc_aacPlus.zip)
enc_aacplus.dll (free AAC CT encoder , from full Winamp 5.66)
nscrt.dll (needed for enc_aacplus.dll, from full Winamp 5.5)
libmp4v2.dll (needed for enc_aacplus.dll mp4 output, from full Winamp 5.66)

ffmpeg.exe (many options, maybe: http://ffmpeg-builds.sourceforge.net/)
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)

qtaacenc.exe (Apple quicktime aac encoder, it needs QuickTime 7.6.2 or later and VC2008 runtime http://tmkk.undo.jp/qtaacenc/
fhgaacenc.exe (interface for enc_fhgaac.dll, http://tmkk.undo.jp/tools/fhgaacenc-20120624.zip)
enc_fhgaac.dll (Fraunhofer FHG AAC Encoder, new version of AAC CT encoder, needed for fhgaacenc.exe from winamp 5.66)
nsutil.dll (needed for enc_fhgaac.dll, from full Winamp 5.66)

dcaenc.exe (dcaenc free DTS encoder,http://aepatrakov.narod.ru/index/0-2, v2)

-- lossy only stereo encoders
lame.exe (free MP3 encoder http://www.rarewares.org/mp3-lame-bundle.php, v3.99.5)
twolame.exe (free MP2 encoder, http://www.rarewares.org/mp3-others.php#twolame, included v0.3.13)
mpcenc.exe (free MPC MusePack encoder, http://www.musepack.net, v1.30)

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.

For nero encoder information look at http://wiki.hydrogenaudio.org/index.php?title=NeroAAC

http://110.imagebam.com/download/K6S39gvuFBlyKVnunpwQuQ/30429/304289813/1.png
http://111.imagebam.com/download/tsdGHAejP-ErjwMgR42Xsg/30429/304289818/2.png
http://112.imagebam.com/download/FvWeUVSirPpaJK14z8pHgw/30429/304289822/3.png
http://109.imagebam.com/download/WRxX96eMjGxVjlLEljlYEg/30429/304289823/4.png
http://111.imagebam.com/download/o0jMp24PnVttLoHbcobT8g/30429/304289826/5.png
http://109.imagebam.com/download/F2ZSr1nO7sULlAUNWEAfAQ/30429/304289831/6.png

tebasuna51
28th January 2014, 00:55
... i added dts encoder and fgh aac encoder estensions. Also I added logo.

Thanks.

(I never know how to add a logo)

Tom Keller
28th January 2014, 16:32
I've got some additional Extensions:
one for the usage of qaac (http://sites.google.com/site/qaacpage/) (if someone prefer it over qtaacenc)
and another one for opusenc (http://www.opus-codec.org/downloads/)

(I never know how to add a logo)
The logos are *.png files as Base64 coded text. So you simply have to create your logo with the graphics software of your choice, then use one of the many Base64 online converters (http://base64converter.com/) to upload and convert the image... and add it to your *.extension file afterwards.

tebasuna51
28th January 2014, 17:03
Thanks.

New options:

LigH
30th January 2014, 09:53
I wonder if extensions are configurable in another way. This huge bunch of radio buttons makes me uncomfortable. Especially for QAAC, where I would prefer more options between quality 73 and 100 (I often prefer 82, but would never consider using the lowest possible). Using radio buttons to choose between CBR, CVBR and (t)VBR, and then having combo boxes to select the bitrate or quality level, may be more convenient, but would have to be supported by the extension designer features.

Tom Keller
30th January 2014, 16:25
Yes... i know - or some kind of slider for choosing the bitrate would be much more comfortable too. But as far as i understand, that's (sadly) not possible with the XML based extension scripts.

siella
2nd February 2014, 17:59
that's (sadly) not possible with the XML based extension scripts.
That's right. Behappy written C# language also is open source and maybe some person who know C# programmer add radio button.

Reino
2nd February 2014, 21:26
Also I added logo.How do you translate a picture to characters of code you can use in a text file?

Strange, I completely overlooked that paragraph. Thanks, LigH

LigH
2nd February 2014, 21:37
@ CoRoNe:

The logos are *.png files as Base64 coded text. So you simply have to create your logo with the graphics software of your choice, then use one of the many Base64 online converters (http://base64converter.com/) to upload and convert the image... and add it to your *.extension file afterwards.

Tom Keller
5th February 2014, 14:43
That's right. Behappy written C# language also is open source and maybe some person who know C# programmer add radio button.
I think that's highly unlikely, since no programmer was interested in the further development of BeHappy for quite a while.

tebasuna51
9th February 2014, 18:45
Warning!

Bug detected in FraunhoferMp3.extension in the package of previous post.

Use this one instead:

Edit: file updated.

Sorry, I don't see the Siella edition of next post until now

siella
10th February 2014, 10:06
Warning!

Bug detected in FraunhoferMp3.extension in the package of previous post.

Use this one instead:

Thanks tebasuna51
-if - -of "{0}" -q 1 -eof -res {2} -br 0 -m 1 -sr {1} -res {2} -c {3} -vbri
but why did you write -res {2} command double?

siella
7th May 2014, 17:10
I made ffaudio extension to use geting and decoding directly audio files from avi,mkv,mp4,flv,m2ts and ts container.
You need to download ffms2.dll and put in to avisynth plugin folder
https://ffmpegsource.googlecode.com/svn/trunk/doc/ffms2-avisynth.html
Also it request installed hali media splitter on your pc.
FFAudio create index file in path of your video.
FFAudioNoindex doesnt creat file. It writes on ram. But If you dont have enough ram I dont recommend. it use ram above 200 mb for hd video.

LigH
7th May 2014, 17:18
Certainly a useful extension. :thanks:

Slightly more useful may be an L-SMASH Works extension, though; the splitters of LAVFilters are more reliable, LwLibavAudioSource() doesn't need the help of Haali to read MPEG containers.

siella
8th May 2014, 11:10
Well I made extension for l-smash as a alternative. Diffirent is if you use LWAudioNoindex spend ram more less than FFAudioNoindex. But if use LWAudio index file size more than FFaudio

Download here https://drive.google.com/folderview?id=0BwV03nn6LPd9OXJUWVVMMXZmNUU&usp=sharing
Copy LSMASHSource.dll to avsynth plugin folder. Also you need msvcr120.dll (not 64bit) put in to system32 folder. (if your system 64bit put in to SysWOW64)
LWAudio create index file in path of your video.
LWAudioNoindex doesnt create index file.

LigH
8th May 2014, 11:47
Also you need msvcr120.dll (not 64bit) put in to system32 folder. (if your system 64bit put in to SysWOW64)

Or much more reliable: Install Microsoft's Visual C++ Redistributable Packages für Visual Studio 2013 (http://www.microsoft.com/de-de/download/details.aspx?id=40784) 32-bit (vcredist_x86.exe).

P.S.: :thanks:

siella
8th May 2014, 11:51
Thanks LigH

siella
9th May 2014, 17:06
I change dts extension. Dcaenc doesnt support 24 bit or 32 bit float. Now it will be auto convert 32bit int.

Reino
27th July 2014, 14:10
BassAudio.dll (v2.4 2008) was compiled with Visual C++ Express 2005.

I make a new compile with Visual C++ Express 2010, with a more recent version of AviSynth.h and the last Bass.h (with Bass.dll 2.4.9).Hi tebasuna, could you release the source codes for this compile, so someone else can have a look to make it work with BASS 2.4.10?

tebasuna51
28th July 2014, 09:45
Hi tebasuna, could you release the source codes for this compile, so someone else can have a look to make it work with BASS 2.4.10?
Of course, here is:

siella
6th November 2014, 21:20
I added new exts., fix some and togethered all.
http://i.imgbox.com/PDciLZ1Z.png

LigH
6th November 2014, 23:58
By the way, a user of the german doom9/Gleitz board recently made a multithreaded fork of BeHappy (one file conversion per thread in a batch). No decision yet if he may also try to enhance the extension interface (e.g. with sliders or comboboxes)...

siella
9th November 2014, 00:38
Thanks for this great news. It will be very good if he made. I liked options of drag'n and drop and paralel jobs

jones1913
9th November 2014, 21:35
Thanks for mention it, LigH.

Here is the download link: http://www.mediafire.com/folder/qc84j3132cvnp/BeHappy

14475
14476

Sourcecode is included in download archive.


2014-11-09 (jones1913) v0.2.6.34898
+ multiple files/folders can be opened at once

2014-10-19 (jones1913) v0.2.6.18337
+ added parallel job processing
+ some gui modernization/tweaks

forclip
9th November 2014, 23:06
Of course, here is:
Thanks.

Not a fix:
Comment out the BASS_Free() call and then ignore BASS_ERROR_ALREADY on BASS_Init(). Not sure what else will be broken after that.. :p

The real fix:
Move everything related to bass (un)initialization from DllMain to other place, as it seems like bass 2.4.9+ doesn't like to be Init'ed or Free'd from that point, it hangs. BASS_Init(0,48000,0,0,0) - works, yes, but BASS_Init(1,48000,0,0,0) - hangs. And nothing hangs after moving it to bassAudioSource(), including BASS_Free().

tebasuna51
10th November 2014, 03:03
@jones1913
Thanks for your job.

Like you can see noboby is active developing this tool in CodePlex, if you are interested I can add you to the BeHappy team like Developer (I need your Codeplex username)

tebasuna51
10th November 2014, 03:15
The real fix:
Move everything related to bass (un)initialization from DllMain to other place, as it seems like bass 2.4.9+ doesn't like to be Init'ed or Free'd from that point, it hangs. BASS_Init(0,48000,0,0,0) - works, yes, but BASS_Init(1,48000,0,0,0) - hangs. And nothing hangs after moving it to bassAudioSource(), including BASS_Free().
Sorry, I don't understand the fix needed.

Can you supply a functional new source code?

forclip
10th November 2014, 19:44
Something like this, at least it works for me with bass.dll 2.4.10: http://ge.tt/7t9vkD42/v/0 (src + bassAudio.dll)
Also, this way bassAudio unloads noticeably faster than the original one.

jones1913
10th November 2014, 21:32
if you are interested I can add you to the BeHappy team like Developer (I need your Codeplex username)

Yeah Im not yet registered at codeplex, but I will do it.

I have no experience in code revision control systems. Which system is used by BeHappy project on codeplex? SVN, Git?

tebasuna51
12th November 2014, 08:18
The Project was created by Dimzon using Team Foundation Server / Subversion and I use TortoiseSVN to manage it.

Now recommend Git, but I don't know if can be converted.

Kurtnoise
12th November 2014, 11:03
Now recommend Git, but I don't know if can be converted.
Sure it does...for example, using this (http://svn2github.com/).

tebasuna51
12th November 2014, 14:33
@Kurtnoise
You are Coordinator like me in BeHappy project, the other Cordinator (and creator) Dimzon have 'Last Activity: 5th November 2009' in Doom9.

If you think than is more convenient convert the project to Git you are free to do.

Kurtnoise
12th November 2014, 16:02
I dont see any benefit for the moment to switch to Git for this project...So, stay with SVN and that should be fine.

jones1913
12th November 2014, 21:13
Git seems to be well suited for projects with many contributing people or teams.
This is obviously not the case for BeHappy. So SVN is good enough :cool:.

@tebasuna
Codeplex username is 'jones1913'. When you add me i will check in my changes.

tebasuna51
12th November 2014, 23:28
@jones1913
You are now BeHappy Developer.

tebasuna51
13th November 2014, 00:05
Something like this, at least it works for me with bass.dll 2.4.10: http://ge.tt/7t9vkD42/v/0 (src + bassAudio.dll)
Also, this way bassAudio unloads noticeably faster than the original one.

I forget say thank you. Work also for me.

Reino
13th November 2014, 02:03
Something like this, at least it works for me with bass.dll 2.4.10: http://ge.tt/7t9vkD42/v/0 (src + bassAudio.dll)
Doesn't work for me:
Evaluate: System exception - Illegal Instruction
or,
bassAudioSource: Unable to load or init bass.dll!
for numerous audioformats.
That's on my WinXP pc. Tomorrow I'll test on a Win7 laptop.

forclip
13th November 2014, 04:24
I forget say thank you. Work also for me.
No problem :)

WinXP
Please try this one http://ge.tt/8ngKhP42/v/0 (v110_xp, v110_xp SSE)

tebasuna51
13th November 2014, 04:59
Please try this one http://ge.tt/8ngKhP42/v/0 (v110_xp, v110_xp SSE)

Work also in my W7 system.

LigH
13th November 2014, 09:44
"Illegal instruction" sounds like too much CPU optimization?

Reino
13th November 2014, 21:50
@forclip:
No SSE2 indeed ;)
Therefor only bassAudio_SSE.dll works on my WinXP pc. The two (SSE2) bassAudio.dll work perfectly on the Win7 laptop.
Thanks a lot!

Reino
13th November 2014, 22:22
forclip, I have 2 feature requests, if I may:

Is there a reason why opening tracker music (umx/mod/mo3/s3m/xm/it) fails with BassAudioSource? Or is opening audio through Avisynth limited to sample audio?Yes, don't work with umx/mod/mo3/s3m/xm/it.
- Do you perhaps have the knowhow to add support for tracker-files?

Could you let the next BassAudio version accept original BASS add-on filenames? At the moment it seems BassAudio only accepts BASS add-ons with an underscore in their filename (bass_xxx.dll, like the 3th-party add-ons). BASS' own add-ons; basswma, basscd, bassflac, basswv and bassopus, don't have an underscore in their original filename. You'd have to add one manualy for BassAudio to work.
- Have BassAudio accept the original filename (without underscore) of BASS' own add-ons.

forclip
13th November 2014, 23:36
- Do you perhaps have the knowhow to add support for tracker-files?

For such kind of files another method must be used (BASS_MusicLoad (http://www.un4seen.com/doc/#bass/BASS_MusicLoad.html) instead of BASS_StreamCreateFile (http://www.un4seen.com/doc/#bass/BASS_StreamCreateFile.html), with appropriate flags). I don't think I'm very interested in it, so..


- Have BassAudio accept the original filename (without underscore) of BASS' own add-ons.
Most probably this was done to filter out all *.dlls in current folder, so only those that are bass-plugins ("bass_" prefixed) will be BASS_PluginLoad'ed.
Theoretically there can be other dlls, AviSynth plugins (if someone decided to put everything in one place), runtimes. It seems quite reasonable to not try to load them all.

I'm glad that it now works for you too :)

-----

At your own risk: http://ge.tt/5qvijT42/v/0
Firstly it tries BASS_StreamCreateFile, if it fails - BASS_MusicLoad with BASS_MUSIC_SINCINTER and BASS_MUSIC_RAMP (and BASS_STREAM_PRESCAN | BASS_STREAM_DECODE | BASS_MUSIC_POSRESETEX, required for bassAudio). Works for me, but I have only one such file, so "untested".

Reino
14th November 2014, 21:42
...so only those that are bass-plugins ("bass_" prefixed) will be BASS_PluginLoad'ed.
I don't know any Avisynth plugins that begin with "bass", so "bass" as prefix would suffice just as well and can easily be changed in line 132 of bassAudio.cpp.

At your own risk: http://ge.tt/5qvijT42/v/0
Wow, thanks a lot! All tracker files I've tested so far play flawlessly.
I do however have some samples that have several "chapters", like Twilight.umx (http://www.mediafire.com/download/8tn4s3hg3h12hue/Twilight.umx) for instance. Foobar2000 (with foo_dumb) shows me the file consists of 4 segments: segment 1 (2:18), segment 2 (3:49), segment 3 (0:50) and segment 4 (4:15) (11:12 in total). BassAudio (and DC-BSM btw) only load segment 1 and I don't know if BASS is capable of loading all segments.
I've uploaded Twilight.mka (http://www.mediafire.com/download/ajug5lf7ifo6dwn/Twilight.mka) (Twilight.umx encoded to a 48Kbps Opus stream and muxed to Matroska with chapters), in case you don't have foobar2000, so you can listen to all segments.

forclip
15th November 2014, 03:48
I don't know any Avisynth plugins that begin with "bass"

Well, bassAudio.dll, bass.dll :p . Anyway, I like how it currently is, I don't think it is so hard to rename those plugins after downloading. How often it is required? Surely not every day.

Twilight.umx - can be played in a very tricky way. Here is (http://www.un4seen.com/forum/?topic=2650.msg17705#msg17705) a short explanation. But knowing starting positions "in orders" doesn't make a lot of sense, it's only part of the problem. So I would say that bassAudio will stay limited in playing such files..

tebasuna51
15th November 2014, 10:09
Well, bassAudio.dll, bass.dll :p . Anyway, I like how it currently is, I don't think it is so hard to rename those plugins after downloading. How often it is required? Surely not every day.
I agree.

I was thinking about this problem and I don't found a easy solution.

Reino
15th November 2014, 19:24
Understood. Thanks for you effort, forclip.

tebasuna51
12th December 2014, 16:12
New stable release BeHappy-0.2.6.34898e including BassAudio new versions.

StainlessS
13th December 2014, 10:02
:thanks:Thanx tebasuna51

LigH
13th December 2014, 10:57
:thanks: tebasuna51 for keeping the project alive and jones1913 for the now merged multi-threading fork.

jones1913
13th December 2014, 12:32
New stable release BeHappy-0.2.6.34898e including BassAudio new versions.

Ok, after 300+ downloads without complaints my beta release can be considered to be stable.

Some days ago I made a mini svn commit but I though it was not worth to pack a new release.
If someone will try I have just uploaded a built (.exe only) to mediafire.
EDIT: removed invalid link

Anyway I have a few ideas to further improve the usability but this will not happen this year.
I hope I have more free time next year to work on this app.

tebasuna51
14th December 2014, 08:48
Thanks to jones1913 and forclip, I only join your jobs.

And thanks to siella, and Tom Keller, for the extensions pack, I don't include the pack (only I correct a bug in previous FraunhoferMp3) in the release because I don't have time to check all new encoders, and each user is free to add the needed ones.

Also to CoRoNe for force us to improve the app.

siella
18th December 2014, 10:58
Thanks to jones1913 and tebasuna51 for keeping alive behappy project. I found bug but i am not sure so i ll test again and i ll report in here. Problem is behappy doesnt decode bit of ac3 audio file correctly. I looked ac3 file with mediainfo and it gave 16 bit but when i try to decode with bassadio, ffaudio or nicac3 behappy show 32 bit float.

LigH
18th December 2014, 11:14
Again this confusing topic...

Most lossy audio compression technologies with psycho-acoustic spectrum masking (like MP2, MP3, AC3, AAC...) work in a floating-point mode, they will transform the samples into audio spectrums of brief blocks and store parameters of a Fourier transformation. Decoding them back into samples again will return floating point samples at first. They may be converted to integer samples later, or not, depending on the decoder.

I don't know which resolution of 16 bit MediaInfo reports. That may be the resolution of the input samples which the encoder used. But that doesn't matter. As soon as there is an AC3 bitstream, there are no more 16 bit integer samples. Only a sequence of encoded frequency spectrums in AC3 blocks.

tebasuna51
18th December 2014, 18:39
:goodpost: LigH

BeHappy preserve the output of the decoders (32 bits float, max precission in AviSynth) and only downsample when the next encoder don't support this precission.

Or when you, manually, add a Convert Sample To ... function.

jones1913
27th December 2014, 14:21
Maybe declaring this as stable was a bit too optimistic.

I found an error in jobs start logic, but it was actually only noticeable when using DSP scripts with initialization delay (eg. normalize filter) or source plugins which are delayed while creating an index (LWLibavAudioSource).
In this case jobs can simply crash or can finish with "done" status but with broken audio output file (with size of only a few kB).

I have just commited a fix.
Now a job is only started if the previous job has properly initialized and reached at least a progress of 1%.
This can lead to a more delayed start of each job now (depending on source/dsp filters and filesize).
But of course correct audio output is much more important than speed.

SVN-builds can be found in my mediafire folder. (https://www.mediafire.com/folder/g6bmfizehfa5m/SVN) (Link also in my signature)

jones1913
2nd January 2015, 13:01
Happy new year to all!

The last days I had some time and so I have worked through the code to see if Im able to extend the extension system,
for more functional and visually rich extension plugins (good advertising slogan he?).

Until now I was not very familiar with the xml-deserialization technique used by BeHappy, but it was actually quite simple to understand.

What I have done so far is:
- added some more elements to multi-option class so we can add a trackbar, comboboxes and checkboxes additional to the existing radiobuttons
- renamed some things (all plugins must be recreated anyway)
- make the current plugin configuration saveable in behappy save state file (as before)

old:
http://abload.de/thumb/l16bshn.png (http://abload.de/image.php?img=l16bshn.png) http://abload.de/thumb/q1bws6p.png (http://abload.de/image.php?img=q1bws6p.png)

new:
http://abload.de/thumb/l2l3spf.png (http://abload.de/image.php?img=l2l3spf.png) http://abload.de/thumb/q2k0s16.png (http://abload.de/image.php?img=q2k0s16.png)



Of course all extensions needs to be recreated once this is finished , but I hope that someone can help me then (TomK.? siella?) :)

More infos soon..

LigH
2nd January 2015, 13:11
Now that will certainly be a Happy New Year!

http://cosgan.de/images/smilie/musik/n015.gif (http://www.cosgan.de/smilie.php)

tebasuna51
2nd January 2015, 13:34
Happy new year!

Can you upload the new qaac.extension to see the changes needed?

jones1913
2nd January 2015, 19:03
Hehe patience please,
I will tomorrow make a package with all needed files, but first I must clean up the things a bit.


a few general notes:


as long the new extension specification is not "frozen" there is no need to convert all plugins
But: I have worked so far only with qaac and l-smashSource plugin, other encoders or sources may have other requirements,
so it would make sence to first convert some prominent plugins to see if there are fundamental bugs or if more window controls are needed



suggestions about additional usefull window controls are welcome (maybe optional textbox for command args or so?)



my current approach seems to work good for encoder and source plugins, not for dsp plugins.
I think configuring complex avisynth scripts for dsp functions is anyway beyond what we can achieve with the current xml extension system.
So for dsp plugins we wont see big changes here.



suggested new naming convention to tidy up extension directory:
- file extension is now ".ext" (looks better)
- encoder plugins start with "e_", dsp with "d_", source with "s_" (eg. "e_qaac.ext")



we can now specify the name of the needed avisynth plugin in the ext. file. If the plugin is found in "BeHappy\plugins32" folder
it will be explicit loaded from there. This makes behappy a bit more portable, but its of course fully optional.
(anyway I suggest to always specify the plugin.dll)



Man now Im tired of writing... Not to mention that the formatting takes almost longer than writing. :eek:
Thanks google translator in any case for help! :p

jones1913
3rd January 2015, 12:09
Here is a test version with 3 plugins and documentation included:
EDIT: removed invalid link

a few notes about window control arrangement:

http://abload.de/thumb/q2k0s16.png (http://abload.de/image.php?img=q2k0s16.png)


the window is unvisible tiled horizontal


upper side:
- this is the place for the radiobuttons and trackbar
- the trackbar is only shown if at least one radiobutton has specified one, otherwise its omited
- there exist only one trackbar dynamical assigned to selected radiobutton
- arrangement is top down, first radiobuttons, trackbar always bottom
- theoretical radiobuttons can be omited but then there can also exist no trackbar


lower side:
- place for comboboxes, checkboxes, url
- arrangement is left to right, first comboboxes, checkboxes, url
- every object here is optional


Thats currently all I can say about that. Feel free to ask if something is unclear.

siella
7th January 2015, 10:11
I treid BeHappy-0.2.6.34898e converting sample but didnt work. Can You check it?
@jones1913
Many thanks for new extantions feature i am going to start to create new extantions

LigH
7th January 2015, 10:35
No details about the source format.
No details about the setup.
No log file or error message.

So what do we have to check?

siella
7th January 2015, 10:39
well
########################################
#Created by BeHappy v0.2.6.34898
#Creation timestamp: 07.01.2015 11:36:11
########################################
#Source FileName:E:\1.mkv
#Target FileName:E:\1.dts
########################################

########################################
# [Source: FFAudioSource - First Audio]
########################################
FFAudioSource("E:\1.mkv")

########################################
# [DSP: Convert Sample To 16 bit int]
########################################
ConvertAudioTo16bit()

########################################
# [DSP: Resample SSRC - SpeedUp 23.976->25]
########################################
AssumeSampleRate(last, (AudioRate()*1001+480)/960).SSRC(AudioRate(last))

########################################
# [Encoder: @DTS Encoder @ 768 kbps]
########################################
16==Audiobits(last)?last:ConvertAudioTo32bit(last)


Found Audio Stream
Channels=6, BitsPerSample=32 int, SampleRate=48000Hz

BitsPerSample must be 16, older version can convert 16 bit
Source is 24 bit.
I geuss 16==Audiobits(last)?last:ConvertAudioTo32bit(last) command crushes ConvertAudioTo16bit()

LigH
7th January 2015, 10:56
There is indeed something surprising in the last command:

"If the result has 16 bit audio, then return it as it is, else convert it to 32 bit"?! That appears suspicious.

tebasuna51
7th January 2015, 11:37
There is indeed something surprising in the last command:

"If the result has 16 bit audio, then return it as it is, else convert it to 32 bit"?! That appears suspicious.

It's correct. The dcaenc support 16 bits and 32 bits int but not 24 bits or float.

BTW, I recommend use the fork ffdcaenc (http://forum.doom9.org/showthread.php?p=1688148#post1688148) with support for 24 bits and other benefits (read the full thread).

siella
7th January 2015, 11:46
Yes i know that but i convert with ConvertAudioTo16bit before but it doesnt effect

tebasuna51
7th January 2015, 12:21
Yes i know that but i convert with ConvertAudioTo16bit before but it doesnt effect
I see, but you have:

ConvertAudioTo16bit()

########################################
# [DSP: Resample SSRC - SpeedUp 23.976->25]
########################################
AssumeSampleRate(last, (AudioRate()*1001+480)/960).SSRC(AudioRate(last))

And:

SSRC Shibata Sample Rate Converter is a resampler. Audio is always converted to float

Change the DSP order if you want 16 bits.

siella
7th January 2015, 13:54
thanks tebasuna51. i changed order and now it is effected

siella
7th January 2015, 20:36
@jones1913

I am writing new extantions according to your new rules.
Firstly at DSP Tooltip box appears like this
http://i.imgbox.com/QEfmyXmi.png
it has space at front

List my asking for extantion
Could you
-add tag for note like url? I want to add some explanation like "it needs this dll or soft bla bla.."
-add default selected value for Trackbar?
-make multi load plugin tag for bass source or another one?
-add Standart values for Trackbar like constant bitrate of ac3 aften config
-show Dropdown Name at above choice
- add multiple wav source for encoding 5.1 audio?

jones1913
7th January 2015, 22:00
at DSP Tooltip box appears like this
haha strange, I will look into it

-add tag for note like url? I want to add some explanation like "it needs this dll or soft bla bla.."
-add default value for Trackbar?
no problem

-multi load plugin tag for bass source or another one?
you mean to specify more than one avisynth plugin.dll to be loaded? certainly easy to implement. (even I thought its not needed)

- add multiple wav source for encoding 5.1 audio?
currently not sure about how to do this. On weekend I will look into the things.

siella
7th January 2015, 22:11
I just need multi load plugin for bass. You know there is more dll. And so that users dont need copy all plugin into avisynth plugin folder.
One more thing :) Can you add input section like aftengui

http://i.imgbox.com/bP8TbVvO.png

and maybe Additional CLI argumant box

tebasuna51
7th January 2015, 22:57
I just need multi load plugin for bass. You know there is more dll.

But only one is a AviSynth plugin: BassAudio.dll

- add multiple wav source for encoding 5.1 audio?

Something like Mux Wizard in EncWAVtoAC3?
To create a temporal input.avs like:

l = RaWavSource("D:\tmp\0L.wav")
r = RaWavSource("D:\tmp\0R.wav")
c = RaWavSource("D:\tmp\0C.wav")
lfe= RaWavSource("D:\tmp\0LFE.wav")
sl = RaWavSource("D:\tmp\0SL.wav")
sr = RaWavSource("D:\tmp\0SR.wav")
mergechannels(l,r,c,lfe,sl,sr)

siella
8th January 2015, 11:04
@tebasuna51
Yes it can be but i think also it can use source1, soruce2... for ffdcaenc, aften or other aac encoder that can support multichannel encode.
I dont know which is easy for behappy.

But only one is a AviSynth plugin: BassAudio.dll
Then still user must copy all bass dll to avisynth folder or system path?

LigH
8th January 2015, 18:18
DLLs can be used (and even required) by other DLLs too. Either the same directory as the calling EXE/DLL or the system directory are recommendable locations for dependent DLLs, because Windows would look there, probably also in all directories listed in %PATH% (here the system directory is usually included).

jones1913
8th January 2015, 18:39
Then still user must copy all bass dll to avisynth folder or system path?
No, this means: only the "BassAudio.dll" needs to be loaded via "LoadPlugin()", and all other bassxxx.dll must be located in the same place where the BassAudio.dll is.
So for the time being I see no need for multiple <LoadAvsPlugin> fields.

and maybe Additional CLI argumant box
yes, probably optional displayable

- add multiple wav source for encoding 5.1 audio?
Something like Mux Wizard in EncWAVtoAC3?
To create a temporal input.avs like:
This seems not related to the current extension stuff and would require an additional window where you can open files and assign the channels.
Maybe when the extensions are done, but with rather low priority for me. Simplest solution for now is manually create avs script like tebasuna has shown.

Can you add input section like aftengui
I thought that something like this is required for fixed bitrate values, but I dont like the idea of adding or replacing the trackbar with a combobox.
The simplest solution for me to implement would be a trackbar which accept fixed values instead of min/max values.

siella
9th January 2015, 00:32
Ok jones1913. I am waiting your new extantions xml still. When you finished i ll keep going.
I think if Dropdown name is showed at above it ll be nice.

jones1913
9th January 2015, 18:52
I think if Dropdown name is showed at above it ll be nice.
To keep things simple window controls in this area are arranged automatical from left to right, if a control not fit in remaining space then it is wrapped to the next line.
I think about adding a label next to each combobox somehow...

Thanks so far for your suggestions. Give me some time to implement the things.

jones1913
13th January 2015, 20:53
new test version online:

EDIT: removed invalid link

changes:

- fixed tooltip bug
- added tooltip field for url
- trackbar can now represent fixed values instead of continuous values
- each window control can have a default value
- changed plugin configuration saving behavior in save state file, to use less space
- updated sample plugins and documentation

The other suggested changes follow at a later time. I think they are not so important at the moment.

jones1913
15th January 2015, 21:35
ok, had some time today, so new test version (same link as in previous post)

- added optional textbox for commandline arguments to plugin config window
- updated sample plugin and doc


@siella
if you have some extensions working can you upload them somewhere, so that I can see myself how good or bad it is working?
I still test things only with the 3 sample plugins...

siella
18th January 2015, 12:23
Today i start to write new ext. whe i finished i ll upload to mediafire

jones1913
1st February 2015, 21:18
Everything ok with you, siella? :D:D:D

I have a new test version ready but I really like to test this with some real world extensions instead of my 3 uncluttered samples.
So if somebody of the many test version downloaders has made an extension dont hesitate to share it with me.

I added description labels for the comboboxes but dont invested much time to mess around with automatic resizing and alignment because it is boring stuff.
Best for you is to play around with the <DialogWidth> element to find a suitable window control layout. A value of 350-400 works good for 1 column of comboboxes.
If there are many comboboxes then try a value around 550 for 2 columns of combos. I dont know how this behave when using non standard font sizes or high dpi settings or so.
It is a primitive solution and I will improve that at a later time.

Here is a pic of current look:

http://abload.de/thumb/q_currypxr0.png (http://abload.de/image.php?img=q_currypxr0.png)

Of course a lot better than the former radiobutton invasion, but it feels like something is missing... I dont know.


changes:

- NOTE: The placeholder for trackbar value is now "{0}" instead of "%tbval%" !!! (sorry)
- added optional <Divisor> element to <Trackbar>, usefull if point values are needed
- added description label to comboboxes
- reset button for plugin configuration works again and set all values to default

same link as before.

jones1913
18th February 2015, 21:18
Small enhancement to make extension plugin development a bit easier:
If Behappy is started with parameter "-testmode" then two additional buttons are added to the operations section.
One button opens a window which shows the generated avs script and commandline (after click on "enqueue job"), the other one to immediately reload all extensions.
(The last saved config is also reloaded)


I changed configuration saving behavior again a bit to save all radiobutton option values independently.
Now when selecting a radiobutton option then the last known value for this option is set at trackbar.


Last but not least I made a small change to the integrated timestretch plugin.

old:
http://abload.de/thumb/ts_oldyvut8.png (http://abload.de/image.php?img=ts_oldyvut8.png)


new:
http://abload.de/thumb/ts_newu7uj5.png (http://abload.de/image.php?img=ts_newu7uj5.png)


From now we dont need to grab an external calculator anymore when changing audio track lenght (sometimes Im lazy).


EDIT: removed invalid link

siella
12th March 2015, 14:51
@jones1913
sorry bro i had some problems so i couldnt look, but this week i am gone do it

jones1913
13th March 2015, 18:14
Good to see that you are still here. I have a new build almost ready, I must only do some tests and write changelog and documentation.

Best for you is to wait for this release because there are some changes and the previous one was a bit buggy. :o

jones1913
15th March 2015, 15:06
Time to bring this to an end and move on to other things. I converted all existing extensions from the repository to the new format and added also QAAC and Opus extension.
Mostly I have done only 1:1 conversion with minimal tweaks, additional functionality can be of course added at any time later.

Additionally I have ripped out some encoders out of Behappy source and provide them now as extensions (Nero-AAC, CT-AAC, Lame, Aften), because with the new extension capabilities there is no need to bloat the source code with legacy plugins.

Last but not least I rewrote parts of the control arrangement code because I was not happy with it.
Using FlowLayoutPanels for automatic control alignment was the a wrong decision. Now I use TableLayoutPanels and it works (and looks) better I think.


- bugfix: when reloading extensions then source files list was cleared instead of source plugins list
- bugfix: exceptions when loading extensions with certain configurations
- bugfix: exception if config loaded from save state not matched the extension config, now the defaults are loaded instead
- bugfix: logo was cutted off if there was only a few controls on plugin form
- replaced <Divisor> element for trackbars with <Multiplier> (is more common, to achieve the same thing)
- Radiobutton "Name" attribute now can include a "{0}" string for trackbar value representation in GUI
- added <NumericUpdown> element
- changed <DropDown> element to have separate value and caption
- show a summary of all plugin settings in main-window's plugin combobox
- added some more encoder .exes
- updated/added documentations for all extension types


Maybe someone can help me a bit with testing the encoder extensions for proper audio output...
(Especially with multichannel audio, I have no 5.1 environment available to test this)

EDIT: removed invalid link

Finally I will make a stronly needed code cleanup and then, if there are no complaints, commit the changes to SVN and make a new release.


some impressions:

http://abload.de/thumb/aften_oldipsb0.png (http://abload.de/image.php?img=aften_oldipsb0.png) ===> http://abload.de/thumb/aften_aeroizsyw.png (http://abload.de/image.php?img=aften_aeroizsyw.png)
http://abload.de/thumb/lame_old9ms2b.png (http://abload.de/image.php?img=lame_old9ms2b.png) ===> http://abload.de/thumb/lame_aeros8sn8.png (http://abload.de/image.php?img=lame_aeros8sn8.png)
http://abload.de/thumb/nero_oldshs8a.png (http://abload.de/image.php?img=nero_oldshs8a.png) ===> http://abload.de/thumb/nero_classic0asps.png (http://abload.de/image.php?img=nero_classic0asps.png)
http://abload.de/thumb/opus_old8bsim.png (http://abload.de/image.php?img=opus_old8bsim.png) ===> http://abload.de/thumb/opus_classicqas4r.png (http://abload.de/image.php?img=opus_classicqas4r.png)
http://abload.de/thumb/qaac_old1msli.png (http://abload.de/image.php?img=qaac_old1msli.png) ===> http://abload.de/thumb/qaac_classick2sw8.png (http://abload.de/image.php?img=qaac_classick2sw8.png)

LigH
15th March 2015, 19:10
:thanks:

You brought this project to another milestone!

jones1913
16th March 2015, 19:04
You brought this project to another milestone!
BeHappy 0.3 ? :D

GMJCZP
18th March 2015, 13:17
These changes also includes Fraunhofer mp3 and Fgh aac? Thanks for your effort.

jones1913
18th March 2015, 17:20
A very basic Fraunhofer MP3 plugin is there but I was not able to find the needed executable (mp3sencoder.exe) on the net to test this, all links seems to be down.

FhgAAC plugin is not yet there but can easy created.

GMJCZP
18th March 2015, 20:59
A very basic Fraunhofer MP3 plugin is there but I was not able to find the needed executable (mp3sencoder.exe) on the net to test this, all links seems to be down.

Looking at one of the packages of siella (BePack.v2).

siella
19th March 2015, 23:26
@jones1913
I've looked lame and qaac extensions
<Step> tag is not effected in Trackbar for BeHappy_testing_2015-03-15

jones1913
21st March 2015, 10:24
Looking at one of the packages of siella (BePack.v2).
Hehe sometimes the things are so close that you cant see them. The FhgMP3 plugin needed some tweaking but it works now.
I have uploaded FhgMP3 and FhgAAC plugin if you want to test. Make sure to delete the old "e_FraunhoferMP3.ext" before copying the new ones to extension directory.
EDIT: removed invalid link

@siella

<Step> element works as expected, but it describes only the ticks drawn on the trackbar, see here: https://msdn.microsoft.com/library/system.windows.forms.trackbar.tickfrequency%28v=vs.100%29.aspx
I must admit the term "step" is maybe a bit misleading, you probably expected something that "skips" the specified count of values?

Tom Keller
2nd April 2015, 22:37
Is it possible to use floating point values for a trackbar in an encoder extension? I did try to use something like 1411.2 as a bitrate value for a dcaenc extension... but it crashes BeHappy.

jones1913
3rd April 2015, 11:28
This can be achieved by playing around with the <min/max> values and <multiplier>.
<Trackbar DefaultValue="15000">
<Min>1280</Min>
<Max>15000</Max>
<Step>320</Step>
<Multiplier>0.1</Multiplier>
</Trackbar>
I have noticed again that there occurs an exception if "DefaultValue" is not set, tought I had already fixed that...

Tom Keller
3rd April 2015, 14:06
I see - thanks. But is there a similar solution for a trackbar with fixed values? Cause there might be situations, where an encoder only accepts some floating point values amongst a couple of integer values. So you can't feed him with any possible value between a certain range of values but only with some specific ones.

jones1913
3rd April 2015, 17:01
Fixed values list currently only consists of integer types. Maybe I take a look tomorrow, should be no problem to use floats instead.
I never used dcaenc, can you post some commandlines that I can see how the parameters should look?

Tom Keller
3rd April 2015, 20:59
There aren't much options for dcaenc (afaik). A basic command line for creating a *.dts file with a constant bitrate of 768kbps may look like this:

dcaenc -i "C:\Input.wav" -o "C:\Output.dts" -b 768

Since the original dcaenc does not support stdin, the dcaenc-2 (http://forum.videohelp.com/threads/348702-ffdcaenc-%28an-upgrade-to-dcaenc%29?p=2337613&viewfull=1) fork (created by 'LoRd_MuldeR (https://german.doom9.org/member.php?u=78667)') is needed in order to work properly with BeHappy. The -h parameter provides some additional infos about the command line options - but (as i said) there aren't an awful lot of them:

DCAENC --- experimental 'Coherent Acoustics' compressor.

Usage: dcaenc -i <input.wav> -o <output.dts> -b <kbps>

Optional:
-l Ignore input length, can be useful when reading from stdin
-e Set the byte-order to 'Little-Endian' (default is 'Big-Endian')
-h Print this help screen
-c Overwrite the channel configuration (default is: auto-selection)
-f Add an LFE channel (default: used for 6-channel input)
-v Show version info

DETAILS:

The input .WAV file must be either 16-bit or 32-bit integer;
the input or output file name can be "-" for stdin/stdout.

The bitrate is specified in kilobits per second and may be rounded up;
floating-point values are allowed.

* Available channel-layouts:

- 1: A
- 2: A, B
- 3: L, R
- 4: (L+R), (L-R)
- 5: Lt, Rt
- 6: FC, FL, FR
- 7: FL, FR, BC
- 8: FC, FL, FR, BC
- 9: FL, FR, BL, BR
- 10: FC, FL, FR, BL, BR
- 11: CL, CR, FL, FR, BL, BR (not supported)
- 12: FC, FL, FR, BL, BR, OV (not supported)
- 13: FC, BC, FL, FR, BL, BR (not supported)
- 14: CL, FC, CR, FL, FR, BL, BR (not supported)
- 15: CL, CR, FL, FR, SL1, SL2, SR1, SR2 (not supported)
- 16: CL, FC, CR, FL, FR, BL, BC, BR (not supported)

[more info in the file 'uncommon-channel-layouts.mht']

* Valid sample rates (in kHz):

8 11.025 12 16 22.05 24 32 44.1 48

* Transmission bitrates (in kbps):

32 56 64 96 112 128 192 224
256 320 384 448 512 576 640 768
960 1024 1152 1280 1344 1408 1411.2 1472
1536 1920 2048 3072 3840 open VBR LOSSLESS

I created a rudimentary BeHappy extension for dcaenc-2 which works kind of well:

http://s000.tinyupload.com/index.php?file_id=88627149444811312474

I write "kind of", because dcaenc has some restrictions you have to deal with. For instance: 24bit and 32bit float input isn't supported. But since most AviSynth audio source-plugins deliver 32bit float audio, a line for converting the audio to 32bit integer has to be inside the extension, which is a bit bothering.

There's even another dcaenc fork: ffdcaenc (http://forum.videohelp.com/threads/348702-ffdcaenc-%28an-upgrade-to-dcaenc%29?p=2337613&viewfull=1#post2337613), with 24bit input support and options for a more DTS-CD- and DVD-Video-compliant output - which may be the best one of all the dcaenc forks:

FFDCAENC --- experimental 'Coherent Acoustics' compressor.

Usage:
ffdcaenc -i <input.wav> -o <output.dts> -b <bitrate_kbps>

Optional:
-l Ignore input length, can be useful when reading from stdin
-e Switch output endianess to Little Endian (default is: Big-Endian)
-r Reduced Bit Depth for DTS CD format (default is: Full Bit-Depth)
-h Print this help screen
-c Overwrite the channel configuration (default is: auto-selection)
-f Add an additional LFE channel (default: used for 6-channel input)
-m Multiple Mono input files (default: -i for multi-channel input file)
Use -0 <input.wav> -1 <input.wav> etc. (up to -5) Channels are in ITU order:
0,1,2,3,4,5 --> LF, RF, C, LFE, LS, RS
The following mono input file combinations are supported:
1.0 -2 center.wav
1.1 -2 center.wav -3 lfe-wav
2.0 -0 left.wav -1 right.wav
2.1 -0 left.wav -1 right.wav -3 lfe.wav
3.0 -0 left.wav -1 right.wav -2 center.wav
3.1 -0 left.wav -1 right.wav -2 center.wav -3 lfe.wav
4.0 -0 left.wav -1 right.wav -4 ls.wav -5 rs.wav
4.1 -0 left.wav -1 right.wav -4 ls.wav -5 rs.wav -3 lfe.wav
5.0 -0 left.wav -1 right.wav -2 center.wav -4 ls.wav -5 rs.wav
5.1 -0 left.wav -1 right.wav -2 center.wav -4 ls.wav -5 rs.wav -3 lfe.wav

-v Show version info

REMARKS:
The input or output filename can be "-" for stdin/stdout.
The bitrate is specified in kilobits per second and may be rounded up
-- use floating-point values for bitrates that are not a multiple of 1 kbps.
Because the encoder uses a 4-byte granularity, i.e., 32 bits per audio frame
(with 512 samples/frame), the ACTUAL bitrate will always be a multiple of:

3 kbps for 48 kHz
2.75625 kbps for 44.1 kHz
2 kbps for 32 kHz
1.5 kbps for 24 kHz
1.378125 kbps for 22.05 kHz
1 kbps for 16 kHz
0.75 kbps for 12 kHz
0.6890625 kbps for 11.025 kHz
0.5 kbps for 8 kHz

-- NOTICE: the values 754.5 and 1509.75 AT _48kHz_ are an exception.

* Available channel-layouts:

- 1: A
- 2: A, B
- 3: L, R
- 4: (L+R), (L-R)
- 5: Lt, Rt
- 6: FC, FL, FR
- 7: FL, FR, BC
- 8: FC, FL, FR, BC
- 9: FL, FR, BL, BR
- 10: FC, FL, FR, BL, BR
- 11: CL, CR, FL, FR, BL, BR (not supported)
- 12: FC, FL, FR, BL, BR, OV (not supported)
- 13: FC, BC, FL, FR, BL, BR (not supported)
- 14: CL, FC, CR, FL, FR, BL, BR (not supported)
- 15: CL, CR, FL, FR, SL1, SL2, SR1, SR2 (not supported)
- 16: CL, FC, CR, FL, FR, BL, BC, BR (not supported)

* Valid sample rates (in kHz):

8 11.025 12 16 22.05 24 32 44.1 48

* Transmission bitrates (in kbps):

32 56 64 96 112 128 192 224
256 320 384 448 512 576 640 768
960 1024 1152 1280 1344 1408 1411.2 1472
1536 1920 2048 3072 3840 open VBR LOSSLESS

But it doesn't change THAT much for its usage with BeHappy.

I have to admit: it's not mandatory necessary to feed the encoder with floating point bitrate values, since every incarnation of dcaenc does some internal roundings for any given bitrate (depending on the sample rate). But i thought it may be useful to have the option to add floating point numbers as fixed values to a trackbar... and maybe(???) letters too? Therefore it would be possible to use trackbars/sliders in extensions for some other purposes than "just" setting up the bitrate.

tebasuna51
3rd April 2015, 21:06
About the free DTS encoder I recommend use ffdcaenc (a fork of dcaenc): http://forum.doom9.org/showthread.php?p=1688150#post1688150
Accept wav int (16, 24 or 32) but not float (dcaenc don't accept 24 int), and make:

- CD-compatible DTS files from a multichannel 44.1KHz sample rate file:
ffdcaenc -i - -o output.dts -e -r -b 1411.2

- DVD-compatible tracks from a multichannel wav file 48 kHz sample rate:
ffdcaenc -i - -o output.dts -l -b 1509.75 (Transmission bitrate 1536)
ffdcaenc -i - -o output.dts -l -b 754.5 (Transmission bitrate 768)

Other options in README and ffdcadec -h

Edit: same time than Tom Keller

jones1913
4th April 2015, 10:49
I have to admit: it's not mandatory necessary to feed the encoder with floating point bitrate values, since every incarnation of dcaenc does some internal roundings for any given bitrate (depending on the sample rate). But i thought it may be useful to have the option to add floating point numbers as fixed values to a trackbar... and maybe(???) letters too?
Easy solution: trackbar fixed values list is now of "String[]" type, you can use numbers or letters or whatever you want now. :cool:
And the bug with the exception in case of missing "DefaultValue" attribute is fixed.

Therefore it would be possible to use trackbars/sliders in extensions for some other purposes than "just" setting up the bitrate.
Yes but keep in mind that there only one trackbar exists assigned to currently selected radiobutton. When using the trackbar for other parameters then the bitrate must be set with another control eg. with a dropdown.

Btw. dcaenc extension looks good.

EDIT: removed invalid link

Tom Keller
4th April 2015, 22:25
Thanks a lot 'jones1913' - looking forward to do some tests with the new version.

Btw i did some changes to the dcaenc extension and modified it for ffdcaenc:

http://s000.tinyupload.com/index.php?file_id=76826108398181592540

The trackbar now uses 0.05 steps to allow pretty precise bitrate settings for most situations. Because of the wide bitrate range i increased the dialog width in order to make the trackbar usable. I also added the new "reduce bitrate" option and introduced some advices in the tool tips for creating dts files for DTS-CDs.

tebasuna51
5th April 2015, 10:01
...and introduced some advices in the tool tips for creating dts files for DTS-CDs.
Works fine.

Also we can modify:
<ToolTip>Constant Bitrate mode. In order to create DVD-BD compliant files use 1509.75 or 754.5 kb/s.</ToolTip>

Tom Keller
5th April 2015, 14:15
I thought about that - but i was unsure, if the DVD and/or BD specs may allow some lower bitrates for 1- and 2-channel DTS files too.

tebasuna51
5th April 2015, 18:19
I thought about that - but i was unsure, if the DVD and/or BD specs may allow some lower bitrates for 1- and 2-channel DTS files too.

Of course there are others bitrates allowed, but this ones are the standard for 5.1.

I can't understand for what use DTS to encode mono or stereo.

Tom Keller
5th April 2015, 19:15
A couple of years ago i didn't even know that movie releases with DTS mono or stereo sound existed... 'till someone mentioned to me having an old movie on Bluray with a DTS stereo track. I don't remember which movie it was and i didn't believe him at first - but he sent me a snippet for prove. I don't know why the BD producers used DTS for the stereo audio track of the movie... but they did it nonetheless.

Long story made short:
Even if it's uncommon, there may be users out there trying to create (for whatever reason) DTS 1- and 2-channel files for their DVDs or Blurays. So i would simply suggest writing ;) :

<ToolTip>Constant Bitrate mode. In order to create DVD-BD compliant 6-channel files use 1509.75 or 754.5 kb/s.</ToolTip>


Btw. just out of interest @tebasuna51:
Why didn't you add the 6.1-to-5.1 and 7.1-to-5.1 downmix setups you posted a couple of years before as two additional downmix options to BeHappy :confused: :

http://forum.doom9.org/showthread.php?p=1465361#post1465361

siella
7th April 2015, 21:51
I edited e.dcaenc.ext for ffdcaenc (http://forum.doom9.org/showthread.php?t=170952) i changed some little options and logo. Btw. i added yours tooltip :)
http://i.imgbox.com/SOOxDtIx.png

I edited e_FhgMP3.ext. too
I added tooltip for cbr and replaced min max of Trackbar with fixed value.
Also i fixed e_Flac.ext. There was problem with wav header.
@jones1913
Can you add end of box tex area for note. e.g. " it's only support 1 2 or 6 channels audio input"
Additionally There are a lot of config info at encoder select box. So when I reopen behappy, windows is expanding on the screen. could you make it as optional that who appear on selected info .
Also i tried NumericUpdown and Dropdown without Radiobutton and TitleFormatString and it was appeared fisrt "???" at selected info.

tebasuna51
8th April 2015, 14:11
Btw. just out of interest @tebasuna51:
Why didn't you add the 6.1-to-5.1 and 7.1-to-5.1 downmix setups you posted a couple of years before as two additional downmix options to BeHappy :confused: :

http://forum.doom9.org/showthread.php?p=1465361#post1465361

I don't use these downmix now to avoid Normalize and low the volume of front channels.

Now I use:
flr = Getchannel(a, 1, 2, 3, 4)
blr = Getchannel(a, 5, 6)
slr = Getchannel(a, 7, 8)
sur = MixAudio(blr, slr, 1.0, 1.0).SoftClipperFromAudX(0.0)
return mergechannels(flr,sur)

We need AudioLimiter.dll http://forum.doom9.org/showthread.php?t=108470

Added to d_DownMix.ext, downloads:

jones1913
9th April 2015, 16:32
First thanks for all contributions, I am happy to integrate them in the next release.

I edited e.dcaenc.ext for ffdcaenc i changed some little options and logo.
You have used another approach for bitrate setting, but I will only integrate one ffdcaenc extension in Behappy.
I can not decide which is better, because I'm not interested in DTS encoding...

Can you add end of box tex area for note. e.g. " it's only support 1 2 or 6 channels audio input"
Somehow I dislike the idea of writing help text in the config window...
And if the encoder not support the audio input then you see it on the exception thrown :p

Additionally There are a lot of config info at encoder select box. So when I reopen behappy, windows is expanding on the screen.
On my machine the text is simply cutted off, the window never expands itself.

could you make it as optional that who appear on selected info .
An additional parameter for each option to specify if it should be shown in summary? Probably not...

Also i tried NumericUpdown and Dropdown without Radiobutton and TitleFormatString and it was appeared fisrt "???" at selected info.
I will check this next time.

siella
9th April 2015, 16:51
You have used another approach for bitrate setting, but I will only integrate one ffdcaenc extension in Behappy.
I can not decide which is better, because I'm not interested in DTS encoding...
I've used ffdcaenc_213-20141209 (http://forum.doom9.org/showthread.php?p=1702067#post1702067) because it has extra options. like support multiple adio input and Reduced Bit Depth for DTS CD. well in the future maybe you will add multiple auido input for behappy with GetChannel of avisynth

Somehow I dislike the idea of writing help text in the config window...
And if the encoder not support the audio input then you see it on the exception thrown
I am a bit forgetful and lazy :)
An additional parameter for each option to specify if it should be shown in summary? Probably not...
{0} in <TitleFormatString> mean it will show all options ?

Another question, forexample nicauido and bassaudio are support ac3 decode. So will you choise only one? also the same question for ffmpeg and libav decode?
well i am thinking of making ffmpeg aac and ac3 encoder ext with more options.

jones1913
9th April 2015, 20:11
I am a bit forgetful and lazy
We all are, thats the whole point of GUIs. That we not have to remember all those annoying commandline switches.
I will think of a way supplying informations in config dialog, maybe a button which opens an info window or a tooltip?

{0} in <TitleFormatString> mean it will show all options ?
Yesss

Another question, forexample nicauido and bassaudio are support ac3 decode. So will you choise only one? also the same question for ffmpeg and libav decode?
Of course not, different encoders or decoders which support the same formats will stay in there. But I will not add several extensions for the same encoder in the BeHappy standard download package.
So you provided a ffdcaenc extension and TomKeller provided one, now we have to choose one for BeHappy download archive.

well i am thinking of making ffmpeg aac and ac3 encoder ext with more options.
Looking forward to this. I always wondered how ffmpeg AC3 encoder compares to Aften, or is ffmpeg using the Aften code?

Richard1485
9th April 2015, 21:42
I don't use these downmix now to avoid Normalize and low the volume of front channels.

Now I use:
flr = Getchannel(a, 1, 2, 3, 4)
blr = Getchannel(a, 5, 6)
slr = Getchannel(a, 7, 8)
sur = MixAudio(blr, slr, 1.0, 1.0).SoftClipperFromAudX(0.0)
return mergechannels(flr,sur)

Is this the same as eac3to -down6?

tebasuna51
9th April 2015, 21:51
So you provided a ffdcaenc extension and TomKeller provided one, now we have to choose one for BeHappy download archive.
With Siella .ext I can't obtain 1509.75 bitrate. For me the TomKeller one is ok.

Looking forward to this. I always wondered how ffmpeg AC3 encoder compares to Aften, or is ffmpeg using the Aften code?
ffmpeg AC3 encoder and Aften have the same developer jruggle, maybe there are some improvements in ffmpeg: http://forum.doom9.org/showthread.php?p=1522077#post1522077

BTW ffmpeg have some other problems:
- can't accept additional parameters like Aften
- poor STDIN support (without -readtoeof 1, wrong remap ignoring wav channelmask, ...)

I only can recommend ffmpeg encoder for stereo, multichannel output with BeHappy don't work.

EDIT: new ffmpeg versions need bitrate in b/s the .ext need add a 'k' in:
<Value>-ab {0}k</Value>

tebasuna51
9th April 2015, 22:19
Is this the same as eac3to -down6?

Nope, this is more advanced downmix using SoftClipperFromAudX(0.0) to avoid clip in surround channels without touch the front and LFE channels.

eac3to -down6 is the same than http://forum.doom9.org/showthread.ph...61#post1465361
Some peaks adding Side to Back channels can force (normalize) to down front volume.

siella
10th April 2015, 09:50
With Siella .ext I can't obtain 1509.75 bitrate. For me the TomKeller one is ok.
ffdcaenc doent support continues bitrate e.g. it cant encode 443.25 kpbs except 755.50 and 1509.75
How is this?
http://i.imgbox.com/Z5MsZD2M.png
@jones1913
tooltip will be fine.
If you think aften better i just will write aac enc ext. for ffmpeg.

I have just tried convert 16 bit ac3 to dts but when i used bass and nic source read audio as 32 bit float but when i used directshowsouce read correct value?? (BeHappy_testing_2015-04-04)

tebasuna51
10th April 2015, 21:23
...I have just tried convert 16 bit ac3 ...
Don't exist 16 bit AC3, AC3 don't have bitdepth, have bitrate.

jones1913
11th April 2015, 09:55
I have just tried convert 16 bit ac3 to dts but when i used bass and nic source read audio as 32 bit float but when i used directshowsouce read correct value?? (BeHappy_testing_2015-04-04)
Isn't that related to this question you have already asked in the past:
I looked ac3 file with mediainfo and it gave 16 bit but when i try to decode with bassadio, ffaudio or nicac3 behappy show 32 bit float.

And LigH has given an accurate answer:
Again this confusing topic...

Most lossy audio compression technologies with psycho-acoustic spectrum masking (like MP2, MP3, AC3, AAC...) work in a floating-point mode, they will transform the samples into audio spectrums of brief blocks and store parameters of a Fourier transformation. Decoding them back into samples again will return floating point samples at first. They may be converted to integer samples later, or not, depending on the decoder.

I don't know which resolution of 16 bit MediaInfo reports. That may be the resolution of the input samples which the encoder used. But that doesn't matter. As soon as there is an AC3 bitstream, there are no more 16 bit integer samples. Only a sequence of encoded frequency spectrums in AC3 blocks.

Probably the DirectShow decoder on your system is doing a conversion to 16 bits, but we can't know which decoder is used on your system.

siella
11th April 2015, 10:12
Sorry I sad before I am a bit forgetful :)
There is lav filter on my system.
But really strange, why do ac3 header has bit depth information?
Also http://stnsoft.com/DVD/ac3hdr.html ?
that means when ac3 to dts converting all time need firts converting bit depth 16,24 or 32? Because dts has bit depth

I converted dts to ac3 and eac3 for testing with ffmpeg
Audio
Format : AC-3
Format/Info : Audio Coding 3
Mode extension : CM (complete main)
Format settings, Endianness : Big
Duration : 1h 52mn
Bit rate mode : Constant
Bit rate : 640 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 48.0 KHz
Bit depth : 16 bits
Compression mode : Lossy
Stream size : 513 MiB (100%)

Audio
Format : E-AC-3
Format/Info : Audio Coding 3
Format settings, Endianness : Big
Duration : 1h 52mn
Bit rate mode : Constant
Bit rate : 768 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 48.0 KHz
Compression mode : Lossy
Stream size : 615 MiB (100%)
eac3 hasnt bit depht but ac3 has

tebasuna51
11th April 2015, 12:40
But really strange, why do ac3 header has bit depth information?
Also http://stnsoft.com/DVD/ac3hdr.html ?

Like you can see don't exist bit depth info in AC3 header.

that means when ac3 to dts converting all time need firts converting bit depth 16,24 or 32? Because dts has bit depth
Only DTS-MA have bitdepth, and convert AC3 to DTS have no sense at all.

To standard DTS you can apply the LigH comment also.

The DTS header have a field to remember the original bitdepth of the source, but you can't trust this info.
Some encoders (Surcode, ffdcaenc,...) put always 24, and is ok because is always recommended decode to 24 bit int at least, no mather the original bitdepth of the source.

EDIT: Please don't trust in all than MediaInfo say. The ac3 'Bit depth' info is wrong.
https://sourceforge.net/p/mediainfo/bugs/908/

siella
11th April 2015, 22:37
@tebasuna51 thanks for information.

http://i.imgbox.com/nHDzUsEv.jpg

http://i.imgbox.com/Aq2LPwyH.jpg

http://i.imgbox.com/oUXDnkmH.jpg

Could anybody check this

jones1913
19th April 2015, 11:28
Could anybody check this
I had just a quick look at your extensions:

FFmpeg E-AC3: Looks OK.

FFmpeg MP2: We have also the standalone twolame encoder but thats OK.

FFmpeg AAC: I dislike the way how it is configured. I suggest to use only native and faac with ffmpeg, and write an extension for standalone fdkaac encoder. (https://github.com/nu774/fdkaac)

LigH
19th April 2015, 12:30
standalone twolame encoder

RareWares: MP3 and MP2 - Others (http://www.rarewares.org/mp3-others.php)

jones1913
19th April 2015, 21:20
RareWares: MP3 and MP2 - Others
Yeah I mean we have already an extension for twolame encoder there. And I would prefer using the standalone encoders instead of ffmpeg if possible.

tebasuna51
20th April 2015, 00:44
RareWares: MP3 and MP2 - Others (http://www.rarewares.org/mp3-others.php)

Like I say in encoders\Readme.txt the TwoLame 0.3.12b in RareWares don't work with BeHappy (a regression, don't accept wav header by STDIN, only RAW).

TwoLAME 0.3.10b supplied with BeHappy work without problems.

Could anybody check this
I added ffmpeg AC3 (a copy of E-AC3) encoder with only the valid bitrates for AC3.
Seems work fine.

Like ffmpeg don't have a parameter like -readtoeof or -ignorelength, when the audio info sended is greater than 4 GB, typical for a mutichannel movie track, don't forget activate in [2] Tweak the header W64 (1).

siella
24th April 2015, 22:08
I'd added AC3 but before you sad aften is fine so i didint add. Also eac3 and ac3 has some diffirent commands. Like center and sorround mix level But in my opinion Aften is good and enough for ac3.
FFmpeg has a lot of audio encoder in inside. But i think we must add only native encoders. But actually some encoders improved by ffmpeg. So i am not sure.
Also I think jones1913 must moderate which will be add or not.
I made new extantion for helix mp3 encoder. It is good encoder for mp3.
http://i.imgbox.com/GChcSkFs.png

Also i changed mp2 encoder And removed aac library for ffmpeg
http://i.imgbox.com/w9Pf4ZuX.png

jones1913
26th April 2015, 11:48
FFmpeg has a lot of audio encoder in inside. But i think we must add only native encoders. But actually some encoders improved by ffmpeg. So i am not sure.
Also I think jones1913 must moderate which will be add or not.

If an encoder is available as standalone exe then we should prefer using this, because it is easier to check. When we place a ffmpeg.exe in encoder directory we never now for sure if it has the required libraries included.
Thats especially the case for non-redistributable encoders like fdk-aac.


I made new extantion for helix mp3 encoder. It is good encoder for mp3.

Cool.

Like ffmpeg don't have a parameter like -readtoeof or -ignorelength, when the audio info sended is greater than 4 GB, typical for a mutichannel movie track, don't forget activate in [2] Tweak the header W64 (1).

Fixed :-) see changelog:

- fixed plugin configuration summary if no radiobuttons are present
- added <Info> element for description and other informations about plugin, these infos are shown as messagebox
when the new little "?" button on logo area in config window is clicked (see QAAC plugin for sample)
- added <HeaderType> element to force specific audio data header written to encoder
(with same values as "Header" in [2]Tweak section on MainWindow)
- encoders which need several files can now arranged in subfolders

So extension system is in good shape now. Next time I spend time on this I make a code cleanup and upload to svn.

EDIT: removed invalid link


Also worth mentioning in this package:


- added an audio-only ffmpeg build with the encoders used by BeHappy, did some testing and noticed no problems so far. Only redistributable encoders are included.
Had problems with linking libtwolame so this encoder wont work for now...



- added lsmashsource.dll build with dcadec support included.
Had several linker warnings but seems to work fine, however I have not tested all dts variants, only a .dtshd file.
If there are problems with this build, the old one is still present as lsmashsource.bak in plugin folder.

siella
9th May 2015, 00:53
Finally I complated behappy jobs. And now realy i be happy :)
I checked and tested all encoder and extensions.
I made list for changes that i remember

-Added bass dll of ac3 opus,aix alac, adx, ofr and midi and also added bass ext.
-Changed readme.txt in plugin32 folder
-Added Strange search size,Bandwith and dc filter,lfe options to aften ext.
-Created help folder and i put all encoder help files as txt(maybe needed for extra command)
-Created aacPlus folder and move aacplus in to there also i writed needing dll.
-Added Cuetools Flaccl encoder and ext.
-Addded bitrate info for samplerate to lame ext
-Changed tta script for 6 ch 24 bit audio that is getting error because of more than 4gb
-Added dca ext. and encoder
- Added Float Bitrate option to dca and ffdca
-Added LWLibavAudio support thd, dtshd
-Added FFAudio source ext.
-Changed Ct-AAC ext.(Added tooltips and separated choosing ps)
-Revized FFmpeg ext.
-Added info to fhgmp3 ext.
-Replaced Radiobutton with Dropdown in flac ext.
-Added info in to Nero ext.
-Corrected nero ext.'s bitrate config
-Added FDK AAC Encoder and ext.
-Added extra config to twolame ext.
-Added lossy options for flac and wavpack
-Added alac encoder to qaac ext
-Added monkey ext. and encoder
-Added Tak ext. and encoder
-Added wma ext. and encoder
-Edit wavpack ext.
-Updated readme files
-Created multichs folder in other folder and putted input avs files for mono wavs. Now You can
put yours multiple wavs and into there, edit wavs name as channels name and than easly convert with using behappy avs input.

I release this with all encoders except nero, fhg mp3 encoders and fhgaac, aacplus,qaac dlls.

All extantions screen shoots
http://www.imagebam.com/gallery/l36oc79rxsrfravea5rx4d3xzken0yfl/
@jones1913
Can you add title name for exts also maybe make tab for group info table like
this photo
http://thumbnails108.imagebam.com/40846/90cd48408454716.jpg (http://www.imagebam.com/image/90cd48408454716)
Maybe next days behappy support multi language.
BTW i dont know why but in my home pc when i was reopening everytime behappy windows size was growing . When i delete BeHappy.State file turning normal. ( I am using windows 7 ) I tried to another 2 pc that installed win 8 and win 2008 and there is no problem.

Bug: wav write and pcm raw write doesnt work

http://www.mediafire.com/download/1k3s0zuw3k3hi0b/BeHappy_testing_2015-04-26+-+%28new+extansions+09.05.2015%29.zip

jones1913
9th May 2015, 12:31
I see you have done a lot work ,thanks! Some extensions have small cosmetic problems or typos but thats easy to fix.

I release this with all encoders except nero, fhg mp3 encoders and fhgaac, aacplus,qaac dlls.
Not sure but I think fdkaac is also not redistributable.


Can you add title name for exts also maybe make tab for group info table like this photo
No idea why you have no title in config window, here it looks as expected (win7, classic and aero).
14770


Not sure what you mean with "tab for group info table" but I wont spend more time in changing the gui.


BTW i dont know why but in my home pc when i was reopening everytime behappy windows size was growing . When i delete BeHappy.State file turning normal. ( I am using windows 7 ) I tried to another 2 pc that installed win 8 and win 2008 and there is no problem.
I have never seen this behavior on my system (also win7). Delete .state file can be recommened if you encounter problems after making big changes to extensions.


Bug: wav write and pcm raw write doesnt work
Ah I see, will check this soon.

Edit:
Another thing is that I personally dont like the preceding "[Lossy]" or "[Lossless]" at your extensions. It makes the encoder list a bit hard to read.
I have done already some work in the background to better control the growing list of encoders with a simple filter system, to show only encoders wich support eg. ac3 or aac or ...
But it is not ready to release yet. When this is done I'll take a break from working on BeHappy because the weather is becoming better here and I wont spend so much time on pc for the time being.

jones1913
10th May 2015, 11:18
Just tried to upload my sources to svn but it wont work anymore (subversion on linux terminal).
Even a simple checkout "svn co https://behappy.svn.codeplex.com/svn" fails with "Ungültiger Maschinenbefehl (Speicherabzug geschrieben)". Really great! :mad::mad::mad:

@siella
2 small problems with your package:
- If we include wrappers like qaac.exe in BeHappy package then the encoder is shown as "working" in gui encoder list because BeHappy checks only for the .exe , but it actually don't work because the needed .dlls are missing.
Best would maybe to not include this files (or rename to _qaac.exe ?).
- Before a job started a message box warned me about missing "OptimFrog.dll", altough it is present in plugins folder of your package. For what is this file needed?

tebasuna51
10th May 2015, 13:59
Just tried to upload my sources to svn but it wont work anymore (subversion on linux terminal).
Even a simple checkout "svn co https://behappy.svn.codeplex.com/svn" fails with "Ungültiger Maschinenbefehl (Speicherabzug geschrieben)". Really great! :mad::mad::mad:

Like you are the unique active BeHappy developer feel free to abandon Codeplex like source repository and select other at your convenience.

- Before a job started a message box warned me about missing "OptimFrog.dll", altough it is present in plugins folder of your package. For what is this file needed?

For the bass_ofr.dll decoder http://forum.doom9.org/showthread.php?p=1557337#post1557337

siella
13th May 2015, 09:37
- If we include wrappers like qaac.exe in BeHappy package then the encoder is shown as "working" in gui encoder list because BeHappy checks only for the .exe , but it actually don't work because the needed .dlls are missing.
Best would maybe to not include this files (or rename to _qaac.exe ?).
If itunes is installed it will work, but you can rename or remove.I think removing is best.

Not sure what you mean with "tab for group info table" but I wont spend more time in changing the gui.
Okey it is not necessary.

I have done already some work in the background to better control the growing list of encoders with a simple filter system, to show only encoders wich support eg. ac3 or aac or ...
it sounds good. I look forward to your last relase.

@tebasuna51
Before you made Dynamic Range copression (http://forum.doom9.org/showthread.php?p=779165#post779165)ext. for behhapy I've tried to create drc profile (https://github.com/nu774/qaac/wiki/Dynamic-range-compression) for qaac based on your extantion, but it is really mixed so i dont understand well,
Can you explain which value is what for
threshold, Compresion, knee, attack time, release time

tebasuna51
13th May 2015, 11:48
...I've tried to create drc profile (https://github.com/nu774/qaac/wiki/Dynamic-range-compression) for qaac based on your extantion, but it is really mixed so i dont understand well,
Can you explain which value is what for threshold, Compresion, knee, attack time, release time
In DynRanComp.extension I try to emulate the DD compression curves
http://web.archive.org/web/20051111165720/http://pages.sbcglobal.net/wilsondr/ddcompprof.gif
using the compand Sox effect. Syntax:

compand attack1,decay1{,attack2,decay2} [soft-knee-dB:]in-dB1[,out-dB1]{,in-dB2,out-dB2} [gain [initial-volume-dB [delay]]]

Then the Music Standard curve (yelow in the image):
# Music Standard Segments: (Noise) +12dB 2:1 = 20:1
# Points: ------- ------- ------- ------- ------- -----
SoxFilter("compand 0.1,0.3 -90,-90,-70,-58,-55,-43,-31,-31,-21,-21,0,-20 0 0 0.1")
have:
Attack: 100 ms
Decay: 300 ms
Hard-knee (don't exist soft-knee dB: before pairs in-dB,out-dB)
in-dB1,out-db1: -90,-90 (without change)
in-dB2,out-db2: -70,-58 (begin segment amplify 12 dB)
in-dB3,out-db3: -55,-43 (end segment amplify 12 dB)
in-dB4,out-db4: -31,-31 (begin segment without amplifly)
in-dB5,out-db5: -21,-21 (end segment without amplifly)
in-dB6,out-db6: -0,-20 (rest with limited output at -20 dB)
Gain: 0 dB
Initial volume: 0 dB
Delay: 100 ms

Like you can see the Sox compand accept many pairs of Threshold, Compresion (Ratio) values.

BTW you dont need emulate DD curves.

siella
13th May 2015, 23:49
Many thanks tebasuna51

If i understand correctly
-70,-58 mean 1.20:1 compression ?
so can i use sox Music value for qaac(only for downward compression) like
threshold:-31dBFS
20:1 compresion
knee width 0dB for hard knee
attack time 100ms
release time 300ms

i looked soxfilter v1.1 and i noticed that port from 12.17.9 version. I hope someone update it to 14.4.2 v.
Sox support stdin and maybe i can make sox extantion like encoder.

tebasuna51
14th May 2015, 10:51
If i understand correctly
-70,-58 mean 1.20:1 compression ?
Nope, in this segment there are a gain of 12 dB then the ratio is 1:12

so can i use sox Music value for qaac(only for downward compression) like
threshold:-31dBFS
20:1 compresion
knee width 0dB for hard knee
attack time 100ms
release time 300ms
With only 1 segment you can emulate the last part of Music Ligth with:
threshold:-20dBFS
10:1 compresion

Range input [-20 to 0 dB] go to range output [-20 to -10 dB]

Plain last segments (Music Std, Film Light, Film Std) can't be emulated with this method.

siella
14th May 2015, 15:25
Thanks again tebasuna51
I think it is not necessary. I will make sox extension.

tebasuna51
17th May 2015, 11:29
@jones1913
Please read http://forum.doom9.org/showthread.php?p=1722472#post1722472

To upgrade to SoundTouch library to 1.8.0 (multichannel timestretch better support) we need load the new TimeStretch.dll plugin and change TimeStretch() to TimeStretchPlugin().
Thanks.

jones1913
17th May 2015, 11:55
Like you are the unique active BeHappy developer feel free to abandon Codeplex like source repository and select other at your convenience.
OK, but I wanted to avoid that. Anyway I found a working svn client and just uploaded my sources with 2 small changes:

- fixed: wav and raw writer are now working again
- fixed: glitch if no radiobuttons are present in config window

A build is not needed yet for these small changes.

To upgrade to SoundTouch library to 1.8.0 (multichannel timestretch better support) we need load the new TimeStretch.dll plugin and change TimeStretch() to TimeStretchPlugin().
Thanks.
Ok.

jones1913
24th May 2015, 10:33
@siella

I have uploaded your extensions to svn rep (https://behappy.codeplex.com/SourceControl/changeset/76678) with slight changes:

- modified some encoder logos (reduced size, added transparency)
- fixed some typos and added empty lines in tooltips for better readability
- ffaudiosource: removed info text about haali splitter because newer versions doesn't rely on haali anymore

Now we have 6 AAC encoders, 4 MP3 encoders, 2 AC3 encoders and a varied mix of exotic encoders in the list. :cool::cool::cool:

siella
24th May 2015, 13:45
Thanks jones1913
I look forward your last build release

jones1913
31st May 2015, 10:37
Pre-release: EDIT: dead link removed

- added file type filters to show only certain encoder/source plugins (use right click on source/encoder combobox)
- added <IsLossless> field to extensions
- cleaned up about-tab a bit

14807

@siella
There is a problem with Helix MP3 encoder: When the process reaches 99%, then the encoder throw an error and delete the encoded file.
I have tried with various encoder settings. Is it working for you?
Log:
Starting job test.flac -> test.mp3
Found Audio Stream
Channels=2, BitsPerSample=16 int, SampleRate=48000Hz
encoder\hmp3.exe - "C:\Dokumente und Einstellungen\jones\Eigene Dateien\media\test.mp3" -V80 -hf2 -C0 -O1 -U2 -X2 -SBT450 -TX0
Writing RIFF header to encoder's StdIn
Writing PCM data to encoder's StdIn
Finalizing encoder
Error: System.ApplicationException: Abnormal encoder termination 13237
bei BeHappy.Encoder.encode()
#### Encoder StdErr ####

file-file MPEG Layer III audio encode v5.1 2005.08.09
Copyright 1995-2005 RealNetworks, Inc.

Usage: mp3enc <input> <output> [options]
<input> and/or <output> can be "-", which means stdin/stdout.

Example:
mp3enc input.wav output.mp3

Options:
-Nnsbstereo -Sfilter_select -Aalgor_select
-C -X -O
-D -Qquick -Ffreq_limit -Ucpu_select -TXtest1
-SBTshort_block_threshold -EC
-h (detailed help)

<press any key to stop encoder>
PCM input file: -
MPEG ouput file: C:\Dokumente und Einstellungen\jones\Eigene Dateien\media\test.mp3
pcm file: channels = 2 bits = 16, rate = 48000 type = 0
Layer III mode 1 STEREO 48000Hz VBR-80 hf2

-------------------------------------------------------------------------------
Frames | Bytes In / Bytes Out | Progress | Current/Average Bitrate
13237 | 61032960 / 6080904 | 371517% | 75.08 / 153.14 Kbps
-------------------------------------------------------------------------------
Compress Ratio 37015.485756%





@tebasuna
I noticed the wavsplit.exe build is older (1.0.0.3) than the source code in BeHappy/others folder (1.0.1.1) ??

tebasuna51
31st May 2015, 19:06
I noticed the wavsplit.exe build is older (1.0.0.3) than the source code in BeHappy/others folder (1.0.1.1) ??
Thanks for your pre-release.

Yep, seems I forget modify the .exe, I experience some problems with stdin in command line usage (never with BeHappy) and I make a little change.
Changelog:
2008-11-06 v1.0.1.1
Cosmetic changes and continue until input buffer is full.

Here is the 1.0.1.1 wavsplit.exe

[EDIT] wavsplit.exe included in wav2Util.7z here (https://forum.doom9.org/showthread.php?p=1624209#post162420)

jones1913
21st June 2015, 12:52
I've just uploaded the previous pre-release as new stable release to codeplex. (https://behappy.codeplex.com/releases/view/615867)

changes since last stable release:

2015-06-21 (jones1913) 0.2.8.19896
* newer wavsplit.exe

2015-05-31 (jones1913) r76729
+ added file type filters to show only certain encoder/source plugins (use right click on source/encoder combobox)
+ added <IsLossless> field to extensions
* cleaned up about-tab a bit

2015-05-24 (jones1913) r76678
+ added siella's extensions

2015-05-17 (jones1913) r76645
* time stretch dsp now use the TimeStretchPlugin() function

2015-05-17 (jones1913) r76644
* enhanced extension system and replaced all extensions (commented samples in "BeHappy/extensions/extension_specs/*")
+ added calculator to internal timestretch dsp plugin

2014-12-27 (jones1913) r76062
* start next job only if previous running job has properly initialized

2014-12-03 (jones1913) r75896
+ encoder plugin item in combobox is grayed out if the needed encoder executable is missing
+ added a button to automatically set the recommened maximum of simultanously running jobs

tebasuna51
21st June 2015, 18:06
Thanks jones1913.

Yamcha
26th June 2015, 02:12
Finally got the program working after a few tries but can't encode. I followed all instructions from the readme files. Using a Dell Dimension 2350 with 1 meg of memory with Windows XP Pro 32 bit.

Log: Starting job 01b.wav -> 01b.mp3
Error: System.Runtime.InteropServices.SEHException (0x80004005): External component has thrown an exception.
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
26th June 2015, 02:19
Please post the log.

Yamcha
27th June 2015, 20:57
Please post the log.

Look up.

jones1913
28th June 2015, 08:52
@Yamcha

We need some more informations:

- AviSynth installed? If yes which version?
- selected source filter?
- selected encoder?

Yamcha
29th June 2015, 02:17
@Yamcha

We need some more informations:

- AviSynth installed? If yes which version?
- selected source filter?
- selected encoder?

Not sure what you mean by Source Filter. I didn't run a script, straight from file.
I don't have FFMpeg installed to system btw.

AviSynth 2.5.8.5
Wav to Mp3 (FhG)

EDIT: Instead image:
[1] Source
C:\Wav\01b.wav
WavSource

[3] DSP (none)

[4] Destination
C:\Wav\01b.mp3
MP3 FHG - CBR mode 128 Kb/s. High Quality

tebasuna51
29th June 2015, 11:26
Maybe MP3 FHG is not correctly installed in your system ("External component has thrown an exception")

Try with MP3 Lame.

GMJCZP
29th June 2015, 17:41
Try run for first time the archive mp3sencoder.exe and follow the onscreen instructions.

Yamcha
29th June 2015, 23:01
Maybe MP3 FHG is not correctly installed in your system ("External component has thrown an exception")

Try with MP3 Lame.

I don't have mp3sEncoder 'Installed', I assumed it was a stand alone command line encoder. I have the FhG ACM hack called Radium 1.2 installed. That never gave me a problem as long as I use EAC to encode/decode with it.
I use LFE Lame Frontend v1.8 for Lame mp3s.

This is the error reported through EAC: C:\MP3sEncoder\mp3sEncoder.exe -if 2.wav -of 2.mp3 -br 128

Error: Could not open 'wav' file '2.wav'.

LigH
30th June 2015, 07:47
So please give us a detailed analysis of this "2.wav", e.g. using MediaInfo. Is it at all a WAV file? Does it contain compressed audio?

jones1913
30th June 2015, 14:52
Not sure what you mean by Source Filter. I didn't run a script, straight from file.
For every file BeHappy generates an AviSynth script in the background an opens the file using the selected (AviSynth)source filter.


I don't have FFMpeg installed to system btw.
I don't have mp3sEncoder 'Installed', I assumed it was a stand alone command line encoder.
To clear this a bit up: BeHappy doesnt rely on any encoders 'installed' on system. It only uses encoders which stay in the "BeHappy/encoders/*" directory.
Some encoders are included in the download package (lame, ffmpeg). Others cant be included due to their licensing conditions (fhg mp3sencoder, most aac encoders), these must be copied manually by the user to encoders directory. And all of them are command line encoders.

The next step is: So please give us a detailed analysis of this "2.wav", e.g. using MediaInfo. Is it at all a WAV file?

Yamcha
1st July 2015, 01:46
General
Complete name: 02.wav
Format: Wave
File size: 43.6 MiB
Duration: 4mn 19s
Overall bit rate mode: Constant
Overall bit rate: 1 411 Kbps

Audio
Format: PCM
Format settings, Endianness: Little
Format settings, Sign: Signed
Codec ID: 1
Duration: 4mn 19s
Bit rate mode: Constant
Bit rate: 1 411.2 Kbps
Channel(s): 2 channels
Sampling rate: 44.1 KHz
Bit depth: 16 bits
Stream size: 43.6 MiB (100%)
================================================
########################################
#Created by BeHappy v0.2.8.19896
#Creation timestamp: 6/30/2015 8:44:13 PM
########################################
#Source FileName:C:\Wav\02.wav
#Target FileName:C:\Wav\02.mp3
########################################

########################################
# [Source: WavSource]
########################################
WavSource("C:\Wav\02.wav")

########################################
# [Encoder: MP3 Helix - CBR Mode per chnl 112 kb/s; HF Encode:HF2]
########################################
16==Audiobits(last)?last:ConvertAudioTo16bit(last)

jones1913
1st July 2015, 18:54
Your wave file looks regular.

Helix mp3 encoder plugin is probably broken, I have mentioned it (http://forum.doom9.org/showpost.php?p=1724791&postcount=1181), but siella (author of the plugin) has not yet responded.

Have you tried another encoder? Lame plugin should work in any case.

Yamcha
2nd July 2015, 05:03
I get the same error message regardless of encoder. I tried every one in the encoder folder.

yonta
3rd July 2015, 07:49
extensions\e_FFmpeg.ext seems to have a typo at line 339. I think -c:a aac -strict -2 should be removed from the line.
And the included ffmpeg.exe doesn't seem to support .m4a output.

jones1913
5th July 2015, 13:05
extensions\e_FFmpeg.ext seems to have a typo at line 339. I think -c:a aac -strict -2 should be removed from the line.

You're right, Thanks.

And the included ffmpeg.exe doesn't seem to support .m4a output.

Can this be configured somehow? However I have fixed this for now by appending "-f mp4" to the command line.
https://behappy.codeplex.com/SourceControl/changeset/77012
Seems its not possible to download single files from codeplex, the download button always downloads the complete source code package.

I get the same error message regardless of encoder. I tried every one in the encoder folder.

Is AviSynth in general working for you?

Yamcha
5th July 2015, 15:26
Is AviSynth in general working for you?

I wouldn't know, don't know anything about avisynth. I used EAC and CEP2 for audio encoding before.

jones1913
5th July 2015, 16:55
I wouldn't know, don't know anything about avisynth. I used EAC and CEP2 for audio encoding before.

BeHappy needs a working AviSynth environment as prerequisite. It should be as easy as installing the latest version using the installer. (http://sourceforge.net/projects/avisynth2/files/AviSynth%202.6/AviSynth%202.6.0/)
But if its not working you need a basic knowledge of how avisynth works to test your environment. Try to read in the avisynth section of this forum or the avisynth wiki.
(http://avisynth.nl/index.php/Main_Page#New_to_AviSynth_-_start_here)
As quick'n dirty alternative it can work to simply copy an avisynth.dll to the BeHappy main folder. (here you can find one (https://forum.doom9.org/showthread.php?t=167358))

But apart from that, if you want to convert your music collection then you may consider using a tool more suited for this use case eg. LameXP. (https://forum.doom9.org/showthread.php?t=157726)
BeHappys main purpose is more at movie track conversions.

Yamcha
5th July 2015, 20:48
BeHappy needs a working AviSynth environment as prerequisite. It should be as easy as installing the latest version using the installer. (http://sourceforge.net/projects/avisynth2/files/AviSynth%202.6/AviSynth%202.6.0/)
But if its not working you need a basic knowledge of how avisynth works to test your environment. Try to read in the avisynth section of this forum or the avisynth wiki.
(http://avisynth.nl/index.php/Main_Page#New_to_AviSynth_-_start_here)
As quick'n dirty alternative it can work to simply copy an avisynth.dll to the BeHappy main folder. (here you can find one (https://forum.doom9.org/showthread.php?t=167358))

But apart from that, if you want to convert your music collection then you may consider using a tool more suited for this use case eg. LameXP. (https://forum.doom9.org/showthread.php?t=157726)
BeHappys main purpose is more at movie track conversions.

Uninstalled 258 with revo uninstaller and installed 260. It works now, quite speedy also on this 12yo pc. :) Thanks for the help. :)

siella
28th July 2015, 14:29
Pre-release: EDIT: dead link removed

- added file type filters to show only certain encoder/source plugins (use right click on source/encoder combobox)
- added <IsLossless> field to extensions
- cleaned up about-tab a bit

14807

@siella
There is a problem with Helix MP3 encoder: When the process reaches 99%, then the encoder throw an error and delete the encoded file.
I have tried with various encoder settings. Is it working for you?
Log:
Starting job test.flac -> test.mp3
Found Audio Stream
Channels=2, BitsPerSample=16 int, SampleRate=48000Hz
encoder\hmp3.exe - "C:\Dokumente und Einstellungen\jones\Eigene Dateien\media\test.mp3" -V80 -hf2 -C0 -O1 -U2 -X2 -SBT450 -TX0
Writing RIFF header to encoder's StdIn
Writing PCM data to encoder's StdIn
Finalizing encoder
Error: System.ApplicationException: Abnormal encoder termination 13237
bei BeHappy.Encoder.encode()
#### Encoder StdErr ####

file-file MPEG Layer III audio encode v5.1 2005.08.09
Copyright 1995-2005 RealNetworks, Inc.

Usage: mp3enc <input> <output> [options]
<input> and/or <output> can be "-", which means stdin/stdout.

Example:
mp3enc input.wav output.mp3

Options:
-Nnsbstereo -Sfilter_select -Aalgor_select
-C -X -O
-D -Qquick -Ffreq_limit -Ucpu_select -TXtest1
-SBTshort_block_threshold -EC
-h (detailed help)

<press any key to stop encoder>
PCM input file: -
MPEG ouput file: C:\Dokumente und Einstellungen\jones\Eigene Dateien\media\test.mp3
pcm file: channels = 2 bits = 16, rate = 48000 type = 0
Layer III mode 1 STEREO 48000Hz VBR-80 hf2

-------------------------------------------------------------------------------
Frames | Bytes In / Bytes Out | Progress | Current/Average Bitrate
13237 | 61032960 / 6080904 | 371517% | 75.08 / 153.14 Kbps
-------------------------------------------------------------------------------
Compress Ratio 37015.485756%





@tebasuna
I noticed the wavsplit.exe build is older (1.0.0.3) than the source code in BeHappy/others folder (1.0.1.1) ??

i tried some diffirent header and i solved that problem. I checked and now i cant. I dint remember but if you tick keep out put on error at behappy, mp3 files is written and it seems no problem.

I report this eror
When i choose lwlibavaudio at source i get error.
"LoadPlugin: unable to load "D:\program\ses\BeHappy-0.2.8.19896\BeHappy\plugins32\lsmashsource.dll", Module not found. Install missing library?"

jones1913
2nd August 2015, 19:16
i tried some diffirent header and i solved that problem. I checked and now i cant. I dint remember
What??? :D:D:D

but if you tick keep out put on error at behappy, mp3 files is written and it seems no problem.
Ok but its of course no permanent solution.

When i choose lwlibavaudio at source i get error.
"LoadPlugin: unable to load "D:\program\ses\BeHappy-0.2.8.19896\BeHappy\plugins32\lsmashsource.dll", Module not found. Install missing library?"
M$VC 2010 package (https://www.microsoft.com/en-US/download/details.aspx?id=5555) installed?

siella
17th August 2015, 15:30
M$VC 2010 package installed?
Nope. I ll install

at codeplex page images of behappy is very old. it can be good if it is renewed

jones1913
6th September 2015, 13:00
at codeplex page images of behappy is very old. it can be good if it is renewed
Done. (https://behappy.codeplex.com/) Also updatet the description a bit.

tebasuna51
6th September 2015, 17:56
Thanks jones1913.

jones1913
6th September 2015, 19:30
Thanks jones1913
You're welcome! :)

siella
12th September 2015, 20:06
Thanks for all jones1913
Good work

siella
16th September 2015, 22:25
I update oggenc2 v2.88 aoTuVb6.03 2015, qaac 2.52 and some bass dll.
Also i corrected some readme files.
Bug: newer version of mac. exe encoder doenst support stdin so i replaced with older version.
Main readme file
You need install AviSynth v2.6 or higher*, and .NET FrameWork v4.5 or higher.
The basic BeHappy is a folder (portable) with BeHappy.exe and AvisynthWrapper.dll.
You can create a DeskTop link with right mouse button over BeHappy.exe and Send to -> DeskTop

To add more features you can add a subfolder 'extensions'.

Add the subfolder 'encoder' (read the Readme.txt file)

Not: We dont recommend but if you dont want install avisynth you can download avisynth.ddl and DevIL.dll from http://avs-plus.net/
and copy them to the BeHappy main folder and also install Visual C++ Redistributable or put msvcp110.dll and msvcr110.dll main folder.
Maybe after some test it can be realease avisynth.dll as standart to make complate portable.
http://www.mediafire.com/download/dwr2xkh86kc3qqi/BeHappy.17.09.2015.7z

siella
24th October 2015, 12:04
I got this error
Error: BeHappy.AviSynthException: LoadPlugin: unable to load "E:\BeHappy_v0.2.8.19896\plugins32\TimeStretch.dll", Module not found. Install missing library?
but TimeStretch.dll(16.05.2015) exist in plugins folder

LigH
24th October 2015, 12:40
Maybe TimeStretch.dll exists, but depends on any other DLL? (try DependencyWalker 32 bit)

Wilbert
25th October 2015, 17:23
You will need the VC2010 runtime libs: http://www.microsoft.com/en-us/download/details.aspx?id=8328 (or maybe just http://www.microsoft.com/en-us/download/details.aspx?id=5555).

siella
31st December 2015, 16:41
I updated some dll , encoder and readme files. Also i added avisynth+ from megui(that has ConvertAudioToFloat, SSRC).
http://www.mediafire.com/download/3d6ji33jyvcvihh/BeHappy.31.12.2015.7z

jones1913
4th January 2016, 18:50
I updated some dll , encoder and readme files. Also i added avisynth+ from megui(that has ConvertAudioToFloat, SSRC).
Cool, only small problem with portable Avisynth is that the "Preview" button wont work.
Preview simply opens the avs script with the associated direct show player, and this call fail without avs system wide installed.

LigH
4th January 2016, 18:56
A VfW based player would possibly be able to use an avisynth.dll if its working directory is specified in its directory... Is there even any dedicated "native AviSynth player"? Never heard of any, yet. But well, AviSynth's focus is accuracy, not real-time playback.

jones1913
4th January 2016, 19:12
I could hook the preview function to behappys internal decoding routines and then playback the raw wave samples via internal .net media classes... :cool:

But.. too lazy, too less time, no interest. choose one :D:D:D

LigH
5th January 2016, 09:27
At least two of them could be solved by a "distributed persuasion attack"... any volunteers? ;)

jones1913
7th January 2016, 14:38
At least two of them could be solved by a "distributed persuasion attack"... any volunteers?
Seems there is low demand for this "feature". No way that I currently spend time on this.

For now I'm busy with other important things (trying to get the VCE on my AM1 Kabini to run on linux). :devil:

Sharc
2nd February 2016, 09:42
Thanks jones1913 for keeping BeHappy alive......

tebasuna51
16th October 2016, 18:39
I make a new package of BeHappy (https://www.sendspace.com/file/bakkpw) with:

- New versions of AviSynth plugins decoders: LSMASHSource, ffms2 and Bass.
- New versions of some encoders and a new encoder: OptimFROG
- Also a pack of encoders with 64 bit version (https://www.sendspace.com/file/whrg1v) to replace if use OS 64 bits.
- Some changes in extension folder to acomodate new encoder versions or correct some bugs.

I put in main BaHappy folder OptimFROG.dll, because in plugins32 is usseless, and work here without need to copy to system folder.
Is a new version from recent encoder, the included with bass_ofr don't work with the new encoder.

I modify the Readme files. And I have somme suggestions about encoders:

Some of them are really old and usseless: enc_AudX_CLI and mp3sEncoder.

Others are deprecated and replaced with better options: dcaenc, Aften, Twolame and enc_aacPlus
Now ffmpeg is preferred for AC3 and MP2, and offer the new native AAC than claim be high quality (FAAC deprecated, fdkaac not present in Zeranoe builds but we have already fdkaac).
We have now 6 AAC encoders.

Also CUETools, a great tool to rip CD's, but wasted here to only encode to flac when we have already Flaac.

Maybe is time to clear a little BeHappy. At least I will do that with my working copy, and leave this package like a historic backup.

EDIT: I forget the Readme.txt and Changes.txt from main folder but without changes with the included in Codeplex.
Only ffms2 need AviSynth 2.6 but LSMASHSource work with 2.58 (and I suposse also with 2.57)

EDIT 2: Included Readme.txt and Changes.txt

Sharc
17th October 2016, 15:16
Thank you. Makes me feel happy :)

GMJCZP
17th October 2016, 18:31
Thank you tebasuna51.
IMHO mp3sencoder is still valid, it's a excelent encoder for mp3 cbr.

tebasuna51
17th October 2016, 20:11
I changed the packages in previous post:

- pack of encoders with 64 bit version
Deleted mpcdec.exe, a decoder not needed at all.
Created folder qaac (previously qaac was in encoder folder)

Don't need a new download only make the changes if already download previously.

- new package of BeHappy
Added Readme.txt and Changes.txt with some changes.
New clean BeHappy.State

I know BeHappy.State is created if not exist but the included put the logical order, for me, of DSP functions.
By default BeHappy put the DSP order of first image, but I like the order of second image:

- First downmix channels (mono, Downmix).
- After convert frequency or tempo (TimeStretch or SSRC).
- Now upmix (Duplicate or Upmix 5.1).
- Amplify or Normalize volume.
- At last change to desired bitdepth if required.

Changed files attached if already downloaded.

tebasuna51
17th October 2016, 20:32
IMHO mp3sencoder is still valid, it's a excelent encoder for mp3 cbr.

Of course each user can preserve any of them.

But I think mp3sencoder need a special player to play surround mp3's, is not standard at all.

And I don't found new versions, the link provided don't work.

GMJCZP
18th October 2016, 00:18
The package of siella BePack v3.1 (see in previous pages of this thread) is mp3sencoder.

tebasuna51
18th October 2016, 13:47
Yep, the mp3s(surround)encoder.exe 2008/05/19 is still in my package.

But need special player like http://www.free-codecs.com/download/fraunhofer_iis_mp3_surround.htm (not currently available)
Or Foobar2000 plugin http://www.free-codecs.com/download/winamp_plugin_mp3_surround.htm (not currently available)

The same for enc_AudX_CLI, you can always make a Downmix Dpl_II, encode like regular mp3 stereo, and play with hardware/software players with Dpl_II decoder than is more standard.

GMJCZP
18th October 2016, 14:45
In foobar2000 is present the last version of fhg aac (by case, 2015, in lamexp is already present too). In your package is the 2012 version of tmkk.

For now, I use mp3sencoder for mp3 cbr only.

siella
1st December 2016, 10:24
thanks tebasuna51
I am not sure but i think new version of behappy need net frame 4 not 2

tebasuna51
1st December 2016, 22:52
I'm not change the BeHappy versión, is still the same than Sun Jun 21, 2015.
Only encoders, some plugins and .ext.

GMJCZP
2nd January 2017, 17:26
At least in xp with avast, lately and sometimes exists incompatibilities with d_ConvertSample.ext. The error message starts:

"Can't load extensions from file C:\Program files\BeHappy\extensions\d_ConvertSample.ext
System.InvalidOperationException:There is an error in XML document (22, 4).---> System.IO.IOException: The process cannot access the file 'C:\Documents and Settings\...\Temp\da5qiums.dll' because it is being used by another process"

The solution is deactivate the AV or click in "Reintent" (equivalent to "Reintentar" in spanish).

Edit: the dll archive in Temp directory maybe be different.

Emulgator
3rd January 2017, 00:10
da5qiums.dll would look suspicious to me, nothing that belongs inside BeHappy. An unwanted guest maybe ?

tebasuna51
3rd January 2017, 03:24
Of course don't belong to BeHappy, but if "The solution is deactivate the AV" you have already the culprit.

jones1913
3rd January 2017, 10:58
I can not imagine what dependency could be between the extension loading and some suspicious dlls in your Temp folder.

I suggest to clear your 'C:\Documents and Settings\...\Temp\' folder (manual or with CCleaner or so..).

LigH
3rd January 2017, 11:05
I would guess that BeHappy wants to create a temporary file, which gets a directory content list to avoid filename conflicts, and the AV takes this opportunity to scan the folder for suspicious files in the same location as their list is collected. So, obviously, cleaning the %TEMP% folder regularly is not a bad idea...

GMJCZP
4th January 2017, 01:34
It's curious, BeHappy, d_ConvertSample and Temp folder? :confused:

jones1913
22nd January 2017, 14:56
I have cloned BeHappy repository over to GitHub. (https://github.com/jones1913/behappy) Why? Because everybody is on GitHub. :cool:

Next week or so I'll look at tebasuna's changes. (https://forum.doom9.org/showpost.php?p=1782977&postcount=1221)

@tebasuna: You can of course send your changes via pull request at github, or I can add you as collaborator (for direct access) if you want.
I aggree to clean extensions folder, we can move old exts. to 'BeHappy/extensions/deprecated/' and users can copy them back if they want to use them.


Changes since last release on codeplex:
(Nothing fancy, some gui tweaks and github import related things.)

commit 7c938ce21cc52a35149a838c48dd941cd4b93b29
Author: jones1913 <jones1913@users.noreply.github.com>
Date: Sun Jan 22 11:16:34 2017 +0100

* fix .csproj and compile.bat
+ add controls.cs (missing in previous commit)
+ add .gitignore

commit fefcce84b240a96d3d66af432a7063f01aacaff5
Author: jones1913 <jones1913@users.noreply.github.com>
Date: Wed Jan 11 10:45:54 2017 +0100

* move custom controls to controls.cs
+ add linkLabel with context menu as head to source and destination groupboxes
to make related tasks accessible in a more obvious way (concept stolen from StaxRip)
+ add some tooltips to 'Tweak' section

commit 53d4ca1eb6bfbc0e51f012698983af108aedbf4f
Author: jones1913 <jones1913@users.noreply.github.com>
Date: Wed Jan 11 10:27:45 2017 +0100

+ show number of loaded source files in groupbox text
+ add option 'StartJobsInstantly' to start jobs immediately after enqueuing
* state of 'omitEncoderScript' and 'startJobsInstantly' checkboxes is saved in config file

commit 15d1a4546955cc76702e26623a8da38da8190ad5
Author: jones1913 <jones1913@users.noreply.github.com>
Date: Wed Jan 11 10:18:54 2017 +0100

+ jobqueue tab is splitted horizontal to make jobqueue/log panels resizeable
* fix too much spaces in some generated encoder command lines

commit 21658ae39699ba27a27c69cacdd2cf95c9440325
Author: jones1913 <jones1913@users.noreply.github.com>
Date: Wed Jan 11 10:05:45 2017 +0100

+ add button 'show script' to immediately inspect the avs script
+ add encoder commandline as comment to avs script

commit 072644cb221c032854307080398d5c202b97224c
Author: jones1913 <jones1913@users.noreply.github.com>
Date: Wed Jan 11 09:11:57 2017 +0100

* cleanup after TFS import from codeplex
* changed folder structure, removed some stuff

commit 7895a07b2856940a5414280a2a1f0d662ba226fe
Author: jones1913 <jones1913@users.noreply.github.com>
Date: Sun Jan 8 15:34:34 2017 +0100

create README.md

commit 25262541788250d9731cc5707d8749a985a64872
Author: jones1913 <jones1913@users.noreply.github.com>
Date: Sun Jul 5 07:49:01 2015 -0400

* bugfix in ffmpeg aac extension



Compiled binary can be found here: https://github.com/jones1913/BeHappy/releases

tebasuna51
22nd January 2017, 23:37
Thanks jones1913, I aggree with your decission.

Don't need be addeed like collaborator, if I have some suggestion I can use GitHub and/or this thread.

GMJCZP
23rd January 2017, 00:38
Thank you, Mr. Jones!
I have a question: How use BeHappy and fhgaac (or fdkaac) for encode the audio source ripped from a Bluray with MakeMKV?

tebasuna51
23rd January 2017, 02:24
- [1] Load your mkv in BeHappy

- [1] Select LWLibavAudioSource and Configure to the Stream Index (-1 work for first audio, if not select the desired track, 2 for the second...)
All audio formats (except DTS-Express) from a BluRay can be decoded by LWLibavAudioSource.

- [3] If desired select any DSP (Downmix, TimeStretch, ...)

- [4] Select name, Encoder and Configure to the desired mode (CBR/VBR) and Bitrate/Quality.

GMJCZP
23rd January 2017, 18:09
Thanks, I will analyze your reply, thank you very much.

jones1913
26th February 2017, 20:07
I've just packed a new release (https://github.com/jones1913/BeHappy/releases) and wrote some lines to the wiki. (https://github.com/jones1913/behappy/wiki)

Have fun! :)

LigH
26th February 2017, 21:41
:thanks:

I will.

tebasuna51
27th February 2017, 00:36
Thanks jones1913.

Richard1485
16th June 2017, 16:43
Is it possible to build this nightmode downmix (https://forum.doom9.org/showthread.php?t=168267) into BeHappy but to normalize the matrix to prevent clipping?



This "nightmode" preset uses the following channel matrix:
FL' = FC + 0.30*FL + 0.30*BL
FR' = FC + 0.30*FR + 0.30*BR


I'm not sure how to normalize the matrix myself. It looks as if it should be something like...

FL'= 0.2929 + 0.1875 + 0.1875
FR'= 0.2929 + 0.1875 + 0.1875

..but the total is significantly below 1.0. (I know that the total doesn't have to be exactly 1.0, but should it be this much less?)

tebasuna51
16th June 2017, 21:39
In FL' = FC + 0.30*FL + 0.30*BL

the max value is 1.6 then the normalized version is:

FL' = (1/1.6)*FC + (0.30/1.6)*FL + (0.30/1.6)*BL = 0.625*FC + 0.1875*FL + 0.1875*BL

Richard1485
17th June 2017, 02:00
Thank you! For some reason, I divided the value for FC by the wrong number. I knew something didn't look right. Would this work?


flr = GetChannel(a, 1, 2)
fcc = GetChannel(a, 3, 3)
lrc = MixAudio(flr, fcc, 0.1875, 0.625)
blr = GetChannel(a, 5, 6)
return MixAudio(lrc, blr, 1.0, 0.1875)

tebasuna51
17th June 2017, 10:52
Yes, this is the avs code for that downmix.

Richard1485
18th June 2017, 17:19
^ Thanks very much! If it would possible to build it into BeHappy at some point, that would be most useful. :-)

tebasuna51
18th June 2017, 19:51
^ Thanks very much! If it would possible to build it into BeHappy at some point, that would be most useful. :-)

Done.

Replace ...Behappy\extensions\d_DownMix.ext with the attached one.

You can edit d_DownMix.ext and add your mixes.

Richard1485
18th June 2017, 19:56
¡Eres muy trabajador!

Thanks for your help and hard work! :D

siella
29th June 2017, 22:28
I changed url ext. of dts also upmix ext. doesnt have <LoadAvsPlugin> parameter for soxfilter.
I made stereo to 2.1 (lfe) upmix dsp plugin. only dts and ac3 encode give you 2.1 audio. when you dts encode you have to choose channel conf. (L,R) and click to Add lfe channel

Thanks for your effort, jones1913

tebasuna51
30th June 2017, 12:50
I changed url ext. of dts

Thanks, I updated the link also in Doom9 thread then the e_FFdcaenc.ext update is not necessary.

also upmix ext. doesnt have <LoadAvsPlugin> parameter for soxfilter.

Thanks, before only work if soxfilter.dll was in autoload plugins folder.

I made stereo to 2.1 (lfe) upmix dsp plugin. only dts and ac3 encode give you 2.1 audio. when you dts encode you have to choose channel conf. (L,R) and click to Add lfe channel

I can't recommend use this upmix function:

l = GetLeftChannel(a)
r = GetRightChannel(a)
lfe = ConvertToMono(a).SoxFilter("lowpass 120","vol -0.5")
return MergeChannels(l,r,lfe)

Any audio player with 2.1 speakers do this job better with 2.0 input, because:

1) Make the lowpass cut (here 120 Hz) with the appropiate frecuency to the attached speakers.

2) Low frecuencies aren't eliminated from FL,FR and the audio player still extract them to subwoofer adding to LFE content.
That addition can cause a over-mix or a sub-mix if there phase shift's in the low pass sox filter.

Please don't mistake LFE channel with subwoofer speaker.
Any 2.1 audio player send to subwoofer the low frequencies present in all channels.

Is always a bad idea create a LFE channels if not present in source.
Never make 2.0 -> 2.1 or 5.0 -> 5.1
If you need 5.1 for some compatibility create a empty LFE.

siella
2nd July 2017, 23:32
thank you for information
do you recommend convert 5.1 to 2.1 with using orginal lfe channel ?
You know people doesnt use 5.1 system anymore, usually use soundbar.

Max bitrate of eac3 is variable for each sample rate so i updated eac3 ext.

LigH
3rd July 2017, 07:18
I am no expert in this regard ... but for movies, I would possibly keep the LFE (in case it contains extra cinematic effects), and convert the full range audio preferably with DPL-II (IMHO it sounds nice even with stereo speakers). Personal preference.

tebasuna51
3rd July 2017, 11:23
do you recommend convert 5.1 to 2.1 with using orginal lfe channel ?
You know people doesnt use 5.1 system anymore, usually use soundbar.

Downmix to save space disk is now not necesary at all, then the downmix is recommended to adecuate the input audio to the audio player:

1) Downmix to stereo 2.0, even with special mix prioritizing Center channel.
Recoded to AAC (or AC3 for very old players)
- To play with stereo TV's, old stereo only players or streaming.
- Is not recommended use the LFE channel in the mix (but you can try it)

2) Downmix to DPL 2.0 only recommended for old audio players without support for 5.1 input but with DPL decoder and surround speakers.
Recoded to 2.0 AC3 dpl marked.
Dolby do not recommend use the LFE channel in the mix (but you can try it)

3) Maybe a downmix 5.1 -> 2.1 for an audio system 2.1 speakers can work fine.
I never test that, but mix front and surround channels can't be bad for low frecuencies (surround channels don't have them normally).
BTW not all audio systems 2.1 have spdif input to support AC3 2.1 (or HDMI to support PCM 2.1), most of them have only 2.0 analog input and a mix 2.1 is unusable.

But I can't recommend a downmix for a soundbar than stand for a 5.1 (at least) input. Try to do their job before can be a problem, let apply their specific downmix.

siella
3rd July 2017, 17:08
Well actually i have plan making other language of movies 2.0 channels to 2.1 using lfe from 5.1 audio orginal language of movies. I have soundbar and i ll test if i find spare time

LigH
3rd July 2017, 17:38
Every time someone has the great idea to mix channels from different audio streams into one, I can feel Agrajag (https://en.wikipedia.org/wiki/List_of_minor_The_Hitchhiker's_Guide_to_the_Galaxy_characters#Agrajag) crying: "Oh no, not again!" ;)

siella
3rd July 2017, 19:29
I think it will be fantasy :)

eca2424
21st December 2017, 13:36
I think it will be fantasy :)
Thanks for BePack Tools sir. That is most useful for me. I will Follow the updates for BeHappy and BePack. :-)

jones1913
5th January 2018, 13:52
Just uploaded a new release (https://github.com/jones1913/BeHappy/releases/tag/0.3.0.19814) with a mini change (already since last summer on my harddisk).

- audio source plugins are grayed out in combo box if source files are unsupported
- update qaac.exe, opusenc.exe, ffmpeg.exe (audio encoder only build)

Last release from me, I recently migrated to Linux on my main PC.

Unfortunately I haven't found an equivalent audio encoding gui for Linux yet...

tebasuna51
5th January 2018, 21:59
Thanks jones1913.

Richard1485
20th February 2018, 21:31
I'm encoding 5.1 for DVD and would like to check my settings.

https://s14.postimg.org/yk252yi8h/that.png


Does it matter that my source file – W64, which I'm loading with RaWavSource() – is little endian and that the output is set to big? I guess that it doesn't and that the conversion occurs internally, but the fact that the byte-order is given as an option makes me wonder.
Do I have to change anything when encoding for BD?

tebasuna51
20th February 2018, 22:52
Standard DTS (for DVD and BD) are Big-Endian, but for multichannel CD Audio must be Little-Endian, for that there are the options.

BTW use a recent dialog with the 3 most usefull options:
(replace the e_FFdcaenc.ext in extensions folder)

EDIT: replaced e_FFdcaenc.ext, see next posts

Richard1485
20th February 2018, 23:44
Thanks! If the same settings work for BD and DVD, then I suppose that DTS-HD cores are always BD complaint.

To get a DTS track to work with MuxMan without its throwing an error, I've found that I have to use 1509.75kb/s with ffdcaenc (when using eac3to's stdout as well). When viewed with LeeAudBi, the transmission bitrate shows correctly as 1536kb/s, and the primary frame byte-size is correct too.

EDIT: The track that is produced by BeHappy using the settings above is accepted by MuxMan with no problems. :)

Richard1485
22nd February 2018, 11:43
The full-DTS option presented by BeHappy produces a file that is accepted by MuxMan, but the half-DTS option does not.

DTS frame size not DVD compatible

Perhaps this is because BeHappy sets -b 755.5. If I use the command-line,...

eac3to.exe input.w64 stdout.wav -down16 | ffdcaenc.exe -i - -o output.dts -l -b 754.5

...the result is accepted by MuxMan.

Accepted audio output.dts

Is one value right and the other wrong, or is it more complicated than that? I think it's desirable for BeHappy to present a half-DTS option that's accepted by MuxMan.

tebasuna51
22nd February 2018, 12:34
You are right, is a bug in e_FFdcaenc.ext than put 755.5 instead the correct value 754.5.

Replaced e_FFdcaenc.ext in previous post.
The files in extensions folder can be edited (with Notepad for example) to correct any bug or make user option.

Richard1485
22nd February 2018, 15:32
Replaced e_FFdcaenc.ext in previous post.

Thanks!

The files in extensions folder can be edited (with Notepad for example) to correct any bug or make user option.

I guess I should have thought of that before. :p

GMJCZP
23rd February 2018, 20:25
tebasuna51, could you please upload the updated file e_FFdcaenc.ext? Thank you.

tebasuna51
23rd February 2018, 23:47
Replaced e_FFdcaenc.ext in previous post.

Is already uploaded.

GMJCZP
24th February 2018, 00:00
Thanks!

Richard1485
7th March 2018, 21:07
I often convert 16-bit multichannel audio to W64, edit it, and then re-encode. When the edited file exits BeHappy, it reads as 24-bit. If I convert it (before or after exporting) to 16-bit, do I lose anything? I guess that it's just padded and that the padding is subsequently stripped, but I'd like to make sure. (I've been meaning to ask this for a while and never got round to it. :))

tebasuna51
7th March 2018, 23:27
What kind of edit and recode to what format?

Some AviSynth functions need convert 16 bit int to 32 bit float and some encoders don't accept 32 bit float and need a conversion to 24 bit int.
Downconvert manually to 16 bit lose some precission.

For instance, in your command line:

eac3to.exe input.w64 stdout.wav -down16 | ffdcaenc.exe -i - -o output.dts -l -b 754.5

the -down16 is not recommended and lose precission, ffdcaenc can work with 24 bits source.
Take in mind than any encoder convert input to float to work internally.
Better 24 bit -> 32 bit float than 16 bit -> 32 bit float.

Richard1485
7th March 2018, 23:52
Downconvert manually to 16 bit lose some precission.

Ah, okay. That fits with what I've just been reading.


For instance, in your command line:

eac3to.exe input.w64 stdout.wav -down16 | ffdcaenc.exe -i - -o output.dts -l -b 754.5

the -down16 is not recommended and lose precission, ffdcaenc can work with 24 bits source.

I put that in only because I thought that stdout required 16-bit, not the encoder, but if that's not true, I can take it out.


Take in mind than any encoder convert input to float to work internally.
Better 24 bit -> 32 bit float than 16 bit -> 32 bit float.

Got it! :)

tebasuna51
8th March 2018, 12:10
I put that in only because I thought that stdout required 16-bit, not the encoder, but if that's not true, I can take it out.

Some encoder can't support wav files greater 4 GB and, maybe, we need reduce size downsampling 24 -> 16 bits.

But ffdcaenc with -l parameter support wav files >4GB.

LigH
8th March 2018, 13:36
Check documentations for mentioning the W64 format (WAV with 64-bit chunk size fields). If supported, prefer it.

tebasuna51
8th March 2018, 14:59
ffdcaenc can't support w64.

BTW, talking about BeHappy only, the user don't need care about this, always the best format is selected for the encoder used.

You can see in extensions\e_ENCODER.ext, for instance for ffmpeg:
<HeaderType>1</HeaderType>
and BeHappy output W64 header (1) because ffmpeg support W64.

For ffdcaenc use the default header WAV (0) but add the parameter -l to accept wav files > 4GB.

Richard1485
8th March 2018, 17:24
Yeah, I use W64 where possible. And it's good to know this about BeHappy:

BTW, talking about BeHappy only, the user don't need care about this, always the best format is selected for the encoder used.

:)

tebasuna51
26th June 2021, 15:54
The TimeStretch filter used in last BeHappy release was based in the TimeStretch.dll (2015 Wilbert based in SoundTouch library 1.9.0) plugin.
And is called with TimeStretchPlugin() in avs's created by BeHappy.

There are more recent SoundTouch versions, in AviSynth v2.61 and with Avs+.
Both need calls with only TimeStretch() and the current release can't do so.

There are a custom compilated BeHappy.exe (https://forum.doom9.org/showthread.php?p=1981303#post1981303), by -QfG-, than generate .avs like this:

...
LoadPlugin("C:\Portable\Behappy\plugins32\TimeStretch.dll")
WavSource("C:\z.wav")
ConvertAudioToFloat()
TimeStretch(...)
...

than can be compatible with Avs v2.61 and Avs+

I recommend delete the ...Behappy\plugins32\TimeStretch.dll
not needed at all, if we use Avs v2.61 the internal function is called, if we use Avs+ the plugin must be loaded by default, if Avs+ is properly installed.

There are other custom changes, for instance add TrueHD encode with ffmpeg in the file 's_FFAudio.ext', but for the TimeStretch improvement you only need replace the file 'BeHappy.exe' in your BeHappy package.

GMJCZP
26th June 2021, 18:30
Many thanks to -Qfg- and you tebasuna.

It is necessary to make the clarification that all the operations with FFMpeg are only for 64 bits, if they need a version for 32 bits they must download from the Reino compilations.

PD: won't it be possible to compile a version of FFMpeg like the one that weighed almost 3 Mb? Wouldn't that version just encode audio?

tebasuna51
27th June 2021, 10:49
It is necessary to make the clarification that all the operations with FFMpeg are only for 64 bits, if they need a version for 32 bits they must download from the Reino compilations.

BeHappy.exe is a 32 bits exe than can run also in 64 bits OS, but need a AviSynth version of 32 bits installed (Avs 2.61 or Avs+ 32 bits), and all plugins in ...BeHappy\plugins32 mus be 32 bits.

Remember than you can have installed both versions (32 and 64 Avs) in a OS 64 bits.

But encoders in BeHappy\encoder can be 64 bits unless your OS is only 32 bits like GMJCZP say, you must replace any encoder with a 32 bits version, not only ffmpeg.

tebasuna51
28th July 2021, 20:11
New LSMASHSource.dll release (https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works/releases/tag/20210729)

Replace the 32 bits version in ...BeHappy\plugins32, and the s_L-SmashAudio.ext attached here in ...BeHappy\extensions to use the new parameter drc_scale (recommended to 0 to obtain the full range of decodes)

GMJCZP
29th July 2021, 02:32
New LSMASHSource.dll release (https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works/releases/tag/20210728)

Replace the 32 bits version in ...BeHappy\plugins32, and the s_L-SmashAudio.ext attached here in ...BeHappy\extensions to use the new parameter drc_scale (recommended to 0 to obtain the full range of decodes)

Congratulations for drc_scale append to Lsmash! Thanks for the update.

tebasuna51
15th August 2021, 11:23
The same for new ffms2.dll linked here (https://forum.doom9.org/showthread.php?p=1949799#post1949799).

-QfG-
24th August 2021, 19:41
Updated the package with modified Encoder:

v1.1 QfG Mod BeHappy 3.x

Changelog:

-AC3 DRC scale 0 Support via FFAudioSource and L-SMASH Source.
-TrueHD Encoding with FFMPEG.
-Update of some Encoders deleted by illegal content, download always the oficial last versions.
-Correct TimeStretch management

Download here (https://forum.doom9.org/showthread.php?p=1981303#post1981303)

GMJCZP
25th August 2021, 15:41
Thanks, Isn't there a 32-bit version for the ffmpeg encoder?

Edit: I just read post #1281, because of the size of 22 mb I suspect that the ffmpeg encoder is only for converting audio

Out of curiosity, where can I get these builds? Suddenly you could get a 32 bit version.

-QfG-
26th August 2021, 22:23
It's the newest FFMPEG encoder, but i still packed it with UPX. It is the x86 version of FFMPEG.

siella
10th January 2022, 00:29
I made extantion for Open Source USAC encoder exhale

dark76
16th January 2023, 21:47
Updated the package with modified Encoder:

v1.1 QfG Mod BeHappy 3.x

Changelog:

-AC3 DRC scale 0 Support via FFAudioSource and L-SMASH Source.
-TrueHD Encoding with FFMPEG.
-Update of some Encoders

Download here (https://1fichier.com/?oy296bucjp9x152tu7ct)



Is it possible to reupload it?
I finally upgraded to windows 10 64 bit (I had windows 7 32 bit) and I really cant make work the timestretch of behappy. I guess the reason is the one tebasuna51 wrote some posts ago.
Thank you :)

tebasuna51
17th January 2023, 05:09
BeHappy_modified_QfG_v1.1
[EDIT]Seems that pack have a illegal ffmpeg content like richardpl must know, but it is not detected previously.
I only repeat the -QfG- upload, I don't know how detect illegal ffmpeg content[EDIT]

Behappy is a 32 bits exe and need AviSynth 32 installed.
In W10 64 bit you can have installed both AviSynth 32 and 64 bit.

dark76
17th January 2023, 10:52
BeHappy_modified_QfG_v1.1 seems have a illegal ffmpeg content

Behappy is a 32 bits exe and need AviSynth 32 installed.
In W10 64 bit you can have installed both AviSynth 32 and 64 bit.

Thank you, i just tried and it works!
I love Behappy and I didn't like the idea to not be able to use it anymore. Thanks again!

P.S. I noticed there are 2 times the option "Convert Sample - Float 32bits"

richardpl
17th January 2023, 11:15
Nice, moderator of this forum is uploading illegal ffmpeg content.

tebasuna51
17th January 2023, 13:09
Sorry, I delete the links.

But how detect the illegal ffmpeg content?

Based in the e_FFmpeg.ext file is used only with:

ffmpeg.exe -i - -y -loglevel error -c:a mp2 %options% "{0}"
ffmpeg.exe -i - -y -loglevel error -c:a mp2fixed %options% "{0}"
ffmpeg.exe -i - -y -loglevel error -c:a libtwolame %options% "{0}"
ffmpeg.exe -i - -y -loglevel error -c:a dca -strict -2 %options% "{0}"
ffmpeg.exe -i - -y -loglevel error -c:a truehd -strict -2 %options% "{0}
ffmpeg.exe -i - -y -loglevel error -c:a eac3 %options% "{0}"
ffmpeg.exe -i - -y -loglevel error -c:a ac3 %options% "{0}"
ffmpeg.exe -i - -y -loglevel error -c:a ac3_fixed %options% "{0}"
ffmpeg.exe -i - -y -loglevel error -c:a aac -f mp4 %options% "{0}"

AFAIK all are legal usage and supported by standard ffmpeg builds from https://ffmpeg.org/download.html#build-windows

I recommend fill the encoders folder of BeHappy with the last version of them (can be the 64 bit version in a 64 OS)

The plugins32 folder can have always the last versions but only 32 bits.

The extensions folder show how use decoders and encoders, and can be modified with a text editor. For instance the improvement in last LSMASHSource.dll and ffms2.dll need the last 32 bit versions and changes in s_FFAudio.ext and s_L-SmashAudio.ext

It is easy have BeHappy actualized without download the full package always:
- Download last versions of encoders and plugins32 folders
- Modify yourself, or request in this thread, the .ext changes if needed.

Changes in root folder (BeHappy.exe and AvisynthWrapper.dll only) normally aren't required, the last oficial release (in my signature) is v0.3.19814 and the -QfG- v1.1 is v0.37671, like the differences are interesting (https://forum.doom9.org/showthread.php?p=1946110#post1946110) I attached the new BeHappy.exe and the extensions folder.

That replace the full -QfG- v1.1 package

richardpl
17th January 2023, 13:22
It is packed with UPX, that is instant bell ringing. But I admit I never fetched binary so I have not actually inspected its content. So It may contain even virus. You never know.

filler56789
17th January 2023, 13:55
It is packed with UPX, that is instant bell ringing. But I admit I never fetched binary so I have not actually inspected its content. So It may contain even virus. You never know.

Thanks for the useful information. From now on I will stop UPXing ffmpeg, ffprobe, ffplay and Mkvtoolnix because the UPX compression automagically makes them illegal.

:rolleyes: :rolleyes: :rolleyes: :rolleyes: :rolleyes:

<Woman Facepalming Emoji>

tebasuna51
17th January 2023, 15:34
P.S. I noticed there are 2 times the option "Convert Sample - Float 32bits"

Maybe you have a mix in extensions folder of d_*.ext from oficial and QfG packages:

Directorio de D:\tmp\Be_last\extensions

06/01/2017 18:54 881 d_ConvertSample.ext
02/09/2016 12:24 6.487 d_DownMix.ext
06/01/2017 18:54 1.197 d_DuplicateChannels.ext
16/10/2016 14:14 2.216 d_SSRC.ext
06/01/2017 18:54 13.584 d_UpMix.ext

Directorio de D:\tmp\qfg_v1.1\extensions

26/06/2021 10:17 881 d_ConvertBits.ext
25/06/2021 21:13 918 d_ConvertSampleRate.ext
06/01/2017 18:54 1.197 d_DuplicateChannels.ext
d_ConvertBits.ext = d_ConvertSample.ext
But like have different name are showed like a different DSP

d_ConvertSampleRate.ext < d_SSRC.ex
I recommend delete d_ConvertSampleRate.ext and use d_SSRC.ext with more options

d_DuplicateChannels.ext = content and name, no problem.

d_DownMix.ext and d_UpMix.ext don't exist in qfg_v1.1 package.
Recommended to use them.

The e_*.ext and s_*.ext have the same name and content in both versions except the next 3.

If you have the last oficial BeHappy version I recommend upgrade from the QfG version only:
BeHappy.exe (https://forum.doom9.org/showthread.php?p=1981303#post1981303) (for TimeStretch)
extensions\e_FFmpeg.ext (more options)
extensions\s_FFAudio.ext (https://forum.doom9.org/showthread.php?p=1949836#post1949836) (for DRC)
extensions\s_L-SmashAudio.ext (https://forum.doom9.org/showthread.php?p=1948669#post1948669) (for DRC)

The BeHappy.exe and last ones already in previous posts.
My e_FFmpeg.ext version here:

dark76
18th January 2023, 17:21
Maybe you have a mix in extensions folder of d_*.ext from oficial and QfG packages:

Yed, indeed, i had 31 files .ext. I deleted the ones you adviced and now looks okay, thx :)

-QfG-
27th January 2023, 17:49
It is packed with UPX, that is instant bell ringing. But I admit I never fetched binary so I have not actually inspected its content. So It may contain even virus. You never know.

I have packed the official FFMPEG Build with UPX by myself, so instead of ~100MB the exe is only ~35MB. Thats all.

Thanks for the useful information. From now on I will stop UPXing ffmpeg, ffprobe, ffplay and Mkvtoolnix because the UPX compression automagically makes them illegal.

Me too. :D :D

jones1913
10th March 2023, 22:01
I still sometimes use BeHappy under Linux (per Wine) but it had some gui issues.
So I decided to make a recompile with a more recent toolkit and update some things.

Changelog:

- update to .net 4.8
- enabled AMD64 build
- added avisynth dlls for portable mode
- newer avisynthwrapper builds (borrowed from megui)
- replaced TimeStretchPlugin() function with TimeStretch()
- encoder updates (x64 builds if available)
- extension updates (thanks to contributors)
- add BestAudioSource extension
- added hi-dpi support, use nicer font
- gui tweaks (for better compability with linux/wine)


Notes:
- .net 4.8 is required, should work on win7 und later
- I have only tested with windows server 2019 evaluation in a virtual machine, but it should all work with recent win10 and 11
- if portable mode is not desired delete avisynth.dll and devil.dll from program folder
- in portable mode every source and dsp extension must specify the required plugin.dll
in <LoadAvsPlugin> tag, since there is no autoloading from a system-wide avisynth folder
- I have not tested dsp in x64 mode except timestretch, please test if required avs plugin dlls are in place
- preview button wont work in portable mode, does anyone use that anyway?
- on Linux it runs fine with the wine-mono package installed, installing .net 4.8 is not required

https://www.mediafire.com/file/1m4hbkv2pypdh6n/behappy-0.3.1.zip/file

tebasuna51
11th March 2023, 12:39
Thanks Jones, I'll test it in W10.

jones1913
12th March 2023, 21:49
...
https://www.mediafire.com/file/1m4hbkv2pypdh6n/behappy-0.3.1.zip/file
I just noticed that mediafire flagged my upload as "virus".
So I dropped the zip file to virustotal, and some encoders are detected as virus or trojan or whatnot (by max 4 search engines out of 69).
See here:
https://www.virustotal.com/gui/file/9bb833c94d3bec4494f46009444a369f80a2f3c497aeb2b8687c00ece24c0499/relations

To compare I have also tested with encoders from Mulders site:
https://sourceforge.net/projects/muldersoft/files/Opus%20Tools/
and the results are even more crazy:
https://www.virustotal.com/gui/file/dcedc57fed63d8f96d65b6dffc8f96d94b854dfc0d062a84c0d5329b767e46d9/relations

I am very confident that Mulders compiles contain no viruses and these are all false flags.
So I guess it is the same with the encoders in my upload. They are mostly from rarewares.org .
I think everyone must decide if they trust downloaded programs.

If someone has suggestions for alternative download sources than rarewares.org ...

LigH
12th March 2023, 22:24
I am not surprised that some Antivirus engines report false alarms for assembler optimized SSE builds of encoders, as provided by RareWares.

john33
13th March 2023, 08:32
I am confident that anything from Rarewares will be a false positive. I am afraid that virustotal is in many cases more of a hindrance than a help, their algorithms are not as smart as they would have people believe.

tebasuna51
15th March 2023, 02:19
The Upmix DSP's can't work with Avs+ and SoxFilter.dll, maybe in the future (https://forum.doom9.org/showthread.php?p=1984463#post1984463)...

Until that the Avs+ users can work with the commented soxfilter usage in d_UpMix.ext:

front = a#.soxfilter("filter 20-20000")
back = a#.soxfilter("filter 100-7000")
lfe = cc.Amplify(0.0)#ConvertToMono(a).soxfilter("lowpass 120","vol -0.5")
The filters are, for me, unnecesaries and the lfe is much better empty.

tebasuna51
15th March 2023, 13:02
@jones1913
I can't see the new sources in https://github.com/jones1913/BeHappy

BTW I proppose a change:
Line 338 in old Encoder.cs:
int[] defmask = {0, 4, 3, 7, 51, 55, 63, 319, 1599, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};

Num Mask Mask
cha old old maskchannel defaults new maskchannel defaults new Name
--- ---- ---------------------------- --------------------------- ---- ------
1 4 FC FC 4 mono
2 3 FL FR FL FR 3 stereo
3 7 FL FR FC FL FR LFE 11 2.1
4 51 FL FR BL BR (quadro) FL FR FC BC 263 4.0 (first surround)
5 55 FL FR FC BL BR FL FR FC SL SR 1543 5.0
6 63 FL FR FC LFE BL BR FL FR FC LFE SL SR 1551 5.1
7 319 FL FR FC LFE BL BR BC FL FR FC LFE BC SL SR 1807 6.1
8 1599 FL FR FC LFE BL BR SL SR FL FR FC LFE BL BR SL SR 1599 7.1

Then must be:
int[] defmask = {0, 4, 3, 11, 263, 1543, 1551, 1807, 1599, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};

Now the defaults are the same than ffmpeg, and with the pair SL/SR for surround, instead BL/BR like can see here (https://mediaarea.net/AudioChannelLayout)

Question: decoders like BestAudioSource or FFAudioSource export a runtime variable with the current dwChannelMask.
How can BeHappy read it to assign the correct maskchannel without need put it manually?

jones1913
16th March 2023, 21:06
I can't see the new sources in https://github.com/jones1913/BeHappy
It's up now.


Question: decoders like BestAudioSource or FFAudioSource export a runtime variable with the current dwChannelMask.
How can BeHappy read it to assign the correct maskchannel without need put it manually?
Good question. I guess this has to be wired up in Avisynthwrapper.dll .
To start small: how would I retrieve this variable in an ordinary script?

tebasuna51
16th March 2023, 23:02
It's up now.
Thanks.
how would I retrieve this variable in an ordinary script?
I don't know, I ask also in Avisynth usage thread (https://forum.doom9.org/showthread.php?p=1984600#post1984600)

There are some news https://forum.doom9.org/showthread.php?p=1984568#post1984568

pinterf
17th March 2023, 10:36
@jones1913
I can't see the new sources in https://github.com/jones1913/BeHappy

BTW I proppose a change:
Line 338 in old Encoder.cs:
int[] defmask = {0, 4, 3, 7, 51, 55, 63, 319, 1599, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};

Num Mask Mask
cha old old maskchannel defaults new maskchannel defaults new Name
--- ---- ---------------------------- --------------------------- ---- ------
1 4 FC FC 4 mono
2 3 FL FR FL FR 3 stereo
3 7 FL FR FC FL FR LFE 11 2.1
4 51 FL FR BL BR (quadro) FL FR FC BC 263 4.0 (first surround)
5 55 FL FR FC BL BR FL FR FC SL SR 1543 5.0
6 63 FL FR FC LFE BL BR FL FR FC LFE SL SR 1551 5.1
7 319 FL FR FC LFE BL BR BC FL FR FC LFE BC SL SR 1807 6.1
8 1599 FL FR FC LFE BL BR SL SR FL FR FC LFE BL BR SL SR 1599 7.1

Then must be:
int[] defmask = {0, 4, 3, 11, 263, 1543, 1551, 1807, 1599, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};

Now the defaults are the same than ffmpeg, and with the pair SL/SR for surround, instead BL/BR like can see here (https://mediaarea.net/AudioChannelLayout)

Question: decoders like BestAudioSource or FFAudioSource export a runtime variable with the current dwChannelMask.
How can BeHappy read it to assign the correct maskchannel without need put it manually?
Had a look into av_get_default_channel_layout which iterates over channel_layout_map[] and returns the first entry with matching channel count, I see it differently.

Based on this:
https://ffmpeg.org/doxygen/trunk/channel__layout_8c_source.html
and
https://ffmpeg.org/doxygen/trunk/channel__layout_8h_source.html

The default five and six-channel setting is 5.0 BACK and 5.1 BACK, so they shouldn't be changed.
Changing the 3 and 4-channel defaults to 2.1 and 4.0 is O.K.

tebasuna51
17th March 2023, 14:49
https://ffmpeg.org/doxygen/trunk/channel__layout_8c_source.html
and
https://ffmpeg.org/doxygen/trunk/channel__layout_8h_source.html

The default five and six-channel setting is 5.0 BACK and 5.1 BACK, so they shouldn't be changed.
Changing the 3 and 4-channel defaults to 2.1 and 4.0 is O.K.
And 6.1 (7 channels) must be changed also.

Well, and ffmpeg must change 5.0 BACK and 5.1 BACK defaults.

In old times SL/SR (Side) was at 90º and BL/BR at 135º (Back like cuadro) and the AC3/DTS sources 5.1 with Surround channels (Ls/Rs) at 120º was decoded to BL/BR (120º near 135º than 90º)

But now the preference seems assign 110º (https://mediaarea.net/AudioChannelLayout) to Side (SL/SR) and Surround (Ls/Rs)

And ffmpeg is coherent with that:
DTS 5.0 decoded like 5.0(side)
DTS 5.1 decoded like 5.1(side)
AC3 5.0 decoded like 5.0(side)
AC3 5.1 decoded like 5.1(side)
...
What source must be decoded to BL/BR pair?

pinterf
17th March 2023, 15:30
And 6.1 (7 channels) must be changed also.

Well, and ffmpeg must change 5.0 BACK and 5.1 BACK defaults.

In old times SL/SR (Side) was at 90º and BL/BR at 135º (Back like cuadro) and the AC3/DTS sources 5.1 with Surround channels (Ls/Rs) at 120º was decoded to BL/BR (120º near 135º than 90º)

But now the preference seems assign 110º (https://mediaarea.net/AudioChannelLayout) to Side (SL/SR) and Surround (Ls/Rs)

And ffmpeg is coherent with that:
DTS 5.0 decoded like 5.0(side)
DTS 5.1 decoded like 5.1(side)
AC3 5.0 decoded like 5.0(side)
AC3 5.1 decoded like 5.1(side)
...
What source must be decoded to BL/BR pair?
Then they at ffmpeg project know it well, just keep the above mentioned old defaults for compatibility reasons?

tebasuna51
17th March 2023, 19:54
Then they at ffmpeg project know it well, just keep the above mentioned old defaults for compatibility reasons?

I don't think so, but no problem for me (I am one of the last defender of decode Ls/Rs to BL/BR, but with eac3to I changed my mind and recommend the pair SL/SR).

BTW the BeHappy defaults was created by me, and I recommend actualize them because all sources 5.0/5.1 are decoded to SL/SR, and encoders accept better the SL/SR pair to create 5.0/5.1 files.

All AVR's 5.1 play SL/SR or BL/BR with the Ls/Rs speakers without problems.

jones1913
18th March 2023, 14:31
@jones1913
BTW I proppose a change:
Line 338 in old Encoder.cs:
int[] defmask = {0, 4, 3, 7, 51, 55, 63, 319, 1599, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};

Num Mask Mask
cha old old maskchannel defaults new maskchannel defaults new Name
--- ---- ---------------------------- --------------------------- ---- ------
1 4 FC FC 4 mono
2 3 FL FR FL FR 3 stereo
3 7 FL FR FC FL FR LFE 11 2.1
4 51 FL FR BL BR (quadro) FL FR FC BC 263 4.0 (first surround)
5 55 FL FR FC BL BR FL FR FC SL SR 1543 5.0
6 63 FL FR FC LFE BL BR FL FR FC LFE SL SR 1551 5.1
7 319 FL FR FC LFE BL BR BC FL FR FC LFE BC SL SR 1807 6.1
8 1599 FL FR FC LFE BL BR SL SR FL FR FC LFE BL BR SL SR 1599 7.1

Then must be:
int[] defmask = {0, 4, 3, 11, 263, 1543, 1551, 1807, 1599, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};

Now the defaults are the same than ffmpeg, and with the pair SL/SR for surround, instead BL/BR like can see here (https://mediaarea.net/AudioChannelLayout)

Its done.
Compiled bins can be found on github in "bin" folder: https://github.com/jones1913/BeHappy/tree/master/bin

jones1913
19th March 2023, 19:12
The Upmix DSP's can't work with Avs+ and SoxFilter.dll, maybe in the future (https://forum.doom9.org/showthread.php?p=1984463#post1984463)...

Until that the Avs+ users can work with the commented soxfilter usage in d_UpMix.ext:

front = a#.soxfilter("filter 20-20000")
back = a#.soxfilter("filter 100-7000")
lfe = cc.Amplify(0.0)#ConvertToMono(a).soxfilter("lowpass 120","vol -0.5")
The filters are, for me, unnecesaries and the lfe is much better empty.
Soxfilter seems to work now with latest avs+ test version, should we still use your fix?

And 2 more questions:
- Audiolimiter.dll (for Down Mix) is 32bit only, so we must disable it in 64bit BeHappy build or is there an alternative?
- Do we still need BassAudioSource and NicAudioSource? Have they any use case that is not covered from our ffmpeg based filters?

tebasuna51
20th March 2023, 09:45
Soxfilter seems to work now with latest avs+ test version, should we still use your fix?

It is a test version, we can wait until we know how use it to include the maskchannel. BTW can be a user decision because:

- front = a#.soxfilter("filter 20-20000")

Who need that filter? For what a limit here? The encoders have filters to limit the banwidth based in bitrate requested.

- back = a#.soxfilter("filter 100-7000")

To save bitrate? Maybe this can have some sense.

- lfe = cc.Amplify(0.0)#ConvertToMono(a).soxfilter("lowpass 120","vol -0.5")

Never. Please don't mistake the LowFrequencyEfects channel with the subwoffer in an AVR.
The AVR, and also simple audio equipment 2.1, extract the low frequencies from ALL channels and send them to the subwoofer.
Create a unexistent LFE only can produce problems with differences in phase or cut frequencies betwen that filter and the AVR's filters configured more accurate with the speakers attached to them.
Please leave the lfe empty, or use a 5.0, when upmix 2.0 to 5.1

- Audiolimiter.dll (for Down Mix) is 32bit only, so we must disable it in 64bit BeHappy build or is there an alternative?

There are an alternative using the compand sox filter.
See the ffmpeg downmix (https://forum.doom9.org/showthread.php?t=181726), and in MeGui 64 thread (https://forum.doom9.org/showthread.php?p=1916468#post1916468)

I will test it.

- Do we still need BassAudioSource and NicAudioSource? Have they any use case that is not covered from our ffmpeg based filters?
NicAudioSource is not necesary anymore after the other decoders support the drc=0.

BassAudioSource have some special decoders, for instance .mid, not supported in standard audio decoders. Maybe it is not used frequently but it is a option.

tebasuna51
5th December 2023, 13:43
WARNING: the sintax in last L-SMASH-Works-r1156.0.0.0 have a important change:

the recommended parameter for LWLibavAudioSource/LSMASHAudioSource(..., drc_scale=0,...) not work now, must be:
(..., ff_options = "drc_scale=0", ...)

Then if you use that new version (32 or 64 bits) you must change the s_L-SmashAudio.ext with the attached one.

There are also a upgraded SoxFilter 2.1 (https://forum.doom9.org/showthread.php?p=1994527#post1994527) with some changes over the previous 1.0. If you use it I recommend upgrade also d_UpMix.ext and d_DownMix.ext with the attached, now work for 32 and 64 bits and not need AudioLimiter.dll:

tebasuna51
24th April 2024, 10:37
I still sometimes use BeHappy under Linux (per Wine) but it had some gui issues.
So I decided to make a recompile with a more recent toolkit and update some things.

Changelog:

- update to .net 4.8
- enabled AMD64 build
- added avisynth dlls for portable mode
- newer avisynthwrapper builds (borrowed from megui)
- replaced TimeStretchPlugin() function with TimeStretch()
- encoder updates (x64 builds if available)
- extension updates (thanks to contributors)
- add BestAudioSource extension
- added hi-dpi support, use nicer font
- gui tweaks (for better compability with linux/wine)


Notes:
- .net 4.8 is required, should work on win7 und later
- I have only tested with windows server 2019 evaluation in a virtual machine, but it should all work with recent win10 and 11
- if portable mode is not desired delete avisynth.dll and devil.dll from program folder
- in portable mode every source and dsp extension must specify the required plugin.dll
in <LoadAvsPlugin> tag, since there is no autoloading from a system-wide avisynth folder
- I have not tested dsp in x64 mode except timestretch, please test if required avs plugin dlls are in place
- preview button wont work in portable mode, does anyone use that anyway?
- on Linux it runs fine with the wine-mono package installed, installing .net 4.8 is not required

https://www.mediafire.com/file/1m4hbkv2pypdh6n/behappy-0.3.1.zip/file

@jones1913 if you are still interested in BeHappy development please consider update it to AviSynth+ 3.7.3 with the ChannelMask than now all audio decoders support.

Only need 64 bit versions now, you can read:
https://github.com/AviSynth/AviSynthPlus/blob/master/avs_core/include/avisynth.h

and the comments to MeGUI 6666 (https://forum.doom9.org/showthread.php?t=185399)

siella
8th February 2025, 19:09
Avisynth+ doesnt support 'TimeStretchPlugin' command. It should be updated.

tebasuna51
8th February 2025, 21:11
The last version v0.3.1.32760 is already updated and use the TimeStretch() command (need float samples) instead TimeStretchPlugin()

siella
9th February 2025, 20:16
I coudnt find new release. Can you give me link?
btw i updated ssrc ext. It needs Shibatch.dll

tebasuna51
9th February 2025, 21:12
Like you can see in my previous post the link by jones1913 don't work anymore.

I have a BeHappy64 v0.3.1.37671 (64 bits test version) and a BeHappy32 v0.3.0.37671 (last 32 bits version I know)

Shibatch.dll is included with each avisynth+ install and not need a specific load, include it in the ssrc.ext is not necesary for me. Maybe if avisynth is not installed correctly...

siella
11th February 2025, 09:51
i am using behappy mostly with avisynth.dll for portable. i dont install avisynth everytime if i use only behappy another computer.
Thank you for the files

tebasuna51
11th February 2025, 11:54
Of course is a option, then you need maintain all dll's involved manually.

Kurt.noise
11th February 2025, 13:29
I can provide a recent build using channel mask information if needed :-)

tebasuna51
12th February 2025, 01:07
Ok for me, but I don't know if there are many people using BeHappy now.

SquallMX
19th February 2025, 23:05
I can provide a recent build using channel mask information if needed :-)

Please. Do it.

tebasuna51
20th February 2025, 08:10
@Kurt, if you make a new version please put a switch to use the installed Avisynth+ or one local (portable) like MeGUI do.

One for users like siella and other for users like me (control the versions and plugins installed with a tool like Groucho AVS Installer (https://forum.doom9.org/showthread.php?p=1720988#post1720988))
When use installed version BeHappy don't need load local plugins.
Users can also load special plugins like siella do with d_SSRC.ext

Kurt.noise
20th February 2025, 16:16
Why ? I dont see the point...just rename or delete plugins/plugins64 subfolder if you dont need to use local libraries.

tebasuna51
21st February 2025, 12:30
Why ? I dont see the point...just rename or delete plugins/plugins64 subfolder if you dont need to use local libraries.
You are right, the script created is like this:

#Source Plugin request: lsmashsource.dll
#"lsmashsource.dll" not found in "C:\Portable\BeHappy\plugins64"

########################################
# [Source: LWLibavAudioSource - Apply DRC scale 0; Stream Index:-1]
########################################
LWLibavAudioSource(...
But work without problems or other error messages.

I don't need update at all the plugins folder.

With MeGUI don't work like this, always need the required plugins in MeGUI subfolders even using the installed AviSynth.

Kurt.noise
21st February 2025, 16:57
Here are some fresh builds.

- x64 : https://www.mediafire.com/file/35u8xg2bhaobcyx/BeHappy-3.2.29142_x64.7z/file
- x86 : https://www.mediafire.com/file/xj13mnx0lofzt3u/BeHappy-3.2.19142_x86.7z/file

Hoping that I didnt missed something...

Kurt.noise
21st February 2025, 17:07
With MeGUI don't work like this, always need the required plugins in MeGUI subfolders even using the installed AviSynth.
That depends on how you use it.

tebasuna51
22nd February 2025, 19:19
Many thanks Kurt, I make some tests without problems but there are many to do.

I test only the 64 bits version and by the moments I found some troubles with:

d_DownMix.ext: the AudioLimiter.dll don't have 64 bits version use SoxFilter instead.
d_UpMix.ext: The SoxFilter 'filter' was replaced with 'sinc'
e_Flac.ext: not use 'UseRawPCM' the channelmask can't be send to flac with raw pcm
e_QAAC.ext: not use a qaac subfolder, it is not needed at all
and other minor changes.

I upload the full subfolder 'extensions' than can be used in both versions (64 and 32 bits)

EDIT: new version in next post

LigH
22nd February 2025, 19:25
the AudioLimiter.dll don't have 64 bits version use SoxFilter instead.

That was my personal reason to create AudioBoost (https://github.com/LigH-de/AudioBoost/) as replacement...

tebasuna51
22nd February 2025, 21:54
Yep, it is easy create a new d_DownMix.ext and use it with BeHappy.

Edit: redownload extensions.7z for QAAC ALAC encoder

tebasuna51
23rd February 2025, 00:10
I'm use AviSynth+ 3.7.3 (r4193 (https://forum.doom9.org/showthread.php?p=2014723#post2014723), master, x86_64) installed, then I moved all unneded files in BeHappy folder and I 7zip the new versions, to keep in attached files, to avoid mediafire timeout.

Kurt, the file BeHappy.exe.config is needed?. It is not present in old BeHappy versions.

The BeHappy.State file is created/modified with BeHappy to store ini values like window position, dsp order, etc. No problem (like LICENSE.txt).

AviSynth.dll and DevIL.dll are the local version not needed for me like all plugins in plugins subfolder (better empty fo me and AviSynth+ users)

The extensions folder is already uploaded, only we need encoders, remember https://forum.doom9.org/showthread.php?p=1981982#post1981982 to locate the last versions of ffmpeg, qaac, FDK-AAC, exhale, opus, flac, oggenc2, etc

EDIT: new versions in next posts

Kurt.noise
23rd February 2025, 08:01
Kurt, the file BeHappy.exe.config is needed?. It is not present in old BeHappy versions.
I dont think its required.

Thanks by the way to have updated extensions package. Yes, I hadn't tested everything.

tebasuna51
23rd February 2025, 22:06
Like don't exist 64 bits BassAudio.dll (and all other bass_xxx.dll) the s_BassAudio.ext must be removed from the 64 bits extensions folder.

Making test about ChannelMask:

- WavSource, NicAudio and DirectShowSource can't output ChannelMask. Please don't use it and don't use WavSource like default for wav files.

- Use always BestAudioSource, FF, LSMASH or LWLibav. BeHappy output the correct value with these decoders and encoders try to convert it (only FLAC preserve the correct ChannelMask always).

- The BeHappy button ChMask cheked is ignored always, after a down or upmix a default value is used, for instance if I load this avs:

# Downmix to quadro
a=BSAudioSource("D:\Test\AudioD\Samples\wavs\8w341.wav")

flr = GetChannel(a, 1, 2)
fcc = GetChannel(a, 3, 3)
lrc = MixAudio(flr, fcc, 0.65, 0.35)
blr = GetChannel(a, 5, 6)
slr = GetChannel(a, 7, 8)
qlr = MixAudio(blr, slr, 0.5, 0.5)

MergeChannels(lrc, qlr)

AviSinth+ is not so smart to know the correct ChannelMask 51 (FL FR BL BR) quadro, and output the default for 4 channels 263 (FL FR FC BC)
Please when the ChMask is checked and filled with '51' put and end of generated script this (without check, the user can put a wrong value to test):

SetChannelMask("51")

Using it in my script I encode it to flac or ac3 correctly.

- It is possible use a encoder folder defined in BeHappy.state other than the default?
I use "C:\Portable\0" to put all audio/video/util .exe and now Foobar2000 and Useac3to share that folder.
I have it in the system %PATH% and can use ffmpeg, etc. from any folder.

Kurt.noise
26th February 2025, 10:33
- The BeHappy button ChMask cheked is ignored always, after a down or upmix a default value is used, for instance if I load this avs:



AviSinth+ is not so smart to know the correct ChannelMask 51 (FL FR BL BR) quadro, and output the default for 4 channels 263 (FL FR FC BC)
Please when the ChMask is checked and filled with '51' put and end of generated script this (without check, the user can put a wrong value to test):

SetChannelMask("51")

Using it in my script I encode it to flac or ac3 correctly.

Well, that would need to parse first the avs script...Because, users might add it already. So, we should not to add it twice.

- It is possible use a encoder folder defined in BeHappy.state other than the default?
I use "C:\Portable\0" to put all audio/video/util .exe and now Foobar2000 and Useac3to share that folder.
I have it in the system %PATH% and can use ffmpeg, etc. from any folder.
yes, done

tebasuna51
28th February 2025, 09:02
Well, that would need to parse first the avs script...Because, users might add it already. So, we should not to add it twice.
Maybe it is not necesary, if the chMask is checked is the last decision of the user and can be included at the end.

yes, done
Thanks

Kurt.noise
4th March 2025, 10:47
https://github.com/Kurtnoise-zeus/BeHappy/releases/latest

tebasuna51
4th March 2025, 13:08
Many thanks Kurt, I'll test it asap.

tebasuna51
15th March 2025, 22:38
The encoder folder work fine but not preserved between sesions.

I test all encoders and only MusePack dont work at all because don't support WAVE_FORMAT_EXTENSIBLE header.
It is a old encoder and despite have multichannel support we can't know the channels present.
I moved the extension to the 'deprecated' folder to avoid the use.
[EDIT] If anybody want use the MusePack encoder (mpcenc.exe SV8 (https://www.musepack.net/index.php?pg=win)) can use a workaround with eac3to:
eac3to SOURCE stdout.wav -simple | mpcenc --standard - OUTPUT.mpc
Where SOURCE is a format supported by eac3to or a WAV/FLAC obtained from BeHappy

My encoder folder with all the encoders tested:
C:\Portable\0

<DIR> CUETools flac OpenCL
<DIR> fhgaac m4a,aac Fraunhofer FHG (32bits)
<DIR> (qaac) QTfiles64
735.744 exhale.exe m4a Exhale
756.224 fdkaac.exe m4a,aac Fraunhofer FDK
371.712 ffdcaenc.exe dts Ffdcaenc (32bits)
90.646.528 ffmpeg.exe mp2,ac3,eac3,aac,m4a,dts,thd
715.264 flac.exe flac Flac
1.241.748 hmp3.exe mp3 Helix
1.731.072 lame.exe mp3 Lame
419.712 MAC.exe ape Monkey's
295.936 mpcenc.exe mpc MusePack
868.352 neroAacEnc.exe m4a Nero (32bits)
349.184 ofr.exe ofr OptimFrog
2.187.264 oggenc2.exe ogg Vorbis
676.352 opusenc.exe opus Opus
2.286.592 qaac.exe m4a,aac QuickTime
248.320 Takc.exe tak TomAudioKompresor (32bits)
58.880 tta.exe tta True Audio Lossless
608.256 wavpack.exe wva WavPack
28.672 WavSplit.exe wav
226.816 WMAEncode.exe wma Windows Media Audio
Links here (https://forum.doom9.org/showthread.php?t=185516) and here for WavSplit (https://forum.doom9.org/attachment.php?attachmentid=17895&d=1632880681)
[END EDIT]

Like I say before only flac preserve the correct channel configuration, other encoders can't preserve all configs and some ones show a error about 'not supported' or assign the default for the number of channels.
But BeHappy seems work fine (remember use decoders Best, Lsmash or ffms, never Wavsource, DirectShow or NicAudio without channelmask)

The extensions folder is not updated in the release, with some problems (https://forum.doom9.org/showthread.php?p=2015258#post2015258).
Please replace it with the attached:
[EDIT] New thread BeHappy+ (https://forum.doom9.org/showthread.php?t=186267)

Please use this old and big thread to talk only about old BeHappy if necesary