View Full Version : BeHappy - AviSynth based audio transcoding tool (UPD 19-07-2006)
dimzon
18th May 2006, 16:06
In my case I'm interested to use BeHappy for audio encoding with StaxRip.
...
It can already be hacked easily from .NET but it's nicer to use a real SDK, late binding etc. instead of reflection on private code.
Actually I think it's much better to add direct reference from StaxRip to BeHappy. If You need some methods to be public instead of private or You need some special API just ask me ;) And if You need COM support just write .NET wrapper around BeHappy...
Another good way is - extract only requed parts of the code from BeHappy source and use it directly into StaxRip (MeGUI way). Since your primary code is written in VB.NET and BeHappy is written in C# it's better to create separate assembly and use it from your VB.NET code ;)
Anycase keep in mind - BeHappy is GPL-ed so You can modify it as You wish ;)
Cheers
dimzon
18th May 2006, 17:31
Fresh ffmpeg.extension is avaluable @ BeHappy Workspace
stax76
18th May 2006, 18:00
How about CLI, don't you think it would be useful? I could help you if you don't want to spend much time with it (start StaxRip with -h to see how I did my CLI, IMHO it's quite nice).
dimzon
18th May 2006, 18:11
How about CLI, don't you think it would be useful? I could help you if you don't want to spend much time with it (start StaxRip with -h to see how I did my CLI, IMHO it's quite nice).
Actually I have some far future plans to improve BePipe a lot...
Avs inline is not very easy-to-use when you need some complex processing - I'm planning to make another architecture, easy to use and extensible... (extension will add or extend command-line switch )
It will be complete different application with it's own extensions and encoders arhitecture... Command line will be close to BeSweet one (maybe it will be even mimic to BeSweet to allow drop-in replacement)
dimzon
19th May 2006, 08:17
New version is out
dimzon
19th May 2006, 16:29
Aud-X extension is out
http://img105.imageshack.us/img105/6730/untitled7ir.png
Daodan
19th May 2006, 16:33
I really can't get that upmix working. It always sais: Invalid arguments to function "SuperEq". How can I get this working?
Thank you.
FredThompson
19th May 2006, 19:51
Am I correct that posts 1 and 4 are the only current "reference" posts?
shon3i
19th May 2006, 22:29
BeHappy 0.1.9 build 5241
Download (http://www.box.net/public/1hvgoifeyd)
Just install and enjoy in encoding
Changelog:
18/08/2006:
- With little late BeHappy package is updated to BeHappy 19/07/2006
- Added Aften AC3 encoding
20/06/2006:
- Added BassAudio plugins & extensions (request by tebasuna51)
17/06/2006:
- Updated BeHappy to 23/05/2006 v4
- Updated mp4box to last release
- Updated Nero to 1.0.0.2
- Updated CT from Winamp 5.23 Pro
- Updated Aud-X 23/05/2006
- Updated NicAudio.extension (support MPG123 ReplayGain)
- Added Nero SSE2 Encoder
- Added SoxFilter for upmix extensions
- New installation by InstallShield
23/05/2006:
- Updated BeHappy to 23/05/2006
- Updated Aud-X CLI encoder to 22/05/2006
22/05/2006:
- Updated BeHappy to 22/05/2006
20/05/2006:
- MeGUI auto updater overwrites my NicAudio.dll (20060314) with some from 2005, in that case DRC not work, so install this new package to return to (20060314)
- I forgot to put mp4box need for CT audio encoder.
19/05/2006
-First release
buzzqw
20th May 2006, 07:11
thanks shon3i !
BHH
dimzon
21st May 2006, 22:10
fresh beta out!
some eye-candy
http://img62.imageshack.us/img62/6428/c19lr.png
shon3i
21st May 2006, 22:47
Hmm very nice Thanks dimzon, new package (http://forum.doom9.org/showpost.php?p=829754&postcount=259)
dimzon
21st May 2006, 22:52
shon3i
If You prefer mp4 over m4a you need
open BeHappy.exe.config via notepad
change key="preferMP4overM4A" value="false" to key="preferMP4overM4A" value="true"
You can also use your favorite DirestShow player for preview instead of mplayer2. Just edit key="directShowPlayer" value="mplayer2"
shon3i
22nd May 2006, 08:59
OK, thanks you.
shon3i
22nd May 2006, 10:38
Is there chance to integrate FAAD or some different AAC/MP4 decoder.
dimzon
22nd May 2006, 11:22
Is there chance to integrate FAAD or some different AAC/MP4 decoder.
Later (much more later)
dimzon
22nd May 2006, 17:32
sorry to bother but i have some problem with enc_AudX_CLI.exe
C:\Programmi\PureBasic\Prove>BePipe.exe --script "import(^test.avs^)" | enc_AudX_CLI.exe - qqq.mp3
--q 2
##################################################################
Aud-X multichannel encoder CLI frontend
this algorithm has been prepared by: [Aud-X Team www.aud-x.com]
##################################################################
***************************************
BePipe by dimzon
***************************************
Script used:
# BEGIN
import("test.avs")
# END
Scanning for Audio Stream...
Found Audio Stream
Channels=6, BitsPerSample=32, SampleRate=48000Hz
Writing Header...
Writing Data...
0% System.NotSupportedException: Il flusso non supporta la ricerca. ---> "stream doesn't support seek" i can translate
in System.IO.__Error.SeekNotSupported()
in System.IO.__ConsoleStream.get_Position()
in enc_AudX_CLI.WaveFormat.ReadWavHeader(BinaryReader reader)
in enc_AudX_CLI.Main(String[] args)
Done!
C:\Programmi\PureBasic\Prove>
this is my test.avs
loadplugin("C:\Programmi\PureBasic\Prove\exe\filter\nicaudio.dll")
nicac3source("C:\Programmi\PureBasic\Prove\aaa.ac3")
the same script is fine wth oggenc/lame/neroaacenc.exe
any suggestion ?
thanks
BHH
Edit: typos
fixed (maybe) - check new enc_AudX_CLI.exe version
tebasuna51
22nd May 2006, 19:08
To encode a wav 5.1 to ogg I need a explicit GetChannels(1,3,2,5,6,4) to obtain a correct mapped ogg.
Isn't added automatically?
buzzqw
22nd May 2006, 19:24
downloaded latest version 22/05/2006 of AudX_cli package
avs script
LoadPlugin("NicAudio.dll")
NicAC3Source("C:\Programmi\PureBasic\Prove\aaa.ac3")
EnsureVBRMP3Sync()
ConvertAudioTo16bit() # since aud-x want 16bit sample
batch
BePipe.exe --script "import(^mkvmaudio.avs^)" | enc_AudX_CLI.exe - aaa.mp3 --raw 48000 --q 2
isn't working... mean the job end without warning but audio is corrupted.
i tryed without --raw 48000 and without EnsureVbrMp3Sync, and without convertaudioto16bit
any help ?
BHH
dimzon
22nd May 2006, 20:14
To encode a wav 5.1 to ogg I need a explicit GetChannels(1,3,2,5,6,4) to obtain a correct mapped ogg.
Isn't added automatically?
http://forum.doom9.org/showthread.php?p=827430#post827430
LoadPlugin("NicAudio.dll")
NicAC3Source("C:\Programmi\PureBasic\Prove\aaa.ac3")
EnsureVBRMP3Sync()
ConvertAudioTo16bit() # since aud-x want 16bit sample
batch
BePipe.exe --script "import(^mkvmaudio.avs^)" | enc_AudX_CLI.exe - aaa.mp3 --raw 48000 --q 2
isn't working... mean the job end without warning but audio is corrupted.
i tryed without --raw 48000 and without EnsureVbrMp3Sync, and without convertaudioto16bit
valid command-line is
BePipe.exe --script "import(^mkvmaudio.avs^)" | enc_AudX_CLI.exe - aaa.mp3 --q 2
what does "corrupted" means?
Can you save audio to WAV using
BePipe.exe --script "import(^mkvmaudio.avs^)" > test.wav and listen it - maybe something wrong BEFORE encoder
buzzqw
22nd May 2006, 21:28
tryed without --raw 48000 (as already posted) and audio get wrong
Sample test is 12 second and aud-x got 14 seconds with rumors and distorted audio play.
bepiping for wav file is correctly played
i packed my files (bat/avs/ac3/audx/bepipe) (800kb) please try yourself
www.64k.it/andres/test_bepipe_audx.rar
thanks !
BHH
EDIT: seems to be the normalize fuction...
dimzon
23rd May 2006, 00:28
fresh beta is out.
including UpMix extension ;)
tebasuna51
23rd May 2006, 01:17
From http://forum.doom9.org/showthread.ph...430#post827430
don't forget that latest oggenc2 build support 5.1 channel in correct order
Oh Shit...
Please, provide me download link for fresh valid oggenc2
Oggenc2.83 using aoTuVb4.51 2006-04-26 in rarewares and oggenc2 in shon3i package still need the GetChannel.
Where is the latest oggenc2 build?
tebasuna51
23rd May 2006, 01:45
i packed my files (bat/avs/ac3/audx/bepipe) (800kb) please try yourself
With your example (with or without Normalize) i get:
ERROR: Can't find audio stream!
System.Exception: Invalid file format
at enc_AudX_CLI.WaveFormat.ReadWavHeader(BinaryReader reader)
at enc_AudX_CLI.Main(String[] args)
buzzqw
23rd May 2006, 07:12
@tebasuna51
look at nicaudio plugin and correct it to your avisynth path
about ogg: i usually got it at rarewares
quoting from rarewares
oggenc2 A short explanation.
oggenc2.x: is a command line Ogg Vorbis encoder based upon the official oggenc.....Version 2.8 introduces correct channel mapping for encoding of multi-channel (3 to 6 channels) files that conform to the WAVEFORMATEXTENSIBLE standard. The multi-channel mapping conforms to the Vorbis I Specification.
seems that oggenc2.x has correct channel map :confused: so i don't know if getchannel has to be passed or not
BHH
tebasuna51
23rd May 2006, 07:57
look at nicaudio plugin and correct it to your avisynth path
Of course. And two pass encoding:
BePipe.exe --script "import(^mkvmaudio.avs^)" > aaa.wav
enc_AudX_CLI.exe aaa.wav aaa.mp3 --q 3
the mono mp3 equivalent seems work ok (I haven't 5.1 audio attached to pc)
about ogg: i usually got it at rarewares
quoting from rarewares:
"Version 2.8 introduces correct channel mapping for encoding of multi-channel (3 to 6 channels) files that conform to the WAVEFORMATEXTENSIBLE standard."
But Bepipe/BeHappy never use WAVEFORMATEXTENSIBLE header.
Edit: BeHappy sends audio to oggenc2 in RAW format.
Oggenc2.83 using aoTuVb4.51 2006-04-26 from rarewares need the getchannel.
dimzon
23rd May 2006, 08:31
Edit: BeHappy sends audio to oggenc2 in RAW format.
Oggenc2.83 using aoTuVb4.51 2006-04-26 from rarewares need the getchannel.
Both MeGUI and BeHappy will be fixed soon
Sorry....
dimzon
23rd May 2006, 08:56
Oggenc2.83 using aoTuVb4.51 2006-04-26 from rarewares need the getchannel.
fixed
dimzon
23rd May 2006, 13:01
fresh beta is out ;)
fixed improper Lame MP3 ABR command-line
shon3i
23rd May 2006, 16:39
Fresh package (http://forum.doom9.org/showpost.php?p=829754&postcount=259)
tebasuna51
23rd May 2006, 18:38
@Dimzon
In enc_AudX_CLI.cs maybe there are a bug to explain the buzzqw problem.
Lines 136-148 and a new line (in black):
// advance in the stream to skip the wave format block
len -= 16; // minimum format size
while (len > 0)
{
reader.ReadByte();
--len;
}
// assume the data chunk is aligned
if (readChunk(reader) != "data")
throw new Exception("Invalid file format");
reader.ReadInt32(); // Data length not used but maybe must be read
return format;
If DataLength is not read can be interpreted like first audio data for FL and FR channels and all the file is missmapped.
dimzon
23rd May 2006, 19:42
@Dimzon
In enc_AudX_CLI.cs maybe there are a bug to explain the buzzqw problem.
Lines 136-148 and a new line (in black):
// advance in the stream to skip the wave format block
len -= 16; // minimum format size
while (len > 0)
{
reader.ReadByte();
--len;
}
// assume the data chunk is aligned
if (readChunk(reader) != "data")
throw new Exception("Invalid file format");
reader.ReadInt32(); // Data length not used but maybe must be read
return format;
If DataLength is not read can be interpreted like first audio data for FL and FR channels and all the file is missmapped.
Thanx!!!
New release @ beHappy workspace
dimzon
23rd May 2006, 21:28
first post modified - now it contains some usefull info and installation manual ;)
still need user manual
buzzqw
23rd May 2006, 21:31
sorry again
i have update the build with latest posted by dimzon
but, again , there must be some problems
link at mp3 and ac3 converted (846kb)
www.64k.it/andres/ac3_mp3_23062006.rar
BHH
dimzon
23rd May 2006, 22:00
sorry again
i have update the build with latest posted by dimzon
but, again , there must be some problems
link at mp3 and ac3 converted (846kb)
www.64k.it/andres/ac3_mp3_23062006.rar
BHH
does this bug reproducable when You encode via BeHappy (not BePipe)
dimzon
24th May 2006, 08:51
BeHappy @ first place @ gotdotnet.com
http://img138.imageshack.us/img138/7218/bh110bf.th.png (http://img138.imageshack.us/my.php?image=bh110bf.png)
buzzqw
24th May 2006, 12:07
tested with latest behappy
same error
www.64k.it/andres/ac3_mp3_24052006.rar
BHH
Eric B
25th May 2006, 15:01
So this is not a bug in BeHappy application as I said before. You just placed NicAudio.dll in wrong folder.
Hi,
I've just wanted to use your soft to encode some AAC files with the new Nero Digital Audio free AAC encoder.
I have the same pb than SirLamer before (no function named "NicAc3Source").
I ve put the NicAudio.dll in my Avisynth plugin folder, but there is no reference to avisynth installation path from your software, so I do not see how it could work. Did you hard coded the default avisynth installation path?
It would be great to let the user to configure it, e.g. stored in app.config. It is possible under megui, but not here.
Similar, it would be nice to save all the settings into it (choosen input and output format with the index or value of comboboxes ).
Regarding Avisynth, I am looking into your source (great that I can open it with VS2005 Express, I am myself a C# developper), but I do not find it. I do not see any avisynth config file into windows folder
Alternatively, it is possible to use MeGui to encode with the new Nero CLI ?
Eric B
25th May 2006, 15:19
I ve just tested your new BSN with besweet, and it works great, so I will stay using besweet instead of avisynth for audio encoding.
shon3i
25th May 2006, 16:25
@Eric B download this (http://forum.doom9.org/showpost.php?p=829754&postcount=259) and enjoy
Avish
27th May 2006, 08:19
I'm getting this error:Starting job Bambi T01 DELAY -155ms.mpa->Bambi T01 DELAY -155ms.m4a
Error: BeHappy.AviSynthException: unexpected character "˙"
at BeHappy.AviSynthClip..ctor(String func, String arg, AviSynthColorspace forceColorspace, AviSynthScriptEnvironment env)
at BeHappy.Encoder.encode()I can't figure out what's the culprit here?
BTW what is aacPlusHigh? I mean is it better for any perticular use?
shon3i
27th May 2006, 12:38
I can't figure out what's the culprit here?
Hmm this is very strange, what you setting use?
BTW what is aacPlusHigh? I mean is it better for any perticular use?aacPlusHigh is same as HE-AAC but only for High bitrates, someone says that is not good using SBR @ high bitrates, my ears can't find any artifact, but for safe reason better use LC. aacPlusHigh support only 2 channel audio and have 88.2khz instead 44.1khz.
Avish
27th May 2006, 13:28
Hmm this is very strange, what you setting use?I did this: Selected the source file [mpa], set the suggested delay, selected "CT aacPlus v2, CBR @ 64 kbit/s, Joint Stereo" profile, enqueue & start. Error comes almost immediately.
shon3i
27th May 2006, 15:55
Try to select instead Nic123Source, DirectShowSource and Vice Versa
Avish
27th May 2006, 16:16
Try to select instead Nic123Source, DirectShowSource and Vice VersaNicMPG123Source seems to be working. Thanks. :)
shon3i
27th May 2006, 16:23
put mp4box in BeHappy folder
Avish
27th May 2006, 16:30
put mp4box in BeHappy folderYes. Did exactly that. Sorry for the trouble. :)
:D Troubling you again!!! Why it's showing "AAC 22050Hz stereo 62Kbps". Shouldn't it be 44100Hz?
shon3i
27th May 2006, 18:34
No everything is fine because that is HE-AAC, but when playing decoder upsample to 44Khz
tebasuna51
29th May 2006, 02:26
My first C# program, using enc_AudX_CLI.cs scheme I change the body code to obtain Wav2mono.exe.
This program can split in mono wav's any stereo or 6 channel wav accepting STDIN input. Then can be used with BeHappy to obtain mono wav´s like output instead Wav writer, this replace a BeSweet/BeLight functionality not supported yet by BeHappy.
We need Wav2mono.exe and Wav2mono.Extension in BeHappy folder.
These files, and source and old version (only 23 KB), are in:
(link lost)
Any input will be apreciated.
Edit: See http://forum.doom9.org/showthread.php?p=886080#post886080
dimzon
29th May 2006, 09:24
My first C# program, using enc_AudX_CLI.cs scheme I change the body code to obtain Wav2mono.exe.
Welcome to C#/.NET World ;)
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.