homebridge-eufy-security / plugin

Homebridge plugin to control certain Eufy Security devices
Apache License 2.0
166 stars 24 forks source link

[Bug]: [Doorbell] [Video Process] FFmpeg exited with code: 0 and signal: null (Expected) on Live Streaming #360

Open joshuaswilcox opened 1 year ago

joshuaswilcox commented 1 year ago

What happened?

This is probably less of an issue with this plugin, but the Doorbell will not stream video in the home app, all the other Eufy cameras work fine with this just not the doorbell.

I enabled debugging and ffmpeg debugging. I see this in the logs if thats helpful

[Doorbell] [Video Process] FFmpeg exited with code: 0 and signal: null (Expected)

and a more detailed log

Device Type

Doorbell (Supported)

Plugin Version

v2.0.x (Supported)

HomeBridge Version

v1.4.x (Supported)

NodeJS Version

v12 (Supported)

Operating System

Raspbian 10+ (Supported)

Relevant log output

[8/10/2023, 8:57:13 AM] [EufySecurity-2.1.14] INFO:  [Doorbell] [Video Process] Starting video stream: 1280x720, 30 fps, 299 kbps
[8/10/2023, 8:57:13 AM] [EufySecurity-2.1.14] DEBUG: [Doorbell] [Video Process] ffmpeg log message:
[tcp @ 0x3aa86e0] [verbose] Starting connection attempt to 127.0.0.1 port 16700
[tcp @ 0x3aa86e0] [verbose] Successfully connected to 127.0.0.1 port 16700
[tcp @ 0x3ab0ec0] [verbose] Starting connection attempt to 127.0.0.1 port 13517
[tcp @ 0x3ab0ec0] [verbose] Successfully connected to 127.0.0.1 port 13517

[8/10/2023, 8:57:13 AM] [EufySecurity-2.1.14] DEBUG: [Doorbell] [Video Process] ffmpeg log message:
[h264 @ 0x3ab1570] [verbose] Reinit context to 640x480, pix_fmt: yuv420p

[8/10/2023, 8:57:14 AM] [EufySecurity-2.1.14] DEBUG: [Doorbell] [Video Process] ffmpeg log message:
[info] Input #0, h264, from 'tcp://127.0.0.1:13517':
[info]   Duration: N/A, start: 1691672233.917419, bitrate: N/A
[info]   Stream #0:0: Video: h264 (High), 1 reference frame, yuv420p(tv, bt709, progressive, left), 640x480, 15 fps, 15 tbr, 1200k tbn

[8/10/2023, 8:57:14 AM] [EufySecurity-2.1.14] DEBUG: [Doorbell] [Video Process] ffmpeg log message:
[info] Stream mapping:
[info]   Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
[info] Press [q] to stop, [?] for help

[8/10/2023, 8:57:14 AM] [EufySecurity-2.1.14] DEBUG: [Doorbell] [Video Process] ffmpeg log message:
[h264 @ 0x3abf9c0] [verbose] Reinit context to 640x480, pix_fmt: yuv420p

[8/10/2023, 8:57:14 AM] [EufySecurity-2.1.14] DEBUG: [Doorbell] [Video Process] ffmpeg log message:
[Parsed_scale_0 @ 0x3bbf180] [verbose] w:min(1280,iw) h:min(720,ih) flags:'' interl:0

[8/10/2023, 8:57:14 AM] [EufySecurity-2.1.14] DEBUG: [Doorbell] [Video Process] ffmpeg log message:
[Parsed_scale_1 @ 0x3aa8490] [verbose] w:trunc(iw/2)*2 h:trunc(ih/2)*2 flags:'' interl:0
[graph 0 input from stream 0:0 @ 0x3ba5980] [verbose] w:640 h:480 pixfmt:yuv420p tb:1/1200000 fr:15/1 sar:0/1

