Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Audio encoding

Reply
 
Thread Tools Search this Thread Display Modes
Old 17th April 2008, 01:07   #681  |  Link
mob
Registered User
 
Join Date: Jun 2004
Posts: 90
Hey guys,

I got BeHappy from http://www.codeplex.com/BeHappy/ and it is very good!

So I have a question about how it is adding a switch to the command line of LAME.

When I set it up to do VBR 5 it give this command:

lame.exe -v -V 5 --nohist --vbr-new -S --silent - "C:\test.mp3"

So why is it -v -V 5? Instead it should be only -V 5 right?

And also, another question. In the LAME encoder configuration, what is that setting: comply as much as possible to ISO MPEG spec?

Thanks!
mob is offline   Reply With Quote
Old 17th April 2008, 03:15   #682  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Quote:
Originally Posted by mob View Post
Hey guys,

I got BeHappy from http://www.codeplex.com/BeHappy/ and it is very good!

So I have a question about how it is adding a switch to the command line of LAME.

When I set it up to do VBR 5 it give this command:

lame.exe -v -V 5 --nohist --vbr-new -S --silent - "C:\test.mp3"

So why is it -v -V 5? Instead it should be only -V 5 right?

And also, another question. In the LAME encoder configuration, what is that setting: comply as much as possible to ISO MPEG spec?

Thanks!
Yes, maybe we need some update :

-v -V 5 --vbr-new

actually is enough use only -V 5 because the default is --vbr-new and -v is superfluous.

'comply as much as possible to ISO MPEG spec'

do nothing because the corresponding parameter:
--strictly-enforce-ISO
is not included, BTW I don't know if anybody need this.
tebasuna51 is offline   Reply With Quote
Old 17th April 2008, 05:04   #683  |  Link
mob
Registered User
 
Join Date: Jun 2004
Posts: 90
Quote:
Originally Posted by tebasuna51 View Post
Yes, maybe we need some update :

-v -V 5 --vbr-new

actually is enough use only -V 5 because the default is --vbr-new and -v is superfluous.

'comply as much as possible to ISO MPEG spec'

do nothing because the corresponding parameter:
--strictly-enforce-ISO
is not included, BTW I don't know if anybody need this.
Yeah I knew something had to be wrong because I always check the hydrogenaudio for the best settings for LAME: http://wiki.hydrogenaudio.org/index....coder_settings

and they never use that -v switch. Only -V as in -V 4 --vbr-new

Well, perhaps you can add a feature so we can use our own commandline switches. Sometimes I like to just use my own commandline switches without using the dialog with all the options. It gives more control if you let the user make his own commandline options. Can this be added maybe?
mob is offline   Reply With Quote
Old 17th April 2008, 10:06   #684  |  Link
Geleodor
Registered User
 
Join Date: Dec 2007
Posts: 17
What settings should I use to encode multichannel AAC from multichannel.wav? Or multichannel AAC can be just as input, not output ?
Geleodor is offline   Reply With Quote
Old 17th April 2008, 12:08   #685  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Quote:
Originally Posted by mob View Post
and they never use that -v switch. Only -V as in -V 4 --vbr-new
Don't worry about this. Using more parameters we guarantee compatibility with old and beta versions because the defaults can change. See that:
Code:
VBR options: 3.97
  -v              use variable bitrate (VBR) (--vbr-old)
  --vbr-old       use old variable bitrate (VBR) routine
  --vbr-new       use new variable bitrate (VBR) routine
  -V n            quality setting for VBR.  default n=4
                  0=high quality,bigger files. 9=smaller files

VBR options:  3.98 beta 7
  -V n            quality setting for VBR.  default n=4
                  0=high quality,bigger files. 9=smaller files
  -v              the same as -V 4
  --vbr-old       use old variable bitrate (VBR) routine
  --vbr-new       use new variable bitrate (VBR) routine (default)
The syntax:
-v -V 5 --vbr-new
work fine with 3.96, 3.97 and 3.98 beta Lame versions.

Quote:
Well, perhaps you can add a feature so we can use our own commandline switches. Sometimes I like to just use my own commandline switches without using the dialog with all the options. It gives more control if you let the user make his own commandline options. Can this be added maybe?
What is your BeHappy version?
Only the bitrate, with the allowed values, are forced in the dialog.
There are a window to add your commandline switches, I always add at least -h.
tebasuna51 is offline   Reply With Quote
Old 17th April 2008, 12:41   #686  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Quote:
Originally Posted by Geleodor View Post
...multichannel AAC can be just as input, not output ?
Maybe a input if you select BassAudioSource (BassAudio.dll, Bass.dll and bass_aac.dll required in ...AviSynth 2.5\plugins folder) or DirectShowSource with some DS filter to decode aac well configured.

