title: How to run video files continuously in Delphi?
body: <p>I am using Delphi 5.</p>
  
  <p>I want to know when avi file play is completed using 'TFilterGraph'. I want to run number of avi file one after another automatically. So I have downloaded DSPack and used 'TFilterGraph' and 'TVideoWindow' component. avi file video is displaying properly.
  How do I know the avi video or any video has completed playing so I can select next avi or any other video file to play?</p>
  
  <pre><code>procedure TForm1.Button2Click(Sender: TObject);
  begin
    videowindow1.FilterGraph:=filtergraph1; //query interfaces to video window
    filtergraph1.Active:=true;
    filtergraph1.RenderFile('I:\Project Part 1\Clips\More Clips\D.avi');
    filtergraph1.Play;
  end;
  </code></pre>