Sunoo / homebridge-camera-ffmpeg

Homebridge Plugin Providing FFmpeg-based Camera Support
https://sunoo.github.io/homebridge-camera-ffmpeg/
Apache License 2.0
1.08k stars 225 forks source link

Moved to new Mac with M1 chip, video not loading #1275

Closed jandreaucodes closed 2 years ago

jandreaucodes commented 2 years ago

Describe The Problem: I just moved my Homebridge install to a new Mac Studio with an M1 Ultra chip. The streams that worked on my previous machine don't work now.

It seems M1 chips install ffmpeg in a different location, so I updated the plugin, but am still seeing errors.

To Reproduce: Run a stream from a camera on an M1 Mac with ffmpeg installed in a different location than default.

Logs: PorchDoor 97FE] Snapshot request handler provided empty image buffer! [3/21/2022, 4:26:09 PM] [Camera FFmpeg] [DrivewayCam] Video stream requested: 1280 x 720, 30 fps, 299 kbps [3/21/2022, 4:26:09 PM] [Camera FFmpeg] [DrivewayCam] Starting video stream: native x native, native fps, ??? kbps [3/21/2022, 4:26:09 PM] [Camera FFmpeg] [DrivewayCam] Stream command: /opt/homebrew/bin/ffmpeg -i rtsp://!!@192.168.7.44:88:554/videoMain -an -sn -dn -codec:v copy -pix_fmt yuv420p -color_range mpeg -f rawvideo -payload_type 99 -ssrc 6807798 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params VfMDRbKBeDMlrI08E9CTqyg/nAw/jAmpkpB2/ov5 srtp://192.168.6.153:54758?rtcpport=54758&pkt_size=1316 -loglevel level+verbose -progress pipe:1 [3/21/2022, 4:26:09 PM] [Camera FFmpeg] [DrivewayCam] [info] ffmpeg version 5.0 Copyright (c) 2000-2022 the FFmpeg developers [3/21/2022, 4:26:09 PM] [Camera FFmpeg] [DrivewayCam] [info] built with Apple clang version 13.0.0 (clang-1300.0.29.30) [3/21/2022, 4:26:09 PM] [Camera FFmpeg] [DrivewayCam] [info] configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/5.0 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-neon [3/21/2022, 4:26:09 PM] [Camera FFmpeg] [DrivewayCam] [info] libavutil 57. 17.100 / 57. 17.100 [3/21/2022, 4:26:09 PM] [Camera FFmpeg] [DrivewayCam] [info] libavcodec 59. 18.100 / 59. 18.100 [3/21/2022, 4:26:09 PM] [Camera FFmpeg] [DrivewayCam] [info] libavformat 59. 16.100 / 59. 16.100 [3/21/2022, 4:26:09 PM] [Camera FFmpeg] [DrivewayCam] [info] libavdevice 59. 4.100 / 59. 4.100 [3/21/2022, 4:26:09 PM] [Camera FFmpeg] [DrivewayCam] [info] libavfilter 8. 24.100 / 8. 24.100 [3/21/2022, 4:26:09 PM] [Camera FFmpeg] [DrivewayCam] [info] libswscale 6. 4.100 / 6. 4.100 [3/21/2022, 4:26:09 PM] [Camera FFmpeg] [DrivewayCam] [info] libswresample 4. 3.100 / 4. 3.100 [3/21/2022, 4:26:09 PM] [Camera FFmpeg] [DrivewayCam] [info] libpostproc 56. 3.100 / 56. 3.100 [3/21/2022, 4:26:09 PM] [Camera FFmpeg] [DrivewayCam] [tcp @ 0x12cf05290] [verbose] Starting connection attempt to 192.168.7.44 port 88 [3/21/2022, 4:26:09 PM] [Camera FFmpeg] [DrivewayCam] [tcp @ 0x12cf05290] [verbose] Successfully connected to 192.168.7.44 port 88 [3/21/2022, 4:26:09 PM] [Camera FFmpeg] [DrivewayCam] [error] rtsp://XX:YYYY!!@192.168.7.44:88:554/videoMain: Invalid data found when processing input [3/21/2022, 4:26:09 PM] [Camera FFmpeg] [DrivewayCam] FFmpeg exited with code: 1 and signal: null (Error)

Homebridge Config:

