Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am working with VLC from C# by creating a process that opens the command line.

Is there any way of knowing when a movie ended in from the command line or something ?

share|improve this question

If you add vlc://quit to the playlist after the intended file you want to play, VLC will quit after playback has finished. This is surely possible to catch from the command-line.

(Perhaps this is also what you really are trying to do: quit VLC after playback has finished and let the script continue.)

share|improve this answer
vlc.exe vlc:quit

Then, wait for your process to terminate:

var info = new System.Diagnostics.ProcessStartInfo(); 
info.FileName = @"c:\path\to\vlc.exe vlc:quit"; 
var process = new System.Diagnostics.Process(); 
process.StartInfo = info; 

//Wait for the process to be completed 

//It's finished. Enter your code here.
share|improve this answer
It is also worth noting that VLC has a command-line varient (CVLC/CVLC.exe) which is functionally the same, however it simply launches a video window that has no controls or menus unless you explicity enable them. Which depending on your usage may be a slightly improved situation. – Turix Apr 13 '12 at 11:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.