Quantcast Using Sweethead with Mencoder in Batch - digitalFAQ.com Forums [Archives]
  #1  
06-03-2004, 05:32 PM
black prince black prince is offline
Free Member
 
Join Date: Jul 2002
Posts: 1,224
Thanks: 0
Thanked 0 Times in 0 Posts
@Kwag,

I'm trying to use SweetHead with MEncoder in a batch file. The
problem is HeadAC3he is not automatically getting the destination
file which has the delay as part of the name for .ac3. Below
is an example of this batch:

SweetHeadac3.exe "f:\Temp\*.ac3" "f:\Temp\MOVIE.mp2" Sweet.Template.ini


For input file "F:\Temp\*.ac3" is giving me an error of file not found.
Is there a way to have Headac3he get the input from this directory
automatically. When I rename it to say "F:\Temp\movie.ac3" I lose
the delay setting as part of the file name

-BP
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Site Staff / Ad Manager
 
Join Date: Dec 2002
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
06-03-2004, 05:42 PM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
Why dont u use Besweet??? As it works perfectly together with mencoder.
Packshot i.E. generates a whole bat incl. Mencoder AND besweet commandlines from avob input.

You can start the encode ... and exit it, so u got a tweakable bat file in the "engines" folder.

The next version of Packshot also includes a "commandline" only tab so you dont need to interrupt that process acrivated by packshot.

Reply With Quote
  #3  
06-03-2004, 07:47 PM
Prodater64 Prodater64 is offline
Free Member
 
Join Date: Mar 2003
Location: Palma de Mallorca - España
Posts: 2,925
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by black prince
...I'm trying to use SweetHead with MEncoder in a batch file. The problem is HeadAC3he is not automatically getting the destination file which has the delay as part of the name for .ac3. Below
is an example of this batch:

SweetHeadac3.exe "f:\Temp\*.ac3" "f:\Temp\MOVIE.mp2" Sweet.Template.ini


For input file "F:\Temp\*.ac3" is giving me an error of file not found.
Is there a way to have Headac3he get the input from this directory
automatically. When I rename it to say "F:\Temp\movie.ac3" I lose
the delay setting as part of the file name

-BP
You can choice from 2 options.
1 - At your batch file begin, put this lines:
Quote:
SET AUDIOFILE=
SET /P AUDIOFILE= INPUT AUDIO FILENAME?
Each time you execute batch file, prompt ask you for filename. You can select from cmd window properties (left click in upper left window side), options tab, quick edit modality. With this option you can copy in your audio file folder, the audio filename (F2, CTRL+C), and then paste it in cmd window just with a right click.

2 - Replace your current Sweetheadac3.exe line with:
Quote:
FOR %%A IN (f:\Temp\*.ac3) DO SweetHeadac3.exe "f:\Temp\%%A.ac3" "f:\Temp\MOVIE.mp2" Sweet.Template.ini
Be sure that only one ac3 file are in your temp folder.


--------------------------
Visit: Intermediate guide: MencodeMe/Win32 - Avisynth - MakeAvis by Prodater64.
Visit: KVCD - MencodeMe - Auxiliar Task - KVCD Docking Gate by Prodater64.
Visit: Mencoder scripting with AVSEdit and Guide for Multiple Files by Prodater64.
Visit: Mini-guide quick and easy - DVD to (S)KVCD with MencodeMe by Maurus.
Visit: Mencode-me: a newbie oriented GUI - 0.23 is out! by VMesquita.
--------------------------

Reply With Quote
  #4  
06-03-2004, 11:03 PM
black prince black prince is offline
Free Member
 
Join Date: Jul 2002
Posts: 1,224
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks Prodater64 and Inc,

I like this option:
FOR %%A IN (f:\Temp\*.ac3) DO Headac3.exe "f:\Temp\%%A.ac3" "f:\Temp\MOVIE.mp2" -userini Sweet.Template.ini