Show your homebridge config.json here.
{
    "bridge": {
        "name": "Homebridge 186A",
        "username": "0E:EB:49:4F:18:6A",
        "port": 51071,
        "pin": "837-27-177"
    },
    "accessories": [],
    "platforms": [
        {
            "name": "Config",
            "port": 8581,
            "auth": "form",
            "theme": "dark-mode-blue",
            "tempUnits": "f",
            "lang": "auto",
            "platform": "config"
        },
        {
            "refreshToken": "XXXXXXX",
            "hideLightGroups": true,
            "hideDoorbellSwitch": true,
            "hideCameraLight": true,
            "hideCameraMotionSensor": true,
            "hideCameraSirenSwitch": true,
            "hideInHomeDoorbellSwitch": true,
            "hideAlarmSirenSwitch": true,
            "hideUnsupportedServices": true,
            "treatKnockAsDing": true,
            "platform": "Ring"
        },
        {
            "name": "Nest",
            "access_token": "XXXXXXX",
            "platform": "Nest"
        },
        {
            "name": "Insteon",
            "user": "true",
            "pass": "true",
            "host": "true",
            "port": "25105",
            "model": "PLM",
            "refresh": "false",
            "server_port": "3000",
            "use_express": "true",
            "keepAlive": "false",
            "devices": [
                {
                    "dimmable": "true",
                    "deviceType": "dimmer"
                }
            ],
            "platform": "InsteonLocal"
        },
        {
            "username": "CCCC",
            "password": "XXXXX",
            "vehicles": [
                {
                    "name": "Avenger",
                    "vin": "DDD"
                }
            ],
            "options": {
                "batteryName": "Fuel Level",
                "autoRefresh": false,
                "refreshRate": 180
            },
            "platform": "FordPass"
        },
        {
            "name": "RainBird",
            "devices": [
                {
                    "ipaddress": "192.168.5.0",
                    "password": "CCCCC",
                    "showValveSensor": true
                }
            ],
            "platform": "RainBird"
        },
        {
            "name": "Total Control",
            "hubIP": "192.168.4.30",
            "hubName": "Total Contol",
            "DELAY_BEFORE_RETRY_AFTER_NETWORK_LOSS": 60000,
            "HUB_CONNECT_TIMEOUT": 10000,
            "HUB_SEND_TIMEOUT": 30000,
            "publishGeneralVolumeSlider": true,
            "publishGeneralVolumeSwitches": false,
            "platform": "HarmonyHubWebSocket"
        },
        {
            "devices": [
                {
                    "name": "Bedroom TV",
                    "ip": "192.168.4.56",
                    "mac": "e4:75:dc:2d:7f:73",
                    "pollingInterval": 5,
                    "hideTvService": false,
                    "volumeLimit": 100,
                    "volumeControl": "buttons",
                    "channelControl": false
                }
            ],
            "platform": "webostv"
        },
        {
            "name": "Camera FFmpeg",
            "videoProcessor": "/opt/homebrew/bin/ffmpeg",
            "porthttp": 8080,
            "cameras": [
                {
                    "name": "DrivewayCam",
                    "manufacturer": "xxxx",
                    "model": "xxxx",
                    "motion": true,
                    "doorbell": true,
                    "switches": true,
                    "motionTimeout": 60,
                    "motionDoorbell": true,
                    "unbridge": true,
                    "videoConfig": {
                        "source": "-i rtsp://CCC:UUU!!@192.168.7.44:88:554/videoMain",
                        "maxStreams": 6,
                        "maxWidth": 0,
                        "maxHeight": 0,
                        "maxFPS": 0,
                        "vcodec": "copy",
                        "debug": true
                    }
                },
                {
                    "name": "PorchDoor",
                    "manufacturer": "xxxx",
                    "model": "xxxx",
                    "motion": true,
                    "doorbell": true,
                    "switches": true,
                    "motionDoorbell": true,
                    "unbridge": true,
                    "videoConfig": {
                        "source": "-i rtsp://CCC:YYY!!@192.168.7.44:88:554/videoMain",
                        "maxStreams": 6,
                        "maxWidth": 0,
                        "maxHeight": 0,
                        "maxFPS": 0,
                        "vcodec": "copy",
                        "debug": true
                    }
                }
            ],
            "platform": "Camera-ffmpeg"
        },
        {
            "name": "SMTP Motion",
            "log_emails": true,
            "platform": "smtpMotion"
        }
    ],
    "disabledPlugins": [
        "homebridge-newfoscam",
        "homebridge-enphase-envoy",
        "homebridge-platform-insteonlocal",
        "homebridge-rainbird",
        "homebridge-august-smart-locks",
        "homebridge-camera-ui",
        "homebridge-dyson-pure-cool",
        "homebridge-http-webhooks"
    ]
}

Screenshots:

Environment:

Sunoo commented 2 years ago

[3/21/2022, 4:26:09 PM] [Camera FFmpeg] [DrivewayCam] [error] rtsp://XX:YYYY!!@192.168.7.44:88:554/videoMain: Invalid data found when processing input

Looks like the video location might be bad? Can you view the stream in VLC or similar?

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.