Log in

View Full Version : HC newb can't use batch


wackman
9th October 2005, 12:20
Hey everyone,

I've just recently (tonight, actually) discovered and played around with HCEnc. I wanted to let it do some batch encoding of a few movies while I slept. I just can't get it to work.

I have one directory where I put all the files in, d:\movies-encode. In that directory, I have all my video files (an .mp4, an .avi and an .mpg), their .avs files, and .ini files.

EX:

movies.bat (used a post here as a template):


@echo off
color 17
title My Batchlist

start "HC-Batch" /wait HCbatch_015A.exe "-ini" "D:\movies-encode\peter.ini" "-i" "D:\movies-encode\peter.ini" "-o" "D:\movies-encode\peter.m2v" "-log" "D:\movies-encode\peter.log" "-b" "5500" "-maxbitrate" "8500"


then peter.ini

-------------------------------
HC.ini template
These commands are required
Use full pathnames and just use the bitrate you want
-------------------------------
*INFILE d:\movies-encode\peter.avs
*OUTFILE d:\movies-encode\peter.m2v
*BITRATE 5500
*MAXBITRATE 8500
-------------------------------
Next commands are optional,
putting a space for it disables a command
Not all commands are shown here,
see the manual for a complete list and default values
-------------------------------
*logfile d:\....\test.log
*MATRIX qlb
*PROFILE best
*ASPECT 4:3
*BIAS 30
*cpu auto
*shutdown
*gop 15 2
*interlaced
*tff
*CLOSEDGOPS
*CQ 6.3
*cq_maxbitrate 7.6
*DC_PREC 10
*frames 100 200
*custommatrix
8 16 19 22 26 27 29 34
16 16 22 24 27 29 34 37
19 22 26 27 29 34 34 38
22 22 26 27 29 34 37 40
22 26 27 29 32 35 40 48
26 27 29 32 35 40 48 58
26 27 29 34 38 46 56 69
27 29 35 38 46 56 69 83

16 17 18 19 20 21 22 23
17 18 19 20 21 22 23 24
18 19 20 21 22 23 24 25
19 20 21 22 23 24 26 27
20 21 22 23 25 26 27 28
21 22 23 24 26 27 28 30
22 23 24 26 27 28 30 31
23 24 25 27 28 30 31 33
*chapter 3
12000
13345
18758


then peter.avs:

DirectShowSource("D:\movies-encode\peter.mp4")
ConvertToYV12()
AddBorders(0,40,0,40)


I've tried it by specifying the path (even though everything's in the same directory), and without the path. No matter what, the batch file pops up the batch screen, it shows most of the settings in the upper right and upper left boxes, but down below in the status fields, it says it has no .avs or .d2v input, even though I'm positive I got the paths and filenames right. I even went to start->run and entered the entire path/filename and it opened the files up.

As a last ditch effort, I tried the preview of version 16. Same errors.

So for now, I'll just do the regular HC and worry about the batch version tomorrow.

Thanks all.

Wackman

Boulder
9th October 2005, 15:47
Your problem is most likely DirectShowSource.

andythomas
15th November 2005, 10:37
I'm also having a problem with batch encoding. I'm using a VERY simple bat file to encode multiple files :
HCbatch -i C:\MPEG2\9.avs -o C:\MPEG2\9.m2v -b 2500 -maxbitrate 5000 -profile best
HCbatch -i C:\MPEG2\10.avs -o C:\MPEG2\10.m2v -b 2500 -maxbitrate 5000 -profile best
HCbatch -i C:\MPEG2\16.avs -o C:\MPEG2\16.m2v -b 2500 -maxbitrate 5000 -profile best

After each encoding process has finished though, I get an error box which I have to click on before the next process starts - thus I might as well start each on manually !

The error is (something like - numbers can change):
The instruction at "0x08968bfc" referenced memory at "0x08753f00". The memory could not be "read". Click on OK to terminate the program.

Then the next encoding process starts.
Am I missing something important from my bat file (wait command) ?
Thanks.

Boulder
15th November 2005, 11:00
See this: http://forum.doom9.org/showthread.php?t=99163

Prodater64
15th November 2005, 13:09
See this: http://forum.doom9.org/showthread.php?t=99163


Updated: Better than this method: http://forum.doom9.org/showthread.php?t=99156