Headac3he has better sound quality for low bitrate such as 64kbps.
BeSweet can not compare at this low rate. Kwag has done many
tests and the results were Headac3he was the winner!!

-BP
Reply With Quote
  #5  
06-04-2004, 12:09 AM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Hi BP,

You have to supply the exacty command line arguments that DVD2SVCD uses to call BeSweet.
Then, SweetHead should work
And yes, HeadAC3he produces better audio quality than BeSweet

-kwag
Reply With Quote
  #6  
06-04-2004, 12:27 AM
Prodater64 Prodater64 is offline
Free Member
 
Join Date: Mar 2003
Location: Palma de Mallorca - España
Posts: 2,925
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by kwag
Hi BP,

You have to supply the exacty command line arguments that DVD2SVCD uses to call BeSweet.
Then, SweetHead should work
And yes, HeadAC3he produces better audio quality than BeSweet

-kwag
But i think BP is trying avoid to write ac3 name (with delay) each time that he need to convert ac3 to mp2, for automation purposes. Then he need a way to search for any ac3 name in his working folder. But it seems that sweethead don't support *.ac3 as a valid name. For this reason, he need to use the command line that I mentioned before.


--------------------------
Visit: Intermediate guide: MencodeMe/Win32 - Avisynth - MakeAvis by Prodater64.
Visit: KVCD - MencodeMe - Auxiliar Task - KVCD Docking Gate by Prodater64.
Visit: Mencoder scripting with AVSEdit and Guide for Multiple Files by Prodater64.
Visit: Mini-guide quick and easy - DVD to (S)KVCD with MencodeMe by Maurus.
Visit: Mencode-me: a newbie oriented GUI - 0.23 is out! by VMesquita.
--------------------------

Reply With Quote
  #7  
06-04-2004, 01:45 AM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
Quote:
Originally Posted by kwag
Hi BP,

And yes, HeadAC3he produces better audio quality than BeSweet

-kwag
If you choose mp2enc as encoder for encoding mp2's it will got the exact same output! as headac3he uses the way azid ...x.x.x.x .mp2enc
Reply With Quote
  #8  
06-04-2004, 09:30 AM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by incredible

If you choose mp2enc as encoder for encoding mp2's it will got the exact same output! as headac3he uses the way azid ...x.x.x.x .mp2enc
Yes, I believe previous versions of BeSweet used 2lame, right
If BeSweet now uses mp2enc, just like HeadAC3he, then it's the same thing
I forgot about that

-kwag
Reply With Quote
  #9  
06-04-2004, 04:56 PM
black prince black prince is offline
Free Member
 
Join Date: Jul 2002
Posts: 1,224
Thanks: 0
Thanked 0 Times in 0 Posts
@Kwag,

This works GREAT!!!, thanks to Prodater64 My work folder is
"F:\Temp\" for video and audio, so substitute your folder. The settings
in My.Template.ini are set to 64kbs, change to what you need.

Head.bat

Quote:
FOR %%A IN (f:\Temp\*.ac3) DO Headac3he.exe "%%A" -useini My.Template.ini
My.Template.ini:

Quote:
; HeadAC3he INI File

INIVersion = 10

; Usually the digits mean:
; 0 - Disable
; 1 - Enable

; If an option is left blank, a hardcoded default will be used.

; DON'T change the order of the options!


; Error-details
; 0 - show everything
; 1 - skip infos, but show warnings
; 2 - show only critical errors
; 3 - show nothing (not recommended!)
ErrorDetail = 2

; Start the process automatically/manually? Quit the program automatically/manually?
; 0 - manual start and end
; 1 - auto start, manual end
; 2 - manual start, auto end
; 3 - auto start and end
StartEnd = 3

; Ask "Do you want to quit?"
; StartEnd>1 overrides this setting
ConfirmExit = 1


SourFile =

; leave blank for automatic operation or set value in ms (max/min +/-32000)
SourDelay =

