Ghawken / HomeKitLink-Siri

8 stars 3 forks source link

Security Spy Cam issues #17

Closed LukeSpad closed 2 years ago

LukeSpad commented 2 years ago

Hi there, Thanks for a great plug-in!

One issue I’ve found - for Security Spy Cameras, although the preview images are displaying properly, opening the stream results in a Camera Not Available message.

LukeSpad commented 2 years ago

To add - the screen says “wait until another user has stopped viewing the stream”

Ghawken commented 2 years ago

It’ll be camera dependant unfortunately. Lots of ways to break stream. The messaging - including the above is unreliable I have found.

Disable Audio in first instance. Often Audio breaks SS streams

& failing that helping: Run the Menu Command FFMPEG (Run Ffmpeg for logging) This all going well will show a log of what the issue is - may be straight forward - and post here

Otherwise happy to review and possibly add support for - but a lot of different cameras and not a major priority.

Glenn

LukeSpad commented 2 years ago

Thanks Glenn,

Looking at the Ffmpeg line, I've retrieved the rest stream address and checked it in VLC - the stream is valid and correctly formed and displays properly in VLC.

I do get some errors to the log if I run the Ffmpeg line in indigo as follows:

HomeKitLink Siri Warning ffmpeg version 5.0 Copyright (c) 2000-2022 the FFmpeg developers built with Apple clang version 13.0.0 (clang-1300.0.29.30) configuration: --enable-videotoolbox --pkgconfigdir=/Users/runner/work/ffmpeg-for-homebridge/ffmpeg-for-homebridge/build/workspace/lib/pkgconfig --prefix=/Users/runner/work/ffmpeg-for-homebridge/ffmpeg-for-homebridge/build/workspace --pkg-config-flags=--static --extra-cflags=-I/Users/runner/work/ffmpeg-for-homebridge/ffmpeg-for-homebridge/build/workspace/include --extra-ldflags=-L/Users/runner/work/ffmpeg-for-homebridge/ffmpeg-for-homebridge/build/workspace/lib --extra-libs='-lpthread -lm' --enable-static --disable-debug --disable-shared --disable-ffplay --disable-doc --enable-openssl --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-libvpx --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libx264 --enable-runtime-cpudetect --enable-libfdk-aac --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-decoder=h264 --enable-network --enable-protocol=tcp --enable-libspeex --enable-demuxer=rtsp libavutil 57. 17.100 / 57. 17.100 libavcodec 59. 18.100 / 59. 18.100 libavformat 59. 16.100 / 59. 16.100 libavdevice 59. 4.100 / 59. 4.100 libavfilter 8. 24.100 / 8. 24.100 libswscale 6. 4.100 / 6. 4.100 libswresample 4. 3.100 / 4. 3.100 libpostproc 56. 3.100 / 56. 3.100 [rtsp @ 0x7f9e14104140] CSeq 2 expected, 0 received. [rtsp @ 0x7f9e14104140] Stream #0: not enough frames to estimate rate; consider increasing probesize Input #0, rtsp, from 'rtsp://user:password@ipaddress:port/stream?cameraNum=3&width=1280': Metadata: title : Live Stream Duration: N/A, bitrate: N/A Stream #0:0: Video: h264 (High), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], 90k tbr, 90k tbn Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264)) Press [q] to stop, [?] for help [libx264 @ 0x7f9e14005d00] using SAR=1/1 [libx264 @ 0x7f9e14005d00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 [libx264 @ 0x7f9e14005d00] profile High, level 3.1, 4:2:0, 8-bit Output #0, rtp, to 'srtp://ipaddress:port?rtcpport=port&localrtcpport=port&pkt_size=1316': Metadata: title : Live Stream encoder : Lavf59.16.100 Stream #0:0: Video: h264, yuv420p(tv, progressive), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 299 kb/s, 15 fps, 90k tbn Metadata: encoder : Lavc59.18.100 libx264 Side data: cpb: bitrate max/min/avg: 299000/0/299000 buffer size: 2392000 vbv_delay: N/A frame= 1 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x frame= 7 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A dup=1 drop=1 speed= 0x frame= 15 fps= 13 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A dup=1 drop=1 speed= 0x frame= 22 fps= 13 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A dup=1 drop=1 speed= 0x frame= 32 fps= 14 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A dup=3 drop=2 speed= 0x frame= 39 fps= 14 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A dup=3 drop=2 speed= 0x frame= 46 fps= 14 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A dup=3 drop=3 speed= 0x frame= 53 fps= 14 q=58.0 size= 141kB time=00:00:00.33 bitrate=3477.1kbits/s dup=4 drop=4 speed=0.0883x frame= 61 fps= 14 q=42.0 size= 144kB time=00:00:00.86 bitrate=1360.0kbits/s dup=5 drop=4 speed=0.201x frame= 70 fps= 14 q=42.0 size= 148kB time=00:00:01.46 bitrate= 827.1kbits/s dup=5 drop=5 speed=0.303x frame= 77 fps= 14 q=41.0 size= 152kB time=00:00:01.93 bitrate= 643.5kbits/s dup=6 drop=5 speed=0.36x frame= 85 fps= 14 q=35.0 size= 160kB time=00:00:02.46 bitrate= 530.8kbits/s dup=6 drop=6 speed=0.42x frame= 94 fps= 15 q=42.0 size= 176kB time=00:00:03.06 bitrate= 471.2kbits/s dup=10 drop=8 speed=0.481x frame= 101 fps= 15 q=39.0 size= 183kB time=00:00:03.53 bitrate= 424.2kbits/s dup=10 drop=9 speed=0.511x frame= 109 fps= 15 q=38.0 size= 197kB time=00:00:04.06 bitrate= 396.2kbits/s dup=11 drop=11 speed=0.546x frame= 116 fps= 15 q=38.0 size= 208kB time=00:00:04.53 bitrate= 376.4kbits/s dup=12 drop=12 speed=0.57x frame= 124 fps= 15 q=37.0 size= 220kB time=00:00:05.06 bitrate= 356.1kbits/s dup=14 drop=14 speed=0.597x frame= 132 fps= 15 q=41.0 size= 242kB time=00:00:05.60 bitrate= 353.8kbits/s dup=16 drop=16 speed=0.622x frame= 139 fps= 15 q=35.0 size= 248kB time=00:00:06.06 bitrate= 335.0kbits/s dup=16 drop=16 speed=0.638x frame= 147 fps= 15 q=42.0 size= 281kB time=00:00:06.60 bitrate= 348.8kbits/s dup=18 drop=18 speed=0.659x frame= 155 fps= 15 q=36.0 size= 297kB time=00:00:07.13 bitrate= 341.5kbits/s dup=21 drop=20 speed=0.676x frame= 164 fps= 15 q=40.0 size= 319kB time=00:00:07.73 bitrate= 338.3kbits/s dup=21 drop=20 speed= 0.7x frame= 172 fps= 15 q=38.0 size= 335kB time=00:00:08.26 bitrate= 331.8kbits/s dup=21 drop=20 speed=0.713x frame= 179 fps= 15 q=38.0 size= 351kB time=00:00:08.73 bitrate= 329.6kbits/s dup=21 drop=20 speed=0.72x frame= 188 fps= 15 q=39.0 size= 369kB time=00:00:09.33 bitrate= 323.6kbits/s dup=21 drop=20 speed=0.737x frame= 196 fps= 15 q=37.0 size= 384kB time=00:00:09.86 bitrate= 318.8kbits/s dup=21 drop=20 speed=0.747x frame= 204 fps= 15 q=40.0 size= 407kB time=00:00:10.40 bitrate= 320.9kbits/s dup=21 drop=20 speed=0.758x frame= 211 fps= 15 q=36.0 size= 427kB time=00:00:10.86 bitrate= 322.1kbits/s dup=21 drop=20 speed=0.764x

Ghawken commented 2 years ago

Ok. If the logging output above is from the plugin Menu item (would guess so just missing beginning) this suggest it decodes the stream then really should be fine. Presume you have run the xattr command? To unquarantine.

Can you post the whole output - including the command ffmpeg is running - should be surrounded by square brackets…

It may be more a connected iOS client issue - try iphone/ipad etc - you may find a different outcome.

LukeSpad commented 2 years ago

Thanks - I had run the xattr command previously but, having re run it all is well now. Must have been that - many thanks for all the support. Brilliant plug-in and very much appreciate the assistance

Ghawken commented 2 years ago

Ok. That is a bit odd. It may be something else altogether. Normally when xattr not run - displays a big ‘Move to Bin’ pop up. If that wasn’t there - would guess might be something else. Possible was running 2 streams and were clashing…. SS does take a bit of time to start up.

Either way - all good!