That is for english XP OS.
If somebody want it in another language, just ask for it.

Prodater64
15th November 2005, 13:16
Wackman, there are some switches that you can set in the ini file.
Also you could encode differents films with differents settings writing an ini file for each one. You can see the command line in:

http://forum.doom9.org/showthread.php?p=692791#post692791

:cool:

dragongodz
15th November 2005, 15:31
important little tip. if you have not already done so then DO upgrade to avisynth 2.5.6 since it fixes some problems with directshowsource().

andythomas
15th November 2005, 17:58
Thanks for VERY prompt replies with what looks to be a solution !
TMPGenc was taking about 9hrs for each encode, whilst HC only takes 2hrs.
With batch encoding this could save me DAYS !!!
Thanks again

Prodater64
15th November 2005, 20:33
Thanks for VERY prompt replies with what looks to be a solution !
TMPGenc was taking about 9hrs for each encode, whilst HC only takes 2hrs.
With batch encoding this could save me DAYS !!!
Thanks again


Your welcome.

andythomas
19th November 2005, 18:20
I've downloaded Kill-Error.zip, extracted contents and modified kill-error.bat for the new HCbatch 0.16 to read :

@echo off
rem I like this color
color 17
Title HC Encoder error killer by Prodater64

:cmdow
timeout 10>nul
for /f "tokens=8*" %%I in ('cmdow') do (
if "%%I" equ "HCbatch 0.16 beta - by hank315: HCbatch_016.exe - Application Error" (
cmdow "HCbatch 0.16 beta - by hank315: HCbatch_016.exe - Application Error" /cls & goto :cmdow
)
)
goto :cmdow

I run the bat file (blue dos screen appears).
I then run my HC bat file :
HCbatch_016.exe -i C:\MPEG2\test1.avs -o C:\MPEG2\test1.m2v -b 1500 -maxbitrate 3000
HCbatch_016.exe -i C:\MPEG2\test2.avs -o C:\MPEG2\test2.m2v -b 2500 -maxbitrate 5000

And as usual, I get the memory could not be "read" error.
But nothing happens - the error window doesn't disappear !

Full screen capture : http://www.ajt.org.uk/HC_Batch_016-error[full].gif

I've tested this, with the same results on 3 different PC's.

Please help ?

Prodater64
22nd November 2005, 09:23
I've downloaded Kill-Error.zip, extracted contents and modified kill-error.bat for the new HCbatch 0.16 to read :

@echo off
rem I like this color
color 17
Title HC Encoder error killer by Prodater64

:cmdow
timeout 10>nul
for /f "tokens=8*" %%I in ('cmdow') do (
if "%%I" equ "HCbatch 0.16 beta - by hank315: HCbatch_016.exe - Application Error" (
cmdow "HCbatch 0.16 beta - by hank315: HCbatch_016.exe - Application Error" /cls & goto :cmdow
)
)
goto :cmdow

I run the bat file (blue dos screen appears).
I then run my HC bat file :
HCbatch_016.exe -i C:\MPEG2\test1.avs -o C:\MPEG2\test1.m2v -b 1500 -maxbitrate 3000
HCbatch_016.exe -i C:\MPEG2\test2.avs -o C:\MPEG2\test2.m2v -b 2500 -maxbitrate 5000

And as usual, I get the memory could not be "read" error.
But nothing happens - the error window doesn't disappear !

Full screen capture : http://www.ajt.org.uk/HC_Batch_016-error[full].gif

I've tested this, with the same results on 3 different PC's.

Please help ?


You downloaded the old method.
If your system is in english language download: http://rapidshare.de/files/4553406/Kill-error_en.zip.html

There is no more bat file, just an exe one.

If you have any other language in your OS, just tell me it and i will give you the correct version.

andythomas
26th November 2005, 12:10
Prodater64, you're a star !

The "new" version you suggested works perfectly.

Thanks again...

Prodater64
27th November 2005, 01:30
Prodater64, you're a star !

The "new" version you suggested works perfectly.

Thanks again...

Your welcome.
JFYI, the program is resident, it will protect you not only against HC error, but against any program that gives same error.
You can unload it from Windows task manager. When you close or restart Windows, the program will ask you if you want to close it.

See you.

twinkysaurus
5th December 2005, 11:00
*gasp* Didn't know there was a newer version Prod, and thanks :D