samemory / homebridge-eufy-security

Work in progress
Apache License 2.0
97 stars 14 forks source link

[Bug]: Floodlight Camera (T8420) won't stream in Home app #271

Closed fullphat closed 2 years ago

fullphat commented 2 years ago

What happened?

Floodlight camera won't stream in Home app, but if I extract the RTMP details from the HomeBridge log, it works in VLC.

Is there anything I can do to fix it, or this a bug with how the plugin is talking to ffmpeg?

Device Type

Floodlight (Supported)

Plugin Version

v1.0.x (Supported)

HomeBridge Version

v1.3.x (Supported)

NodeJS Version

v14 (Supported)

Operating System

Mac OS X

Relevant log output

No response

github-actions[bot] commented 2 years ago

Did you check this Common Issues pages ?

fullphat commented 2 years ago

Certainly did - says this device is supported

fullphat commented 2 years ago

Is there anything I can do to fix it, or this a bug with how the plugin is talking to ffmpeg?

eRWN commented 2 years ago

Hello,

I wonder if this can help : https://github.com/samemory/homebridge-eufy-security/issues/284#issuecomment-981137804 (I don't know how to do it to test)

fullphat commented 2 years ago

Happy to test if someone could push this out as 1.0.7?

fullphat commented 2 years ago

Still not working in 1.0.8 unfortunately - also the rtmp stream that appears in the log doesn't load on VLC on MacOS.

schliemann commented 2 years ago

Please provide logs.

fullphat commented 2 years ago

Here you go:

[12/26/2021, 9:10:24 PM] [EufySecurity-1.0.8] DEBUG: Ext Garden HL Property Changes: wifiRssi { value: -67, timestamp: 1640553024876 }
[12/26/2021, 9:10:24 PM] [EufySecurity-1.0.8] DEBUG: Video stream requested: 1920 x 1080, 30 fps, 802 kbps Floodlight Cam false
[12/26/2021, 9:10:24 PM] [EufySecurity-1.0.8] INFO:  Starting video stream: 1920 x 1080, 30 fps, 802 kbps (AAC-eld) Floodlight Cam
[12/26/2021, 9:10:24 PM] [EufySecurity-1.0.8] DEBUG: Stream command: /usr/local/lib/node_modules/homebridge-eufy-security/node_modules/ffmpeg-for-homebridge/ffmpeg -i rtmp://p2p-vir-9.eufylife.com/xxxx -an -sn -dn -codec:v libx264 -pix_fmt yuv420p -color_range mpeg -r 30 -f rawvideo -preset ultrafast -tune zerolatency -filter:v scale='min(1920,iw)':'min(1080,ih)':force_original_aspect_ratio=decrease,scale=trunc(iw/2)*2:trunc(ih/2)*2 -b:v 802k -payload_type 99 -ssrc 15940227 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params MfNE3DJKmfW91/8re+762xci3z7O6BFlkpuSlhAW srtp://192.168.1.109:63962?rtcpport=63962&pkt_size=1316 -vn -sn -dn -codec:a aac -profile:a aac_eld -flags +global_header -f null -ar 16k -b:a 24k -ac 1 -payload_type 110 -ssrc 2392789 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params cx0QlAUDBGy+WdzM1UPqsz6kIouJt3s2wXYh9rVV srtp://192.168.1.109:62596?rtcpport=62596&pkt_size=188 -loglevel level -progress pipe:1 Floodlight Cam false
[12/26/2021, 9:10:27 PM] [EufySecurity-1.0.8] INFO:  Stopped video stream. Floodlight Cam
[12/26/2021, 9:10:27 PM] [EufySecurity-1.0.8] DEBUG: Getting the first frames took 2.777 seconds. Floodlight Cam false
[12/26/2021, 9:10:27 PM] [EufySecurity-1.0.8] DEBUG: FFmpeg exited with code: 0 and signal: null (Expected) Floodlight Cam false
fullphat commented 2 years ago

Think I've fixed it. In streamingDelegate.js around line 353, if you force vcodec to be copy then the stream works in the Home app.

schliemann commented 2 years ago

Will be fixed in https://github.com/samemory/homebridge-eufy-security/issues/321