Log in

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


Pages : 1 2 3 4 5 6 7 8 9 [10] 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27

Chumbo
12th March 2007, 04:39
@tebasuna51
Here you go. I hope it helps. Get it here (http://www.mytempdir.com/1251054).

tebasuna51
12th March 2007, 18:05
@tebasuna51
Here you go. I hope it helps. Get it here (http://www.mytempdir.com/1251054).

Thanks Chumbo, works fine but need also some changes in Encoder.cs.

Here (http://www.mytempdir.com/1251693) is a new BeHappy version with:

1) Changes to allow any AviSynth output samples. Compatible with actual and alternative AvisynthWrapper.dll (Encoder.cs)

2) New ConvertSample.extension. Needed to test output samples and check encoders:
The old AvisynthWrapper.dll is equivalent to use the new one with a final DSP Convert Sample to 16 bit int.
Warning, some encoders must need 16 bit int output.

3) Descriptive literal change: "Custom (actual_time / desired_time) x 100" instead "Custom transform" (TimeStretchDSP.cs)

4) EnsureMP3VBRSync unchecked by default, in my opinion not needed in BeHappy (MainForm.cs).

Please send yours opinions about the use of the new AvisynthWrapper.dll, and EnsureMP3VBRSync also.

shon3i
12th March 2007, 18:56
Thank you guy's for hard work.

@alwa, i tested version and works perfectly.

@Chumbo, i agree with you about leaving seperate .state file.

@tebasuna51, is now aften dialog ok?

aslo, what you guys think to change the name to BeHappyMod or something, maybe Dimzon won't include these changes?

Chumbo
12th March 2007, 20:09
...aslo, what you guys think to change the name to BeHappyMod or something, maybe Dimzon won't include these changes?
How about calling it BeHappyCATmod. Since you have a cat in your avatar and Chumbo, Alwa and Tebasuna51. Just a thought...;) It would be a good idea to have a mod with the changes listed in a txt file too.

tebasuna51
12th March 2007, 21:07
It would be a good idea to have a mod with the changes listed in a txt file too.
With my last version there are a complete (I hope) list of changes.

@Chumbo, i agree with you about leaving seperate .state file.
You say maintain BeHappy.exe.config and BeHappy.state?
I am with alwa, the 'config' is unnecessary: 2-2 :rolleyes:

About sample precision:

- Decoders: NicAudio and BassAudio output are 32 float.
Others inputs (WavSource, DirectShowSource) can vary.

- DSP functions:
Amplify 16 Bit, Float
ConvertToMono 16 Bit, Float
Downmix 16 Bit, Float
Normalize 16 Bit, Float
SSRC Float
TimeStretch Float
SoxFilter 32 Bit Int

- Encoders:
8 i 16 i 24 i 32 i 32 f
---- ---- ---- ---- ----
mp3 AudX - Y - - -
aac CT - Y - - -
aac Nero Y Y Y Y Y
ac3 Aften Y Y Y Y Y
ffmpeg (3) Y Y Y Y -
mp3 Lame Y Y Y Y -
ogg enc2 Y Y Y Y -
flac - Y Y - -
wavpack Y Y Y Y Y


AudX and aac CT maybe are limited by the Dimzon's interface.

What do you think? Include or not the new AvisynthWrapper.dll?

Aften, for instance, take all formats but make a conversion to float internally, if internally AviSynth work in float, is necessary convert to 16 bit int and reconvert after?.

tebasuna51
12th March 2007, 21:22
@tebasuna51, is now aften dialog ok?

Aften have many parameters but confuse the user, maybe we can add a 'Additional CLI Arguments' like Lame.

Or add a few parameters, for me the most interesting are the pre-filters:

-bwfilter 1 (Bandwidth Low-Pass Filter)
-lfefilter 1 (LFE Low-Pass Filter)
-dcfilter 1 (DC High-Pass Filter)

defaults are 0 (do not apply filter)

