Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot get snapshot to appear in notifications #117

Closed
nicknicknickos opened this issue Oct 18, 2017 · 3 comments
Closed

Cannot get snapshot to appear in notifications #117

nicknicknickos opened this issue Oct 18, 2017 · 3 comments
Labels

Comments

@nicknicknickos
Copy link

I have a hackintosh running macOS Sierra. Homebridge has been running wonderfully for a long time, so I decided to expand and add some cameras.

The setup:

I have a Logitech c270 webcam plugged in via USB to the computer. Running ffmpeg -f avfoundation -list_devices true -i "" shows:

$ ffmpeg -f avfoundation -list_devices true -i "" ffmpeg version 3.4 Copyright (c) 2000-2017 the FFmpeg developers built with Apple LLVM version 9.0.0 (clang-900.0.37) configuration: --prefix=/usr/local/Cellar/ffmpeg/3.4 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma libavutil 55. 78.100 / 55. 78.100 libavcodec 57.107.100 / 57.107.100 libavformat 57. 83.100 / 57. 83.100 libavdevice 57. 10.100 / 57. 10.100 libavfilter 6.107.100 / 6.107.100 libavresample 3. 7. 0 / 3. 7. 0 libswscale 4. 8.100 / 4. 8.100 libswresample 2. 9.100 / 2. 9.100 libpostproc 54. 7.100 / 54. 7.100 [AVFoundation input device @ 0x7faf1f40e800] AVFoundation video devices: [AVFoundation input device @ 0x7faf1f40e800] [0] USB Camera [AVFoundation input device @ 0x7faf1f40e800] [1] Capture screen 0 [AVFoundation input device @ 0x7faf1f40e800] AVFoundation audio devices: [AVFoundation input device @ 0x7faf1f40e800] [0] Unknown USB Audio Device : Input/output error

My config.json looks like this:
"platform": "Camera-ffmpeg", "cameras": [ { "name": "Hallway", "videoConfig": { "source": "-re -f avfoundation -video_size 1280x720 -framerate 15 -i 0", "stillImageSource": "-i /image.jpg", "maxStreams": 2, "maxWidth": 1280, "maxHeight": 720, "maxFPS": 15 } } ] }

Streaming video in the app is not a problem - it works very well. I also have a Hue motion sensor in the same 'Room' in Home.app. This is set to display notifications at anytime.

The Issue:

For the life of me I cannot get rich notifications to show the snapshot when motion is detected without having Home.app open. This may be my misunderstanding of what stillImageSourceactually does, or how ffmpeg and this plugin work. If this is the case, can someone please let me know the proper use?

  • When the motion sensor is activated and the camera IS NOT live the home.app, I get just a notification with no snapshot (not what I want)
  • When the motion sensor is activated and the camera IS being viewed the home.app, I get a notification and still image from the camera (what I want). However If I am in the Home.app and watching the camera stream, why would I need a notification?

What can I do to ensure that when the motion sensor is activated, I receive a notification WITH a snapshot next to it?

Thanks!

@dkrizic
Copy link

dkrizic commented Nov 1, 2017

I have multiple cameras, some are low-tech (1,3MP) and some are high-tech (4MP). All of them have a stillImageSource URL which also works (pictures are updated). But I only get rich notifications from the low-tech cameras.

I presume there might be one or two reasons:

  • Size: The size (in pixels) of the images don't have to be too large
  • Timing: Maybe there is a timeout until when the image has to be loaded (which also needs longer for larger images).

Unfortunately I did not find a possibility to get a URL that sends a lower resolution image for testing. I will keep this thread updated.

@notabene00
Copy link

Adding "-f mjpeg" to the start of stillImageSource key's value solved this for me.

@github-actions
Copy link

github-actions bot commented May 3, 2020

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.

@github-actions github-actions bot added the stale label May 3, 2020
@github-actions github-actions bot closed this as completed May 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants