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

Commit

Permalink
faq: add initial gphoto2 preview instructions
Browse files Browse the repository at this point in the history
Change-Id: I6a81e6950faf2367c86af2c97204247470df4b8b
  • Loading branch information
andi34 committed Nov 17, 2020
1 parent 820f408 commit d8bb286
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
16 changes: 16 additions & 0 deletions faq/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,22 @@ There's different ways depending on your needs and personal setup:
- Capture pictures via `raspistill` won't work if motion is installed!
- Requires Photobooth v2.2.1 or later!

3. A device independent preview can also be done using the video mode of your DSLR (Linux only):
- install all dependencies `sudo apt install ffmpeg v4l2loopback-dkms -y`
- create a virtual webcam `modprobe v4l2loopback exclusive_caps=1 card_label="GPhoto2 Webcam"`
- `/dev/video0` is used by default, you can use `v42l-ctl --list-devices` to check which `/dev/*` is the correct one:
If it doesn't match the default setup you need to adjust the `Command to generate a live preview` inside the admin panel!
- Give permissions to /dev/video* `sudo gpasswd -a www-data video` (this was done automatically if you used the installation script) and reboot once
- Admin panel config *"Preview mode"*: `from gphoto2`

**Note**
- Requires Photobooth v2.11.0 or later!
- 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 usage and also a general slowdown.**
- 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 Chromium a first time with a webpage asking for the camera.
- 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`.
- 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).
- For best user experience the countdown should be set at least to 8 seconds.

<hr>

### Can I use a live stream as background?
Expand Down
17 changes: 17 additions & 0 deletions manual/faq.html
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,23 @@ <h3>How to use a live stream as background at countdown?</h3>
<ul><li>Do NOT enable <em>"Device cam takes picture"</em> in admin panel config!</li>
<li>Capture pictures via <code>raspistill</code> won't work if motion is installed!</li>
<li>Requires Photobooth v2.2.1 or later!</li></ul></li>
<li><p>A device independent preview can also be done using the video mode of your DSLR (Linux only):</p>

<ul><li>install all dependencies <code>sudo apt install ffmpeg v4l2loopback-dkms -y</code></li>
<li>create a virtual webcam <code>modprobe v4l2loopback exclusive_caps=1 card_label="GPhoto2 Webcam"</code>
<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 />
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>
<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>
<li>Admin panel config <em>"Preview mode"</em>: <code>from gphoto2</code></li></ul>

<p><strong>Note</strong></p>

<ul><li>Requires Photobooth v2.11.0 or later!</li>
<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 usage and also a general slowdown.</strong></li>
<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 Chromium a first time with a webpage asking for the camera.</li>
<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>
<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).
<ul><li>For best user experience the countdown should be set at least to 8 seconds.</li></ul></li></ul></li>
</ol>

<hr>
Expand Down

0 comments on commit d8bb286

Please sign in to comment.