kopiro / homebridge-tapo-camera

Homebridge plugin for TP-Link TAPO security cameras
ISC License
119 stars 10 forks source link

FFmpeg issue #92

Closed tomberriman closed 6 months ago

tomberriman commented 7 months ago

Describe The Bug: can preview camera in HomeKit but when I try to view I get this in the logs - Fmpeg exited with code: 1 and signal: null (Error)

To Reproduce: live view of camera feed

Expected behavior: live camera feed freezes

Logs: Fmpeg exited with code: 1 and signal: null (Error)

Show the Homebridge logs here, remove any sensitive information. Fmpeg exited with code: 1 and signal: null (Error)

Plugin Config:

Show your Homebridge config.json here, remove any sensitive information.
{
    "cameras": [
        {
            "name": "Living Room Camera",
            "ipAddress": "192.168.68.66",
            "password": "xxxx",
            "streamUser": "xxxx",
            "streamPassword": "xxxx",
            "debug": true,
            "disablePrivacyAccessory": true,
            "disableAlarmAccessory": true,
            "lowQuality": false
        },
        {
            "name": "Stairs Camera",
            "ipAddress": "192.168.68.51",
            "password": "xxxx",
            "streamUser": "xxxx",
            "streamPassword": "xxxxx",
            "debug": true,
            "disablePrivacyAccessory": true,
            "disableAlarmAccessory": true,
            "lowQuality": false
        }
    ],
    "platform": "tapo-camera"
}

Screenshots:

Environment:

entoryFB commented 7 months ago

have the same problem

Plugin Version: 2.3.1 Homebridge Version: 1.7.0 Node.js Version: 18.18.2 NPM Version: 10.1.0 Operating System: raspberry

anjuchamantha commented 7 months ago

https://github.com/homebridge/ffmpeg-for-homebridge

Installed this and worked

TheExcitedTech commented 7 months ago

I'm also experiencing a similar issue. But I can't preview in Home at all.

I installed the ffmpeg that @anjuchamantha suggested and rebooted my Hoobs server, but issue still persists.

Getting hit with these errors

ERROR[Kitchen] Failed to fetch snapshot. 12/3/2023, 3:08:40 PMTapo Camera BridgeERROR[Kitchen] Snapshot request handler provided empty image buffer! 12/3/2023, 3:08:40 PMTapo Camera Bridgetapo-cameraERROR[Living Room] Failed to fetch snapshot. 12/3/2023, 3:08:40 PMTapo Camera BridgeERROR[Living Room] Snapshot request handler provided empty image buffer! 12/3/2023, 3:08:42 PMTapo Camera Bridgetapo-camera[Living Room] Starting video stream: native x native, native fps, ??? kbps (AAC-eld) 12/3/2023, 3:08:42 PMTapo Camera Bridgetapo-cameraERROR[Living Room] FFmpeg exited with code: 1 and signal: null (Error) 12/3/2023, 3:08:42 PMTapo Camera Bridgetapo-camera[Living Room] Stopped video stream. 12/3/2023, 3:08:45 PMTapo Camera Bridgetapo-cameraERROR[Kitchen] Failed to fetch snapshot. 12/3/2023, 3:08:45 PMTapo Camera BridgeERROR[Kitchen] Snapshot request handler provided empty image buffer! 12/3/2023, 3:08:45 PMTapo Camera Bridgetapo-cameraERROR[Living Room] Failed to fetch snapshot. 12/3/2023, 3:08:45 PMTapo Camera BridgeERROR[Living Room] Snapshot request handler provided empty image buffer! 12/3/2023, 3:08:55 PMTapo Camera Bridgetapo-cameraERROR[Kitchen] Failed to fetch snapshot. 12/3/2023, 3:08:55 PMTapo Camera BridgeERROR[Kitchen] Snapshot request handler provided empty image buffer! 12/3/2023, 3:08:55 PMTapo Camera Bridgetapo-cameraERROR[Living Room] Failed to fetch snapshot. 12/3/2023, 3:08:55 PMTapo Camera BridgeERROR[Living Room] Snapshot request handler provided empty image buffer!


EDIT: Ok I found the solution. This works with this plugin too. I'm using it now.

