samemory / homebridge-eufy-security

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

[Bug]: Cannot stream battery Doorbell (FFmpeg error 1 ) with version 1.0.6 #284

Closed DavTechFr closed 2 years ago

DavTechFr commented 2 years ago

What happened?

Hello,

I cannot stream the Doorbell due to FFmepg issue: ERROR: FFmpeg exited with code: 1 and signal: null (Error) Doorbell

I’ve tried to run this command: sudo npm i ffmpeg-for-homebridge -g

Same Issue

Device Type

Doorbell (Supported)

Plugin Version

v1.0.x (Supported)

HomeBridge Version

v1.3.x (Supported)

NodeJS Version

v14 (Supported)

Operating System

Raspbian

Relevant log output

[11/25/2021, 10:55:36 AM] [EufySecurity-1.0.6] DEBUG: Video stream requested: 1280 x 720, 30 fps, 299 kbps Doorbell false
[11/25/2021, 10:55:36 AM] [EufySecurity-1.0.6] INFO:  Starting video stream: 1280 x 720, 30 fps, 299 kbps (AAC-eld) Doorbell
[11/25/2021, 10:55:36 AM] [EufySecurity-1.0.6] DEBUG: Stream command: /usr/local/lib/node_modules/homebridge-eufy-security/node_modules/ffmpeg-for-homebridge/ffmpeg -i  -an -sn -dn -codec:v libx264 -pix_fmt yuv420p -color_range mpeg -r 30 -f rawvideo -preset ultrafast -tune zerolatency -filter:v scale='min(1280,iw)':'min(720,ih)':force_original_aspect_ratio=decrease,scale=trunc(iw/2)*2:trunc(ih/2)*2 -b:v 299k -payload_type 99 -ssrc 9240860 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params VUiTto6NyFm7DALbh+LbgdeIYJRQPv/8QbNdu3OQ srtp://192.168.1.57:64426?rtcpport=64426&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 1944321 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params 1OxbmPt06RK3wUmiHsFY1k/ejujHpbgcV5hCgiuI srtp://192.168.1.57:57009?rtcpport=57009&pkt_size=188 -loglevel level -progress pipe:1 Doorbell false
[11/25/2021, 10:55:36 AM] [EufySecurity-1.0.6] ERROR: FFmpeg exited with code: 1 and signal: null (Error) Doorbell
[11/25/2021, 10:55:36 AM] [EufySecurity-1.0.6] INFO:  Stopped video stream. Doorbell
[11/25/2021, 10:55:47 AM] [EufySecurity-1.0.6] DEBUG: Snapshot requested: 1280 x 720 Doorbell false
[11/25/2021, 10:55:47 AM] [EufySecurity-1.0.6] DEBUG: Snapshot command: /usr/local/lib/node_modules/homebridge-eufy-security/node_modules/ffmpeg-for-homebridge/ffmpeg -i https://zhixin-security-eu.s3.eu-central-1.amazonaws.com/thumb/2021/11/25/station/T8010P2321063492/Yx08lgTSdRl2821e.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJYLV2KOLW6PU4FSA%2F20211125%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20211125T095241Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=688fc9659a3bb60a6b6780938bf52c47c83fd0c2b4b571ba3ed990eba22b287b -frames:v 1 -f image2 - -hide_banner -loglevel error Doorbell false
[11/25/2021, 10:55:47 AM] [EufySecurity-1.0.6] DEBUG: Fetching snapshot took 0.326 seconds. Doorbell false
[11/25/2021, 10:55:47 AM] [EufySecurity-1.0.6] DEBUG: Sending snapshot: 1280 x 720 Doorbell false
daboubim commented 2 years ago

Commenting out that line in api.js sort of fixed my issue. Video feed isn't completely reliable, but I get it at least half the time and don't see the errors anymore.

worldhosted commented 2 years ago

Commenting out that line in api.js sort of fixed my issue. Video feed isn't completely reliable, but I get it at least half the time and don't see the errors anymore.

