Support
Wiki Documentation
Support Forum
Mobile
- andRoc Android
- Rocweb Browser
- WIO-Control ESP32
- Rocview Tablet
DIY
User
Wiki writer
Special
Legal
Support
Wiki Documentation
Support Forum
Mobile
DIY
User
Wiki writer
Special
Legal
The WebCam on Server provides the captured images to all connected clients.
Supported clients:
The captured WebCam image should be as small as possible to save bandwidth. This is especially important in case of connected mobile clients.
The action calls an external Capture Script for capturing a new snapshot image from the WebCam.
The Asynchrone option should be disabled for this action.
The script must provide an image in JPEG format and should be as small as possible and must be smaller then 100kB.
The wacaw –CIF option will generate a small image of 352 X 288. (Common Intermediate Format)
#!/bin/bash echo "Snapping a new image of the webcam..." /Users/rob/Projects/Rocrail/unxbin/rocnet/webcam/wacaw -d 2 --jpeg --CIF /Users/rob/Projects/Rocrail/unxbin/rocnet/webcam/_picture mv /Users/rob/Projects/Rocrail/unxbin/rocnet/webcam/_picture.jpeg /Users/rob/Projects/Rocrail/unxbin/rocnet/images/picture.jpg
Line explanation:
#!/bin/bash picfile="/home/sven/rocrail/images/$(basename "$0").jpg" tmpfile="/home/sven/rocrail/images/_$(basename "$0").jpg" device="/dev/video${0: -1}" echo "Snapping a new picture from $device to $picfile" avconv -f video4linux2 -i "$device" -frames 1 "$tmpfile" mv "$tmpfile" "$picfile"