[8/10/2023, 8:57:14 AM] [EufySecurity-2.1.14] DEBUG: [Doorbell] [Video Process] ffmpeg log message:
[Parsed_scale_0 @ 0x3bbf180] [verbose] w:640 h:480 fmt:yuv420p sar:0/1 -> w:640 h:480 fmt:yuv420p sar:0/1 flags:0x0
[Parsed_scale_1 @ 0x3aa8490] [verbose] w:640 h:480 fmt:yuv420p sar:0/1 -> w:640 h:480 fmt:yuv420p sar:0/1 flags:0x0

[8/10/2023, 8:57:14 AM] [EufySecurity-2.1.14] DEBUG: [Doorbell] [Video Process] ffmpeg log message:
[libx264 @ 0x3ad19f0] [info] using cpu capabilities: ARMv6 NEON

[8/10/2023, 8:57:14 AM] [EufySecurity-2.1.14] DEBUG: [Doorbell] [Video Process] ffmpeg log message:
[libx264 @ 0x3ad19f0] [info] profile Constrained Baseline, level 3.0, 4:2:0, 8-bit

[8/10/2023, 8:57:14 AM] [EufySecurity-2.1.14] DEBUG: [Doorbell] [Video Process] ffmpeg log message:
[info] Output #0, rtp, to 'srtp://xxx.xxx.xx.xxxx:62841?rtcpport=62841&pkt_size=1128':
[info]   Metadata:
[info]     encoder         : Lavf59.16.100
[info]   Stream #0:0: Video: h264, 1 reference frame, yuv420p(tv, bt709, progressive, left), 640x480 (0x0), q=2-31, 299 kb/s, 30 fps, 90k tbn
[info]     Metadata:
[info]       encoder         : Lavc59.18.100 libx264
[info]     Side data:
[info]       cpb: bitrate max/min/avg: 299000/0/299000 buffer size: 598000 vbv_delay: N/A

[8/10/2023, 8:57:14 AM] [EufySecurity-2.1.14] DEBUG: [Doorbell] [Video Process] ffmpeg log message:
[verbose] Past duration 0.984474 too large   14kB time=00:00:00.00 bitrate=10075636.4kbits/s speed=0.00102x    
[verbose] *** 1 dup!

[8/10/2023, 8:57:14 AM] [EufySecurity-2.1.14] DEBUG: [Doorbell] [Video Process] process started. Getting the first response took 0.693 seconds.
[8/10/2023, 8:57:14 AM] [EufySecurity-2.1.14] DEBUG: [Doorbell] [Video Process] ffmpeg log message:
[verbose] *** dropping frame 5 from stream 0 at ts 1
[verbose] *** dropping frame 5 from stream 0 at ts 1

[8/10/2023, 8:57:14 AM] [EufySecurity-2.1.14] DEBUG: [Doorbell] [Video Process] ffmpeg log message:
[verbose] *** dropping frame 5 from stream 0 at ts 1
[verbose] *** dropping frame 5 from stream 0 at ts 1

[8/10/2023, 8:57:14 AM] [EufySecurity-2.1.14] DEBUG: [Doorbell] [Video Process] ffmpeg log message:
[verbose] Past duration 0.647591 too large

[8/10/2023, 8:57:14 AM] [EufySecurity-2.1.14] DEBUG: [Doorbell] [Video Process] ffmpeg log message:
[verbose] *** dropping frame 7 from stream 0 at ts 1
[verbose] *** dropping frame 7 from stream 0 at ts 1

[8/10/2023, 8:57:14 AM] [EufySecurity-2.1.14] DEBUG: [Doorbell] [Video Process] ffmpeg log message:
[verbose] *** dropping frame 7 from stream 0 at ts 3

[8/10/2023, 8:57:14 AM] [EufySecurity-2.1.14] DEBUG: [Doorbell] [Video Process] ffmpeg log message:
[verbose] *** dropping frame 7 from stream 0 at ts 1

[8/10/2023, 8:57:14 AM] [EufySecurity-2.1.14] DEBUG: [Doorbell] [Video Process] ffmpeg log message:
[verbose] *** dropping frame 7 from stream 0 at ts 1