; If DestFile is left blank, a name will be generated using SourFile
DestFile = F:\Temp\Movie.mp2 <--- outpout audio file

; 0 - AC3
; 1 - AC3-WAV
; 2 - WAV
; 3 - MP3
; 4 - Vorbis
; 5 - MP2
DestFormat = 5

; Specify bits per sample
; 2 - 16
; 3 - 24
; 4 - 32
WAVBits = 4

; Specify WAV format
; 0 - int
; 1 - float
WAVFormat = 1

; Specify 2pass mode
; 0 - none
; 1 - dumb
; 2 - hybrid
; 3 - float
TwoPassMode = 3

; Values from 1 to 100 allowed
NormalizeTo = 100


StartFrame =
EndFrame =


; Use Boost Function?
UseBooster = 1
; Types 0->3 available
BoostType = 0
; muliply desired values by 100
; allowed ranges are 1->999 resp. 0->100
BoostValue = 140
BoostStrength = 100


; Reading block size for every undefined drive
; Put in the number of 2^x Bytes:
; eg: 13 - 8KB
; 15 - 32KB
; Maximum is 23 (=8192KB)
BlockSizeGlobal = 14

; Reading block size for every defined drive
; format: drive:blocksize and use , as seperator
; eg: C:12,D:15 or leave blank
BlockSizeDrive =

; Same applies for write block settings
WBlockSizeGlobal = 18
WBlockSizeDrive =

; Specify minimum and maximum buffer in MB
; Minimum is 10
MinBuffer = 10
; Maximum buffer has higher priority then minimum
; 0 - unlimited
MaxBuffer = 128

; Specify priority for main and transfer thread (0 - idle -> 6 critical)
PriorityCPU = 3
PriorityIO = 2

; Specify *relative* I/O priority when PCM data is written
; eg. 2 means two steps lower then PriorityIO)
PCMRelPrioIO = 1


; 0 - nothing
; 1 - Azid Configuration
; 2 - MP2enc/Lame/Vorbis Configuration
ShowOptions = 2

; Show the Log window?
ShowLog = 1


; Azid Defaults:

; set to less than -2db (min is -127) to prevent clipping with wrongly(?) mastered ac3s
AzidGainCorrect =-2

; Current Preset

; Select input channels
InLeft = 1
InCenter = 1
InRight = 1
InRearLeft = 1
InRearRight = 1
InLFE = 1

; Input channel gain (-60db to 60db)
InLeftGain = 0
InCenterGain = -3
InRightGain = 0
InRearLeftGain = -3
InRearRightGain = -3
InLFEGain = -3

; Input channel DRC
; 0 - none
; 1 - light
; 2 - normal
; 3 - heavy
; 4 - inverse
InLeftDRC = 0
InCenterDRC = 0
InRightDRC = 0
InRearLeftDRC = 0
InRearRightDRC = 0
InLFEDRC = 0

; Select output channels
OutLeft = 1
OutCenter = 0
OutRight = 1
OutRearLeft = 0
OutRearRight = 0
OutLFE = 0

; Output channel gain (-60db to 60db)
OutLeftGain = 0
OutCenterGain = 0
OutRightGain = 0
OutRearLeftGain = 0
OutRearRightGain = 0
OutLFEGain = 0

; Output channel DRC
; 0 - none
; 1 - light
; 2 - normal
; 3 - heavy
; 4 - inverse
OutLeftDRC = 2
OutCenterDRC = 0
OutRightDRC = 2
OutRearLeftDRC = 0
OutRearRightDRC = 0
OutLFEDRC = 0

; global gain, needed for one pass mode (-120db to 120db)
GlobalGain = 0

; 0 - Mono
; 1 - Surround
; 2 - Stereo
; 3 - Surround 2
DownmixType = 3

; Use 7kHz low-pass for rear channels?
LowPassFilter = 0


; 2Ch Preset

