Page 1 of 1
Camera lags heavily when sound is on
Posted: Thu Dec 08, 2022 8:48 am
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
Re: Camera lags heavily when sound is on
Posted: Sun Dec 11, 2022 4:57 pm
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.
Re: Camera lags heavily when sound is on
Posted: Mon Dec 12, 2022 7:15 am
by mitzi
I don't mean sync. Simply video lags, wait dots are displayed every 2 seconds. Without sound video plays smoothly.
Re: Camera lags heavily when sound is on
Posted: Mon Dec 12, 2022 7:20 am
by Sergey Tkachenko
Does it happen with some specific video source (from IP camera?)?
Re: Camera lags heavily when sound is on
Posted: Mon Dec 12, 2022 9:00 am
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.