Missing last frames

New product: VCL components for displaying and controlling IP cameras, webcams, video conferencing, video chats
Post Reply
oliver
Posts: 30
Joined: Mon Aug 28, 2017 4:42 am

Missing last frames

Post by oliver » Wed Aug 08, 2018 3:17 am

I am using TRVCamera and TRVCamcorder to record the screen.

When I set TRVCamcorder->Active=false to quickly after the last keystroke, that last keystroke (which is visible on the screen) does not get recorded.

I tried adding a Sleep(1000) after the last keystroke before I set TRVCamcorder->Active=false, but that makes no difference.

How can I make sure, TRVCamcorder is done recording before I stop recording?

Sergey Tkachenko
Site Admin
Posts: 14117
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Missing last frames

Post by Sergey Tkachenko » Wed Aug 08, 2018 11:19 am

Several frames may be buffered and processed with some delay. So I suggest to stop recording after some delay.

Sentorolar
Posts: 3
Joined: Tue Sep 11, 2018 2:29 pm
Location: Czech
Contact:

Missing last frames

Post by Sentorolar » Wed Sep 19, 2018 8:53 pm

Do you get some kind of error messages during saving or opening the animation or are the frames just gone?

Sergey Tkachenko
Site Admin
Posts: 14117
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Missing last frames

Post by Sergey Tkachenko » Thu Sep 20, 2018 10:01 am

There are no errors.
RVMedia write frames exactly at interval specified in TRVCamRecorder.VideoFramePerSec, as precise as possible. The only possible reason for missing last frames here is too large value of TRVCamRecorder.VideoFramePerSec: if it's not possible to encode the required count of frames at this speed. But it's very unlikely.

When writing video with sound, another reason is possible. Sound is buffered for some time before writing, and when you stop recording, the last incomplete fragment of sound may be discarded, so the duration of sound will be less than the duration of video, and a video viewer may choose to display video using the sound duration, so last video frames will not be displayed. But I believe this difference is small, less than 1 second.

Post Reply