Stopping VLC

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.
gamename
New Cone
New Cone
Posts: 8
Joined: 15 Jun 2011 17:40

Stopping VLC

Postby gamename » 29 Jun 2011 02:58

Hi,

I'm capturing selenium tests as they execute, and saving video records of their behavior for future analysis. That requires starting and stopping VLC via a script.

I have a batch file on win7 that starts a screen capture just fine:

Code: Select all

del C:\Users\tsmith\capture2.avi call "C:\VideoLAN\VLC\vlc.exe" ^ screen:// --one-instance ^ -I dummy --dummy-quiet ^ --screen-follow-mouse ^ --no-video :screen-fps=5 :screen-caching=300 ^ --sout "#transcode{vcodec=h264,vb=400,fps=5,scale=1,width=1024,height=768,acodec=none}:duplicate{dst=std{access=file,mux=avi,dst='C:\\Users\\tsmith\\capture2.avi}}"
Stopping the capture is tougher. If I use 'pskill' or some other process killer, the output file is corrupted. So, there needs to be a way to gently stop VLC.

The question is: How do you do tell the vlc process (started by the batch file) to quit recording?

Thanks,
-T

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Stopping VLC

Postby Jean-Baptiste Kempf » 29 Jun 2011 12:31

use rc or http interface.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

gamename
New Cone
New Cone
Posts: 8
Joined: 15 Jun 2011 17:40

Re: Stopping VLC

Postby gamename » 29 Jun 2011 18:09

use rc or http interface.
Thanks. I was looking at that approach. Can you point me to an example? It isn't clear how to stop a vlc process via the http interface.

TIA,
-T

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Stopping VLC

Postby Jean-Baptiste Kempf » 29 Jun 2011 19:52

use the xml requests.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

gamename
New Cone
New Cone
Posts: 8
Joined: 15 Jun 2011 17:40

Re: Stopping VLC

Postby gamename » 29 Jun 2011 22:33

Hi,

For the record, here is the solution. There are 2 scripts. One to start vlc screen capture, and another to stop it.

Starting script contents:

Code: Select all

del C:\Users\tsmith\capture2.avi call "C:\VideoLAN\VLC\vlc.exe" ^ screen:// --one-instance ^ -I dummy --dummy-quiet ^ --extraintf rc ^ --rc-host localhost:8088 ^ --rc-quiet ^ --screen-follow-mouse ^ --no-video :screen-fps=5 :screen-caching=300 ^ --sout "#transcode{vcodec=h264,vb=400,fps=5,scale=1,width=1024,height=768,acodec=none}:duplicate{dst=std{access=file,mux=avi,dst='C:\\Users\\tsmith\\capture2.a vi'}}"
Stopping script contents:

Code: Select all

echo quit | "C:\Program Files (x86)\Nmap\ncat.exe" localhost 8088
That's it. Thanks for the suggestions.

-T


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 33 guests