RTSP H264 decoder generates image artifacts

RVMedia support and discussion (components for displaying and controlling IP cameras, webcams, video conferencing, video chats, recording audio and video files)
Post Reply
panlab_mf
Posts: 24
Joined: Wed Feb 06, 2019 9:55 am

RTSP H264 decoder generates image artifacts

Post by panlab_mf » Wed Oct 30, 2019 11:45 am

Hi all,

I'm using the demo application ffmepg RVMEDIA V6 on XE10.2 to connect four rtsp network cameras. As a result, the streaming is not smooth but the worst thing is that artifacts appear in the image, as if the decoder was missing packages to paint. All the cameras point to the same scene but in the received streaming you can see a big delay between the different cameras. sometimes more than two seconds.

But, if I open several cmd windows and run ffplay using the same ffmepg libraries as the ffmpeg-demo appplication, this doesn't happens.

Code: Select all

start cmd /k ffplay rtsp://10.30.40.81:554/onvif1
start cmd /k ffplay rtsp://10.30.40.82:554/onvif1
start cmd /k ffplay rtsp://10.30.40.83:554/onvif1
start cmd /k ffplay rtsp://10.30.40.84:554/onvif1
I mean, the streaming is smouth and the images are clear and sharp, with no artifacts.

The artifacks I'm talking about looks like the "Testing RVCamera - Video blurred". but sometime it is worst!

Image

Is there a way to config the FFMpegProperty in order to avoid these artifacts? And reduce the delay?

Thanks,
Attachments
image-artifacks-Untitled.jpg
image-artifacks-Untitled.jpg (167.54 KiB) Viewed 592 times

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

Re: RTSP H264 decoder generates image artifacts

Post by Sergey Tkachenko » Wed Oct 30, 2019 12:39 pm

The options to try:
1) MaxDelay = 500 000
2) RTSPTransport = [rvpeTCP]

panlab_mf
Posts: 24
Joined: Wed Feb 06, 2019 9:55 am

Re: RTSP H264 decoder generates image artifacts

Post by panlab_mf » Wed Oct 30, 2019 12:59 pm

Hi all,

I've been testing using RVMedia v6. Now I'v moved to RVMedia v7. and modified the TfrmMain.SetCam(..) to assign the options you said. But it doesn't work.
With V7 the delay is even worst. it seems like the video stream is accumulated (dumpered/buffered?) and delivered much later to an artificial frame rate.

In summary, it has a much worse performance than the previous version.

Regards,

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

Re: RTSP H264 decoder generates image artifacts

Post by Sergey Tkachenko » Wed Oct 30, 2019 2:37 pm

Try assigning RVCamera.Latency = 0

panlab_mf
Posts: 24
Joined: Wed Feb 06, 2019 9:55 am

Re: RTSP H264 decoder generates image artifacts

Post by panlab_mf » Thu Oct 31, 2019 1:49 pm

Hi,

I've tried the latency=0 options with the same results. it is, RVMedia v7 ffmpeg demo project, and four cameras pointing to the same scence are displayed with a increasing latency/delay and depicting image artifacks that other tools (ffplay.exe/rtsp-client-demo.exe) using the same ffmepg libraries (ffmpeg-4.1-win32-shared from Zeranoe FFmpeg Builds <http://ffmpeg.zeranoe.com/builds/>) doesn't (see attached screenshots).

Image

How can it be possible? How can I fix that?

Thanks,
Attachments
ht-ffmpeg-client-Screenshot_1h.jpg
ht-ffmpeg-client-Screenshot_1h.jpg (127.56 KiB) Viewed 547 times
rv_ffmepg-0latency-Screenshot_18h.jpg
rv_ffmepg-0latency-Screenshot_18h.jpg (61.11 KiB) Viewed 547 times

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

Re: RTSP H264 decoder generates image artifacts

Post by Sergey Tkachenko » Thu Oct 31, 2019 3:00 pm

Can you open these cameras for us for testing? You can answer in a private message.

panlab_mf
Posts: 24
Joined: Wed Feb 06, 2019 9:55 am

Re: RTSP H264 decoder generates image artifacts

Post by panlab_mf » Mon Nov 04, 2019 11:23 am

You can use this public trafic camera:

rtsp://170.93.143.139/rtplive/470011e600ef003a004ee33696235daa

and run FFMpeg multiview adding two times the same url.

if you let the program running for a while (3 minutes or so) the image starts freezing and finally it stop playing in one of the viewer.

At the same time I have running two instances of VLC using the same url with no interruption.

Do you still think there is nothing in the RVCamera component?

Best regards,
Attachments
public-rtsp-traffic-camera-Screenshot_1.jpg
public-rtsp-traffic-camera-Screenshot_1.jpg (176.73 KiB) Viewed 372 times

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

Re: RTSP H264 decoder generates image artifacts

Post by Sergey Tkachenko » Mon Nov 04, 2019 10:00 pm

I am trying to reproduce this problem (using the compiled version of FFmpeg demo for v7.0).
Currently, videos displayed for about 20 minutes.

In my test, VLC shows even more delay than our demo (yes, slightly more delay in VLC).
However, it really displays video more smoothly (in our demo, sometimes video stops for a moment and then played more fast to compensate).
We will investigate it further...

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

Re: RTSP H264 decoder generates image artifacts

Post by Sergey Tkachenko » Tue Nov 05, 2019 8:56 am

Well, after 30 minutes one of cameras stopped displaying video. But it was not because it hung. A connection was broken (due to a larger delay in receiving video).
This demo does not make attempts to reconnect. You can implement it yourself in OnEndVideoStream event. But limit a number of connection attempts, to avoid infinite connection to a closed video source.

panlab_mf
Posts: 24
Joined: Wed Feb 06, 2019 9:55 am

Re: RTSP H264 decoder generates image artifacts

Post by panlab_mf » Tue Nov 05, 2019 1:22 pm

It wasn't take so mutch time to hung. Specially if take into account that the vlc streaming is live (0 lantency9 and th rvmedia project wasn't "live". it is delayed or something like that.

What I'm asking is how can I avoid that, playback two or more RTSP network cameras without latency in order to see a live streaming without image artfiacts.

Actually RVMedia v6/7 can't do it.

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

Re: RTSP H264 decoder generates image artifacts

Post by Sergey Tkachenko » Tue Nov 05, 2019 6:05 pm

In my tests, VLC player's latency is greater than the default TRVCamera latency. On this camera, I can see cars in our FFmpeg demo first, and only then they appear in VLC player. Nevertheless, we will upload an update soon which will completely remove frame buffering in TRVCamera if Latency = 0.

I still cannot reproduce hanging. The connection may be broken because of a time out, though.

panlab_mf
Posts: 24
Joined: Wed Feb 06, 2019 9:55 am

Re: RTSP H264 decoder generates image artifacts

Post by panlab_mf » Wed Nov 06, 2019 5:06 pm

OK, thanks for try to reproduce my issue.

I'm looking forward to hear about the updated source code.

Post Reply