ipcam
Sample application for "V4L2 for Ruby".
Installation
Add this line to your application's Gemfile:
gem 'ipcam'
And then execute:
$ bundle
Or install it yourself as:
$ gem install ipcam
Usage
Connect a camera device compatible with V4L2 and start ipcam as follows.
ipcam [] [device-file]
options:
--bind=ADDR
--port=PORT
-d, --database-file=FILE
-e, --extend-header
--log-file=FILE
--log-age=AGE
--log-size=SIZE
--log-level=LEVEL
--develop-mode
Then connect to port 4567 by http browser and operate. The accessible URLs are as follows.
- http://$HOST:4567/
redicrect to /main - http://$HOST:4567/main
preview and settings - http://$HOST:4567/stream
http streaming
options
- --bind=ADDR
- Specify the address to which the HTTP server binds. by default, IPv6 any address("::") is used.
- --port=PORT
- Specify the port number to which the HTTP server binds. by default 4567 is used.
- -d, --database-file=FILE
- Specify the file name to save the camera setting value. by default, it tries to save to "~/.ipcam.db".
- -e, --extend-header
- Add extend header to part data (for debug).
- --log-file=FILE
- --log-age=AGE
- --log-level=LEVEL
device-file
specify target device file (ex: /dev/video1). if omittedm, it will use "/dev/video0".
etc
About image data
いらすとや (https://www.irasutoya.com) で配布されている『特撮映画のイラスト』(https://www.irasutoya.com/2018/12/blog-post_90.html) を改変して使用しています。
License
The gem is available as open source under the terms of the MIT License.