homebridge / docker-homebridge

Homebridge Docker. HomeKit support for the impatient using Docker on x86_64, Raspberry Pi (armhf) and ARM64. Includes ffmpeg + libfdk-aac.
https://hub.docker.com/r/homebridge/homebridge/
GNU General Public License v3.0
2.57k stars 241 forks source link

ffmpeg not working both ubuntu versions #430

Closed timmeade closed 2 years ago

timmeade commented 2 years ago

Describe Your Problem:

New install of debian server 11.3 Everything latest as of today. I am replacing a macos install that was native node.js and everything worked fine.

Docker-compose and homebridge starts and looks good. Several other plugins installed (tp-link-wemo). all good Installed the unifi protect plugin for cameras.

When going to homekit. The still captures from the cameras look good. When clicking on them in homekit to start the live views, ffmpeg errors out as seen below.

Logs:

[4/12/2022, 5:45:24 PM] [UniFi Protect] House-UDM-PRO [UDM-PRO] Camera Drive Way [UVC G4 Bullet]: Streaming request from 10.3.111.129: 1280x720@30fps, 299 kbps. Using 1280x720@15fps (Medium), 1200 kbps.
[4/12/2022, 5:45:24 PM] [UniFi Protect] House-UDM-PRO [UDM-PRO] Camera Drive Way [UVC G4 Bullet]: FFmpeg process ended unexpectedly with an exit code of 1.
[4/12/2022, 5:45:24 PM] [UniFi Protect] House-UDM-PRO [UDM-PRO] Camera Drive Way [UVC G4 Bullet]: FFmpeg command line that errored out was: ffmpeg -hide_banner -probesize 2048 -max_delay 500000 -r 15 -rtsp_transport tcp -i rtsps://10.3.0.1:7441/ONyJj022IDVZDofI?enableSrtp -map 0:v -vcodec copy -payload_type 99 -ssrc 10482520 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params QJ61o1TCsQjLGVg21S8ZHv4Mequhj2+USVL6PCfb srtp://10.3.111.129:64958?rtcpport=64958&localrtcpport=64958&pkt_size=564 -map 0:a -acodec libfdk_aac -profile:a aac_eld -flags +global_header -f null -ar 16k -b:a 24k -bufsize 48k -ac 1 -payload_type 110 -ssrc 488667 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params CYmDdpv/hO+4SqBkHHJha95axPWIX6yaVHOz6ihT srtp://10.3.111.129:52969?rtcpport=52969&localrtcpport=52969&pkt_size=188
[4/12/2022, 5:45:24 PM] [UniFi Protect] [rtsp @ 0x55eb6d505e40] Stream #2: not enough frames to estimate rate; consider increasing probesize
[4/12/2022, 5:45:24 PM] [UniFi Protect] [rtsp @ 0x55eb6d505e40] Could not find codec parameters for stream 2 (Video: h264, none): unspecified size
[4/12/2022, 5:45:24 PM] [UniFi Protect] Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (2048) options
[4/12/2022, 5:45:24 PM] [UniFi Protect] Input #0, rtsp, from 'rtsps://10.3.0.1:7441/ONyJj022IDVZDofI?enableSrtp':
[4/12/2022, 5:45:24 PM] [UniFi Protect]   Metadata:
[4/12/2022, 5:45:24 PM] [UniFi Protect]     title           : E063DA3F30D7_1
[4/12/2022, 5:45:24 PM] [UniFi Protect]   Duration: N/A, start: 0.000000, bitrate: N/A
[4/12/2022, 5:45:24 PM] [UniFi Protect]   Stream #0:0: Audio: aac (LC), 48000 Hz, mono, fltp
[4/12/2022, 5:45:24 PM] [UniFi Protect]   Stream #0:1: Audio: opus, 48000 Hz, stereo, fltp
[4/12/2022, 5:45:24 PM] [UniFi Protect]   Stream #0:2: Video: h264, none, 90k tbr, 90k tbn
[4/12/2022, 5:45:24 PM] [UniFi Protect] [rtp @ 0x55eb6d548680] dimensions not set
[4/12/2022, 5:45:24 PM] [UniFi Protect] Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
[4/12/2022, 5:45:24 PM] [UniFi Protect] Error initializing output stream 0:0 -- 
[4/12/2022, 5:45:24 PM] [UniFi Protect] Stream mapping:
[4/12/2022, 5:45:24 PM] [UniFi Protect]   Stream #0:2 -> #0:0 (copy)
[4/12/2022, 5:45:24 PM] [UniFi Protect]   Stream #0:0 -> #1:0 (aac (native) -> aac (libfdk_aac))
[4/12/2022, 5:45:24 PM] [UniFi Protect]   Stream #0:1 -> #1:1 (opus (native) -> aac (libfdk_aac))
[4/12/2022, 5:45:24 PM] [UniFi Protect]     Last message repeated 1 times
[4/12/2022, 5:45:24 PM] [UniFi Protect] Abbotsford-UDM-PRO [UDM-PRO] Camera Drive Way [UVC G4 Bullet]: Stopped video streaming session.

Docker Start Command:

docker-compose

version: '2'
services:
  homebridge:
    image: oznu/homebridge:ubuntu-no-avahi
    container_name: homebridge
    restart: always
    network_mode: host
    environment:
      - TZ=America/New_York
      - PGID=1000
      - PUID=1000
      - HOMEBRIDGE_CONFIG_UI=1
      - HOMEBRIDGE_CONFIG_UI_PORT=8581
    volumes:
      - ./homebridge:/homebridge

Homebridge Config:

{
    "bridge": {
        "name": "Homebridge 4B2D",
        "username": "0E:3C:E6:AA:AA:AA",
        "port": 53079,
        "pin": "031-45-1aa"
    },
    "accessories": [],
    "platforms": [
        {
            "name": "Config",
            "port": 8581,
            "platform": "config"
        },
        {
            "email": "me@email.com",
            "password": "password",
            "platform": "myQ"
        },
        {
            "name": "Wemo",
            "mode": "auto",
            "discoveryInterval": 15,
            "disableUPNP": true,
            "platform": "Wemo"
        },
        {
            "controllers": [
                {
                    "address": "10.3.0.1",
                    "password": "password",
                    "username": "username"
                }
            ],
            "platform": "UniFi Protect"
        }
    ]
}

Screenshots:

Environment:

timmeade commented 2 years ago

Closing as this is an issue with the protect plugin.