View Full Version : BeHappy - AviSynth based audio transcoding tool (UPD 19-07-2006)
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.
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
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.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.