; Select input channels
2ChInLeft = 1
2ChInCenter = 1
2ChInRight = 1
2ChInRearLeft = 1
2ChInRearRight = 1
2ChInLFE = 1

; Input channel gain (-60db to 60db)
2ChInLeftGain = 0
2ChInCenterGain = -3
2ChInRightGain = 0
2ChInRearLeftGain = -3
2ChInRearRightGain = -3
2ChInLFEGain = -3

; Input channel DRC
; 0 - none
; 1 - light
; 2 - normal
; 3 - heavy
; 4 - inverse
2ChInLeftDRC = 0
2ChInCenterDRC = 0
2ChInRightDRC = 0
2ChInRearLeftDRC = 0
2ChInRearRightDRC = 0
2ChInLFEDRC = 0

; Select output channels
2ChOutLeft = 1
2ChOutCenter = 0
2ChOutRight = 1
2ChOutRearLeft = 0
2ChOutRearRight = 0
2ChOutLFE = 0

; Output channel gain (-60db to 60db)
2ChOutLeftGain = 0
2ChOutCenterGain = 0
2ChOutRightGain = 0
2ChOutRearLeftGain = 0
2ChOutRearRightGain = 0
2ChOutLFEGain = 0

; Output channel DRC
; 0 - none
; 1 - light
; 2 - normal
; 3 - heavy
; 4 - inverse
2ChOutLeftDRC = 2
2ChOutCenterDRC = 0
2ChOutRightDRC = 2
2ChOutRearLeftDRC = 0
2ChOutRearRightDRC = 0
2ChOutLFEDRC = 0

; global gain, needed for one pass mode (-120db to 120db)
2ChGlobalGain = 0

; 0 - Mono
; 1 - Surround
; 2 - Stereo
; 3 - Surround 2
2ChDownmixType = 3

; Use 7kHz low-pass for rear channels?
2ChLowPassFilter = 0


; 4Ch Preset

; Select input channels
4ChInLeft = 1
4ChInCenter = 1
4ChInRight = 1
4ChInRearLeft = 1
4ChInRearRight = 1
4ChInLFE = 1

; Input channel gain (-60db to 60db)
4ChInLeftGain = 0
4ChInCenterGain = -3
4ChInRightGain = 0
4ChInRearLeftGain = 0
4ChInRearRightGain = 0
4ChInLFEGain = -3

; Input channel DRC
; 0 - none
; 1 - light
; 2 - normal
; 3 - heavy
; 4 - inverse
4ChInLeftDRC = 0
4ChInCenterDRC = 0
4ChInRightDRC = 0
4ChInRearLeftDRC = 0
4ChInRearRightDRC = 0
4ChInLFEDRC = 0

; Select output channels
4ChOutLeft = 1
4ChOutCenter = 0
4ChOutRight = 1
4ChOutRearLeft = 1
4ChOutRearRight = 1
4ChOutLFE = 0

; Output channel gain (-60db to 60db)
4ChOutLeftGain = 0
4ChOutCenterGain = 0
4ChOutRightGain = 0
4ChOutRearLeftGain = 0
4ChOutRearRightGain = 0
4ChOutLFEGain = 0

; Output channel DRC
; 0 - none
; 1 - light
; 2 - normal
; 3 - heavy
; 4 - inverse
4ChOutLeftDRC = 1
4ChOutCenterDRC = 0
4ChOutRightDRC = 1
4ChOutRearLeftDRC = 1
4ChOutRearRightDRC = 1
4ChOutLFEDRC = 0

; global gain, needed for one pass mode (-120db to 120db)
4ChGlobalGain = 0

; 0 - Mono
; 1 - Surround
; 2 - Stereo
; 3 - Surround 2
4ChDownmixType = 1

; Use 7kHz low-pass for rear channels?
4ChLowPassFilter = 0


; 6Ch Preset

