Quantcast Headac3he: Executing Headac3he from CLI ? - digitalFAQ.com Forums [Archives]
  #1  
10-26-2002, 07: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
Hi All,

I am trying to get Headac3he to execute from CLI in a batch file.
I use this format "Headac3he.exe infile.ac3 -userini my.ini" where userini is
a Headac3he profile ini file. The screen comes up fine and the
settings are perfect, but auto start and close won't work.

; 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


I set StartEnd = 3 and when Head comes up, it won't start unless you
click on the start button. If anyone knows please post me.

-black prince
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  
10-28-2002, 06:43 AM
black prince black prince is offline
Free Member
 
Join Date: Jul 2002
Posts: 1,224
Thanks: 0
Thanked 0 Times in 0 Posts
Hi All,

The batch command line parameters for Headac3he are:

Headac3he.exe start /w audio.ac3 -userini my.ini

my.ini can be created in Headac3he using "Settings-->save file".
Put the above in a batch file and your ready. In DVD2SVCD you
can select this batch file instead of BeSweet.exe and Head will
execute, but be sure to use D2S's audio file naming conventions.

-black prince
Reply With Quote
  #3  
10-28-2002, 09:19 AM
JeffS JeffS is offline
Free Member
 
Join Date: Aug 2002
Location: Chicago
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Back Prince,

First, YOU ROCK!!!!!
I've been looking for a way to use Headac3he instead of besweet
for d2s. This is great.

Second, what am I doing wrong?

I used your settings, I created an ini file and tried it with a short
.ac3 file. I executed it from the commandline, and headac3he
came up fine, and started working, but when it finished it
popped up a window saying that it was done, and it needed to
be clicked before it would go away. So close, yet so far.

also, was the /w start suposed to be in the command line?
when I had that in there it didn't want to run (unless I made a typo)

I'm using XP Pro.

thanks for any help,
and keep up the good work

-Jeff
Reply With Quote
  #4  
10-28-2002, 11:31 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 black prince
Hi All,

The batch command line parameters for Headac3he are:

Headac3he.exe start /w audio.ac3 -userini my.ini

my.ini can be created in Headac3he using "Settings-->save file".
Put the above in a batch file and your ready. In DVD2SVCD you
can select this batch file instead of BeSweet.exe and Head will
execute, but be sure to use D2S's audio file naming conventions.

-black prince
Thanks black prince,