And can be a output if you have the encoders. BeHappy can work with:
- Nero Digitall AAC (NeroAacEnc.exe in BeHappy folder or encoder subfolder)
- Coding Technologies aacPlus (enc_aacPlus.exe, enc_aacplus.dll and nscrt.dll in BeHappy folder or encoder subfolder)

Quote:
Originally Posted by Geleodor View Post
What settings should I use to encode multichannel AAC from multichannel.wav?
1) With NeroAacEnc I recommend you use:
- VariableBitRate with quality between 2.5 and 4 (is your choice)
- Aac Profile: Automatic
- The rest unchecked
The output is always in m4a/mp4 container.

2) With CT only CBR is allowed and for multichannel:
- Profile LC-AAC with bitrates between 224-320 Kb/s
- Or Profile HE-AAC for bitrates between 192-223 Kb/s
- Ignore the Channel Mode valid only for stereo.
- The rest unchecked
The output is .aac if you need m4a/mp4 container you need also Mp4Box.exe in BeHappy folder or encoder subfolder.
tebasuna51 is offline   Reply With Quote
Old 17th April 2008, 21:38   #687  |  Link
mob
Registered User
 
Join Date: Jun 2004
Posts: 90
Hey tebasuna51, try to test it out like I did and see how it happens:

I used any MP3 file for testing. I input the MP3 file to BeHappy and I want to transcode it with -V 2 --vbr-new so I set it up like this with the dialog:



But then it sends the MP3 to LAME with this command instead: -v -V 2 --nohist --vbr-new -S --silent

Now, you said this going to be working fine for all the versions of LAME, but I find that this is not true.

I am using LAME 3.97 from: http://rarewares.org/dancer/dancer.php?f=lame-current

And when I pass my test MP3 file to the LAME commandline encoder (without using BeHappy) then I get a totally different file. So BeHappy is adding unwanted command options and it's causing the encode to be different. Take a look at my findings:

_____________________________________

test.mp3 -> BeHappy -> output.mp3 with these settings:



Gives me: output.mp3 (5.94 MB) CRC: d4502ba8

_____________________________________


But if I only use LAME encoder in the commandline:

test.mp3 -> LAME.exe -> output.mp3 with these settings:

-V 2 --vbr-new

Gives me: output.mp3 (6.21 MB) CRC: d4238540

_____________________________________


So you can see, using BeHappy is not accurate because you are adding switches that are confusing it.

That is why I need an advanced option so I can disable all the things that BeHappy is adding to the commandline and then I'll use my own commandline switches.

btw, I'm using the same version/build of LAME for BeHappy in my test. So the output should come out as the same file. But it is different as you can see. Try to do the test also and see how it happens. This is why you should allow the people to make their own switches. If you add switches to their commands then it will mess up the output

Last edited by mob; 17th April 2008 at 21:45.
mob is offline   Reply With Quote
Old 18th April 2008, 00:20   #688  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Believe me!
The parameters are ok.

Your test is not correct, you can't compare this:

1.mp3 -> Lame Decoder -> Lame Encoder -> 11.mp3

with:

1.mp3 -> NicMPG123/BassAudio decoder (32 float) -> 32 int conversion -> Lame Encoder -> 12.mp3

When BeHappy decode a file use the max precision (32 bits float here) to allow operations like stretch, resample, ... without lose quality.

Unfortunately Lame don't accept 32 bits float and we need convert to 32 int before send the data to Lame.

Like you see the process is different. But you can do the test using a uncompressed wav file. I get a wav file (ripped from CD) and I make the test (with -V 2):

1.wav -> Lame.exe -> 11.mp3 4.196.754 bytes
1.wav -> BeHappy -> 12.mp3 4.196.754 bytes

And bitidentical (Total Commander) of course.
Make the test yourself.
tebasuna51 is offline   Reply With Quote
Old 18th April 2008, 00:58   #689  |  Link
mob
Registered User
 
Join Date: Jun 2004
Posts: 90
LOL tebasuna51

So maybe I don't know much about all of this stuff. But if you say it is good then I believe you because you know a lot more about this kind of stuff then me

Anyway, see my whole problem is that I am going to convert a PAL mp3 to a NTSC mp3 and I found BeHappy to be the best one to do the job.

I need to do this PAL -> NTSC conversion because the PAL audio is messed up with a high pitch sound. I need to get it back to 23.976 and get it back to the original sound.