alwa
13th March 2007, 13:22
There was a problem with the preferMP4overM4A handling.
Update (http://www.mytempdir.com/1252496)

About the .config generally. I could let BeHappy check whether it exist: if yes use it, if not not?

About the Bits Per Sample. It seems like every DSP can handle 32 Bit Float, but the encoder prefer 16 Bit. I rather like 16Bit for encoding it's much faster than 32 Bit.

//Edit: Oops take all formats but make a conversion to float internally
The suitable Bits Per Sample conversion could be placed in the GetScript() method for each encoder individually.

Aften have many parameters but confuse the user, maybe we can add a 'Additional CLI Arguments' like Lame.
I prefer that.

How about calling it BeHappyCATmod.
Rather just BeHappyCAT or BeHappyMod :)

Chumbo
14th March 2007, 01:32
Added the following changes (appended to changes.txt too):

modified Delete All button behavior to only remove items with status of Done, Error and Abort
changed job list control to a multi-select control
modified Delete button behavior to remove the selected items except if item selected is in Processing state


Get the Updated build (http://www.mytempdir.com/1253348) and test it please. :)

tebasuna51
14th March 2007, 02:32
New mod (http://www.mytempdir.com/1253380) with adjust for the limited input encoders:

- Encoders with only support for 16 bit int
Audiobits()==16 ? last : ConvertAudioTo16bit()

- Encoders with max support 24 bit:
Audiobits()==16 ? last : ConvertAudioTo24bit()

- Encoders without support for float:
IsAudioInt() ? last : ConvertAudioTo32bit()

- OggEnc2 support now float input (not suported in raw mode).

- TwoLame for mp2 encode support all data formats, is my election instead ffmpeg.

Now all encoders works at best quality possible and always can returns to previous behaviour using a final DSP Convert Sample to 16 bit int.

Then my vote is use the new AvisynthWrapper.dll because with the old we can never obtain full quality.

Rectal Prolapse
14th March 2007, 08:56
I tried to run the latest (march 14) one with the AVISynthWrapper.dll from the March 12 archive and it always crashes.

I replaced the old AVISynthWrapper.dll with AVISynthWrapper_new.dll - I renamed the new one.

If I don't replace the old one it works - but my source audio always get resampled to 16 bit from the original 24 bit.

Did I do it right?

Rectal Prolapse
14th March 2007, 09:13
Also, I can't seem to compile this - it complains about missing Configuration class members - so I guess I am missing an updated Configuration.cs file - it was not present in the March 12 and 14th .7z files. I don't know where to look - is there a semi-official place to download the *complete* source code? I'd love to try getting 24 bit FLAC and WavPack encodes going. :)

tebasuna51
14th March 2007, 12:11
I tried to run the latest (march 14) one with the AVISynthWrapper.dll from the March 12 archive and it always crashes.

I replaced the old AVISynthWrapper.dll with AVISynthWrapper_new.dll - I renamed the new one.

If I don't replace the old one it works - but my source audio always get resampled to 16 bit from the original 24 bit.

Did I do it right?

- Using the old one (32768 bytes 2006/01/26) all must be like before: always the audio is resampled to 16 bit.

- The new one (69632 bytes 2007/03/11) AVISynthWrapper_new.dll must be renamed to AVISynthWrapper.dll. The changes in new one are:
- compiled w/out lines 260-274 (http://forum.doom9.org/showthread.php?p=969134#post969134) to help out tebasuna51
- replaced deprecated strcpy calls with new strcpy_s method

What are your SO, .NET, AviSynth versions?
Any C++ expert can explain if this can cause the crash in different environments?

The last full code package we are using are in 2007-03-11 (Alwa) (http://www.mytempdir.com/1250395).
And you need the mod's:
2007-03-12 (Chumbo) (http://www.mytempdir.com/1251054)
2007-03-12 (Tebasuna) (http://www.mytempdir.com/1251693)
2007-03-13 (Alwa) (http://www.mytempdir.com/1252496)
2007-03-13 (Chumbo) (http://www.mytempdir.com/1253348)
2007-03-14 (Tebasuna) (http://www.mytempdir.com/1253380)

The last Configuration.cs is at 2007-03-11 (Alwa)

Deckard2019
14th March 2007, 15:16
Don't know what happened the first time I tried but it crashed.
Now it works :
Starting job aud.avs->aud.wv
Found Audio Stream
Channels=6, BitsPerSample=24 int, SampleRate=48000Hz
wavpack.exe -h -i -l -m -r -q -y - "D:\aud.wv"
Writing RIFF header to encoder's StdIn
Writing PCM data to encoder's StdIn
Finalizing encoder
Complete


Maybe you could maintain a tested-and-working package somewhere ?
(if anyone need to create AC3@640kbps with ffmpeg, just change ffmpeg.extension @ line 48 to add correct Option tag).

BTW, thank you all !

Rectal Prolapse
14th March 2007, 17:15
Thank you very much tebasuna51 and Chumbo for the information and patches.

I'm using AVISynth 2.7.0 and Visual Studio .NET 2005 Pro, .NET version 2.0. I've been compiling the project in Debug mode. I will try again with the latest Configuration.cs file you kindly linked for me.

The crashes I get were not from my builds though - just the ones that were released in this thread. Strange!

Rectal Prolapse
14th March 2007, 17:35
Ok, I fixed the crashing problem by starting from scratch - I unzipped the original BeHappy from last year into a directory. Then, starting in order, I unzipped each of the archives you linked for me, replacing the files as needed. Now it works!

24 bit! Yes! :D

tebasuna51
15th March 2007, 02:19
@Chumbo

In my MainForm.cs lines 859-860 from 2007-03-12 I have:
this.cbxEnsureMP3VBRSync.Checked = false;
// this.cbxEnsureMP3VBRSync.CheckState = System.Windows.Forms.CheckState.Checked;

In your MainForm.cs lines 859-860 from 2007-03-13 you have:
this.cbxEnsureMP3VBRSync.Checked = true;
this.cbxEnsureMP3VBRSync.CheckState = System.Windows.Forms.CheckState.Checked;

Is a error or you defend the use of EnsureVBRMP3Sync() ?
Anybody can explain me when is necessary EnsureVBRMP3Sync() ?
I think we always work with uncompressed audio without sync problems.

Chumbo
15th March 2007, 02:23
@Chumbo

In my MainForm.cs lines 859-860 from 2007-03-12 I have:
this.cbxEnsureMP3VBRSync.Checked = false;
// this.cbxEnsureMP3VBRSync.CheckState = System.Windows.Forms.CheckState.Checked;

In your MainForm.cs lines 859-860 from 2007-03-13 you have:
this.cbxEnsureMP3VBRSync.Checked = true;
this.cbxEnsureMP3VBRSync.CheckState = System.Windows.Forms.CheckState.Checked;

Is a error or you defend the use of EnsureVBRMP3Sync() ?
Anybody can explain me when is necessary EnsureVBRMP3Sync() ?
I think we always work with uncompressed audio without sync problems.
No I agree with your setting. I could swear I've grabbed all the updates from you and alwa. You might want to make sure I didn't miss the updates where you changed this to false. Sorry about that. I'm trying hard to make sure I keep the changes you guys are making in the order you're making them so my build is incremental, i.e., includes yours and alwa's changes BEFORE I make any changes.

[EDIT] This build includes the proper default. Thanks Tebasuna for catching it. BeHappy update (http://www.mytempdir.com/1254664)

tebasuna51
15th March 2007, 19:07
One more mod. (http://rapidshare.com/files/21189004/BeHappy_20070315.7z.html)

Changes:

1) Added 'Additional CLI arguments' to Aften capture.

2) Optional 'pseudo-encoders' to split in mono or stereo wav's.

3) Optional optimized Downmix routines. Fast and without inversion in rear channel.

With this I finish my inputs for BeHappy.

Chumbo
16th March 2007, 21:25
@alwa and tebasuna,
I just noticed that the "Keep output..." check box is not working in the latest build. Can you verify this please? I'll try to track down in which build we probably lost this functionality.

raquete
17th March 2007, 00:10
hi.
i need a complete "package" to encode ac3 only(no mp3,aac,ogg,etc).
can you tell me what i have to download and install please?
:thanks:

Chumbo
17th March 2007, 00:23
I believe shon3i was going to update the install package. I need to fix a quick bug though that I mentioned in the pervious post and then I'll put a new build out.

raquete
17th March 2007, 00:25
very nice.thanks so much.

Chumbo
17th March 2007, 00:55
Here's my last changes for now. This build fixes the bug mentioned a few posts back and includes all mods by alwa and tebasuna.

BeHappyCAT (http://www.mytempdir.com/1257194) mod. ;)

@shon3i,
If you plan on building a package now, grab all the previous builds too because they have more up to date versions of aften.exe and other tools in addition to the latest BeHappy.exe in this post. :)

tebasuna51
17th March 2007, 01:53
@raquete
The most basic BeHappy are only two files at same folder:
BeHappy.exe (http://www.mytempdir.com/1257194)
AvisynthWrapper.dll (http://www.mytempdir.com/1251054)

You need add to the folder your preferred Aften version.

The inputs can be from WavSource or DirectShowSource.
The outputs can be ac3, wav or raw PCM.

raquete
17th March 2007, 05:56
thank you so much!

shon3i
17th March 2007, 13:25
Here's my last changes for now. This build fixes the bug mentioned a few posts back and includes all mods by alwa and tebasuna.

BeHappyCAT (http://www.mytempdir.com/1257194) mod. ;)

@shon3i,
If you plan on building a package now, grab all the previous builds too because they have more up to date versions of aften.exe and other tools in addition to the latest BeHappy.exe in this post. :)
Oki, so this is final version, with 32b AvisynthWrapper.dll

raquete
17th March 2007, 15:01
@raquete
The most basic BeHappy are only two files at same folder:
BeHappy.exe (http://www.mytempdir.com/1257194)
AvisynthWrapper.dll (http://www.mytempdir.com/1251054)

You need add to the folder your preferred Aften version.

The inputs can be from WavSource or DirectShowSource.
The outputs can be ac3, wav or raw PCM.
i download the files and extract inside a "behappy" folder together with Aften.exe.
i have netframework2.0 and avisynth installed but Behappy give a error message and close.
is needed something more to put inside the "behappy" folder to encode ac3 only?
thanks.

tebasuna51
17th March 2007, 16:25
i download the files and extract inside a "behappy" folder together with Aften.exe.
i have netframework2.0 and avisynth installed but Behappy give a error message and close.
is needed something more to put inside the "behappy" folder to encode ac3 only?

I can't reproduce your problem, with only:

aften.exe 234.687 10/03/2007 07:14
AvisynthWrapper.dll 69.632 11/03/2007 22:32
BeHappy.exe 237.568 16/03/2007 18:37

And AviSynth v2.5.7 and .Net FrameWork v2.0, works fine for me.

What is the error message?

tebasuna51
17th March 2007, 16:45
Oki, so this is final version, with 32b AvisynthWrapper.dll

Ok for me. The last BeHappy.exe can work with old AvisynthWrapper.dll 16 bit output, or with the new transparent AvisynthWrapper.dll.

Only the Rectal Prolapse report about problems (http://forum.doom9.org/showthread.php?p=970241#post970241)with compilations. And now raquete problem.

Work for everybody the AvisynthWrapper.dll, BeHappy.exe versions in my previous post?

raquete
18th March 2007, 00:22
What is the error message?an advice with a big exclamation in yellow with the words:
"Program Error
behappy.exe generate erros and will be closed by windows.
you need to restart the program.
creating one log of errors."

...but no one error log is created and in the background BeHappy close without messages!

i'm using:
aften.exe 253.952 27/02/2007 02:17
AvisynthWrapper.dll 69.632 11/03/2007 22:32
BeHappy.exe 237.568 16/03/2007 18:37

the same happens with others Aften's versions.

tebasuna51
18th March 2007, 02:44
@raquete
I don't know what is the problem (not Aften version).
I make a new compile (without code changes) to see if work better in your machine (the previous one is by Chumbo).

Also I send the full code (http://www.mytempdir.com/1258593) and you can tray compile yourself (double click in compile.bat and, if not errors, the BeHappy.exe go to 'dist' folder)

@Chumbo, Alwa
Modified files: MainForm.cs, Encoder.cs, compile.bat only to cancell the 'Warnings' and copy files.

=Wolf=
18th March 2007, 06:23
i have this error massage...


Starting job 01.mp3->01.ac3
Found Audio Stream
Channels=2, BitsPerSample=16 int, SampleRate=44100Hz
ffmpeg.exe -i - -y -acodec ac3 -ab 384 "C:\01.ac3"
Writing RIFF header to encoder's StdIn
Writing PCM data to encoder's StdIn
Error: System.IO.IOException: Канал был закрыт.

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.WriteCore(Byte[] buffer, Int32 offset, Int32 count)
at System.IO.FileStream.Write(Byte[] array, Int32 offset, Int32 count)
at BeHappy.Encoder.encode()
#### Encoder StdErr ####
FFmpeg version SVN-r8310, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-pp --enable-swscaler --enable-pthreads --enable-liba52 --enable-avisynth --enable-libdts --enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libnut --enable-libogg --enable-libtheora --enable-libvorbis --enable-x264 --enable-xvid --enable-amr_nb --enable-amr_wb --cpu=i686 --enable-memalign-hack --extra-ldflags=-static
libavutil version: 49.3.0
libavcodec version: 51.38.0
libavformat version: 51.10.0
built on Mar 10 2007 23:38:41, gcc: 4.3.0 20070126 (experimental)
Input #0, wav, from 'pipe:':
Duration: N/A, bitrate: 1411 kb/s
Stream #0.0: Audio: pcm_s16le, 44100 Hz, stereo, 1411 kb/s
Output #0, ac3, to 'C:\01.ac3':
Stream #0.0: Audio: ac3, 44100 Hz, stereo, 0 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Error while opening codec for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height

tebasuna51
18th March 2007, 12:43
i have this error massage...

...
Channels=2, BitsPerSample=16 int, SampleRate=44100Hz
ffmpeg.exe -i - -y -acodec ac3 -ab 384 "C:\01.ac3"
...
FFmpeg version SVN-r8310, Copyright (c) 2000-2007 Fabrice Bellard, et al.
...
libavutil version: 49.3.0
libavcodec version: 51.38.0
libavformat version: 51.10.0
built on Mar 10 2007 23:38:41, gcc: 4.3.0 20070126 (experimental)
...
Input #0, wav, from 'pipe:':
Duration: N/A, bitrate: 1411 kb/s
Stream #0.0: Audio: pcm_s16le, 44100 Hz, stereo, 1411 kb/s
Output #0, ac3, to 'C:\01.ac3':
Stream #0.0: Audio: ac3, 44100 Hz, stereo, 0 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Error while opening codec for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height

The BeHappy work seems ok.

Not all ffmpeg versions can be tested, seems this one have problems maybe with bitrate (384 is a high bitrate for stereo).

Try other ffmpeg version or better, to encode to ac3 use Aften based in same libs than ffmpeg but highly optimized.

Here work fine (with other ffmpeg version):
Starting job Jap6.mp3->Jap6.ac3
Found Audio Stream
Channels=2, BitsPerSample=32 int, SampleRate=44100Hz
Channels=2, BitsPerSample=16 int, SampleRate=44100Hz
ffmpeg.exe -i - -y -acodec ac3 -ab 384 "G:\Jap6.ac3"
Writing RIFF header to encoder's StdIn
Writing PCM data to encoder's StdIn
Finalizing encoder
Complete
#### Encoder StdErr ####
FFmpeg version CVS, Copyright (c) 2000-2004 Fabrice Bellard
configuration: --enable-mingw32 --enable-memalign-hack --enable-gpl --enable-a52 --enable-dts --enable-mp3lame --enable-faac --enable-amr_nb --enable-faad --enable-amr_wb --enable-pp --enable-x264 --enable-xvid --enable-theora --enable-libogg --enable-vorbis
libavutil version: 49.0.0
libavcodec version: 51.9.0
libavformat version: 50.4.0
built on May 13 2006 18:31:30, gcc: 4.1.0 [Sherpya]
Input #0, wav, from 'pipe:':
Duration: N/A, bitrate: 2822 kb/s
Stream #0.0: Audio: pcm_s32le, 44100 Hz, stereo, 2822 kb/s
Duration: N/A, bitrate: 1411 kb/s
Stream #0.0: Audio: pcm_s16le, 44100 Hz, stereo, 1411 kb/s
Output #0, ac3, to 'G:\Jap6.ac3':
Stream #0.0: Audio: ac3, 44100 Hz, stereo, 384 kb/s
Stream mapping:
Stream #0.0 -> #0.0

video:0kB audio:942kB global headers:0kB muxing overhead 0.000000%
Bold lines using the new AvisynthWrapper.dll, normal lines using the old one like you seems use.

raquete
18th March 2007, 13:52
tebasuna,
using one interleaved wave 6 channels,BeHappy close,then i try with stereo source with 2 AvisynthWrapper.dll versions:

with AvisynthWrapper.dll 11/03/2007 18:32
Starting job Track 10.wav->Track 10.ac3
Found Audio Stream
Channels=2, BitsPerSample=16 int, SampleRate=48000Hz
Aften.exe -v 0 -b 448 -m 0 -readtoeof 1 -cmix 0 -smix 0 -dsur 0 -dnorm 31 -dynrng 5 - "D:\01\Track 10.ac3"
Writing RIFF header to encoder's StdIn
Writing PCM data to encoder's StdIn
Error: System.IO.IOException: O pipe foi finalizado.

em System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
em System.IO.FileStream.WriteCore(Byte[] buffer, Int32 offset, Int32 count)
em System.IO.FileStream.Write(Byte[] array, Int32 offset, Int32 count)
em BeHappy.Encoder.encode()
#### Encoder StdErr ####

Aften: A/52 audio encoder
Version SVN
(c) 2006-2007 Justin Ruggles, Prakash Punnoor, et al.

and here with AvisynthWrapper.dll 11/03/2007 22:32
Starting job Track 10.wav->Track 10.ac3
Found Audio Stream
Channels=2, BitsPerSample=16 int, SampleRate=48000Hz
Aften.exe -v 0 -b 448 -m 0 -readtoeof 1 -cmix 0 -smix 0 -dsur 0 -dnorm 31 -dynrng 5 - "D:\01\Track 10.ac3"
Error: System.ApplicationException: Can't start encoder: Não é possível processar a solicitação porque o processo (872) foi encerrado. ---> System.InvalidOperationException: Não é possível processar a solicitação porque o processo (872) foi encerrado.
em System.Diagnostics.Process.GetProcessHandle(Int32 access, Boolean throwIfExited)
em System.Diagnostics.Process.set_PriorityClass(ProcessPriorityClass value)
em BeHappy.Encoder.createEncoderProcess(AviSynthClip x)
--- Fim do rastreamento de pilha de exceções internas ---
em BeHappy.Encoder.createEncoderProcess(AviSynthClip x)
em BeHappy.Encoder.encode()

alwa
18th March 2007, 15:25
Full Code Update with Aften Example (http://www.mytempdir.com/1259180)

Changes:
2007-03-18 (Alwa)
+ renamed the "ext" directory to "extensions" (MainForm.cs, BeHappy.csproj)
+ Encoder binaries can be placed in the "encoder" directory(handling like extensions directory)(MainForm.cs)

You don't have to use those directories! You can...

raquete
18th March 2007, 22:30
@ alwa

your update is working perfectly encoding ac3 using stereo sources but with interleaved 6 channels BeHappy close without encode showing the same error message that i posted yesterday:
"Program Error
behappy.exe generate erros and will be closed by windows.
you need to restart the program.
creating one log of errors."

...but no one error log is created and in the background BeHappy close without messages!

edit: typos!

Chumbo
19th March 2007, 03:33
More changes added to previous mods:
2007-03-18 (Chumbo)
+ added accelerators to buttons so keyboard can be quickly used to access functions
+ when either source/destination are blank, clicking Enqueue displays a message
+ "Keep output..." check box now works AFTER you've started a process
+ Move buttons in Queue tab are now enabled based on list selections (1 item selected only)
+ fixed unintended multiple selections in Jobs list. Now that we have a multi-select list, certain
processes were causing items to stay selected when they should not.

BeHappyCAT (http://www.mytempdir.com/1259886) mod.

alwa
19th March 2007, 12:44
BeHappyCAT (http://www.mytempdir.com/1260250) :rolleyes:
2007-03-19 (Alwa)
+ fixed a problem with the "encoder" directory in connection with the WAVWriter output

@raquete would be nice if you provide us a tiny sample which causes this error.

raquete
19th March 2007, 17:03
@raquete would be nice if you provide us a tiny sample which causes this error.in few minutes.
i'm cutting some from the source and hosting.
thanks so much for your interest.:)

raquete
19th March 2007, 17:41
one interleaved,6-channel wave file with round 30 seconds

http://rapidshare.com/files/21807882/sample.rar

some comments:
loading this sample and others waves(6ch) in AftenGUI1.2 with Aften 06/08/06 43k or Aften 17/03/07 229k the result is perfect.
with the last EncWAVtoAC3 works perfect too.
thanks.

tebasuna51
19th March 2007, 18:24
@raquete
Your wav have a WAVE_FORMAT_EXTENSIBLE header and is not supported by AviSynth WavSource().
To open this files with AviSynth you can:
- Use BassAudioSource(). You need BassAudio.dll and Bass.dll in AviSynth plugins folder.
- Use DirectShowSource with, for instance, ffdshow properly configured.
- Convert to a PCM wav with WaveWizard.
- Patch the wav with WavNotEx.exe

This is a AviSynth problem not related with BeHappy.
If you don't need DSP functions AftenGUI is fast than use BeHappy.

raquete
19th March 2007, 18:31
i have BassAudio.dll and Bass.dll in AviSynth plugins folder but...
This is a AviSynth problem not related with BeHappy.
If you don't need DSP functions AftenGUI is fast than use BeHappy. all right,very clever.
thank you so much! :)

Chumbo
20th March 2007, 04:53
For those of you that are audio coding experts, any idea on why a 24MB ac3 file, after run through BeHappy, is 3 times the size when rewritten back to ac3? I just wanted to test the time stretch to see if that works well and noticed my output file was almost 80MB. I did use the down sample to 16 bit and left it at 384kbps using Aften, but the same thing happens when I use ffmpeg.

btw, I did test it w/out any DSP turned on and still the same 3x larger output file. Ideas? Words of wisdom? Thanks much. Hopefully I can learn something. :)

Using BeSweet gives me the expected result incase you were wondering. I have not tried Aften via the command line with bepipe to see if the results are the same as with BeHappy.

tebasuna51
20th March 2007, 12:01
For those of you that are audio coding experts, any idea on why a 24MB ac3 file, after run through BeHappy, is 3 times the size when rewritten back to ac3? I just wanted to test the time stretch to see if that works well and noticed my output file was almost 80MB. I did use the down sample to 16 bit and left it at 384kbps using Aften, but the same thing happens when I use ffmpeg.
In ac3 always:
Size = Time_length x BitRate

- The bit depth ("I did use the down sample to 16 bit") is irrelevant.

- If Time_length don't vary (TimeStretch don't support great change) your output bitrate is 3 times your input bitrate.

Chumbo
20th March 2007, 15:47
In ac3 always:
Size = Time_length x BitRate

- The bit depth ("I did use the down sample to 16 bit") is irrelevant.

- If Time_length don't vary (TimeStretch don't support great change) your output bitrate is 3 times your input bitrate.
Thanks tebasuna. My input ac3 has the same bitrate. It's a 5.1 384kbps 48kHz. My output parameters are the same. Like I said, I don't have the size "issue" with BeSweet which uses azid. What do you think?

tebasuna51
20th March 2007, 16:36
Thanks tebasuna. My input ac3 has the same bitrate. It's a 5.1 384kbps 48kHz. My output parameters are the same. Like I said, I don't have the size "issue" with BeSweet which uses azid. What do you think?

Is not possible, an ac3 384 Kb/s 24 Mb is 8:44, and a 80 Mb is 29:07. What is true?

Chumbo
20th March 2007, 17:17
Is not possible, an ac3 384 Kb/s 24 Mb is 8:44, and a 80 Mb is 29:07. What is true?
Well, I did a couple tests and it's the input that causing the problem.

03/20/2007 11:10 AM 1,440,768 601.384.ac3
03/20/2007 11:13 AM 4,323,840 601.DSinput.aften.384.ac3
03/20/2007 11:14 AM 1,442,304 601.NicAc3SourceInput.aften.384.ac3
Note how much bigger the file is when DirectShow is used as the input. My problem is, when I use NicAc3Audio on the full file, the process blows up in BeHappy. I ran the ac3 through delaycut and used the fix option and it still blows up during the conversion.

Using DS works fine, but my file is 3x larger. Sigh... Ideas, suggestions? Thanks a lot.

Can you guys confirm this or am I the only one seeing this?

tebasuna51
20th March 2007, 18:25
I ran the ac3 through delaycut and used the fix option and it still blows up during the conversion.

I'm sure than DelayCut send you error message. Please put them.

Seems your ac3 is corrupted. Maybe you have a mix between bitrates or different channels and the behaviour can differ with decoders.

And you don't say me the duration of ac3's (and if sound right).

tebasuna51
20th March 2007, 19:04
BeHappyCAT (http://www.mytempdir.com/1262315) new version with:
- problem fixed because AviSynth bug: IsAudioInt return always false.

The problem is reported (http://forum.doom9.org/showthread.php?t=123646) but waiting a new AviSynth release is better change

IsAudioInt() ? last : ConvertAudioTo32bit()
for
Audiobits()==32 ? ConvertAudioTo32bit() : last

First line (always false) convert always the audio to 32 bit int, second line convert only float and int 32 bit to 32 int.

Chumbo
20th March 2007, 19:26
I'm sure than DelayCut send you error message. Please put them.

Seems your ac3 is corrupted. Maybe you have a mix between bitrates or different channels and the behaviour can differ with decoders.

And you don't say me the duration of ac3's (and if sound right).
Actually, the small sample info I posted is clean. I ran it through delaycut and it came out fine.
[Input info]
Bitrate=384
Actual rate=384.000000
Sampling Frec=48000
TotalFrames=938
Bytesperframe=1536.0000
Filesize=1440768
FrameDuration= 32.0000
Framespersecond= 31.2500
Duration=00:00:30.016
Channels mode=3/2: L+C+R+SL+SR
LFE=LFE: Present
[Target info]
StartFrame=0
EndFrame=937
NotFixedDelay= 0.0000
Duration=00:00:30.016
====== PROCESSING LOG ======================
Number of written frames = 938
Number of Errors= 0
The problematic ac3 file I was referring to was my 24MB file. I just wanted to use a small clean sample to show you what I was talking about.

Look at the differences between the original here:
====== INPUT FILE INFO ========================
File is ac3
Bitrate (kbit/s) 384
Act rate (kbit/s) 384.000
File size (bytes) 1440768
Channels mode 3/2: L+C+R+SL+SR
Sampling Frec 48000
Low Frec Effects LFE: Present
Duration 00:00:30.016
Frame length (ms) 32.000000
Frames/second 31.250000
Num of frames 938
Bytes per Frame 1536.0000
Size % Framesize 0
CRC present: YES
=============================================

and the one run through BeHappy using DirectShow for input and aften output:
====== INPUT FILE INFO ========================
File is ac3
Bitrate (kbit/s) 384
Act rate (kbit/s) 384.000
File size (bytes) 4323840
Channels mode 3/2: L+C+R+SL+SR
Sampling Frec 48000
Low Frec Effects LFE: Present
Duration 00:01:30.080
Frame length (ms) 32.000000
Frames/second 31.250000
Num of frames 2815
Bytes per Frame 1536.0000
Size % Framesize 0
CRC present: YES
=============================================


Why would it be so different when the input is DirectShow? btw, my DS graph is the ac3 file->ac3filter->default ds device. AC3Filter output is set to AS IS (no change).

[EDIT] Here's the ac3 file I'm experimenting with. test file (http://www.mytempdir.com/1262380). btw, I also tried using DirectShow with the sonic audio decoder instead of ac3filter and got the same bloated output. Ugh...