WebRTC icon indicating copy to clipboard operation
WebRTC copied to clipboard

Green artifacts in image output

Open JohannCR opened this issue 11 months ago • 23 comments

What could be the cause of some green artifacts in the image output ? Sometimes it's even an entire frame (or multiple) that are green... Is there some tweaking to do to reduce this ? Thanks

Screenshot_20230821-071646~2

JohannCR avatar Aug 21 '23 05:08 JohannCR

All of your cameras has problems simultaneously? How many you have cameras? How many with problems and without? Has cameras with problems same model?

AlexxIT avatar Aug 23 '23 17:08 AlexxIT

I have 3 reolink RLC-510A and 1 shitty Keview PTZ cam which I don't know the model.

Curiously only the shitty one never has the problem lol The 3 Reolink ones show the green artifacts. Not always, only sometimes.

Mode is not configured in any of them. All show "MSE" while loading and then "RTC".

JohannCR avatar Aug 24 '23 09:08 JohannCR

Reolink. Thats the answer. Don't use RTSP and RTMP from Reolink cameras. They awful. Use HTTP-FLV links

http://192.168.1.123/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=admin&password=password

AlexxIT avatar Aug 24 '23 10:08 AlexxIT

Oh awesome thanks ! Can't connect to the stream unfortunately... I've tried (replaced IP and logins of course) : http://192.168.x.x/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=admin&password=password http://192.168.x.x/flv?port=80&app=bcs&stream=channel0_main.bcs&user=admin&password=password https://192.168.x.x:443/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=admin&password=password

I've also tried to escape the '#' character in my password by %23, to no avail... Any idea ?

JohannCR avatar Aug 24 '23 11:08 JohannCR

Also tried adding mode: flv it shows only the still image, even if no connection error Otherwise I keep getting a connect: no route to host error

JohannCR avatar Aug 24 '23 11:08 JohannCR

Try this link in the VLC. Check if you enable HTTP proto for your camera

AlexxIT avatar Aug 24 '23 12:08 AlexxIT

Capture d’écran du 2023-08-24 15-15-27 Capture d’écran du 2023-08-24 15-14-59 Tried in VLC both ports 1935 and 80 with and without escaping the characters in the password. still no good :-/

JohannCR avatar Aug 24 '23 13:08 JohannCR

You can write to Reolink support. Also you can ask them for new firmware

AlexxIT avatar Aug 24 '23 15:08 AlexxIT

Ok. I will update the issue if I get a fix. Thanks for your help !

JohannCR avatar Aug 24 '23 17:08 JohannCR

Update: Reolink support sent me a firmware update that didn't change anything. But by looking further I found that the stream works in VLC using a password with no special character. Still doesn't work in HA though. In the card error message it says "tcp IP:80" connect no route to host". Does it try to use the port 80 instead of the 1935 one ? tried IP:1935 it didn't change anything, I get "tcp IP:1935" connect no route to host". I feel I'm getting close ! Any idea ?

JohannCR avatar Aug 25 '23 11:08 JohannCR

HTTP link should be with 80 port. 1935 port used by RTMP protocol. It also works badly.

AlexxIT avatar Aug 25 '23 12:08 AlexxIT

Still not working with port=80

JohannCR avatar Aug 25 '23 12:08 JohannCR

Show link that works with VLC. Also try to change password without symbols.

AlexxIT avatar Aug 25 '23 12:08 AlexxIT

So I've already changed the passwords to remove special characters and that's what made it work in VLC. Using the url listed above both port:80 and port:1935 work in VLC. But I may have an idea why it doesn't work in HA : the cameras are on a separate subnet... Both subnets are connected to my Synology Nas on which HAOS runs (2 different plugs), and Surveillance station has no problem accessing them, and DSM integration creates the camera entity that works (with the green artifacts). So I'm thinking of either:

  • configure surveillance station to use flv (don't know yet if possible)
  • or reconfigure my network.

I'll update the issue if I find a solution. Don't hesitate if you have any suggestion! Thx

JohannCR avatar Aug 26 '23 16:08 JohannCR

So, found nothing in surveillance station to use flv stream. But I realized that HA cannot access the cameras subnet, so added it to the virtual machine. Now HA sees both subnets. The card throws a different error (that's progress !) : internal server error... Webrtc debug log says nothing though. How can I find out what's wrong ?

JohannCR avatar Aug 27 '23 08:08 JohannCR

Show screen with error

AlexxIT avatar Aug 27 '23 10:08 AlexxIT

Screenshot_20230827-123822

JohannCR avatar Aug 27 '23 10:08 JohannCR

Check go2rtc WebUI. Try different links and technologies.

AlexxIT avatar Aug 27 '23 11:08 AlexxIT

Problem solved ! Once the subnet access was fixed, I managed to get it working. port 80 definitely does not work, only 1935 does. http://192.168.x.x/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=user&password=password No more green artifacts ! The main stream quickly overloads the system though, and the stream freezes after less than a minute. So I only use the sub stream for now: http://192.168.x.x/flv?port=1935&app=bcs&stream=channel0_sub.bcs&user=user&password=password

I installed go2rtc in a docker container to free some resources. HA seems faster, but the main stream still freezes. I'll try allocating more cpu and see if that works. Thanks again for all the help !

JohannCR avatar Aug 27 '23 22:08 JohannCR

Well even the sub stream freezes after some time... bummer. Is it because of the 1935 port ?

JohannCR avatar Aug 28 '23 09:08 JohannCR

HTTP-FLV source will be reworked in the next go2rtc version. Maybe this will helps. And you not using port 1935. You using port 80 (HTTP).

AlexxIT avatar Aug 28 '23 14:08 AlexxIT

Great, we'll see if it makes a difference. Can I remove go2rtc from HA now that I use a docker container? Or disable it in the Webrtc custom component folder ?

JohannCR avatar Aug 29 '23 06:08 JohannCR

You can resetup WebRTC integration and set address of external go2rtc

AlexxIT avatar Aug 29 '23 07:08 AlexxIT