So I do a timestretch with BeHappy and I select the option Rate for the Rate Control:



This gives me the exact kind of conversion that I need. And BeHappy really makes me Happy

Except now I found this is what they say about Timestretch on the AviSynth website:

Timestretch() by the nature of the algorithm used causes noticeable distortion in the result, generally use it for speech only, never for high quality music.

So is it true? Is it really causing "noticeable distortion" and bad artifacts? Maybe there is a method of doing the conversion that will not cause noticeable distortion?
mob is offline   Reply With Quote
Old 18th April 2008, 02:19   #690  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Quote:
Originally Posted by mob View Post
Anyway, see my whole problem is that I am going to convert a PAL mp3 to a NTSC mp3 and I found BeHappy to be the best one to do the job.

I need to do this PAL -> NTSC conversion because the PAL audio is messed up with a high pitch sound. I need to get it back to 23.976 and get it back to the original sound.

So I do a timestretch with BeHappy and I select the option Rate for the Rate Control
Please don't use with audio:
"convert a PAL mp3 to a NTSC mp3"
because the audio is the same in PAL or NTSC systems.

The correct way to do a PAL -> NTSC conversion is modify the video and let untouched the audio.

Seems you have a 25 fps video and want play this video at 23.976, without conversion the duration is greater and you need enlarge also the audio to match the new video duration. Like the initial audio have high pitch (maybe by the inverse conversion) the desired method is Rate.

Then you are lucky because this method don't produce "noticeable distortion or bad artifacts". Is a simple change of samplerate.

Only when we need change the duration preserving the pitch (or change the pitch without change the duration) the conversion can't be perfect.
tebasuna51 is offline   Reply With Quote
Old 18th April 2008, 02:35   #691  |  Link
mob
Registered User
 
Join Date: Jun 2004
Posts: 90
Quote:
Originally Posted by tebasuna51 View Post
Seems you have a 25 fps video and want play this video at 23.976
Yep that's exactly what I have to do. I already got the video from 25fps -> 23.976. My only trouble now is to get the audio to match it.

And the only reason I need to do it is because when they made the PAL version of my DVD, they speed up the audio and it sounds too high pitch. If I slow it back down to the normal 23.976fps then it will sound normal again. They make the PAL DVDs so bad like this

Quote:
Originally Posted by tebasuna51 View Post
Like the initial audio have high pitch (maybe by the inverse conversion) the desired method is Rate.

Then you are lucky because this method don't produce "noticeable distortion or bad artifacts". Is a simple change of samplerate.
Yep! I used the Rate method like you see in this screenshot:



So you mean, with this method I can be safe because it doesn't have the distortion problem?

If yes, than that's good. And it fixes all my problems
mob is offline   Reply With Quote
Old 18th April 2008, 03:20   #692  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Quote:
Originally Posted by mob View Post
So you mean, with this method I can be safe because it doesn't have the distortion problem?
Yep, the process is change the samplerate from 48000 Hz to 50050 Hz then there are more samples, and after play the audio at 48000 Hz then the duration grow and the pitch decrease.
tebasuna51 is offline   Reply With Quote
Old 18th April 2008, 06:21   #693  |  Link
mob
Registered User
 
Join Date: Jun 2004
Posts: 90
Quote:
Originally Posted by tebasuna51 View Post
Yep, the process is change the samplerate from 48000 Hz to 50050 Hz then there are more samples, and after play the audio at 48000 Hz then the duration grow and the pitch decrease.
WOW

This is perfect!

BeHappy really makes me Happy hehe

...but tebasuna51 makes me smart.

Thanks for helping me and explaining everything to me. I really appreciate it man

mob is offline   Reply With Quote
Old 29th April 2008, 13:52   #694  |  Link
adrianmak
Registered User
 
Join Date: Apr 2006
Posts: 127
the gui looks complex.

How do I use it to convert a 5.1 ac3 to 6 individual wave file ?
adrianmak is offline   Reply With Quote
Old 29th April 2008, 19:32   #695  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Quote:
Originally Posted by adrianmak View Post
How do I use it to convert a 5.1 ac3 to 6 individual wave file ?
System requirements
* Microsoft .NET Framework Version 2.0
* Avisynth v2.57

Install
1) From the BeHappy package uncompress the following files/subfolders in a folder at your choice:
AvisynthWrapper.dll
BeHappy.exe
encoder
extensions
plugins

2) Copy nicaudio.dll from plugins subfolder to your AviSynth 2.5/plugins subfolder.

