Forums

Full Version: Closing and saving video captured files properly with dsCapture and aviLogger
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

angelcaf

Hello,
I have implemented an app using VideoLab that captures videos from the webcam using dsCapture (no audio/no video compression right now), shows the preview on a window and at the same time saves the captured video into a file by using aviLogger.

Sometimes I get two problems though:
1) At some point the audio gets desynchronized from the video with videos longer than 1 or 2 minutes (already checked that framerate of webcam corresponds to capture frame rate)

2) Sometimes when finishing recording and checking for the file just saved I realize the last 2/3 seconds of the recording are missing from the file. So, What is the proper way to close and save the file once recording is stopped by the user (via button on the GUI)?

Right now I am using the aviLogger Progress callback and when the "Args.currentFrame is >= currentFrame when recording was stopped"
I do the following in sequence (aviLogger is the member name of the component):
aviLogger.Close();
aviLogger.Enabled = false;
dsCapture.Enabled = false;

Any suggestion?
Thanks in advance,
Angelo

Dave

This has been an issue for some time, at least for Delphi/Builder. I think there was a solution somewhere on this forum, perhaps you can search for it in the VCL section.

Regards,
Dave

agiltinan

Hi Angelcaf,

I'm having the same issue.

I've searched the archives (VCL, etc.) but couldn't find the solution.

Did you manage to find a solution?

cheers,
agiltinan
Reference URL's