[8/10/2023, 8:57:14 AM] [EufySecurity-2.1.14] DEBUG: [Doorbell] [Video Process] ffmpeg log message:
[verbose] *** dropping frame 7 from stream 0 at ts 1
[verbose] *** dropping frame 7 from stream 0 at ts 3

[8/10/2023, 8:57:14 AM] [EufySecurity-2.1.14] DEBUG: [Doorbell] [Video Process] ffmpeg log message:
[verbose] *** dropping frame 7 from stream 0 at ts 1

[8/10/2023, 8:57:14 AM] [EufySecurity-2.1.14] DEBUG: [Doorbell] [Video Process] ffmpeg log message:
[verbose] *** dropping frame 7 from stream 0 at ts 3
[verbose] *** dropping frame 8 from stream 0 at ts 1
[verbose] *** dropping frame 8 from stream 0 at ts 1
[verbose] *** dropping frame 8 from stream 0 at ts 3
[verbose] *** dropping frame 8 from stream 0 at ts 5

[8/10/2023, 8:57:14 AM] [EufySecurity-2.1.14] DEBUG: [Doorbell] [Video Process] ffmpeg log message:
[verbose] *** 1 dup!

[8/10/2023, 8:57:14 AM] [EufySecurity-2.1.14] DEBUG: [Doorbell] [Video Process] ffmpeg log message:
[verbose] *** 1 dup!

[8/10/2023, 8:57:14 AM] [EufySecurity-2.1.14] DEBUG: [Doorbell] [Video Process] ffmpeg log message:
[verbose] *** 1 dup!

[8/10/2023, 8:57:14 AM] [EufySecurity-2.1.14] DEBUG: [Doorbell] [Video Process] ffmpeg log message:
[verbose] *** 4 dup!

[8/10/2023, 8:57:14 AM] [EufySecurity-2.1.14] DEBUG: [Doorbell] [Video Process] ffmpeg log message:
[verbose] Past duration 0.761040 too large

[8/10/2023, 8:57:15 AM] [EufySecurity-2.1.14] DEBUG: [Doorbell] [Video Process] ffmpeg log message:
[info] frame=   25 fps=0.0 q=41.0 size=      47kB time=00:00:00.80 bitrate= 484.9kbits/s dup=8 drop=17 speed=1.55x    
[8/10/2023, 8:57:15 AM] [EufySecurity-2.1.14] DEBUG: Doorbell Receive Apple HK Stop request{"sessionID":"f97def67-16a0-472e-8aaa-bb342e55d572","type":"stop"}
[8/10/2023, 8:57:15 AM] [EufySecurity-2.1.14] DEBUG: Stopping session with id: f97def67-16a0-472e-8aaa-bb342e55d572
[8/10/2023, 8:57:15 AM] [EufySecurity-2.1.14] DEBUG: Doorbell RTSP rtspStream:false
[8/10/2023, 8:57:15 AM] [EufySecurity-2.1.14] DEBUG: Doorbell Looks like not compatible with RTSP
[8/10/2023, 8:57:15 AM] [EufySecurity-2.1.14] DEBUG: Audiostream was stopped after transmission of 0 data chunks.
[8/10/2023, 8:57:15 AM] [EufySecurity-2.1.14] DEBUG: Videostream was stopped after transmission of 39 data chunks.
[8/10/2023, 8:57:15 AM] [EufySecurity-2.1.14] DEBUG: Doorbell One stream instance (id: 4) released livestream. There are now 0 instance(s) using the livestream.
[8/10/2023, 8:57:15 AM] [EufySecurity-2.1.14] DEBUG: Doorbell All proxy instances to the livestream have terminated.
[8/10/2023, 8:57:15 AM] [EufySecurity-2.1.14] DEBUG: Doorbell Sufficient remaining livestream duration available. (28.703 seconds left)
[8/10/2023, 8:57:15 AM] [EufySecurity-2.1.14] DEBUG: Doorbell Schedule livestream termination in 8 seconds.
[8/10/2023, 8:57:15 AM] [EufySecurity-2.1.14] INFO:  Doorbell Stopped video stream.
[8/10/2023, 8:57:15 AM] [EufySecurity-2.1.14] DEBUG: Doorbell Raw Property Changes: 1142 -63
[8/10/2023, 8:57:15 AM] [EufySecurity-2.1.14] DEBUG: Doorbell Property Changes: wifiRssi -63
[8/10/2023, 8:57:17 AM] [EufySecurity-2.1.14] INFO:  [Doorbell] [Video Process] FFmpeg exited with code: null and signal: SIGKILL (Forced)
[8/10/2023, 8:57:20 AM] [EufySecurity-2.1.14] DEBUG: Doorbell Raw Property Changes: 1142 -62
[8/10/2023, 8:57:20 AM] [EufySecurity-2.1.14] DEBUG: Doorbell Property Changes: wifiRssi -62
[8/10/2023, 8:57:22 AM] [EufySecurity-2.1.14] DEBUG: Doorbell Raw Property Changes: 1142 -63
[8/10/2023, 8:57:22 AM] [EufySecurity-2.1.14] DEBUG: Doorbell Property Changes: wifiRssi -63
[8/10/2023, 8:57:23 AM] [EufySecurity-2.1.14] DEBUG: Doorbell Stopping station livestream.
[8/10/2023, 8:57:23 AM] [EufySecurity-2.1.14] INFO:  eufy HomeBase2 station livestream for Doorbell has stopped.

