Stop VLC from command line

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.
bruce
New Cone
New Cone
Posts: 5
Joined: 27 Aug 2007 23:27

Stop VLC from command line

Postby bruce » 26 Dec 2008 17:05

Hi,

I have an application where I need to be able to start up a VLC process from a windows command line (easy!) and then at a later time stop it playing (less easy!).

How can I simply stop a running vlc from a windows command line? The only solution I've got so far is to go to "tools > preferences > interface" and enable the "allow only one instance" setting. Then, when I want to stop playout, I would do "c:\program files\videolan\vlc.exe dummy.mp3", where dummy.mp3 is a nonexistant file. This stops the existing playout, and generates an error. I suppose I could arrange for dummy.mp3 to be a real mp3 (short, silent) and that would lose the error.

Is there a better way? Something that actually closes vlc rather than just stops playout? Winamp has a /kill flag which accomplishes this - does vlc have anything similar?

Bruce.

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: Stop VLC from command line

Postby Jean-Baptiste Kempf » 26 Dec 2008 17:25

vlc.exe vlc://quit should quit VLC.
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.

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: Stop VLC from command line

Postby VLC_help » 26 Dec 2008 21:39

taskkill command should also work if you like scripting.

bruce
New Cone
New Cone
Posts: 5
Joined: 27 Aug 2007 23:27

Re: Stop VLC from command line

Postby bruce » 27 Dec 2008 00:09

vlc.exe vlc://quit should quit VLC.
Thanks - that's exactly what I was looking for...

Bruce.

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: Stop VLC from command line

Postby Jean-Baptiste Kempf » 30 Dec 2008 18:04

vlc.exe vlc://quit should quit VLC.
Thanks - that's exactly what I was looking for...

Bruce.
Great :D
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.


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: Google [Bot] and 17 guests