homebridge-eufy-security / plugin

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

[Bug]: Can't stream video in HK and get error in logs for Unknown encoder 'libfdk_aac' #457

Open kvoth1 opened 11 months ago

kvoth1 commented 11 months ago

What happened?

Tried to livestream Eufy Doorbell (also Eufy Cam 3) and got error and livestream never started.

Unknown encoder 'libfdk_aac' fatal error.

Device Type

Doorbell (Supported)

Plugin Version

v2.0.x (Supported)

HomeBridge Version

v1.6.x (Supported)

NodeJS Version

v18 (Supported)

Operating System

Raspbian 10+ (Supported)

Relevant log output

[10/19/2023 22:14:53]   [EufySecurity-2.3.4]    DEBUG   [LocalLivestreamManager.ts:235] Back Doorbell 2K New livestream started. Proxy stream has id: 1.
[10/19/2023 22:14:53]   [EufySecurity-2.3.4]    DEBUG   [ffmpeg.ts:821] [Back Doorbell 2K] [Video Process] Stream command: ffmpeg -hide_banner -loglevel level+verbose -use_wallclock_as_timestamps 1 -i tcp://127.0.0.1:14562 -an -sn -dn -r 30 -vcodec libx264 -pix_fmt yuv420p -color_range mpeg -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 -bufsize 598k -maxrate 299k -payload_type 99 -ssrc 14023936 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params aY8kKYse/MyDXflI0R0Cy3oNoygruz3I01gIIk7Q srtp://192.168.7.93:50269?rtcpport=50269&pkt_size=1128 -i tcp://127.0.0.1:14691 -vn -sn -dn -acodec libfdk_aac -profile:a aac_eld -flags +global_header -b:a 24k -ar 16k -ac 1 -payload_type 110 -ssrc 7187531 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params KnVUS9q1dfNE3rpaudh/9XyKyetbKqUeSsnXweYh srtp://192.168.7.93:58823?rtcpport=58823&pkt_size=188 -progress tcp://127.0.0.1:13925
[10/19/2023 22:14:53]   [EufySecurity-2.3.4]    INFO    [ffmpeg.ts:823] [Back Doorbell 2K] [Video Process] Starting video stream: 1280x720, 30 fps, 299 kbps
[10/19/2023 22:14:53]   [EufySecurity-2.3.4]    INFO    [ffmpeg.ts:823] [Back Doorbell 2K] [Video Process] Starting audio stream: 16 kHz, 24 kbps, codec: libfdk_aac
[10/19/2023 22:14:56]   [EufySecurity-2.3.4]    ERROR   [ffmpeg.ts:838] [Back Doorbell 2K] [Video Process] ffmpeg log message:
[info] Input #1, aac, from 'tcp://127.0.0.1:14691':
[info]   Duration: N/A, bitrate: 24 kb/s
[info]     Stream #1:0: Audio: aac (LC), 16000 Hz, mono, fltp, 24 kb/s
[fatal] Unknown encoder 'libfdk_aac'
[AVIOContext @ 0x558710fe30] [verbose] Statistics: 0 seeks, 0 writeouts
[AVIOContext @ 0x5587079040] [verbose] Statistics: 440170 bytes read, 0 seeks
[AVIOContext @ 0x558710b0e0] [verbose] Statistics: 9644 bytes read, 0 seeks

[10/19/2023 22:14:56]   [EufySecurity-2.3.4]    ERROR   [streamingDelegate.ts:276]      Back Doorbell 2K Video process ended with error: FFmpeg exited with code: 1 and signal: null (Error)
[10/19/2023 22:14:56]   [EufySecurity-2.3.4]    DEBUG   [streamingDelegate.ts:366]      Stopping session with id: 4aab8c3d-4334-4a28-957f-5982d27b9a76

config

{
    "enableDetailedLogging": false,
    "CameraMaxLivestreamDuration": 300,
    "pollingIntervalMinutes": 10,
    "hkHome": 1,
    "hkAway": 0,
    "hkNight": 3,
    "hkOff": 63,
    "ignoreStations": [
        "T8400P20201912AA",
        "T8410P202013050D",
        "T87B2P0023031A04"
    ],
    "ignoreDevices": [
        "T8400P20201912AA",
        "T8410P202013050D",
        "T8114P02194203BF",
        "T8140P0220220182",
        "T87B2P0023031A04"
    ],
    "country": "US",
    "cameras": [
        {
            "serialNumber": "T8210P002037087E",
            "rtsp": false,
            "enableCamera": true,
            "videoConfig": {
                "audio": true,
                "audioSampleRate": 8
            },
            "talkback": false,
            "unbridge": false,
            "immediateRingNotificationWithoutSnapshot": true,
            "delayCameraSnapshot": true,
            "refreshSnapshotIntervalMinutes": 20,
            "hsv": false,
            "hsvRecordingDuration": 90,
            "hsvConfig": {},
            "snapshotHandlingMethod": 3,
            "enableButton": false,
            "motionButton": true,
            "indoorChimeButton": false,
            "useCachedLocalLivestream": false,
            "enable": false,
            "motion": false,
            "indoorchime": false
        },
        {
            "serialNumber": "T8140P0220220182",
            "rtsp": false,
            "enableCamera": "true",
            "videoConfig": {
                "audio": true,
                "audioSampleRate": 0
            },
            "talkback": true,
            "hsv": false,
            "hsvRecordingDuration": 90,
            "hsvConfig": {},
            "snapshotHandlingMethod": 3
        },
        {
            "serialNumber": "T8160P1122442039",
            "rtsp": false,
            "enableCamera": "true",
            "talkback": false,
            "videoConfig": {
                "audio": true,
                "audioSampleRate": 0
            },
            "enableButton": false,
            "motionButton": true,
            "hsv": false,
            "unbridge": false,
            "snapshotHandlingMethod": 3,
            "delayCameraSnapshot": true,
            "refreshSnapshotIntervalMinutes": 20,
            "hsvRecordingDuration": 90,
            "hsvConfig": {},
            "talkbackChannels": 1,
            "useCachedLocalLivestream": false,
            "enable": false,
            "motion": false,
            "light": true
        },
        {
            "serialNumber": "T8114P02194203BF",
            "hsv": false,
            "hsvRecordingDuration": 90,
            "hsvConfig": {},
            "snapshotHandlingMethod": 3
        },
        {
            "serialNumber": "T87B2P0023031A04",
            "rtsp": false,
            "talkback": false
        }
    ],
    "cleanCache": true,
    "unbridge": true,
    "ignoreMultipleDevicesWarning": false,
    "syncStationModes": false,
    "platform": "EufySecurity",
    "username": "XXXXX",
    "password": "XXXXX",
    "deviceName": "",
    "stations": [
        {
            "serialNumber": "T8030P1322330D79",
            "manualTriggerModes": [
                3,
                0,
                1
            ]
        }
    ],
    "preferLocalConnection": false,
    "_bridge": {
        "username": "XXX",
        "port": 43001
    }
}
github-actions[bot] commented 11 months ago

Did you check this Common Issues pages ?