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.
MIT License
482 stars 69 forks source link

[Bug]: T8420 Floodlight camera video stream is marked as VideoCodec.UNKNOWN (-1) #97

Closed fullphat closed 2 years ago

fullphat commented 2 years ago

Client version

Latest shipped with HomeBridge plugin

Node version

14.18

Operating System type

Mac OS X

Operating system version

11.3

Describe the bug

Hi Bropat

I'm using the homebridge-eufy-security plugin and have run into an issue with video streaming from the T8420 Floodlight camera. The incoming video stream codec is marked as -1 (VideoCodec.UNKNOWN) which the plugin treats as H264. Unfortunately, this stops the stream from working in HomeKit.

If I forceabely change the vcodec to copy then the stream works instantly. This is using local P2P rather than cloud.

Hope you can help!

To reproduce

  1. Go to '...'
  2. Click on '...'
  3. Scroll down to '....'
  4. See error

Screenshots & Logfiles

[1/8/2022, 11:45:07 AM] [EufySecurity-1.1.1-beta.14] DEBUG: ReqEufy: {"videoCodec":-1,"videoFPS":15,"videoHeight":1080,"videoWidth":1920,"audioCodec":1}
[1/8/2022, 11:45:07 AM] [EufySecurity-1.1.1-beta.14] INFO:  videoConfig->vcodec: undefined
[1/8/2022, 11:45:07 AM] [EufySecurity-1.1.1-beta.14] INFO:  streamData->metadata->videoCodec: -1
[1/8/2022, 11:45:07 AM] [EufySecurity-1.1.1-beta.14] INFO:  vcodec: copy
[1/8/2022, 11:45:07 AM] [EufySecurity-1.1.1-beta.14] DEBUG: Floodlight Cam Video stream requested: 1920 x 1080, 30 fps, 802 kbps true
[1/8/2022, 11:45:07 AM] [EufySecurity-1.1.1-beta.14] INFO:  Floodlight Cam Starting video stream: native x native, native fps, ??? kbps (AAC-eld)
[1/8/2022, 11:45:07 AM] [EufySecurity-1.1.1-beta.14] DEBUG: Floodlight Cam_video Stream command: /usr/local/lib/node_modules/homebridge-eufy-security/node_modules/ffmpeg-for-homebridge/ffmpeg -use_wallclock_as_timestamps 1 -r 15 -i unix:./10.sock -an -sn -dn -codec:v copy -pix_fmt yuv420p -color_range mpeg -payload_type 99 -ssrc 8210666 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params wgTf/0wh7BghYMCQaEU8B2ZN/GKUzRSUzIDn3/qg srtp://192.168.1.104:55316?rtcpport=55316&pkt_size=1316 -loglevel level+verbose -progress pipe:1

Additional context

No response

bropat commented 2 years ago

I will publish a possible fix in the next release.