Closed frizby66 closed 2 years ago
config.json details:- "cameras": [ { "name": "Main Entrance Door", "manufacturer": "Ezviz", "model": "CS-C3C", "motion": true, "unbridge": true, "hsv": true, "prebuffering": true, "prebufferLength": 4, "videoConfig": { "source": "-re -i rtsp://admin:xxxxxxx@192.168.2.180:554/h264_stream", "subSource": "-re -i rtsp://admin:xxxxxxx@192.168.2.180:554/Streaming/Channels/2", "rtspTransport": "tcp", "maxStreams": 2, "maxBitrate": 1024, "vcodec": "copy", "acodec": "libfdk_aac", "packetSize": 188, "stimeout": 10, "audio": false }, "videoanalysis": { "active": true } } ], "platform": "CameraUI"
config.json details:- "cameras": [ { "name": "Main Entrance Door", "manufacturer": "Ezviz", "model": "CS-C3C", "motion": true, "unbridge": true, "hsv": true, "prebuffering": true, "prebufferLength": 4, "videoConfig": { "source": "-re -i rtsp://admin:xxxxxxx@192.168.2.180:554/h264_stream", "subSource": "-re -i rtsp://admin:xxxxxxx@192.168.2.180:554/Streaming/Channels/2", "rtspTransport": "tcp", "maxStreams": 2, "maxBitrate": 1024, "vcodec": "copy", "acodec": "libfdk_aac", "packetSize": 188, "stimeout": 10, "audio": false }, "videoanalysis": { "active": true } } ], "platform": "CameraUI"
try without -re
in the source(s)
Same...log output:-
[1/20/2022, 10:01:45 PM] [CameraUI] HTTP: New message: URL: /motion?Main%20Entrance%20Door [1/20/2022, 10:01:45 PM] [CameraUI] Main Entrance Door: Motion ON [1/20/2022, 10:01:45 PM] [CameraUI] Main Entrance Door: Snapshot requested: 1280 x 720 [1/20/2022, 10:01:45 PM] [CameraUI] Main Entrance Door: Snapshot command: ffmpeg -hide_banner -loglevel error -analyzeduration 0 -probesize 695412 -f mpegts -i tcp://127.0.0.1:13399 -frames:v 1 -f image2 - [1/20/2022, 10:01:45 PM] [CameraUI] Main Entrance Door: Video fragments requested from HSV [1/20/2022, 10:01:45 PM] [CameraUI] Main Entrance Door: Setting prebuffer stream as input [1/20/2022, 10:01:45 PM] [CameraUI] Main Entrance Door: Prebuffer requested with a duration of -4s [1/20/2022, 10:01:45 PM] [CameraUI] Main Entrance Door: Replacing audio with a dummy track, audio source not found or timed out during probe stream (recording) [1/20/2022, 10:01:45 PM] [CameraUI] Main Entrance Door: Start recording... [1/20/2022, 10:01:45 PM] [CameraUI] Main Entrance Door: Recording command: ffmpeg -hide_banner -analyzeduration 0 -probesize 500000 -f mp4 -i tcp://127.0.0.1:29034 -f lavfi -i anullsrc=cl=1 -shortest -f mp4 -vcodec copy -bsf:a aac_adtstoasc -acodec libfdk_aac -profile:a aac_low -ar 32k -b:a 64k -ac 1 -movflags frag_keyframe+empty_moov+default_base_moof -max_muxing_queue_size 1024 tcp://127.0.0.1:39584 [1/20/2022, 10:01:45 PM] [CameraUI] Main Entrance Door: Recording started [1/20/2022, 10:01:45 PM] [CameraUI] Main Entrance Door: Prebuffer request ended [1/20/2022, 10:01:45 PM] [CameraUI] Main Entrance Door: FFmpeg recording process exited (expected) [1/20/2022, 10:01:45 PM] [CameraUI] Main Entrance Door: FFMPEG socket closed during read for 8 bytes! [1/20/2022, 10:01:45 PM] [CameraUI] Main Entrance Door: Recording completed (HSV) [HDS ::ffff:192.168.2.122] Delegate finished streaming for 1 without setting RecordingPacket.isLast. Can't notify Controller about endOfStream! [1/20/2022, 10:01:45 PM] [CameraUI] Main Entrance Door: New custom alert [1/20/2022, 10:01:45 PM] [CameraUI] Main Entrance Door: Notifications not enabled, skip Webhook.. [1/20/2022, 10:01:45 PM] [CameraUI] Main Entrance Door: Notifications not enabled, skip Alexa.. [1/20/2022, 10:01:45 PM] [CameraUI] Main Entrance Door: Recording not enabled, skip recording.. [1/20/2022, 10:01:45 PM] [CameraUI] Main Entrance Door: Recording skipped. Notification skipped. [1/20/2022, 10:01:46 PM] [CameraUI] Main Entrance Door: Prebuffer request ended [1/20/2022, 10:01:46 PM] [CameraUI] Main Entrance Door: Fetching snapshot took 1.127 seconds. [1/20/2022, 10:01:46 PM] [CameraUI] Main Entrance Door: Sending snapshot: 1280x720 [1/20/2022, 10:01:46 PM] [CameraUI] Main Entrance Door: Resize command: ffmpeg -i pipe: -frames:v 1 -filter:v scale='min(1280,iw)':'min(720,ih)':force_original_aspect_ratio=decrease -f image2 - [1/20/2022, 10:01:48 PM] [CameraUI] Main Entrance Door: Snapshot requested: 1280 x 720 [1/20/2022, 10:01:48 PM] [CameraUI] Main Entrance Door: Sending snapshot: 1280x720 (cached) [1/20/2022, 10:01:48 PM] [CameraUI] Main Entrance Door: Resize command: ffmpeg -i pipe: -frames:v 1 -filter:v scale='min(1280,iw)':'min(720,ih)':force_original_aspect_ratio=decrease -f image2 - [1/20/2022, 10:01:53 PM] [CameraUI] Main Entrance Door: Closing recording process [1/20/2022, 10:01:53 PM] [CameraUI] Resetting motion state because HSV closed recording with reason "3"
Here is a comparison of the record command...the top is the RPi, the bottom is the Mac mini. The path to FFMeg is very different...issue?
Recording command: /usr/lib/node_modules/homebridge-camera-ui/node_modules/ffmpeg-for-homebridge/ffmpeg -hide_banner -analyzeduration 0 -probesize 500000 -f mp4 -i tcp://127.0.0.1:19076 -f lavfi -i anullsrc=cl=1 -shortest -f mp4 -vcodec copy -bsf:a aac_adtstoasc -acodec libfdk_aac -profile:a aac_low -ar 32k -b:a 64k -ac 1 -movflags frag_keyframe+empty_moov+default_base_moof -max_muxing_queue_size 1024 tcp://127.0.0.1:39492
Recording command: ffmpeg -hide_banner -analyzeduration 0 -probesize 602929 -f mp4 -i tcp://127.0.0.1:19879 -f lavfi -i anullsrc=cl=1 -shortest -f mp4 -vcodec copy -bsf:a aac_adtstoasc -acodec libfdk_aac -profile:a aac_low -ar 32k -b:a 64k -ac 1 -movflags frag_keyframe+empty_moov+default_base_moof -max_muxing_queue_size 1024 tcp://127.0.0.1:39589
Have also tried the ffmpeg install on the GitHub wiki but get the following output:-
Macs-Mac-mini:~ macmini$ brew install ffmpeg --with-fdk-aac --with-ffplay --with-libass --with-libvorbis --with-libvpx --with-rtmpdump --with-openh264 --with-tools
Running brew update --preinstall
...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
Updated 18 formulae.
Usage: brew install [options] formula|cask [...]
Install a formula or cask. Additional options specific to a formula may be appended to the command.
Unless HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK is set, brew upgrade or brew reinstall will be run for outdated dependents and dependents with broken linkage, respectively.
Unless HOMEBREW_NO_INSTALL_CLEANUP is set, brew cleanup will then be run for the installed formulae or, every 30 days, for all formulae.
Unless HOMEBREW_NO_INSTALL_UPGRADE is set, brew install formula will upgrade formula if it is already installed but outdated.
-d, --debug If brewing fails, open an interactive debugging session with access to IRB or a shell inside the temporary build directory. -f, --force Install formulae without checking for previously installed keg-only or non-migrated versions. When installing casks, overwrite existing files (binaries and symlinks are excluded, unless originally from the same cask). -v, --verbose Print the verification and postinstall steps. --formula, --formulae Treat all named arguments as formulae. --ignore-dependencies An unsupported Homebrew development flag to skip installing any dependencies of any kind. If the dependencies are not already present, the formula will have issues. If you're not developing Homebrew, consider adjusting your PATH rather than using this flag. --only-dependencies Install the dependencies with specified options but do not install the formula itself. --cc Attempt to compile using the specified compiler, which should be the name of the compiler's executable, e.g. gcc-7 for GCC
If you have fixed your ffmpeg and still have problems, feel free to reopen
Describe the bug Tested on RPI, works as expected. Mac mini will not record Video (same configuration details for both).
To Reproduce Steps to reproduce the behavior
Expected behavior Should record HSV but produces a strange error message "[HDS ::ffff:192.168.2.96] Delegate finished streaming for 1 without setting RecordingPacket.isLast. Can't notify Controller about endOfStream!:"
NB - 192.168.2.96 is Apple TV acting as Hub.
Logs [1/20/2022, 9:16:39 PM] [CameraUI] Main Entrance Door: Video fragments requested from HSV [1/20/2022, 9:16:39 PM] [CameraUI] Main Entrance Door: Setting prebuffer stream as input [1/20/2022, 9:16:39 PM] [CameraUI] Main Entrance Door: Prebuffer requested with a duration of -4s [1/20/2022, 9:16:39 PM] [CameraUI] Main Entrance Door: Replacing audio with a dummy track, audio source not found or timed out during probe stream (recording) [1/20/2022, 9:16:39 PM] [CameraUI] Main Entrance Door: Start recording... [1/20/2022, 9:16:39 PM] [CameraUI] Main Entrance Door: Recording command: ffmpeg -hide_banner -analyzeduration 0 -probesize 596512 -f mp4 -i tcp://127.0.0.1:27746 -f lavfi -i anullsrc=cl=1 -shortest -f mp4 -vcodec copy -bsf:a aac_adtstoasc -acodec libfdk_aac -profile:a aac_low -ar 32k -b:a 64k -ac 1 -movflags frag_keyframe+empty_moov+default_base_moof -max_muxing_queue_size 1024 tcp://127.0.0.1:31314 [1/20/2022, 9:16:40 PM] [CameraUI] Main Entrance Door: Recording started [1/20/2022, 9:16:40 PM] [CameraUI] Main Entrance Door: Prebuffer request ended [1/20/2022, 9:16:40 PM] [CameraUI] Main Entrance Door: FFmpeg recording process exited (expected) [1/20/2022, 9:16:40 PM] [CameraUI] Main Entrance Door: FFMPEG socket closed during read for 8 bytes! [1/20/2022, 9:16:40 PM] [CameraUI] Main Entrance Door: Recording completed (HSV) [HDS ::ffff:192.168.2.96] Delegate finished streaming for 1 without setting RecordingPacket.isLast. Can't notify Controller about endOfStream! [1/20/2022, 9:16:40 PM] [CameraUI] Main Entrance Door: New custom alert [1/20/2022, 9:16:40 PM] [CameraUI] Main Entrance Door: Notifications not enabled, skip Webhook.. [1/20/2022, 9:16:40 PM] [CameraUI] Main Entrance Door: Notifications not enabled, skip Alexa.. [1/20/2022, 9:16:40 PM] [CameraUI] Main Entrance Door: Recording not enabled, skip recording.. [1/20/2022, 9:16:40 PM] [CameraUI] Main Entrance Door: Recording skipped. Notification skipped.
Screenshots If applicable, add screenshots to help explain your problem.
Environment