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: 34
Joined: Wed Feb 06, 2019 9:55 am

RTSP H264 decoder generates image artifacts

Post by panlab_mf »

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 14677 times

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

Re: RTSP H264 decoder generates image artifacts

Post by Sergey Tkachenko »

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

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

Re: RTSP H264 decoder generates image artifacts

Post by panlab_mf »

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: 15171
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: RTSP H264 decoder generates image artifacts

Post by Sergey Tkachenko »

Try assigning RVCamera.Latency = 0

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

Re: RTSP H264 decoder generates image artifacts

Post by panlab_mf »

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 14632 times
rv_ffmepg-0latency-Screenshot_18h.jpg
rv_ffmepg-0latency-Screenshot_18h.jpg (61.11 KiB) Viewed 14632 times

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

Re: RTSP H264 decoder generates image artifacts

Post by Sergey Tkachenko »

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

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

Re: RTSP H264 decoder generates image artifacts

Post by panlab_mf »

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 14457 times

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

Re: RTSP H264 decoder generates image artifacts

Post by Sergey Tkachenko »

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: 15171
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: RTSP H264 decoder generates image artifacts

Post by Sergey Tkachenko »

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: 34
Joined: Wed Feb 06, 2019 9:55 am

Re: RTSP H264 decoder generates image artifacts

Post by panlab_mf »

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: 15171
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: RTSP H264 decoder generates image artifacts

Post by Sergey Tkachenko »

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: 34
Joined: Wed Feb 06, 2019 9:55 am

Re: RTSP H264 decoder generates image artifacts

Post by panlab_mf »

OK, thanks for try to reproduce my issue.

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

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

Re: RTSP H264 decoder generates image artifacts

Post by panlab_mf »

Is there a chance than the RVMEdia 7.1 fix this issue?

I think it is easy to reproduce, just use the ffmpeg demo project and configure it to connect two cameras with a regular changing image. Like this,
http://92.154.56.150:8888/mjpg/video.mjpg

You will see how gradually the playback slowdown.

regards,

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

Re: RTSP H264 decoder generates image artifacts

Post by panlab_mf »

Hi all,

I'm testing the new RVMedia v7.1 setting the "RVCamera.Latency = 0" on the ffmpeg demo project.

If I run three instances of the program conecting to three differents local network cameras, it works fine, it is, the image on all the programs are more or less synchronized along the time.

But, if I setup the three cameras in one single instance of the program, the playback starts unsynchronized and finally are completely worst, slow and with a big delay between each camera.

So, summaryzing, the v7.1 is not better than v6 or v7 in RTSP multiple network camera situation.

Is there any other think I can change?

Thanks,

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

Re: RTSP H264 decoder generates image artifacts

Post by Sergey Tkachenko »

Fixed in version 7.1.1.

Post Reply