I was using FFMPEG-Cam (https://github.com/Sunoo/homebridge-camera-ffmpeg) cuz I was really trying to see if there were other ways around this. This should work with this plugin but I am posting at the time that I finally got it working after hours debugging.

It turns out the password I set up for my RTSP stream has special charaters (_?>< etc) which was the issue. The only reason I knew that was an issue is when I was trying to connect to the steam via terminal on my computer to try to test it in a known good setpu; ffmpeg wasn't fully parsing the credentials and would stop at the special character. So I changed my password to a longer alphanumerical and that resolved the issue.

This may still be separate from this particular one, but I figured I'd post here since I also commented.

harrisonratcliffe commented 7 months ago

https://github.com/homebridge/ffmpeg-for-homebridge

Installed this and worked

Thank you!!

x23piracy commented 6 months ago

Is this solved?

kiltedtenor commented 6 months ago

I'm also having this issue as well. Both the main issue and the one that TheExcitedTech was having. Camera connects to HomeKit, but no images, either thumbnail or live. Same error in the logs. Any word on if this has been fixed for anyone else?

I have tried installing the suggested other plugins and have simplified my password significantly to see if any of the other fixes helped at all. No luck so far.

kopiro commented 6 months ago

Please install https://github.com/homebridge/ffmpeg-for-homebridge

SimonLit commented 6 months ago

I'm also experiencing a similar issue. But I can't preview in Home at all.

I installed the ffmpeg that @anjuchamantha suggested and rebooted my Hoobs server, but issue still persists.

Getting hit with these errors

ERROR[Kitchen] Failed to fetch snapshot. 12/3/2023, 3:08:40 PMTapo Camera BridgeERROR[Kitchen] Snapshot request handler provided empty image buffer! 12/3/2023, 3:08:40 PMTapo Camera Bridgetapo-cameraERROR[Living Room] Failed to fetch snapshot. 12/3/2023, 3:08:40 PMTapo Camera BridgeERROR[Living Room] Snapshot request handler provided empty image buffer! 12/3/2023, 3:08:42 PMTapo Camera Bridgetapo-camera[Living Room] Starting video stream: native x native, native fps, ??? kbps (AAC-eld) 12/3/2023, 3:08:42 PMTapo Camera Bridgetapo-cameraERROR[Living Room] FFmpeg exited with code: 1 and signal: null (Error) 12/3/2023, 3:08:42 PMTapo Camera Bridgetapo-camera[Living Room] Stopped video stream. 12/3/2023, 3:08:45 PMTapo Camera Bridgetapo-cameraERROR[Kitchen] Failed to fetch snapshot. 12/3/2023, 3:08:45 PMTapo Camera BridgeERROR[Kitchen] Snapshot request handler provided empty image buffer! 12/3/2023, 3:08:45 PMTapo Camera Bridgetapo-cameraERROR[Living Room] Failed to fetch snapshot. 12/3/2023, 3:08:45 PMTapo Camera BridgeERROR[Living Room] Snapshot request handler provided empty image buffer! 12/3/2023, 3:08:55 PMTapo Camera Bridgetapo-cameraERROR[Kitchen] Failed to fetch snapshot. 12/3/2023, 3:08:55 PMTapo Camera BridgeERROR[Kitchen] Snapshot request handler provided empty image buffer! 12/3/2023, 3:08:55 PMTapo Camera Bridgetapo-cameraERROR[Living Room] Failed to fetch snapshot. 12/3/2023, 3:08:55 PMTapo Camera BridgeERROR[Living Room] Snapshot request handler provided empty image buffer!

EDIT: Ok I found the solution. This works with this plugin too. I'm using it now.

I was using FFMPEG-Cam (https://github.com/Sunoo/homebridge-camera-ffmpeg) cuz I was really trying to see if there were other ways around this. This should work with this plugin but I am posting at the time that I finally got it working after hours debugging.

It turns out the password I set up for my RTSP stream has special charaters (_?>< etc) which was the issue. The only reason I knew that was an issue is when I was trying to connect to the steam via terminal on my computer to try to test it in a known good setpu; ffmpeg wasn't fully parsing the credentials and would stop at the special character. So I changed my password to a longer alphanumerical and that resolved the issue.

This may still be separate from this particular one, but I figured I'd post here since I also commented.

Removing the special char worked for me! Many thanks.