Skip to content
This repository was archived by the owner on Aug 27, 2022. It is now read-only.

Commit 6176989

Browse files
committed
faq: add initial gphoto2 preview instructions
Change-Id: I6a81e6950faf2367c86af2c97204247470df4b8b
1 parent fa37bcb commit 6176989

File tree

2 files changed

+35
-2
lines changed

2 files changed

+35
-2
lines changed

faq/faq.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,11 +218,27 @@ There's different ways depending on your needs and personal setup:
218218
- Admin panel config *"Preview mode"*: `from URL`
219219
- Admin panel config *"Preview-URL"* example (add needed IP address instead): `url(http://127.0.0.1:8081)`
220220

221-
**Note**
221+
**Note**
222222
- Do NOT enable *"Device cam takes picture"* in admin panel config!
223223
- Capture pictures via `raspistill` won't work if motion is installed!
224224
- Requires Photobooth v2.2.1 or later!
225225

226+
3. A device independent preview can also be done using the video mode of your DSLR (Linux only):
227+
- install all dependencies `sudo apt install ffmpeg v4l2loopback-dkms -y`
228+
- create a virtual webcam `modprobe v4l2loopback exclusive_caps=1 card_label="GPhoto2 Webcam"`
229+
- `/dev/video0` is used by default, you can use `v42l-ctl --list-devices` to check which `/dev/*` is the correct one:
230+
If it doesn't match the default setup you need to adjust the `Command to generate a live preview` inside the admin panel!
231+
- Give permissions to /dev/video* `sudo gpasswd -a www-data video` (this was done automatically if you used the installation script) and reboot once
232+
- Admin panel config *"Preview mode"*: `from URL`
233+
234+
**Note**
235+
- Requires Photobooth v2.11.0 or later!
236+
- There's a delay of about 3 seconds until the preview starts, to avoid that disable the `Battery saving mode on gphoto2 live preview` option to generate a preview in background. **This results in a high battery usagage and also a general slowdown.**
237+
- Sometimes Chromium doesn't detect the V4l2 camera launch from php: you need to run `sudo gphoto2 --stdout --capture-movie | ffmpeg -i - -vcodec rawvideo -pix_fmt yuv420p -threads 0 -f v4l2 /dev/video0` from terminal first and load chrome a first time with a webpage asking for the camera.
238+
- Chromium sometimes has trouble, if there is another webcam like `bcm2835-isp`, it will take it by default instead. Disable other webcams, e.g. `rmmod bcm2835-isp`
239+
- Make sure the countdown is long enough to start the preview and free gphoto2 at the end of the countdown to be able to take a picture (2 seconds before the countdown ends)
240+
- For best used experience the countdown should be set at least to 8 seconds
241+
226242
<hr>
227243

228244
### Can I use a live stream as background?

manual/faq.html

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,11 +263,28 @@ <h3>How to use a live stream as background at countdown?</h3>
263263
<ul><li>Admin panel config <em>"Preview mode"</em>: <code>from URL</code></li>
264264
<li>Admin panel config <em>"Preview-URL"</em> example (add needed IP address instead): <code>url(<a href='http://127.0.0.1:8081'>http://127.0.0.1:8081</a>)</code></li></ul>
265265

266-
<p><strong>Note</strong></p>
266+
<p><strong>Note</strong> </p>
267267

268268
<ul><li>Do NOT enable <em>"Device cam takes picture"</em> in admin panel config!</li>
269269
<li>Capture pictures via <code>raspistill</code> won't work if motion is installed!</li>
270270
<li>Requires Photobooth v2.2.1 or later!</li></ul></li>
271+
<li><p>A device independent preview can also be done using the video mode of your DSLR (Linux only): </p>
272+
273+
<ul><li>install all dependencies <code>sudo apt install ffmpeg v4l2loopback-dkms -y</code></li>
274+
<li>create a virtual webcam <code>modprobe v4l2loopback exclusive_caps=1 card_label="GPhoto2 Webcam"</code>
275+
<ul><li><code>/dev/video0</code> is used by default, you can use <code>v42l-ctl --list-devices</code> to check which <code>/dev/*</code> is the correct one: <br />
276+
If it doesn't match the default setup you need to adjust the <code>Command to generate a live preview</code> inside the admin panel!</li></ul></li>
277+
<li>Give permissions to /dev/video* <code>sudo gpasswd -a www-data video</code> (this was done automatically if you used the installation script) and reboot once</li>
278+
<li>Admin panel config <em>"Preview mode"</em>: <code>from URL</code></li></ul>
279+
280+
<p><strong>Note</strong> </p>
281+
282+
<ul><li>Requires Photobooth v2.11.0 or later!</li>
283+
<li>There's a delay of about 3 seconds until the preview starts, to avoid that disable the <code>Battery saving mode on gphoto2 live preview</code> option to generate a preview in background. <strong>This results in a high battery usagage and also a general slowdown.</strong></li>
284+
<li>Sometimes Chromium doesn't detect the V4l2 camera launch from php: you need to run <code>sudo gphoto2 --stdout --capture-movie | ffmpeg -i - -vcodec rawvideo -pix_fmt yuv420p -threads 0 -f v4l2 /dev/video0</code> from terminal first and load chrome a first time with a webpage asking for the camera.</li>
285+
<li>Chromium sometimes has trouble, if there is another webcam like <code>bcm2835-isp</code>, it will take it by default instead. Disable other webcams, e.g. <code>rmmod bcm2835-isp</code></li>
286+
<li>Make sure the countdown is long enough to start the preview and free gphoto2 at the end of the countdown to be able to take a picture (2 seconds before the countdown ends)
287+
<ul><li>For best used experience the countdown should be set at least to 8 seconds</li></ul></li></ul></li>
271288
</ol>
272289

273290
<hr>

0 commit comments

Comments
 (0)