That worked for me also. with v1.0.6 of Homebridge Eufy Security.

schliemann commented 2 years ago

Bropat has released a new version of the client library. Will try and make a new version of ours tomorrow.

schliemann commented 2 years ago

Should be fixed with new version 1.0.8.

DavTechFr commented 2 years ago

It works : I can stream my doorbell from HomeKit when I open the cam but with limitations

schliemann commented 2 years ago

Old preview and speak button are known limitations currently. I'll look into the missing sound. The beta has sound.

lenoxys commented 2 years ago

this will be solved in 1.1.0 using a cleaner way to implement filter

nikongasparis commented 2 years ago

1.0.8 or latest beta still not working for me. i cannot see the stream. [12/28/2021, 2:01:40 PM] [EufySecurity-1.0.8] INFO: Stopped video stream. Doorbell [12/28/2021, 2:01:40 PM] [EufySecurity-1.0.8] DEBUG: FFmpeg exited with code: 0 and signal: null (Expected) Doorbell false

lenoxys commented 2 years ago

1.0.8 or latest beta still not working for me. i cannot see the stream. [12/28/2021, 2:01:40 PM] [EufySecurity-1.0.8] INFO: Stopped video stream. Doorbell [12/28/2021, 2:01:40 PM] [EufySecurity-1.0.8] DEBUG: FFmpeg exited with code: 0 and signal: null (Expected) Doorbell false

Hello, can you fill a new issue for yours : https://github.com/samemory/homebridge-eufy-security/issues/new?assignees=&labels=bug&template=bug-report.yml&title=%5BBug%5D%3A+

quetsal commented 2 years ago

1.0.8 or latest beta still not working for me. i cannot see the stream. [12/28/2021, 2:01:40 PM] [EufySecurity-1.0.8] INFO: Stopped video stream. Doorbell [12/28/2021, 2:01:40 PM] [EufySecurity-1.0.8] DEBUG: FFmpeg exited with code: 0 and signal: null (Expected) Doorbell false

Hello, can you fill a new issue for yours : https://github.com/samemory/homebridge-eufy-security/issues/new?assignees=&labels=bug&template=bug-report.yml&title=%5BBug%5D%3A+

Same for me with 1.0.8 on Synology

Dravegon commented 2 years ago

If anyone still can’t get their FFmpeg issue sorted for the Eufy Doorbell(among others) i got it working with this method with good (enough) working video/audio since so try this workaround:

install: homebridge-eufy-security v1.1.1-beta.15(latest) I’m still running on beta.2 as of now but it wouldn’t matter in operational function(Dev if you read this please confirm)

After install run the instance as child bridge: plugins/homebridge-eufy-security/bridge settings/run as child bridge

This would make the doorbell operate good enough for about 20/25 seconds per time/stream, after that it will freeze up but because it’s running as a child bridge it won’t restart the whole Homebridge but only the Eufy Security plugin(reboot in only 12 seconds)

It’s not ideal/streaming as long as you want it (20/25 seconds max) but i tested this for a while(1 month minimum) and it’s doing the job with only 12 seconds of reboot/downtime and some occasional Eufy Homebase and Homebridge reboots after a while of operation so at least it’s working with this method.

Additional info: Homebridge Version | v1.3.4 Node.js Version | v14.17.4 Npm Version | v7.20.3

lenoxys commented 2 years ago

hey stop livestream timeout was set to 30sec that's why stream was stopped after 20/25 seconds. You have a new parameter within settings to change that.

Dravegon commented 2 years ago

Is that changed from within beta.17 or v1.0.8? And would it not give me any other problems? (not really eager to upgrade since the FFmpeg issue/ beta.2 gave me good working video/audio) I don’t want any more funky doorbell problems if you know what i mean ;-)

lenoxys commented 2 years ago

we're working only on beta for add/change/remove. latest branch is for fix only.

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 2 years ago

This issue was closed because it has been stalled for 5 days with no activity.