digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Audio Conversion (http://www.digitalfaq.com/archives/audio/)
-   -   HeadAC3he: Executing Headac3he from CLI ? (http://www.digitalfaq.com/archives/audio/1430-headac3he-executing-headac3he.html)

black prince 10-26-2002 07:52 PM

HeadAC3he: Executing Headac3he from CLI ?
 
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

black prince 10-28-2002 06:43 AM

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

JeffS 10-28-2002 09:19 AM

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

kwag 10-28-2002 11:31 AM

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 :idea:
Then select this small program instead of BeSweet :idea: :wink:
I'll take a look at this later this evening, if time permits. If time permits, you'll have the executable later tonight 8O ( But don't hold your breath :lol: )


-kwag

black prince 10-28-2002 04:20 PM

Hi Jeffs,

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

-black prince

kwag 10-28-2002 06:06 PM

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" :lol: 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 ) :wink:
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 :cry: , but for the time being, we'll be able to use HeadAC3he automatically :D ( Unless DVD2SVCD decides to use it as a glue tool :wink: )

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

-kwag

black prince 10-28-2002 10:37 PM

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. :D
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. :roll:


-black prince

kwag 10-28-2002 11:24 PM

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. :D
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. :roll:


-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 :D
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. :idea:

-kwag

black prince 10-29-2002 04:51 PM

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

kwag 10-29-2002 06:58 PM

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 :wink:

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

jorel 10-30-2002 03:37 AM

i was waiting for this..........
8)

kwag 10-30-2002 12:52 PM

SweetHead.exe
 
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

black prince 10-30-2002 02:08 PM

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

JeffS 10-30-2002 03:44 PM

Re: SweetHead.exe
 
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

kwag 10-30-2002 06:40 PM

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 8O . 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 8O 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 :wink:

-kwag

kwag 10-30-2002 06:42 PM

Re: SweetHead.exe
 
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

black prince 10-30-2002 07:26 PM

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

kwag 10-30-2002 10:23 PM

First release of SweetHead ( Current version 0.99a )
 
SweetHead topic moved here: http://www.kvcd.net/forum/viewtopic.php?p=7816#7816

-kwag

kwag 10-31-2002 10:18 AM

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


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

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.