Next stop: Creating a small program that parses DVD2SVCD's log file and creates the batch file on the fly. Then executing it. Then there's no need to create it or worry about file names
Then select this small program instead of BeSweet
I'll take a look at this later this evening, if time permits. If time permits, you'll have the executable later tonight ( But don't hold your breath )


-kwag
Reply With Quote
  #5  
10-28-2002, 04:20 PM
black prince black prince is offline
Free Member
 
Join Date: Jul 2002
Posts: 1,224
Thanks: 0
Thanked 0 Times in 0 Posts
Hi Jeffs,

I forgot to add, edit my.ini and Set Errordetail to 1 (or 2) and
StartEnd to 3.

-black prince
Reply With Quote
  #6  
10-28-2002, 06:06 PM
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
Hey black prince,

I just started coding about an hour ago. Here's what will happen: I've created an executable file called "SweetHead.exe" which is what you'll use to substitute BeSweet. Then on DVD2SVCD you select this binary file instead of BeSweet. There's no need for a batch file, because the program reads the command line arguments that DVD2SVCD supplies to the program, and SweetHead modifies a temporary working .INI file, on the fly! So basically it translates BeSweet parameters to HeadAC3he parameters. I'm currently testing the command line argument parsing, and hopefully I'll have something soon. ( Don't hold your breath, but I do recall that I launched KVCD.Net in less than 24 hours )
The program is currently working with "hard coded" parameters. So now I'm actually making the BeSweet to HeadAC3he conversion, so everything you select under the Audio section of DVD2SVCD, will be (hopefully) functional on HeadAC3he. This program is designed to work only with DVD2SVCD. It's not designed to work as a standalone application, as it relies on the command line structure that DVD2SVCD sends to BeSweet. This program will probably be obsolete the day DVD2SVCD does the same thing internally , but for the time being, we'll be able to use HeadAC3he automatically ( Unless DVD2SVCD decides to use it as a glue tool )

I'll keep everyone up to date in this thread.

-kwag
Reply With Quote
  #7  
10-28-2002, 10:37 PM
black prince black prince is offline
Free Member
 
Join Date: Jul 2002
Posts: 1,224
Thanks: 0
Thanked 0 Times in 0 Posts
Hi Kwag,

Kwag wrote:
Quote:
kwag Posted: Mon Oct 28, 2002 7:06 pm Post subject: SweetHead

--------------------------------------------------------------------------------

Hey black prince,

I just started coding about an hour ago. Here's what will happen: I've created an executable file called "SweetHead.exe" which is what you'll use to substitute BeSweet. Then on DVD2SVCD you select this binary file instead of BeSweet. There's no need for a batch file, because the program reads the command line arguments that DVD2SVCD supplies to the program, and SweetHead modifies a temporary working .INI file, on the fly! So basically it translates BeSweet parameters to HeadAC3he parameters. I'm currently testing the command line argument parsing, and hopefully I'll have something soon. ( Don't hold your breath, but I do recall that I launched KVCD.Net in less than 24 hours )
The program is currently working with "hard coded" parameters. So now I'm actually making the BeSweet to HeadAC3he conversion, so everything you select under the Audio section of DVD2SVCD, will be (hopefully) functional on HeadAC3he. This program is designed to work only with DVD2SVCD. It's not designed to work as a standalone application, as it relies on the command line structure that DVD2SVCD sends to BeSweet. This program will probably be obsolete the day DVD2SVCD does the same thing internally , but for the time being, we'll be able to use HeadAC3he automatically ( Unless DVD2SVCD decides to use it as a glue tool )

I'll keep everyone up to date in this thread.

-kwag
Very nice solution. I wondered how the audio selections would become
input to Headac3he. I hope this will get us closer to an automated process that
is on par quality wise with the manual one. Now if only something could
be done with FitCD and filesize predicting, then this would be fantastic.
For almost 85% of my LBR encodes I've been using the following avs script.

LoadPlugin("e:\dvd backup\2 - DVD2SVCD\mpeg2dec\mpeg2dec.dll")
mpeg2source("D:\Temp\movie.d2v")
BilinearResize(336,224,0,0,720,480)
TemporalSmoother(2,2)
AddBorders(8,8,8,8 )


I am wondering if a generic script like this could be default and if
selected FitCD would pop-up and allow for cut and past into to this.
It's just a thought.


-black prince
Reply With Quote
  #8  
10-28-2002, 11:24 PM
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 black prince
Very nice solution. I wondered how the audio selections would become
input to Headac3he. I hope this will get us closer to an automated process that
is on par quality wise with the manual one. Now if only something could
be done with FitCD and filesize predicting, then this would be fantastic.
For almost 85% of my LBR encodes I've been using the following avs script.

LoadPlugin("e:\dvd backup\2 - DVD2SVCD\mpeg2dec\mpeg2dec.dll")
mpeg2source("D:\Temp\movie.d2v")
BilinearResize(336,224,0,0,720,480)
TemporalSmoother(2,2)
AddBorders(8,8,8,8 )


I am wondering if a generic script like this could be default and if
selected FitCD would pop-up and allow for cut and past into to this.
It's just a thought.


-black prince
Hi black prince,

The audio is sent via command line parameters like this: -2lame( -e -b 128 -m d )
So when I parse the command line, I see the "-2lame" and read the parameters that follow. In this case, it would be 128Kbps. The complete line passed from DVD2SVCD to BeSweet is this:

"C:\Program Files\DVD2SVCD\BeSweet\BeSweet.exe" -core( -input "K:\Movie\Extracted_audio_1.ac3" -output "K:\Movie\Encoded_audio_1.mp2" -logfile "K:\Movie\Encoded_audio_1.log" ) -azid( -L -3db -c normal -s surround -g max ) -shibatch( --rate 44100 ) -2lame( -e -b 128 -m d )

So the complete information is in there, Just have to extract the parts and convert to HeadAC3he's equivalent parameters and set the variables in the .INI file. I thought I was going to be done with this tonight, but I'm busy with something else. As I said, I have it working "hard coded", but I really want it working fully dynamic, so it picks up the command line arguments and sets up HeadAC3he automatically. I'll work more on this tomorrow.
About your .avs script, looks very similar to the one I use
But I use TemporalSmoother(1,2) because I find 2,2 a little too strong, and causes ghosting if the source is already clean.
As a matter of fact, I use the LBR now almost 90% of the times. I did modify the MIN to 128Kbps, and MAX to 2,300Kbps for blockless pictures
And I still fit over 120 minutes with quality above VCD. Havent tried a 180 minute lately with those settings.

-kwag
Reply With Quote
  #9  
10-29-2002, 04:51 PM
black prince black prince is offline
Free Member
 
Join Date: Jul 2002
Posts: 1,224
Thanks: 0
Thanked 0 Times in 0 Posts
Hi Kwag,

Quote:
But I use TemporalSmoother(1,2) because I find 2,2 a little too strong, and causes ghosting if the source is already clean.
Do you mean TemporalSmoother(2,1)?

What program are you using to convert BeSweet command line parms
to Headac3he ini file? I'd like to give it a try.

Finally, how can I change dvd2svcd.ini avs script defaults with my
own? I appears very criptic in the file and how can I change preview
avs script also?

thankx

-black prince
Reply With Quote
  #10  
10-29-2002, 06:58 PM
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 black prince
Hi Kwag,

Quote:
But I use TemporalSmoother(1,2) because I find 2,2 a little too strong, and causes ghosting if the source is already clean.
Do you mean TemporalSmoother(2,1)?
No. TemporalSmoother(1,2)

Quote:
What program are you using to convert BeSweet command line parms
to Headac3he ini file? I'd like to give it a try.
I'm writing it myself

Quote:
Finally, how can I change dvd2svcd.ini avs script defaults with my
own? I appears very criptic in the file and how can I change preview
avs script also?
You would have to write a program to do it. That's what I'm doing.

-kwag
Reply With Quote
  #11  
10-30-2002, 03:37 AM
jorel jorel is offline
Invalid Email / Banned / Spammer
 
Join Date: Aug 2002
Location: Brasil - MG - third stone from the sun
Posts: 5,570
Thanks: 0
Thanked 0 Times in 0 Posts
i was waiting for this..........
Reply With Quote
  #12  
10-30-2002, 12:52 PM
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
I have basically finished the program. The only problem that I have encountered is that when HeadAC3he finishes, it pops up the "Finished!" button, and waits until you hit "OK". So I'm working with that now. I'll try pushing this out the door today, if I get a workaround for this. If not, I'll post it later today anyway, so that everyone can try it, with a small readme.txt file on how to use it ( which is extremely simple ).

-kwag
Reply With Quote
  #13  
10-30-2002, 02:08 PM
black prince black prince is offline
Free Member
 
Join Date: Jul 2002
Posts: 1,224
Thanks: 0
Thanked 0 Times in 0 Posts
Hi Kwag,

Black prince wrote:
Quote:
Hi Jeffs,

I forgot to add, edit my.ini and Set Errordetail to 1 (or 2) and
StartEnd to 3.

-black prince
Some how you need to change Errordetail to 1 (or 2) for
Headac3he to completely close.

-black prince
Reply With Quote
  #14  
10-30-2002, 03:44 PM
JeffS JeffS is offline
Free Member
 
Join Date: Aug 2002
Location: Chicago
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by kwag
I have basically finished the program. The only problem that I have encountered is that when HeadAC3he finishes, it pops up the "Finished!" button, and waits until you hit "OK". So I'm working with that now. I'll try pushing this out the door today, if I get a workaround for this. If not, I'll post it later today anyway, so that everyone can try it, with a small readme.txt file on how to use it ( which is extremely simple ).

-kwag
Kwag,

There is an option in the .ini file for ConfirmClose. Set this to 0
and you're all set.

-Jeff
Reply With Quote
  #15  
10-30-2002, 06:40 PM
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 black prince
Some how you need to change Errordetail to 1 (or 2) for
Headac3he to completely close.

-black prince
AAHHHHHH!! Thanks so much black prince,

My head hurts for the last two hours trying to figure how to close the damn program . I was just about to give up!. I set Errordetail to 2, and it closes perfectly. Now I only have one thing, which I believe is a bug in Headac3he. If you run from command line, for example C:\headac3he\headac3he.exe c:\temp\INPUTfile.ac3 c:\temp\OUTPUTfile.mp2 -useini c:\headac3he\HeadAC3he.INI
when the program starts, the input file name is the same as the output file name This is with version 0.23a. No matter what I do, the file names are the same. This presents a problem because DVD2SVCD normally sends Extracted_audio_1.ac3 as input file name, and Encoded_audio_1.mp2 as output file name. So if I can't get this one working, I'm probably going to have to do a rename of the output file name before I exit my program. Thanks for "unsticking" me from the wall

-kwag
Reply With Quote
  #16  
10-30-2002, 06:42 PM
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 JeffS
Quote:
Originally Posted by kwag
I have basically finished the program. The only problem that I have encountered is that when HeadAC3he finishes, it pops up the "Finished!" button, and waits until you hit "OK". So I'm working with that now. I'll try pushing this out the door today, if I get a workaround for this. If not, I'll post it later today anyway, so that everyone can try it, with a small readme.txt file on how to use it ( which is extremely simple ).

-kwag
Kwag,

There is an option in the .ini file for ConfirmClose. Set this to 0
and you're all set.

-Jeff
Thanks JeffS,

Read your post after I read black prince. I did have this already at 0, and still didn't close the program. Setting the Error-details to 2 did the trick.

Thanks,
-kwag
Reply With Quote
  #17  
10-30-2002, 07:26 PM
black prince black prince is offline
Free Member
 
Join Date: Jul 2002
Posts: 1,224
Thanks: 0
Thanked 0 Times in 0 Posts
Hi Kwag,

There are 3 command line formats for Headac3he. If you go into
MSDos and change directory to where Headac3he is located.
Then enter this command Headac3he /? , you will see the 3 different
commandline formats. The one you need looks like this:

Headac3he.exe start /w [input file].ac3 [output file].mp2 -userini my.ini

Now you can hard code the input/output file names without renameing
them. See if this works.

-black prince
Reply With Quote
  #18  
10-30-2002, 10:23 PM
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
SweetHead topic moved here: http://www.kvcd.net/forum/viewtopic.php?p=7816#7816

-kwag
Reply With Quote
  #19  
10-31-2002, 10:18 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
I fixed a problem with the .INI file. Please download version 0.99a. You may delete the file "HeadAC3he.INI.Template" because the new one is HeadAC3he.Template.INI. This way the file name now shows when you try lo "Load" a .INI from within HeadAC3he.
Also, addes the small icon

-kwag
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
HeadAC3he: Does HeadAc3he auto-fix ac3 delays on conversion? Fluffbutt Audio Conversion 2 04-27-2004 11:53 AM
HeadAC3he: Headac3he crashing in XP pro, codec issue? Max0d Audio Conversion 2 02-03-2004 11:42 AM
HeadAC3he: HeadAC3he only loads or recognizes half of the file? Raynaldo Audio Conversion 4 05-27-2003 09:40 PM
HeadAC3he: HeadAC3he doesn't convert MPG or WAV audio properly! PyRoMaNiA Audio Conversion 5 04-21-2003 03:52 PM
HeadAC3he: Empty archive after downloading HeadAC3he?? Help!! Reno Audio Conversion 6 04-09-2003 04:37 PM

Thread Tools



 
All times are GMT -5. The time now is 01:36 PM  —  vBulletin Jelsoft Enterprises Ltd