├── .gitignore
├── Dockerfile.template
├── LICENSE
├── README.md
├── app
├── set_option.sh
└── start.sh
├── config
├── text.json
└── uv4l.conf
└── docs
├── BoM.md
└── remoteadd.png
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | # Created by https://www.gitignore.io/api/node,python,bower,coffeescript,osx,linux,windows,node
3 |
4 | ### Node ###
5 | # Logs
6 | logs
7 | *.log
8 | npm-debug.log*
9 |
10 | # Runtime data
11 | pids
12 | *.pid
13 | *.seed
14 | *.pid.lock
15 |
16 | # Directory for instrumented libs generated by jscoverage/JSCover
17 | lib-cov
18 |
19 | # Coverage directory used by tools like istanbul
20 | coverage
21 |
22 | # nyc test coverage
23 | .nyc_output
24 |
25 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
26 | .grunt
27 |
28 | # node-waf configuration
29 | .lock-wscript
30 |
31 | # Compiled binary addons (http://nodejs.org/api/addons.html)
32 | build/Release
33 |
34 | # Dependency directories
35 | node_modules
36 | jspm_packages
37 |
38 | # Optional npm cache directory
39 | .npm
40 |
41 | # Optional eslint cache
42 | .eslintcache
43 |
44 | # Optional REPL history
45 | .node_repl_history
46 |
47 | # Output of 'npm pack'
48 | *.tgz
49 |
50 | # Yarn Integrity file
51 | .yarn-integrity
52 |
53 |
54 |
55 | ### Python ###
56 | # Byte-compiled / optimized / DLL files
57 | __pycache__/
58 | *.py[cod]
59 | *$py.class
60 |
61 | # C extensions
62 | *.so
63 |
64 | # Distribution / packaging
65 | .Python
66 | env/
67 | build/
68 | develop-eggs/
69 | dist/
70 | downloads/
71 | eggs/
72 | .eggs/
73 | lib/
74 | lib64/
75 | parts/
76 | sdist/
77 | var/
78 | *.egg-info/
79 | .installed.cfg
80 | *.egg
81 |
82 | # PyInstaller
83 | # Usually these files are written by a python script from a template
84 | # before PyInstaller builds the exe, so as to inject date/other infos into it.
85 | *.manifest
86 | *.spec
87 |
88 | # Installer logs
89 | pip-log.txt
90 | pip-delete-this-directory.txt
91 |
92 | # Unit test / coverage reports
93 | htmlcov/
94 | .tox/
95 | .coverage
96 | .coverage.*
97 | .cache
98 | nosetests.xml
99 | coverage.xml
100 | *,cover
101 | .hypothesis/
102 |
103 | # Translations
104 | *.mo
105 | *.pot
106 |
107 | # Django stuff:
108 | local_settings.py
109 |
110 | # Flask stuff:
111 | instance/
112 | .webassets-cache
113 |
114 | # Scrapy stuff:
115 | .scrapy
116 |
117 | # Sphinx documentation
118 | docs/_build/
119 |
120 | # PyBuilder
121 | target/
122 |
123 | # Jupyter Notebook
124 | .ipynb_checkpoints
125 |
126 | # pyenv
127 | .python-version
128 |
129 | # celery beat schedule file
130 | celerybeat-schedule
131 |
132 | # dotenv
133 | .env
134 |
135 | # virtualenv
136 | .venv/
137 | venv/
138 | ENV/
139 |
140 | # Spyder project settings
141 | .spyderproject
142 |
143 | # Rope project settings
144 | .ropeproject
145 |
146 |
147 | ### Bower ###
148 | bower_components
149 | .bower-cache
150 | .bower-registry
151 | .bower-tmp
152 |
153 |
154 | ### OSX ###
155 | *.DS_Store
156 | .AppleDouble
157 | .LSOverride
158 |
159 | # Icon must end with two \r
160 | Icon
161 | # Thumbnails
162 | ._*
163 | # Files that might appear in the root of a volume
164 | .DocumentRevisions-V100
165 | .fseventsd
166 | .Spotlight-V100
167 | .TemporaryItems
168 | .Trashes
169 | .VolumeIcon.icns
170 | .com.apple.timemachine.donotpresent
171 | # Directories potentially created on remote AFP share
172 | .AppleDB
173 | .AppleDesktop
174 | Network Trash Folder
175 | Temporary Items
176 | .apdisk
177 |
178 |
179 | ### Linux ###
180 | *~
181 |
182 | # temporary files which can be created if a process still has a handle open of a deleted file
183 | .fuse_hidden*
184 |
185 | # KDE directory preferences
186 | .directory
187 |
188 | # Linux trash folder which might appear on any partition or disk
189 | .Trash-*
190 |
191 | # .nfs files are created when an open file is removed but is still being accessed
192 | .nfs*
193 |
194 |
195 | ### Windows ###
196 | # Windows image file caches
197 | Thumbs.db
198 | ehthumbs.db
199 |
200 | # Folder config file
201 | Desktop.ini
202 |
203 | # Recycle Bin used on file shares
204 | $RECYCLE.BIN/
205 |
206 | # Windows Installer files
207 | *.cab
208 | *.msi
209 | *.msm
210 | *.msp
211 |
212 | # Windows shortcuts
213 | *.lnk
214 |
215 |
216 | ### Node ###
217 | # Logs
218 |
219 | # Runtime data
220 |
221 | # Directory for instrumented libs generated by jscoverage/JSCover
222 |
223 | # Coverage directory used by tools like istanbul
224 |
225 | # nyc test coverage
226 |
227 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
228 |
229 | # node-waf configuration
230 |
231 | # Compiled binary addons (http://nodejs.org/api/addons.html)
232 |
233 | # Dependency directories
234 |
235 | # Optional npm cache directory
236 |
237 | # Optional eslint cache
238 |
239 | # Optional REPL history
240 |
241 | # Output of 'npm pack'
242 |
243 | # Yarn Integrity file
244 |
--------------------------------------------------------------------------------
/Dockerfile.template:
--------------------------------------------------------------------------------
1 | FROM resin/%%RESIN_MACHINE_NAME%%-debian:jessie
2 |
3 | # Install the UV4L PPA
4 | RUN curl -s http://www.linux-projects.org/listing/uv4l_repo/lrkey.asc | sudo apt-key add - &&\
5 | sed -i '1s;^;deb http://www.linux-projects.org/listing/uv4l_repo/raspbian/ jessie main\n;' /etc/apt/sources.list
6 |
7 | # Install dependencies as well as the proper version of uv4l-webrtc
8 | RUN apt-get update -q &&\
9 | apt-get install -yq \
10 | uv4l \
11 | uv4l-demos \
12 | uv4l-dummy \
13 | uv4l-mjpegstream \
14 | uv4l-raspicam \
15 | uv4l-raspicam-extras \
16 | uv4l-raspidisp \
17 | uv4l-server \
18 | uv4l-uvc \
19 | uv4l-xmpp-bridge \
20 | uv4l-xscreen \
21 | uv4l-webrtc$([ $(uname -m) = armv6l ] && echo -armv6) \
22 | vlc \
23 | && apt-get clean && rm -rf /var/lib/apt/lists/*
24 |
25 | # Move to app dir
26 | WORKDIR /usr/src/app
27 |
28 | # Configure env vars
29 | ENV CONF_DIR=/data/config/ \
30 | INITSYSTEM=on
31 |
32 | # Copy over our project files
33 | COPY ./app/ /usr/src/app/
34 | COPY ./config/ /usr/src/app/config/
35 |
36 | # Disable uv4l_raspicam service which we'll manually start later
37 | RUN systemctl disable uv4l_raspicam
38 |
39 | # Start app
40 | CMD ["/bin/bash", "/usr/src/app/start.sh"]
41 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "{}"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright {yyyy} {name of copyright owner}
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # resin-cam-uv4l
2 | A smart Raspberry Pi streaming camera based on [UV4L](https://www.linux-projects.org/uv4l/).
3 |
4 | It works on all the Raspberry Pi's with a camera connector—even the Pi Zero!
5 |
6 | ### **[Bill of Materials](docs/BoM.md)**
7 |
8 | ## Getting started
9 |
10 | - Sign up on [resin.io](https://dashboard.resin.io/signup) and follow our [Getting Started Guide](https://docs.resin.io/raspberrypi3/nodejs/getting-started/)
11 | - Clone this repository to your local workspace
12 | - Set these variables in the [`Fleet Configuration`](https://docs.resin.io/configuration/advanced/) application side tab
13 | - `RESIN_HOST_CONFIG_gpu_mem` = `196`
14 | - `RESIN_HOST_CONFIG_start_x` = `1`
15 | - Add the _resin remote_ to your local workspace by running the useful command from the Resin dashboard
16 |
17 | Hint
18 |
19 |
20 | - Push code to your device with a simple `git push resin master`
21 | - See the magic happening, your device is getting updated Over-The-Air!
22 | - If you want your device to be accessible on WAN, enable its public URL
23 | - Select your device from the `Devices` side tab
24 | - Click the `Actions` side tab
25 | - Click the `ENABLE PUBLIC DEVICE URL` button
26 | - Note down your device's public URL!
27 | - When your device finishes updating visit your device's IP or public URL to watch your stream!
28 | - You can find your device's IP on the Resin dashboard.
29 | - Further explore [UV4L's configuration options](https://www.linux-projects.org/uv4l/tutorials/) and edit [the config file](config/uv4l.conf)
30 | - Make sure to update your devices after every change you make! You can either:
31 | - Commit your changes and do another `git push resin master`
32 | - Learn more about the powerful [**resin-cli**](https://docs.resin.io/raspberrypi3/nodejs/getting-started/#using-resin-sync-to-develop-fast) and how you can iterate and deploy to your devices rapidly!
33 |
34 | Running a simple `resin sync` in your working directory will sync your changes to local devices faster than a `git push`.
35 |
36 | ## Configure via [environment variables](https://docs.resin.io/management/env-vars/)
37 | Variable Name | Default | Description
38 | ------------ | ------------- | -------------
39 | width | `640` | video width
40 | height | `480` | video height
41 | framerate | `30` | video framerate
42 | rotation | `0` | video rotation (0/90/180/270 degrees)
43 |
44 | If you want to add more environment variables to control [UV4L's config file](config/uv4l.conf) add a line of this format `set_option $ ` to the [start script](app/start.sh). It will be easy once you see the existing lines.
45 |
46 | You can also configure UV4l on the fly using `http:///panel`.
47 | Where `` is the IP address of your Pi or the Public URL, both of them can be found in your resin.io account's Dashboard.
48 |
49 | ## License
50 |
51 | Copyright 2017 Resinio Ltd.
52 |
53 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
54 |
55 |
56 |
57 | Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
58 |
--------------------------------------------------------------------------------
/app/set_option.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set_option() {
3 | if [[ -z $1 || -z $2 || -z $3 ]]; then return; fi
4 |
5 | # Try to replace variable ($1) value with the new one ($2) in the file ($3).
6 | # Append variable to the file if it doesn't exist. Create file with the
7 | # variable set if the file doesn't exist.
8 | [[ -f "$3" ]] \
9 | && grep -q "^$1\s*=.*$" "$3" && sed -i "s+^$1\s*=.*$+$1 = $2+g" "$3" \
10 | || echo "$1 = $2" >> "$3"
11 | }
12 |
--------------------------------------------------------------------------------
/app/start.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | source ./set_option.sh
4 |
5 | CONF_FILE=${CONF_DIR}uv4l.conf
6 |
7 | # Copy the new config file to ${CONF_DIR}
8 | cp -r /usr/src/app/config ${CONF_DIR}
9 |
10 | # Reconfigure uv4l.conf
11 | set_option text-filename ${CONF_DIR}text.json ${CONF_FILE}
12 |
13 | # Resin environment variables
14 | set_option height ${height} ${CONF_FILE}
15 | set_option width ${width} ${CONF_FILE}
16 | set_option framerate ${framerate} ${CONF_FILE}
17 | set_option rotation ${rotation} ${CONF_FILE}
18 |
19 | # Reconfigure the UV4L service
20 | sed -i "s^/etc/uv4l/uv4l-raspicam.conf^${CONF_FILE}^g" /etc/init.d/uv4l_raspicam
21 |
22 | # Start UV4L
23 | systemctl start uv4l_raspicam
24 |
--------------------------------------------------------------------------------
/config/text.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "font": "script_complex",
4 | "font_comment": [ "valid fonts are simplex, plain, duplex, complex,",
5 | "triplex, complex_small, script_simplex,",
6 | "script_complex, italic" ],
7 | "scale": 1.0,
8 | "red": 252,
9 | "green": 205,
10 | "blue": 0,
11 | "line_type": 8,
12 | "thickness": 1,
13 | "bottom_left": false,
14 | "text_line": "Resin Camera",
15 | "x": 5,
16 | "y": 60
17 | }
18 | ]
19 |
--------------------------------------------------------------------------------
/config/uv4l.conf:
--------------------------------------------------------------------------------
1 | # This file contains the default values of SOME of all the available
2 | # options for the UV4L core module, the raspicam driver, and the
3 | # streaming server front-end.
4 | #
5 | # This file is referenced by the 'uv4l_raspicam' init script.
6 | # Alternatively, it can be passed as argument to
7 | # the '--driver-config-file' driver option and/or to the
8 | # '--config-file' option of uv4l.
9 | #
10 | # Please refer to the 'uv4l', 'uv4l-raspicam' and 'uv4l-server' manual
11 | # pages for all the valid options and values or for more informations
12 | # about their meaning.
13 |
14 | # NOTE: for multi argument options you must specify one arg per line,
15 | # e.g --min-object-size 80 120 becomes:
16 | # min-object-size = 80
17 | # min-object-size = 120
18 |
19 |
20 | ##################################
21 | # uv4l core options
22 | ##################################
23 |
24 | driver = raspicam
25 | # video_nr = 0
26 | auto-video_nr = yes
27 | # verbosity = 6
28 | # syslog-host = localhost
29 | # syslog-port = 514
30 | # frame-timeout = 5000
31 | frame-buffers = 4
32 | # drop-bad-frames = yes
33 | # relaxed-ownership = yes
34 |
35 |
36 | ##################################
37 | # raspicam driver options
38 | ##################################
39 |
40 | encoding = h264
41 | width = 640
42 | height = 480
43 | framerate = 30
44 | #custom-sensor-config = 2
45 |
46 | ### dual camera options:
47 | # stereoscopic-mode = side_by_side
48 | # camera-number = 1
49 | # decimate = yes
50 | # swap-eyes = yes
51 |
52 | ### still and/or video options:
53 | # quality = 85
54 | # stills-denoise = yes
55 | video-denoise = no
56 | # raw = no
57 |
58 | ### h264 options:
59 | # profile = high
60 | # level = 4.2
61 | # bitrate = 8000000
62 | # intra-refresh-mode = dummy
63 | # intra-period = #arg
64 | # inline-headers = yes
65 | # quantisation-parameter #arg
66 |
67 | ### video overlay options:
68 | nopreview = no
69 | fullscreen = no
70 | # osd-layer = 2
71 | # opacity = 255
72 | ### preview window :
73 | # preview = 480
74 | # preview = 240
75 | # preview = 320
76 | # preview = 240
77 |
78 | ### post-processing options:
79 | text-overlay = no
80 | text-filename = /data/config/text.json
81 | # object-detection = yes
82 | # object-detection-mode = accurate_tracking
83 | # min-object-size = 80
84 | # min-object-size = 80
85 | # main-classifier = /usr/share/uv4l/raspicam/lbpcascade_frontalface.xml
86 | # secondary-classifier =/usr/share/uv4l/raspicam/lbpcascade_frontalface.xml
87 |
88 | ### image settings options:
89 | # sharpness = 0
90 | # contrast = 0
91 | # brightness = 50
92 | # saturation = 0
93 | # iso = 400
94 | # vstab = yes
95 | # ev = 0
96 | # exposure = auto
97 | # awb = auto
98 | # imgfx = none
99 | # metering = average
100 | # rotation = 0
101 | # hflip = no
102 | # vflip = no
103 | # shutter-speed = 0
104 | # drc = off
105 | # red-gain = 100
106 | # blue-gain = 100
107 | # text-annotation = HelloWorld!
108 | # text-annotation-background = yes
109 | ### ROI normalized to [0, 1]
110 | # roi = 0
111 | # roi = 0
112 | # roi = 1
113 | # roi = 1
114 | ### ISP blocks
115 | # black-level-compensation = yes
116 | # lens-shading = yes
117 | # automatic-defective-pixel-correlation = yes
118 | # white-balance-gain = yes
119 | # crosstalk = yes
120 | # gamma = yes
121 | # sharpening = yes
122 |
123 | ### advanced options:
124 | # statistics = yes
125 | # output-buffers = 3
126 |
127 | ### serial Number & License Key:
128 | # serial-number = #arg
129 | # license-key = #arg
130 |
131 |
132 | #################################
133 | # streaming server options
134 | #################################
135 |
136 | ### path to a separate config file that will be parsed by the streaming server
137 | ### module directly when it's loaded,
138 | ### in which you are allowed to specify all the streaming server options
139 | ### listed below in the short form "option=value" instead of the longer
140 | ### "--server-option = --option=value" form that you must use
141 | ### in this configuration file.
142 | #server-config-file = #path
143 |
144 | server-option = --port=80
145 | # server-option = --bind-host-address=localhost
146 | # server-option = --md5-passwords=no
147 | # server-option = --user-password=myp4ssw0rd
148 | # server-option = --admin-password=myp4ssw0rd
149 | ### To enable 'config' user authentication
150 | # server-option = --config-password=myp4ssw0rd
151 |
152 | ### HTTPS options:
153 | # server-option = --use-ssl=no
154 | # server-option = --ssl-private-key-file=#path
155 | # server-option = --ssl-certificate-file=#path
156 |
157 | ### WebRTC options:
158 | # server-option = --enable-webrtc=yes
159 | # server-option = --enable-webrtc-datachannels=yes
160 | # server-option = --webrtc-datachannel-label=uv4l
161 | # server-option = --webrtc-datachannel-socket=/tmp/uv4l.socket
162 | # server-option = --enable-webrtc-video=yes
163 | # server-option = --enable-webrtc-audio=yes
164 | # server-option = --webrtc-receive-video=yes
165 | # server-option = --webrtc-receive-datachannels=no
166 | # server-option = --webrtc-received-datachannel-socket=/tmp/uv4l.socket
167 | # server-option = --webrtc-receive-audio=yes
168 | # server-option = --webrtc-received-audio-volume=5.0
169 | # server-option = --webrtc-prerenderer-smoothing=yes
170 | # server-option = --webrtc-recdevice-index=0
171 | # server-option = --webrtc-vad=yes
172 | # server-option = --webrtc-echo-cancellation=no
173 | # server-option = --webrtc-preferred-vcodec=0
174 | # server-option = --webrtc-enable-hw-codec=yes
175 | # server-option = --webrtc-hw-vcodec-minbitrate=256
176 | # server-option = --webrtc-hw-vcodec-maxbitrate=4000
177 | # server-option = --webrtc-hw-vcodec-startbitrate=1200
178 | server-option = --webrtc-max-playout-delay=34
179 | # server-option = --webrtc-cpu-overuse-detection=no
180 | # server-option = --webrtc-combined-audiovideo-bwe=no
181 | # server-option = --webrtc-stun-urls=stun:stun.l.google.com:19302
182 | # server-option = --webrtc-ice-servers=[{"urls": "stun:stun.l.google.com:19302"}]
183 | # server-option = --webrtc-stun-server=yes
184 | # server-option = --webrtc-tcp-candidate-policy=1
185 | # server-option = --webrtc-rtcp-mux-policy=0
186 | # server-option = --webrtc-enable-dscp=no
187 | # server-option = --webrtc-ignore-loopback=yes
188 | ### video rendering window positions and sizes on the display.
189 | ### for each window, default values can be optionally overridden, but if you
190 | ### do this you must specify one line for each of the four x, y, width, height
191 | ### window properties (in that order).
192 | ### If fullscreen is set the image is stretched to the maximum available display
193 | ### resolution from the specified size.
194 | ### window 1
195 | # server-option = --webrtc-renderer-window=0
196 | # server-option = --webrtc-renderer-window=0
197 | # server-option = --webrtc-renderer-window=480
198 | # server-option = --webrtc-renderer-window=352
199 | # server-option = --webrtc-renderer-fullscreen=no
200 | # server-option = --webrtc-renderer-rotation=180
201 | # server-option = --webrtc-renderer-opacity=255
202 | ### window 2
203 | # server-option = --webrtc-renderer2-window=480
204 | # server-option = --webrtc-renderer2-window=0
205 | # server-option = --webrtc-renderer2-window=320
206 | # server-option = --webrtc-renderer2-window=240
207 | ### window 3
208 | # server-option = --webrtc-renderer3-window=0
209 | # server-option = --webrtc-renderer3-window=352
210 | # server-option = --webrtc-renderer3-window=176
211 | # server-option = --webrtc-renderer3-window=128
212 |
213 | ### XMPP options:
214 | # server-option = --xmpp-server=lambada.jitsi.net
215 | # server-option = --xmpp-port=5222
216 | # server-option = --xmpp-muc-domain=meet.jit.si
217 | # server-option = --xmpp-room=room
218 | # server-option = --xmpp-room-password=room_password
219 | # server-option = --xmpp-username=me
220 | # server-option = --xmpp-password=mypassword
221 | # server-option = --xmpp-reconnect=yes
222 | # server-option = --xmpp-bosh-enable
223 | # server-option = --xmpp-bosh-tls
224 | # server-option = --xmpp-bosh-server
225 | # server-option = --xmpp-bosh-port
226 | # server-option = --xmpp-bosh-hostname
227 | # server-option = --xmpp-bosh-path
228 | # server-option = --xmpp-bridge-host=localhost
229 | # server-option = --xmpp-bridge-port=7999
230 |
231 | ### Janus WebRTC Gateway options:
232 | # server-option = --janus-gateway-url=http://janus.conf.meetecho.com:8088
233 | # server-option = --janus-gateway-root=/janus
234 | # server-option = --janus-room=1234
235 | # server-option = --janus-room-pin=#pin
236 | # server-option = --janus-username=test
237 | # server-option = --janus-token=#token
238 | # server-option = --janus-proxy-host=#host
239 | # server-option = --janus-proxy-port=80
240 | # server-option = --janus-proxy-username=#user
241 | # server-option = --janus-proxy-password=#password
242 | # server-option = --janus-proxy-bypass=#regex
243 | # server-option = --janus-force-hw-vcodec=no
244 | # server-option = --janus-video-format=#code
245 | # server-option = --janus-publish=yes
246 | # server-option = --janus-subscribe=no
247 | # server-option = --janus-reconnect=yes
248 |
249 | ### Fine-tuning options:
250 | # server-option = --connection-timeout=15
251 | # server-option = --enable-keepalive=yes
252 | # server-option = --max-keepalive-requests=0
253 | # server-option = --keepalive-timeout=7
254 | # server-option = --max-queued-connections=8
255 | # server-option = --max-streams=3
256 | # server-option = --max-threads=5
257 | # server-option = --thread-idle-time=10
258 | # server-option = --chuncked-transfer-encoding=yes
259 |
260 | ### Advanced options:
261 | # server-option = --frame-timeout=5000
262 | # server-option = --frame-buffers=auto
263 |
264 | ### These options are specific to the HTTP/HTTPS Server
265 | ### serving custom Web pages only:
266 | # server-option = --enable-www-server=no
267 | # server-option = --www-root-path=/usr/share/uv4l/www/
268 | # server-option = --www-index-file=index.html
269 | # server-option = --www-port=8888
270 | # server-option = --www-bind-host-address=#host
271 | # server-option = --www-password=#password
272 | # server-option = --www-use-ssl=no
273 | # server-option = --www-ssl-private-key-file=#path
274 | # server-option = --www-ssl-certificate-file=#path
275 | # server-option = --www-connection-timeout=15
276 | # server-option = --www-enable-keepalive=no
277 | # server-option = --www-max-keepalive-requests=0
278 | # server-option = --www-keepalive-timeout=7
279 | # server-option = --www-max-queued-connections=8
280 | # server-option = --www-max-threads=4
281 | # server-option = --www-thread-idle-time=10
282 | # server-option = --www-chuncked-transfer-encoding=no
283 | # server-option = --www-set-etag-header=yes
284 | # server-option = --www-webrtc-signaling-path=/webrtc
285 |
286 | ### Other options:
287 | # server-option = --editable-config-file=#path
288 | # server-option = --enable-control-panel=yes
289 | # server-option = --enable-rest-api=yes
290 |
--------------------------------------------------------------------------------
/docs/BoM.md:
--------------------------------------------------------------------------------
1 | ## Bill of Materials
2 | | Item Name | Manufacturer | Qty |
3 | | :- | :- | :- |
4 | | [Raspberry Pi Zero W](https://www.raspberrypi.org/products/raspberry-pi-zero-w/)
**or**
[Raspberry Pi 3](https://www.raspberrypi.org/products/raspberry-pi-3-model-b/) | Raspberry Pi Foundation | 1 |
5 | | [2.5A microUSB Power Supply](https://www.raspberrypi.org/products/raspberry-pi-universal-power-supply/) | Raspberry Pi Foundation | 1 |
6 | | [Camera Module V2](https://www.raspberrypi.org/products/camera-module-v2/)
**or**
[Camera Module for _Raspberry Pi **Zero**_](https://shop.pimoroni.com/products/raspberry-pi-zero-camera-module) | Raspberry Pi Foundation
**or**
Pimoroni | 1 |
7 | | 8GB _or more_ Class 10 microSD Card | | 1
8 | | [3D Printed Case](https://github.com/resin-io-playground/raspberry-pi-cases) | | 1 |
9 |
--------------------------------------------------------------------------------
/docs/remoteadd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/balena-io-experimental/balena-cam-uv4l/e1310bf6d2b1e6c98790b8d18b172977ebcc5e80/docs/remoteadd.png
--------------------------------------------------------------------------------