bropat / eufy-security-client

This shared library allows to control Eufy security devices by connecting to the Eufy cloud servers and local/remote stations over p2p.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Corrupt videoStream is received on the start_livestream event

davyrolink opened this issue · comments

Describe the bug
Corrupt videoStream is received on the start_livestream event (blockiness/colour artifacts).

To Reproduce

  1. git clone git@github.com:davyrolink/eufy-test-stream.git
  2. cd eufy-test-stream
  3. nano src/App/Parameters.ts (edit this file; enter your username, password and cameraDeviceId)
  4. npm install
  5. npm run start-dev (takes +/- 15sec)
  6. ffplay output/test-stream.dump (ffplay / ffmpeg must be installed)

The video stream that is captured is corrupt and shows blockiness/colour artifacts.

Expected behavior
A video stream dump without artifacts.

Screenshots & Logfiles
test-stream dump example01

Versions:

  • eufy-security-client: 0.6.0
  • Operating system: macOS
  • Device: Battery Doorbell 2K (T8210)

Additional context
The Eufy app settings for the camera "Video Quality" make a difference to the amount of corruption.
Worst case: Steaming Quality -> High, Video Encoding Format -> High

The problem is almost not visible during night time (black&white), only some small artifacts

Hi @davyrolink ,
I think I have found the error. I am working on fixing it. As soon as I have a test version available I will let you know (unfortunately I don't have a doorbell to test).

Hi @davyrolink,
please try the attached version 0.6.1 and let me know if the problem is fixed.

PS: Please rename attached file to eufy-security-client-0.6.1.tgz (.tgz is an unsupported attachment on github).

eufy-security-client-0.6.1.tgz.zip

To install use the following command:

npm install eufy-security-client-0.6.1.tgz

Hi @bropat,

I just tested the new version, but unfortunately the issue seems unchanged. I sent you a mail to your gmail mail address to exchange some additional debug details.

Hi @davyrolink,

one reason for this glitch could also be the change of resolution during the stream, because Eufy provides that the resolution and FPS are adjusted depending on the connectivity. This is of course not handled by ffplay. From the source code I see that behind the scenes Eufy reinitializes and restarts the stream when it detects that the resolution has changed.

PS: If you enable the debug logs you can also see if the resolution has changed at runtime.

@davyrolink

I tested it with version 0.8.1 and it seems to work:

image

Did you change something on your side? Some settings of the doorbell?

@bropat I just updated my test repo ( https://github.com/davyrolink/eufy-test-stream ) to use 0.8.1

Unfortunately the issue seems unchanged for me, first few seconds ok, then artifacts/corruption..

eufy_20210516_110432

@davyrolink

Good news, finally found and fixed the issue after deep troubleshooting. :)

Great work @bropat !! I can confirm that this resolves the issue, thanks 👍