Camera lags heavily when sound is on

RVMedia support and discussion (components for displaying and controlling IP cameras, webcams, video conferencing, video chats, recording audio and video files)
Post Reply
mitzi
Posts: 31
Joined: Thu Oct 10, 2019 12:14 pm

Camera lags heavily when sound is on

Post by mitzi »

hello,

When I play mp4 video file (or rtsp stream with sound) then when connected TRVAudioPlayer is set to Active then video replay lags a lot.
Even worse situation is when TRVAudioPlayer.Active or TRVAudioPlayer.Mute properties are set (to any value) DURING replay. After first set lagging starts and goes on until camera stops.

RVMedia 9.2, VCL, FFMPEG, Delphi 11.2, 64bit
Sergey Tkachenko
Site Admin
Posts: 17522
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Camera lags heavily when sound is on

Post by Sergey Tkachenko »

Do you mean that video and audio are out of sync?
Please note that video and audio are synchronized via TRVAudioPlayer component (it plays audio, and so it can return a current playback position, and TRVCamSound synchronizes video to this position).
If RVAudioPlayer.Mute = True, RVAudioPlayer does not play audio, so it cannot synchronize.
Please use Mute only when playing sound from a microphone. You can turn off sound by specifying RVAudioPlayer.VolumeMultiplier = 0. There will be no sound, but video will be synchronized. It should be mentioned in a help file, I'll do it in the next update.

PS: unfortunately, if you pause your application in Delphi IDE while playing video with sound (by stopping on a breakpoint or tracing it step by step), video and audio will be out of sync as well.
mitzi
Posts: 31
Joined: Thu Oct 10, 2019 12:14 pm

Re: Camera lags heavily when sound is on

Post by mitzi »

I don't mean sync. Simply video lags, wait dots are displayed every 2 seconds. Without sound video plays smoothly.
Sergey Tkachenko
Site Admin
Posts: 17522
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Camera lags heavily when sound is on

Post by Sergey Tkachenko »

Does it happen with some specific video source (from IP camera?)?
mitzi
Posts: 31
Joined: Thu Oct 10, 2019 12:14 pm

Re: Camera lags heavily when sound is on

Post by mitzi »

I investigated more and it happened when RTSP stream is tried to play (regardless if it is succeeded or not), next local video file (or rtsp stream) played starts to lag (only with activated AudioPlayer). When I load local video file as first source, then there's no problem.
Post Reply