Printable Version of Topic
Click here to view this topic in its original format
Unofficial VirtualDub Support Forums > Testing / Bug Reports > Command Line Error: Not In Capture Model


Posted by: leoncheong Jan 30 2011, 03:06 PM
Hi,

I get the above error if I issue the following command:

VirtualDub /capture ... via the CreateProcess call

This is not an issues if the same command is issued via cmd windows.

CreateProcess call will work for Vdub.exe /capture... too.

I also noted this does not occour for version 1.7.0. It will happer for version 1.7.2 and late version.

I am using Windows XP SP3.

Regards
Leon

Posted by: phaeron Feb 5 2011, 07:30 PM
vdub.exe launches VirtualDub.exe with CreateProcess(), so that's not it. The error means that VirtualDub didn't see the /capture switch, which implies there is a problem with the way that lpCmdLine is formatted. Did you include the program name (the argv[0] entry)?

Posted by: leoncheong May 2 2012, 02:40 PM
The function call to CreateProcess() is excatually the same for vdub and VirtualDub.exe. So yes, I did include the program name.

Posted by: phaeron May 6 2012, 09:33 PM
Could you post the strings that you are passing to CreateProcess() for the lpApplicationName and lpCommandLine? You can x out any sensitive names, but I'm interested in the exact positioning of spaces, slashes, and quotation marks.

Posted by: panterasilente Oct 11 2012, 11:05 AM
Hello everybody,
I'm new of this forum.
I have a problem with Vdub command line...
my problem is that I cannot set external plugin filter in capture mode.

for example, in my prompt I write: <vdub /capture /capfile "prova.avi" /F"plugins/alidator.vdf" /capstart>

VDub capture the file prova.avi but without set the filter...

If I do that without command line it works.

any suggestion?

Thanks in advance


Posted by: phaeron Oct 13 2012, 08:13 PM
Try putting the /F switch first -- switches are generally processed in order.

Posted by: leoncheong Nov 10 2012, 10:18 AM
QUOTE (phaeron @ May 6 2012, 09:33 PM)
Could you post the strings that you are passing to CreateProcess() for the lpApplicationName and lpCommandLine? You can x out any sensitive names, but I'm interested in the exact positioning of spaces, slashes, and quotation marks.

Sorry, I miss your post. Here you go.

The code:

CODE
hProcess=thread->launchViaCreateProcess(thread->m_sCommand, thread->m_sPara/*, thread->m_ProcessPriority*/);
TRACE(_T("m_sCommand: %s m_sPara: %s\n"),thread->m_sCommand, thread->m_sPara);


The output
CODE
m_sCommand: C:\VirtualDub-1.7.2\vdub.exe m_sPara:  /capture  /capdevice  file  /capfileinc "C:\VCR(2012-11-10 at 18-10-12).avi" /capstart "768s"


Just to be clear, this is the code that works. if I were to use VirtualDub.exe, I'll get the error "Command line error: not in capture mode"

Posted by: phaeron Nov 11 2012, 04:17 AM
By convention, you're supposed to repeat the program name as the first argument in the command line. What you have probably happens to work with vdub.exe because of the space at the beginning of the command line, but the parser in VirtualDub.exe ignores that whitespace and thus it is getting /capture as argv[0].

Posted by: leoncheong Nov 20 2012, 03:14 PM
Sorry, I am not following...

Are you saying that it should be as below?

CODE
m_sCommand:C:\VirtualDub-1.7.2\VirtualDub.exe
m_sPara:VirtualDub.exe /capture  /capdevice  file  /capfileinc "C:\VCR(2012-11-10 at 18-10-12).avi" /capstart "768s"

Posted by: phaeron Nov 24 2012, 08:48 PM
Not quite, you actually want the full path, i.e.:
CODE

"C:\VirtualDub-1.7.2\VirtualDub.exe" /capture  /capdevice  file  /capfileinc "C:\VCR(2012-11-10 at 18-10-12).avi" /capstart "768s"


Powered by Invision Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)