Log in

View Full Version : Command Line Option


iGillan
30th January 2005, 20:17
Hi

I'm looking to automate as best as possible the process of creating DivX content.

I know there is a command line option for DVD2AVI. That works fine but is there an equivalent for Gordian Knot?

I'd greatly appreciate any advice in this area. I'm assuming that Gordian Knot basicly runs scripts for both BeSweet and VirtualDubMod when doing DivX 2-pass encoding.

Any pointers would be greatly appreciated.

Thanks in Advance

Ian Gillan :)

iGillan
31st January 2005, 01:20
C'mon someone must have some info on this!


Please assist!

Cheers

Ian :cool:

len0x
31st January 2005, 12:21
First, be patient.
Second, GK was coded as a manual GUI application, so for CLI variant of you would have to code yourself...

iGillan
2nd February 2005, 20:49
Thanks for the reply len0x and yes yer right I didn't realise just how impatient I'd been!

So far I have managed to recreate through GK documentation the following:

1. DVD2AVI (cmd line)
2. BeSweet (cmd line)

For producing the necessary .avs file I've been using the result of a GK file with the following:

# PLUGINS
LoadPlugin("C:\PROGRA~1\GORDIA~1\mpeg2dec3.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\undot.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\SimpleResize.dll")
#
# SOURCE
mpeg2source("F:\PostManPat\POSTMANPAT.d2v")
# CROPPING
crop(0,0,720,576)
# RESIZING
SimpleResize(384,288)
#
Undot()

I simply alter the mpeg2source file.

For running the necessary Scripts within VirualDubMod again I have been making use of GK results (Firstpass, Secondpass & append):

// VirtualDub job list (Sylia script format)
// This is a program generated file -- edit at your own risk.
//
// $numjobs 1
//

// $job "DivX5-First Pass"
// $input "F:\PostManPat\POSTMANPAT.avs"
// $output "F:\PostManPat\POSTMANPAT_Movie.avi"
// $state 0
// $start_time 0 0
// $end_time 0 0
// $script

VirtualDub.Open("F:\\PostManPat\\POSTMANPAT.avs",0,0);
VirtualDub.video.SetDepth(24,24);
VirtualDub.video.SetMode(1);
VirtualDub.video.SetFrameRate(0,1);
VirtualDub.video.SetIVTC(0,0,-1,0);
VirtualDub.video.SetRange(0,0);
VirtualDub.video.SetCompression(0x78766964,0,10000,0);
VirtualDub.video.filters.Clear();
VirtualDub.subset.Delete();
VirtualDub.SaveAVI("F:\\PostManPat\\POSTMANPAT_Movie.avi");
VirtualDub.Close();

// $endjob
//
//--------------------------------------------------
// $done

Again making the necssary adjustments for these files.

Having done this steps 3,4 and 5 are jobs run within VirtualDubMod.

Cmd line VirtualDubMod.exe /s"PostManPat_Job1.vcf" /x

At least I'm able so far to mimic the steps involved but know I'm failing to encode the resulting file correctly.

I assume that I'm failing to encode DivX as GK must be making use of the PostmanPat_firstpass.settings & PostmanPat_secondpass.settings files.

If you could elaborate on where I'm going wrong I'd greatly appreciate it. If I can get this working I'm sure others would benefit from this effort.

Thanks again

Ian ;)

len0x
2nd February 2005, 22:19
*.settings are win registry files that contain codec settings. You will obviously not be able to apply the same setting for every movie.

iGillan
2nd February 2005, 22:58
I noticed they were registry entries but I'm just trying to re-encode a stream that will always be the same.

Of course I could make registry changes for logging, etc for DivX.

I'm just intending re-encoding WinTV PVR captured content. I know there is a Plextor capture unit for DivX content but I'm hoping that doing it this way I get better quality.

The stream is always the same. I may eventually venture into removing black border stuff but at this stage I'm just hoping to automate the process so whenever a programme has ended my utility (GK equivalent) will simply reprocess the file to DivX.

I believe I'm perhaps overlooking exactly how to use VirtualDubMod for 2pass encoding and then adding on the mp3 audio. I thought it may well have been in my command line or I'm failing to script it correctly to ensure that the file is encoded to DivX. Either way I'd greatly appreciate mimicking GK for this.

If you can enlighten me to what I'm missing out in here that would be great.

Cheers

Ian

len0x
3rd February 2005, 00:10
Frankly, as you don't seem to have enough knowledge to troubleshoot your problems I suggest using ready made solutions for encoding and not bother writing a new one (that why GK/AGK were written in the first place).

iGillan
3rd February 2005, 00:57
I thought these forums were designed for the sharing of knowledge. I'll manage to solve my problem. I always have before but I thought I'd take the opportunity to ask a well established and respected online community for a few pointers in this direction.

Clearly I've misjudged you on this occasion.

Sorry to have troubled you.

Ian :devil:

iGillan
3rd February 2005, 02:50
Problem solved by adding in

VirtualDub.video.SetCompData

to the VirtualDubMod scripts.

Thought you may want to know if yer HEID isn't too big!