command line question

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
zapdafish
New Cone
New Cone
Posts: 2
Joined: 30 Jul 2009 23:02

command line question

Postby zapdafish » 30 Jul 2009 23:06

I am trying to write a program that uses VLC to convert a batch of movies to flash videos. My problem is the executable seems to spawn a separate process so that I am unable to detect that it has finished. Anyone got a way to prevent this from happening?

thanks

thannoy
Big Cone-huna
Big Cone-huna
Posts: 601
Joined: 20 Mar 2008 09:44
VLC version: 0.9.8a & 1.0-git
Operating System: GNU/Linux Fedora10
Location: France
Contact:

Re: command line question

Postby thannoy » 31 Jul 2009 11:06

When starting VLC from a batch file for example, each line are executed one after the other so it is ok (when VLC closes itself, but there is vlc://quit for that)

Using another way to launch VLC, it depends the way you launch VLC. You should be able to find a way to launch it as your needs (maybe system() command in C language or other)

You can otherwise try to use either
- --pidfile filename option. VLC will write its process id into this file and you can probably check if this ID it running or not from time to time
- look at souted file and check when it stops growing or when it is accessible with fopen

kryptonite
Blank Cone
Blank Cone
Posts: 52
Joined: 22 May 2009 12:01

Re: command line question

Postby kryptonite » 31 Jul 2009 11:15

In Java, you could use the Runtime & Process classes to spawn a process and then check the state/wait for it to complete.


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 43 guests