Webcam and MyController
-
webcam and MyController
use of a Usb webcam connected to the myC server for direct viewing in a widget.
(no Http)installation uvccapture
(for the usb-webcam link)
- sudo apt-get install uvccapture
- lsusb
..... Bus 001 Device 005: ID 046d:081b Logitech, Inc. webcam C310 ....
- lsmod | grep uvcvideo
uvcvideo 102400 0 videobuf2_vmalloc 20480 1 uvcvideo videobuf2_v4l2 32768 3 meson_vdec,uvcvideo,v4l2_mem2mem videobuf2_common 57344 4 meson_vdec,videobuf2_v4l2,uvcvideo,v4l2_mem2mem videodev 278528 5 meson_vdec,videobuf2_v4l2,uvcvideo,videobuf2_common,v4l2_mem2mem mc 61440 6 videodev,snd_usb_audio,videobuf2_v4l2,uvcvideo,videobuf2_common,v4l2_mem2mem
- ls /dev/video*
/dev/video0 /dev/video1 /dev/video2
installation ffmpeg
( for image manipulation)
- sudo apt-get install ffmpeg
start ffmpeg
ffmpeg -y -f v4l2 -video_size 1280x720 -i /dev/video1 -r 0.2 -qscale:v 2 -update 1 /opt/apps/mycontroller/executable/mc_home/secure_share/image/webcam.jpg
And Test Gif
sudo ffmpeg -ss 30 -t 3 -video_size 640x420 -i /dev/video1 -vf "fps=10,scale=320:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop 0 /opt/apps/mycontroller/executable/mc_home/secure_share/image/output.gif
Be careful, it doesn't really work, it's a test.
Now jkandasa I'll need your help / idea for the next step.
1st : Can MyController display a video ?
(in the widget the unrecognised formats
.mov and .mp4 .avi )2nd : Can MyController turn on the Webcam when you go to the Widgets page, and turn it off when you leave ?
Philosophy of the idea :
- a non-shared webcam on LAN or WAN, no video stream from the webcam on the LAN, only a video stream between
WebCam <----> MyC -
@JeeLet said in Webcam and MyController:
1st : Can MyController display a video ?
(in the widget the unrecognised formats
.mov and .mp4 .avi )For now we do not have that option. it is a good requirement, I will work on it. GH issue: https://github.com/mycontroller-org/console-web/issues/12
2nd : Can MyController turn on the Webcam when you go to the Widgets page, and turn it off when you leave ?
This looks again a good idea. GH issue: https://github.com/mycontroller-org/console-web/issues/13
-
..... hello jkandasa
review of the day
and of the nightFFmpeg abandons the FFserver part "Removed the ffserver program
https://trac.ffmpeg.org/wiki/ffserverinstalling an old version would be possible, but the past is not the future
https://ffmpeg.org/releases/?C=N%3BO%3DD
https://www.tecmint.com/install-ffmpeg-in-linux/or maybe https://github.com/klaxa/ffserver
"This project aims to replace the hard to configure and maintain old FFserver component of the FFmpeg project"a test with the mkvserver_mk2 replacement or Srs not give anything clean (too complicated for me or doc too complex or language badly translated )
https://github.com/klaxa/mkvserver_mk2
https://github.com/ossrs/srsNow I test NGINX https://www.codeinsideout.com/blog/pi/stream-ffmpeg-hls-dash/#apache
( a light web server application, but without server ?).... to follow!
-
@JeeLet can you display the video via your nginx server?
-
yes a test .
but I did not succeed, the world becomes more and more complicated, I tested with 4 different tutorials, even installs with compilation, there is always a file or a version which is not with the appointment
but the Nginx server is cool, I will be able to use Hugo for my personal pages.
and MyController is still operational after all it's DIY
so for WebCam and MyC
I let another person prepare a tutoWebCam <----direct link -----> MyC
-
@JeeLet said in Webcam and MyController:
but I did not succeed, the world becomes more and more complicated, I tested with 4 different tutorials, even installs with compilation, there is always a file or a version which is not with the appointment
We will get a great solution at the end of your research
but the Nginx server is cool, I will be able to use Hugo for my personal pages.
true, mycontroller v2 documentation is based on hugo and running with nginx. https://github.com/mycontroller-org/documentation
-
@jkandasa While looking at this it would be nice to be able to overlay basic pan/tilt/zoom controls over the image (or on the page if the video is windowed) - also sensor data like motion sensors too....
I use motioneye for cameras as they are motion triggered and have editable exclude masks for trees etc that constantly trigger in the wind. If you want to test an idea to get motioneye feeds working too I can try it out.
-
@skywatch good one. I have added GH issue to track this https://github.com/mycontroller-org/console-web/issues/14
-
yes several possible philosophy.
use the same server as myC to install a video surveillance application, and encapsulate it inside.
or externally, for example an ESP32-CAM https://www.sigmdel.ca/michel/ha/esp8266/ESP32-CAM_01_fr.html
my idea of WebCam at the beginning it was a simple rear view mirror
to have a view on my doorway, the door rings (arduino) and the webcam turns on in myC .a possible choice of video surveillance
Alternatives -
back after tests with Hassio.
Yes MyController in central core of my MySensors network, Motioneye for the Cam, Grafana (soon to be installed ) for value tracking.
A solid choice