PDA

View Full Version : [vb] running spumux from VB


Nocturno
12th July 2005, 20:23
Hi all, i'm having some trouble running spumux (dvdauthor package) from vb.. probably because of the pipe in the commandline syntax

for example.. this:
Spumux.exe -m dvd -s 0 "E:\avi2dvdtest\test2\Spumux0.xml" <"E:\avi2dvdtest\test2\muxed0.mpg" >"E:\avi2dvdtest\test2\muxedsub0.mpg"

works fine from a batch file, but not from my different approaches in vb.
i tried a simple Shell() command.. it failed
i tried advanced Shellandwait (http://www.vb-helper.com/howto_shell_wait.html) routine , but that didn't work either.
my own routine using the CreateProcessA api failed too

any ideas? could i compile spumux in a way it takes dos commandline input easily?

thanx .. Noc

Doom9
13th July 2005, 16:30
can't you redirect stdin and stdout of a process you're launching? I know that works in VB.NET (and a lot of other languages). Alternatively, instead of running the application itself, write a batch file and launch that.. I've run two applications that pipe data to each other that way.

Nocturno
13th July 2005, 17:22
write a batch file and launch that..

i tried that, it started spumux, but spumux never started working on the files,it just stayed at it's subtitle detection screen.

i'll try piping in vb, i found some stuff about it..

Dark-Cracker
13th July 2005, 19:53
the most easy solution is to create a .bat file with the command line and use a shell to lanch it. and in the .bat file use :

@echo off
spumux....
CLS

hope this help.

++

Doom9
13th July 2005, 20:07
@Dark-Cracker: I think you missed his reply.. though I also have trouble believing that this wouldn't work as I've done it myself with avs2yuv writing to stdout, and piping that into the stdin from mencoder.. it used to work just fine until mencoder got direct AviSynth input, at which point I scrapped the batchfile solution.

Nocturno
14th July 2005, 09:59
Thanx guy's for the help, i got it to work trough my createprocessa api with a batch file now. just a pitty i couldn't get it to work without the batch file. that's why i used the createprocess api in the first place.

i think it failed because i used a start / wait in my old batchfile for testing with a Shellandwait command

Dark-Cracker
14th July 2005, 15:27
oups it right i have not fully read is first post :)
but i am happy u have solve your problem :)

++