; Select input channels
6ChInLeft = 1
6ChInCenter = 1
6ChInRight = 1
6ChInRearLeft = 1
6ChInRearRight = 1
6ChInLFE = 1

; Input channel gain (-60db to 60db)
6ChInLeftGain = 0
6ChInCenterGain = 0
6ChInRightGain = 0
6ChInRearLeftGain = 0
6ChInRearRightGain = 0
6ChInLFEGain = 0

; Input channel DRC
; 0 - none
; 1 - light
; 2 - normal
; 3 - heavy
; 4 - inverse
6ChInLeftDRC = 0
6ChInCenterDRC = 0
6ChInRightDRC = 0
6ChInRearLeftDRC = 0
6ChInRearRightDRC = 0
6ChInLFEDRC = 0

; Select output channels
6ChOutLeft = 1
6ChOutCenter = 1
6ChOutRight = 1
6ChOutRearLeft = 1
6ChOutRearRight = 1
6ChOutLFE = 1

; Output channel gain (-60db to 60db)
6ChOutLeftGain = 0
6ChOutCenterGain = 0
6ChOutRightGain = 0
6ChOutRearLeftGain = 0
6ChOutRearRightGain = 0
6ChOutLFEGain = 0

; Output channel DRC
; 0 - none
; 1 - light
; 2 - normal
; 3 - heavy
; 4 - inverse
6ChOutLeftDRC = 0
6ChOutCenterDRC = 0
6ChOutRightDRC = 0
6ChOutRearLeftDRC = 0
6ChOutRearRightDRC = 0
6ChOutLFEDRC = 0

; global gain, needed for one pass mode (-120db to 120db)
6ChGlobalGain = 0

; 0 - Mono
; 1 - Surround
; 2 - Stereo
; 3 - Surround 2
6ChDownmixType = 1

; Use 7kHz low-pass for rear channels?
6ChLowPassFilter = 0



; Lame defaults:

; 0-6 are alt settings, 7-22 are normal ones
LamePreset = 5

; Available modes:
; 0 - CBR
; 1 - VBR
; 2 - ABR
LameMode = 2

; allowed quality range: 9 (worst) -> 0 (best)
LameVBRQuality = 3

; allowed bitrate range: 0 (32kbps) -> 13 (320kbps)
LameMinBitrate = 0
LameMaxBitrate = 13

; allowed bitrate range: 32kbps -> 320kbps
LameAveBitrate = 112

; Lame channel encoding mode:
; 0 - stereo
; 1 - joint stereo
; 2 - dual channel
LameChannelMode = 1

LameCRC = 0
LameCopyright = 1
LameOriginal = 1
LamePrivate = 0


; Vorbis defaults:

; Available modes:
; 0 - CBR
; 1 - VBR
; 2 - ABR
VorbisMode = 1

; allowed quality range: 0 (worst) -> 1000 (best)
VorbisVBRQuality = 300

; allowed bitrate range: 0kbps -> 511kbps
VorbisMinBitrate = 0
VorbisNomBitrate = 112
VorbisMaxBitrate = 511

;multiplied by 10, range from 0 to 9990
; blank: uses default
VorbisLowpass =

VorbisHoldLowpass = 0


; MP2enc defaults:

; Available modes:
; 0 - CBR
; 1 - VBR
MP2encMode = 0

; allowed quality range: 9 (worst) -> 0 (best)
MP2encVBRQuality = 3

; allowed bitrate range: 0 (32kbps) -> 13 (320kbps)
MP2encMinBitrate = 4 <--- 64kbps

; MP2enc channel encoding mode:
; 0 - stereo
; 1 - joint stereo
; 2 - dual channel
MP2encChannelMode = 2

MP2encCRC = 1
MP2encCopyright = 1
MP2encOriginal = 1
MP2encPrivate = 0

MP2encNoPadding = 0
MP2encAncillary = 0

MP2encPsyModel = 2


; SSRC defaults:

UseSSRC = 0
SSRCFrequency = 1


