okie i need help in this, hopefully the experts here can help.
backgrd:
i need to play a video and the still frames need to be captured from the video in intervals.
i am using WindowsMediaPlayer to play my avi file.
Would it be possible to ask the player to freeze frame at intervals?
i am stuck and my codes are as follows.Button3 is a button named "Capture"
void __fastcall TForm1::Button3Click(TObject *Sender)
{
ImageEnView1->IO->OpenAVIFile( "c:\\incident_0001.mpg" );
a=0;
b=1;
while(a<=299)
{
TTimer.Interval := 100;
WindowsMediaPlayer1->
ImageEnView1->IO->LoadFromAVI(a);
a++;
ImageEnView1->IO->SaveToFile(StringToOleStr("c:\\"+IntToStr(b)+".jpg"));
b++;
}
ImageEnView1->IO->CloseAVIFile();
}
hi problem is solved. i realised that i should not used OpenAVIFile to open a mpg.