Process
Run BeHappy.exe and in New Job Tab:

1) Select the [1] Source method NicAc3Source and [...] Configure. I suggest you don't use DRC.
Select [...] your source ac3 file.

2) Select the desired [2] Tweak functions.
Maybe you need include a Delay detected in your source.

3) Select the desired [3] Digital Signal Processing functions. Each function can be Configured and Moved Up/Down because are executed in descending order.
The NicAudio decoder output have 32 bit float samples. Maybe you want Convert Sample To 16 bit (or 24 int ...)

4) Select the [4] Destination format WavSplit and [...] Configure like Mono Wav's.
Select [...] your desired output filename. This filename is used like prefix and each channel is suffixed with _FL, _FR, ... and so on.

5) Enqueue. Go to Queue Tab and Start the job.

Last edited by tebasuna51; 29th April 2008 at 19:42.
tebasuna51 is offline   Reply With Quote
Old 30th April 2008, 11:19   #696  |  Link
cweb
Registered User
 
cweb's Avatar
 
Join Date: Oct 2002
Location: The Pandorica
Posts: 527
When I quite BeHappy v0.19.50201 I get an error "Unhandled exception has occurred in your application. If you click Continue the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately.

Item has already been added. Key in dictionary:
'58ab9132-50c8-11dc-8314-0800200c9a66' Key being added:
'58ab9132-50c8-11dc-8314-0800200c9a66'
"

Any ideas on what could be wrong?
__________________
PC specs for bug reports: Intel Core i7-4790K @4Ghz Win10(Linux VM) PCI express NVIDIA RTX 2060 SUPER graphics card
http://twitter.com/cwebdesign
cweb is offline   Reply With Quote
Old 30th April 2008, 13:29   #697  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Quote:
Originally Posted by cweb View Post
Item has already been added. Key in dictionary:
'58ab9132-50c8-11dc-8314-0800200c9a66' Key being added:
'58ab9132-50c8-11dc-8314-0800200c9a66'
"

Any ideas on what could be wrong?
Seems the NicAudio ID (see Nicaudio.extension) is duplicated in your machine:
Code:
<AudioSource UniqueID="58ab9132-50c8-11dc-8314-0800200c9a66">
If you don't know what is the problem try edit Nicaudio.extension and change the line by other one, for instance:
Code:
<AudioSource UniqueID="58ab9132-50c8-11dc-8314-0800200c9b66">
tebasuna51 is offline   Reply With Quote
Old 30th April 2008, 18:08   #698  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
@cweb

Maybe you have the old RaWav.extension in BeHappy folder.
Now is inside NicAudio.extension (same ID), and you need delete RaWav.extension and also RaWav.dll in AviSynth 2.5\plugins folder if exist.
tebasuna51 is offline   Reply With Quote
Old 5th May 2008, 05:52   #699  |  Link
EpheMeroN
EphMan
 
Join Date: May 2004
Posts: 737
NicAudio.dll Issues

BeHappy v0.1.9.50201 is reporting the following error when trying to do AC3 > mp3 transcode:

Code:
Starting job VTS_01_1 T80 3_2ch 384Kbps DELAY 0ms.ac3->dvd-xvid-audio.mp3
Error: BeHappy.AviSynthException: Script error: there is no function named "NicAc3Source"
   at BeHappy.AviSynthClip..ctor(String func, String arg, AviSynthColorspace forceColorspace, AviSynthScriptEnvironment env)
   at BeHappy.Encoder.encode()
I have the latest NicAudio.dll in both BeHappy\Plugins dir and AviSynth\Plugins dir. What could be causing this?

Last edited by EpheMeroN; 5th May 2008 at 09:59.
EpheMeroN is offline   Reply With Quote
Old 5th May 2008, 08:52   #700  |  Link
cweb
Registered User
 
cweb's Avatar
 
Join Date: Oct 2002
Location: The Pandorica
Posts: 527
Quote:
Originally Posted by tebasuna51 View Post
@cweb

Maybe you have the old RaWav.extension in BeHappy folder.
Now is inside NicAudio.extension (same ID), and you need delete RaWav.extension and also RaWav.dll in AviSynth 2.5\plugins folder if exist.
For the time being I have downgraded to the previous version.

But thanks, I will reinstall the latest version and try that.
__________________
PC specs for bug reports: Intel Core i7-4790K @4Ghz Win10(Linux VM) PCI express NVIDIA RTX 2060 SUPER graphics card
http://twitter.com/cwebdesign
cweb is offline   Reply With Quote
Reply

Tags
behappy

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:32.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.