PDA

View Full Version : ProjectX Postprocess commands


FreQi
14th March 2007, 02:09
In the settings for ProjectX, there's a postprocess section that has me believing it is possible to launch a program after ProjectX is done working. However, I have found no documentation on how it works or what options I have (variables, etc).

I would like to launch DGIndex to process the .m2v as soon as pjx is done demuxing, but I dunno how. Does anyone else?

Pookie
14th March 2007, 03:50
Hi there. Nice Project X v0.9 guide - I suspect it'll be a popular read, as the docs for that app are sparse.

I don't know the answer to your question, but have you considered the workaround of creating a batch file that would demux using Project X at the command line, then running DGindex in batch mode on the resulting m2v ? I used to do it that way with rev 01 of v0.9, but now I prefer Xport by DrMpeg for demuxing (that's one fast demuxer. Accurate, too)

Syntax was something like (and I think it may have changed in rev 004)

projectx.exe -in "G:\directory\capture.tp" -demux -out G:\directory2\ -name cap -id 0x34,0x31

FreQi
14th March 2007, 04:34
I guess I thought about it, but it just looks like the thing has this built-in, so I don't really want to give up on it yet. Plus I do the commercial trimming in pjx, so I would need to know how to load trim files or something, and that just seems like more work than launching dgindex to drap-n-drop and hitting F4.

Maybe I need to learn a little java and take a look-see at the code.

FreQi
20th March 2007, 00:24
After reading through the java code for ProjectX, I found that the post processing command seems a bit limiting, but it works. The only thing I tested was the postprocessing Demux command.

I wanted to make pjx launch and run DGIndex on the m2v it made. Unfortunatly, the post commands don't seem to allow you to pass arguments to your executible. Anything you type in there seems to be considered the fully qualified path to the executible file. So if you put in "c:\some\thing.exe -args" it thinks "thing.exe -args" is a file name. So you're really limited to just launching a file (well, almost).

There is one argument that you can pass to your executile. If you put a trailing " ?" followed by a number, projectx will replace it with the name(s) of your output file(s). For example...

If you demux a set of files and set the output name to "bleh." and you put this in your demux post processing command:

c:\dgindex.exe ?1

pjx will launch dgindex and pass it the name of your m2v file. Because DGIndex is pretty graceful, it will open the m2v, but it doesn't do anything else. The only other arguments that you can use in pjx that I tried were ?2 which passed the AC3 file and ?0 which passed both files (the m2v and the ac3) as arguments to the executible. I don't know if there is a ?3 or ?4 or more, but I didn't try either.

It also doesn't seem to make much of a difference if you put quotes around your executible file name either. So if you run from c:\program files, you can put it in quotes, or not, it doesn't matter.

So what good does this do? I guess it eliminates the step of opening dgindex and loading the file... not really all that significant, but there it is. I'm thinking about writting a "DGIndex launcher" of some type that would read the dgindex settings/args from a file and take the input from command line. That should keep it flexble enough. Any volunteers want to make that instead? I can give you more details on the wish list ;]

Pookie
20th March 2007, 01:00
What about asking DVB Matt? Perhaps he'll add it to the next revision... (a more robust app launcher in ProjectX). Or perhaps he can update the built in D2V creator to be more compatible with more recent DGdecode(s). Let him know about your English documentation as well :)

squid_80
20th March 2007, 11:03
What about just putting the full dgindex demux command line in a batch file and putting that in projectx?

FreQi
21st March 2007, 17:39
What about just putting the full dgindex demux command line in a batch file and putting that in projectx?

That was the first thing I tried actually, but it doesn't seem to run .cmd or .bat files. I assume that is because projectx runs inside the java virtual machine, and it has no awareness of the windows environment. Since a batch file is just a text file script and not an executable binary, java has no idea what to do with it. I tried using cmd.exe (and "start") to pass the batch file as an argument, but as I mentioned earlier, pjx takes the whole string as a path to an executable file, so it also fails. The only real options I see is to modify the ProjectX code, or to create an "app launcher" that projectx can call and let the launcher pass the args.

@Pookie
Looks like dvb.matt has only made 7 posts since 2004, so he's not real active here. Is there someplace else I should look or just fire off a PM?

Pookie
21st March 2007, 20:32
http://forum.dvbtechnics.info/forumdisplay.php?f=16

FreQi
29th March 2007, 06:10
After a couple quick PM's with dvb.matt, it turns out there already exists a solution like the one I was describing.

you probably need a launcher (e.g. launch.exe preceeding the command line).
http://forum.dvbtechnics.info/showpost.php?p=15262&postcount=3

So after some trial and error, I managed to write a batch script that works with the launcher to suit my needs. I want to test it out some more, but I'll post a guide on using ProjectX that's sort of a setup companion and extension to the one on my web site (http://freqi.net/tutorials/projectx/).

Pookie
29th March 2007, 06:59
Glad to hear it worked out :)

FreQi
29th March 2007, 08:35
Thanks, it really did, and here's the full "guide" on how I do it now.

http://forum.doom9.org/showthread.php?p=976687#post976687

Jim_IT
31st March 2007, 21:38
Thanks for all the hard work FreQi. Now I just need to see if I can get it to run FFMPEG commandline options.

Jim