hjdhjd / homebridge-unifi-protect

:video_camera: Complete HomeKit integration for all UniFi Protect device types with full support for most features including HomeKit Secure Video, and more. https://homebridge.io
Other
1.39k stars 84 forks source link

7.1.1 throws ffmpeg errors #1090

Closed bondskin closed 2 weeks ago

bondskin commented 3 weeks ago

Homebridge UniFi Protect Version

7.1.1

Homebridge Platform and OS

Raspberry Pi

Homebridge Version

1.8.2

Node Version

18.20.3

UniFi OS Version

4.0.5

UniFi Protect Controller Version

4.0.33

Describe the problem

updating from 7.10 to 7.1.1 produces errors as shown below

Homebridge HBUP JSON configuration

"controllers": [
                {
                    "address": "xxx",
                    "password": "yyy",
                    "username": "zzz"
                }
            ],
            "name": "UniFi Protect",
            "options": [
                "Enable.Device.Standalone.784558B70E8D",
                "Enable.Device.SyncName.784558B70E8D",
                "Enable.Device.StatusLed.784558B70E8D",
                "Disable.Doorbell.Messages.784558B70E8D",
                "Disable.Log.Doorbell.784558B70E8D",
                "Disable.Log.Doorbell.68D79AE2FF87",
                "Disable.Log.Doorbell.D021F9978EC7",
                "Disable.Log.Doorbell.70A7418F47A0",
                "Disable.Device.784558B13098",
                "Enable.Video.DynamicBitrate.784558B70E8D",
                "Disable.Video.Transcode.HighLatency.784558B70E8D",
                "Disable.Video.Transcode.HighLatency.68D79AE2FF87",
                "Disable.Video.Transcode.HighLatency.D021F9978EC7",
                "Disable.Video.Transcode.HighLatency.70A7418F47A0",
                "Enable.Video.Stream.Only.Low.784558B70E8D",
                "Disable.Video.HighResSnapshots.784558B70E8D",
                "Enable.Video.HighResSnapshots.68D79AE2FF87",
                "Enable.Video.HighResSnapshots.D021F9978EC7",
                "Enable.Video.HighResSnapshots.70A7418F47A0",
                "Enable.Nvr.SystemInfo",
                "Disable.Nvr.SystemInfo.784558B70E8D",
                "Disable.Video.HKSV.Record.Only.Low.68D79AE2FF87",
                "Disable.Video.HKSV.Record.Only.Low.D021F9978EC7",
                "Enable.Video.DynamicBitrate.70A7418F47A0",
                "Enable.Video.DynamicBitrate.68D79AE2FF87",
                "Disable.Doorbell.Messages.F4E2C6F258ED",
                "Disable.Log.Doorbell.F4E2C6F258ED",
                "Disable.Doorbell.Messages",
                "Disable.Log.Doorbell",
                "Enable.Video.Stream.UseApi",
                "Disable.Log.Doorbell.D021F999A47B",
                "Disable.Video.Transcode.HighLatency.D021F999A47B",
                "Enable.Video.Stream.UseApi.F4E2C6F258ED",
                "Enable.Video.HKSV.Record.Only.High.D021F999A47B",
                "Enable.Video.Stream.Only.Low.68D79AE2FF87",
                "Enable.Video.Stream.Only.Low.D021F9978EC7",
                "Disable.Video.Stream.UseApi.D021F999A47B",
                "Enable.Video.Stream.Only.High.D021F999A47B",
                "Enable.Video.Stream.Only.Low.70A7418F47A0",
                "Enable.Video.HKSV.Record.Only.Medium.70A7418F47A0",
                "Disable.Nvr.SystemInfo.F4E2C6F258ED"
            ],
            "videoProcessor": "/usr/local/bin/ffmpeg",
            "_bridge": {
                "username": "0E:F6:69:C3:75:2A",
                "port": 52653
            },
            "platform": "UniFi Protect"

Relevant log output