config

{
            "username": "xxx@xxx.xxx",
            "password": "xxxxxxx",
            "country": "US",
            "deviceName": "",
            "stations": [
                {
                    "serialNumber": "XXXXXXXXX",
                    "manualTriggerModes": []
                }
            ],
            "platform": "EufySecurity",
            "cameras": [
                {
                    "serialNumber": "XXXXXXXXX",
                    "rtsp": false,
                    "enableCamera": true,
                    "useCachedLocalLivestream": true,
                    "videoConfig": {
                        "audio": false,
                        "debug": true
                    },
                    "talkback": false,
                    "immediateRingNotificationWithoutSnapshot": true,
                    "delayCameraSnapshot": true,
                    "refreshSnapshotIntervalMinutes": 30,
                    "unbridge": true,
                    "snapshotHandlingMethod": 3
                }
            ],
            "ignoreStations": [],
            "ignoreDevices": [],
            "cleanCache": true,
            "_bridge": {
                "username": "xxxxxxxxx",
                "port": 40965
            },
            "enableDetailedLogging": true
        },
lenoxys commented 1 year ago

can you try with useCachedLocalLivestream disabled ? and update to 2.2.5 and send me again the log thanks !

joshuaswilcox commented 1 year ago

I tried that and now i see the following in the logs

[info] frame=  822 fps= 30 q=36.0 size=    1051kB time=00:00:27.36 bitrate= 314.6kbits/s dup=408 drop=17 speed=1.01x    
[08/28/2023 16:40:21]   [EufySecurity-2.2.5]    DEBUG   [ffmpeg.ts:603] [Doorbell] [Video Process] ffmpeg log message:
[verbose] *** 2 dup!

[08/28/2023 16:40:21]   [EufySecurity-2.2.5]    DEBUG   [ffmpeg.ts:603] [Doorbell] [Video Process] ffmpeg log message:
[verbose] *** 1 dup!

[08/28/2023 16:40:21]   [EufySecurity-2.2.5]    DEBUG   [ffmpeg.ts:603] [Doorbell] [Video Process] ffmpeg log message:
[verbose] *** 1 dup!

[08/28/2023 16:40:21]   [EufySecurity-2.2.5]    DEBUG   [ffmpeg.ts:603] [Doorbell] [Video Process] ffmpeg log message:
[verbose] *** 1 dup!