; End
-BP
Reply With Quote
  #10  
06-04-2004, 05:56 PM
Prodater64 Prodater64 is offline
Free Member
 
Join Date: Mar 2003
Location: Palma de Mallorca - España
Posts: 2,925
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by black prince
...
This works GREAT!!!, thanks to Prodater64
Head.bat

Quote:
FOR %%A IN (f:\Temp\*.ac3) DO Headac3he.exe "%%A" -useini My.Template.ini
Thank you for the credits, but really you did your work better than I said. I gave you a line with some mistakes (now I know it).


--------------------------
Visit: Intermediate guide: MencodeMe/Win32 - Avisynth - MakeAvis by Prodater64.
Visit: KVCD - MencodeMe - Auxiliar Task - KVCD Docking Gate by Prodater64.
Visit: Mencoder scripting with AVSEdit and Guide for Multiple Files by Prodater64.
Visit: Mini-guide quick and easy - DVD to (S)KVCD with MencodeMe by Maurus.
Visit: Mencode-me: a newbie oriented GUI - 0.23 is out! by VMesquita.
--------------------------

Reply With Quote
  #11  
06-04-2004, 06:08 PM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
BP could you just compare an mp2 encoding done with Headac3he and Besweet set to mp2enc!
As this should result in the same quality as both use the same engines for de- and encoding. If not in besweet is set something wrong.

Just for testing!

If yes ... you simply could copy the commandline out of besweet and you wouldnt have such a work via templates etc.
Reply With Quote
  #12  
06-04-2004, 06:52 PM
black prince black prince is offline
Free Member
 
Join Date: Jul 2002
Posts: 1,224
Thanks: 0
Thanked 0 Times in 0 Posts
Inc wrote:
Quote:
BP could you just compare an mp2 encoding done with Headac3he and Besweet set to mp2enc!
As this should result in the same quality as both use the same engines for de- and encoding. If not in besweet is set something wrong.

Just for testing!

If yes ... you simply could copy the commandline out of besweet and you wouldnt have such a work via templates etc.
Sure But what version of BeSweet supports mp2enc I use
BeSweet v1.4 for now. Here's my commandline:

BeSweet.exe -core( -input "f:\Temp\MOVIE.ac3" -output "f:\Temp\MOVIE.mp2" ) -azid( -c normal -g 0.95 -L -3db ) -ssrc( --rate 44100 ) -boost( /b2=5 ) -toolame( -m s -b 64 -e )


-BP
Reply With Quote
  #13  
06-04-2004, 07:00 PM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
Quote:
Originally Posted by black prince
Sure But what version of BeSweet supports mp2enc I use
BeSweet v1.4 for now. Here's my commandline:

BeSweet.exe -core( -input "f:\Temp\MOVIE.ac3" -output "f:\Temp\MOVIE.mp2" ) -azid( -c normal -g 0.95 -L -3db ) -ssrc( --rate 44100 ) -boost( /b2=5 ) -toolame( -m s -b 64 -e )
As you see u still use toolame! And that Besweet is more than old!
Goto DSPgurus page and download the newest beta .. its also included in Packshot.

BTW: Besweet gots a nice more options! Like canging the speet without changing the tone! Do look in the readme and theres the new filter explained.
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
SweetHead and ToK J-Wo Audio Conversion 1 06-05-2003 11:27 AM
SweetHead Command line options hedix Audio Conversion 1 03-06-2003 12:32 PM
sweethead always selects the wrong parameters? Sergeiv Audio Conversion 2 11-15-2002 10:45 AM
Testing of SweetHead begins..... black prince Audio Conversion 8 11-01-2002 01:06 AM
SweetHead is out. Use HeadAC3he from DVD2SVCD kwag Video Encoding and Conversion 0 10-31-2002 11:18 AM

Thread Tools



 
All times are GMT -5. The time now is 12:46 PM  —  vBulletin © Jelsoft Enterprises Ltd