[16/06/2024, 11:28:24] [UniFi Protect] Bumblebee [G4 Instant]: FFmpeg process ended unexpectedly with an exit code of 1.
[16/06/2024, 11:28:24] [UniFi Protect] Bumblebee [G4 Instant]: FFmpeg (6.0-homebridge-alpine-armv7l-static) command that errored out was: /usr/lib/node_modules/homebridge-unifi-protect/node_modules/ffmpeg-for-homebridge/ffmpeg -hide_banner -nostats -fflags +discardcorrupt+genpts -max_delay 500000 -flags low_delay -probesize 6314502 -r 30 -f mp4 -i pipe:0 -ss 6000ms -map 0:v:0 -c:v libx264 -preset veryfast -profile:v main -level:v 4.0 -noautoscale -bf 0 -filter:v format=yuvj420p, scale=-2:min(ih\,1080) -g:v 120 -bufsize 4000k -maxrate 2000k -b:v 2000k -video_track_timescale 600 -reset_timestamps 1 -movflags frag_keyframe+empty_moov+default_base_moof -map 0:a:0? -acodec copy -f mp4 pipe:1
[16/06/2024, 11:28:24] [UniFi Protect] Bumblebee [G4 Instant]: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'pipe:0':
[16/06/2024, 11:28:24] [UniFi Protect] Bumblebee [G4 Instant]:   Metadata:
[16/06/2024, 11:28:24] [UniFi Protect] Bumblebee [G4 Instant]:     major_brand     : dash
[16/06/2024, 11:28:24] [UniFi Protect] Bumblebee [G4 Instant]:     minor_version   : 0
[16/06/2024, 11:28:24] [UniFi Protect] Bumblebee [G4 Instant]:     compatible_brands: iso6hvc1avc1mp41
[16/06/2024, 11:28:24] [UniFi Protect] Bumblebee [G4 Instant]:     creation_time   : 2024-06-16T09:27:25.000000Z
[16/06/2024, 11:28:24] [UniFi Protect] Bumblebee [G4 Instant]:   Duration: 00:00:40.68, start: 39.900011, bitrate: N/A
[16/06/2024, 11:28:24] [UniFi Protect] Bumblebee [G4 Instant]:   Stream #0:0[0x1](und): Video: h264 (Main) (avc1 / 0x31637661), yuvj420p(pc, bt709, progressive), 2688x1512, 10 kb/s, 30 fps, 30 tbr, 90k tbn (default)
[16/06/2024, 11:28:24] [UniFi Protect] Bumblebee [G4 Instant]:     Metadata:
[16/06/2024, 11:28:24] [UniFi Protect] Bumblebee [G4 Instant]:       creation_time   : 2024-06-16T09:27:25.000000Z
[16/06/2024, 11:28:24] [UniFi Protect] Bumblebee [G4 Instant]:       handler_name    : VideoHandler
[16/06/2024, 11:28:24] [UniFi Protect] Bumblebee [G4 Instant]:       vendor_id       : [0][0][0][0]
[16/06/2024, 11:28:24] [UniFi Protect] Bumblebee [G4 Instant]:       encoder         : EvoStream Media Server
[16/06/2024, 11:28:24] [UniFi Protect] Bumblebee [G4 Instant]:   Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 16000 Hz, mono, fltp, 0 kb/s (default)
[16/06/2024, 11:28:24] [UniFi Protect] Bumblebee [G4 Instant]:     Metadata:
[16/06/2024, 11:28:24] [UniFi Protect] Bumblebee [G4 Instant]:       creation_time   : 2024-06-16T09:27:25.000000Z
[16/06/2024, 11:28:24] [UniFi Protect] Bumblebee [G4 Instant]:       handler_name    : SoundHandler
[16/06/2024, 11:28:24] [UniFi Protect] Bumblebee [G4 Instant]:       vendor_id       : [0][0][0][0]
[16/06/2024, 11:28:24] [UniFi Protect] Bumblebee [G4 Instant]: Stream mapping:
[16/06/2024, 11:28:24] [UniFi Protect] Bumblebee [G4 Instant]:   Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
[16/06/2024, 11:28:24] [UniFi Protect] Bumblebee [G4 Instant]:   Stream #0:1 -> #0:1 (copy)
[16/06/2024, 11:28:24] [UniFi Protect] Bumblebee [G4 Instant]: [swscaler @ 0xb5d48c90] deprecated pixel format used, make sure you did set range correctly
[16/06/2024, 11:28:24] [UniFi Protect] Bumblebee [G4 Instant]: [swscaler @ 0xb5d48490] deprecated pixel format used, make sure you did set range correctly
[16/06/2024, 11:28:24] [UniFi Protect] Bumblebee [G4 Instant]: [swscaler @ 0xb5d48c80] deprecated pixel format used, make sure you did set range correctly
[16/06/2024, 11:28:24] [UniFi Protect] Bumblebee [G4 Instant]: [swscaler @ 0xb5d48470] deprecated pixel format used, make sure you did set range correctly
[16/06/2024, 11:28:24] [UniFi Protect] Bumblebee [G4 Instant]: [vost#0:0/libx264 @ 0xb6e2b810] Finishing stream without any data written to it.
[16/06/2024, 11:28:24] [UniFi Protect] Bumblebee [G4 Instant]: [libx264 @ 0xb6e34490] using cpu capabilities: ARMv6 NEON
[16/06/2024, 11:28:24] [UniFi Protect] Bumblebee [G4 Instant]: [libx264 @ 0xb6e34490] profile Main, level 4.0, 4:2:0, 8-bit
[16/06/2024, 11:28:24] [UniFi Protect] Bumblebee [G4 Instant]: [libx264 @ 0xb6e34490] 264 - core 164 r3144 5a9dfdd - H.264/MPEG-4 AVC codec - Copyleft 2003-2023 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=2 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=6 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=1 keyint=120 keyint_min=12 scenecut=40 intra_refresh=0 rc_lookahead=10 rc=cbr mbtree=1 bitrate=2000 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=2000 vbv_bufsize=4000 nal_hrd=none filler=0 ip_ratio=1.40 aq=1:1.00
[16/06/2024, 11:28:24] [UniFi Protect] Bumblebee [G4 Instant]: [out#0/mp4 @ 0xb6d13bc0] Could not write header (incorrect codec parameters ?): Broken pipe
[16/06/2024, 11:28:24] [UniFi Protect] Bumblebee [G4 Instant]: [vost#0:0/libx264 @ 0xb6e2b810] Error initializing output stream: 
[16/06/2024, 11:28:24] [UniFi Protect] Bumblebee [G4 Instant]: Exiting normally, received signal 15.

Acknowledgment that you are only running UniFi OS and UniFi Protect releases from the Ubiquiti Official release channel

bondskin commented 3 weeks ago

reverted manual ffmpeg location in settings to default. issue remains

hjdhjd commented 2 weeks ago

This issue relates to use of the experimental livestream API. It's provided without support. You're welcome to join the conversation on Discord if you'd like to work through your experiences.

github-actions[bot] commented 2 weeks ago

This issue is locked to prevent necroposting on closed issues. Please create a new issue for related support requests, bug reports, or feature suggestions.