[08/28/2023 16:40:21]   [EufySecurity-2.2.5]    DEBUG   [ffmpeg.ts:603] [Doorbell] [Video Process] ffmpeg log message:
[verbose] *** 1 dup!

[08/28/2023 16:40:21]   [EufySecurity-2.2.5]    DEBUG   [ffmpeg.ts:603] [Doorbell] [Video Process] ffmpeg log message:
[verbose] *** 1 dup!

[08/28/2023 16:40:21]   [EufySecurity-2.2.5]    DEBUG   [ffmpeg.ts:603] [Doorbell] [Video Process] ffmpeg log message:
[info] frame=  838 fps= 30 q=35.0 size=    1068kB time=00:00:27.90 bitrate= 313.7kbits/s dup=415 drop=17 speed=1.01x    
[08/28/2023 16:40:21]   [EufySecurity-2.2.5]    DEBUG   [ffmpeg.ts:603] [Doorbell] [Video Process] ffmpeg log message:
[verbose] *** 1 dup!

[08/28/2023 16:40:21]   [EufySecurity-2.2.5]    DEBUG   [ffmpeg.ts:603] [Doorbell] [Video Process] ffmpeg log message:
[verbose] *** 1 dup!

[08/28/2023 16:40:21]   [EufySecurity-2.2.5]    DEBUG   [ffmpeg.ts:603] [Doorbell] [Video Process] ffmpeg log message:
[verbose] *** 1 dup!

[08/28/2023 16:40:21]   [EufySecurity-2.2.5]    DEBUG   [streamingDelegate.ts:400]      Doorbell Receive Apple HK Stop request{"sessionID":"c7385daa-7a56-4dd5-8593-b98b4a916df2","type":"stop"}
[08/28/2023 16:40:21]   [EufySecurity-2.2.5]    DEBUG   [streamingDelegate.ts:408]      Stopping session with id: c7385daa-7a56-4dd5-8593-b98b4a916df2
[08/28/2023 16:40:21]   [EufySecurity-2.2.5]    DEBUG   [utils.ts:8]    Doorbell RTSP rtspStream:false
[08/28/2023 16:40:21]   [EufySecurity-2.2.5]    DEBUG   [utils.ts:10]   Doorbell Looks like not compatible with RTSP
[08/28/2023 16:40:21]   [EufySecurity-2.2.5]    DEBUG   [LocalLivestreamManager.ts:47]  Audiostream was stopped after transmission of 0 data chunks.
[08/28/2023 16:40:21]   [EufySecurity-2.2.5]    DEBUG   [LocalLivestreamManager.ts:109] Videostream was stopped after transmission of 448 data chunks.
[08/28/2023 16:40:21]   [EufySecurity-2.2.5]    DEBUG   [LocalLivestreamManager.ts:407] Doorbell One stream instance (id: 4) released livestream. There are now 0 instance(s) using the livestream.
[08/28/2023 16:40:21]   [EufySecurity-2.2.5]    DEBUG   [LocalLivestreamManager.ts:410] Doorbell All proxy instances to the livestream have terminated.
[08/28/2023 16:40:21]   [EufySecurity-2.2.5]    DEBUG   [LocalLivestreamManager.ts:283] Doorbell Stopping station livestream.
[08/28/2023 16:40:21]   [EufySecurity-2.2.5]    INFO    [streamingDelegate.ts:451]      Doorbell Stopped video stream.
[08/28/2023 16:40:21]   [EufySecurity-2.2.5]    INFO    [LocalLivestreamManager.ts:290] eufy HomeBase2 station livestream for Doorbell has stopped.
[08/28/2023 16:40:23]   [EufySecurity-2.2.5]    INFO    [ffmpeg.ts:702] [Doorbell] [Video Process] FFmpeg exited with code: null and signal: SIGKILL (Forced)
lenoxys commented 1 year ago

I will need the log file directly : https://github.com/homebridge-eufy-security/plugin/wiki/Basic-Troubleshooting