gphoto2 | gphoto2 commandline tool
kandi X-RAY | gphoto2 Summary
kandi X-RAY | gphoto2 Summary
gphoto2 is a command-line frontend to libgphoto2.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of gphoto2
gphoto2 Key Features
gphoto2 Examples and Code Snippets
Community Discussions
Trending Discussions on gphoto2
QUESTION
My code always freezes on me. I'm testing it on this code.
...ANSWER
Answered 2021-Dec-28 at 14:46you should add loop for your code. If u dont do this u always get only 1 frame from camera. Example:
QUESTION
This project is taking pictures for the sky and then it's going to mask the clouds, so there will be two pictures, one is the original and the other is the masked one.
I just want to upload every picture taken by the camera pi to Dropbox.
Here is the main code:
...ANSWER
Answered 2020-Oct-26 at 14:36When using the files_upload
method in the Dropbox Python SDK, you specify where you want to upload via the value you supply to the path
parameter.
A path/conflict/file
error when uploading to Dropbox indicates that the upload failed because "There’s a file in the way".
Looking at your code, this seems expected in this case since you're always specifying the value '/image.jpg'
, so after the first successful call, there will already be a file there.
You should instead change your code to use a different path
for each different file.
QUESTION
I'm trying to open a videoURL using cv2.VideoCapture on Heroku, and it consistently fails to open. I've called the same code on my local machine (Windows 10) and it ran with no problems. Does anyone have recommendations/buildpacks/alternatives to resolve this?
OpenCV Version: 3.4.2.16
Python: 3.7
Current Buildpacks:
- https://github.com/cstavish/heroku-buildpack-vips.git
- https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest.git
- https://github.com/heroku/heroku-buildpack-apt
- heroku/python
- https://github.com/timanovsky/subdir-heroku-buildpack
Open Cv Build info (Video) from the Heroku Dyno
...ANSWER
Answered 2020-Aug-16 at 08:09My apologies for the delay. I am assuming you are using pip
to install OpenCV.
The answer to your question is that for OpenCV 3.x, Mac OS and Linux (and ultimately the environment that Heroku is run under) do not link with FFMPEG which means that video support is not enabled for those platforms. However, it is enabled with Windows. This is the reason why there is an inconsistency between the platforms: What is the deal with `pip install opencv-python` is it a full opencv?
The solution is you will either need to build OpenCV 3.x from source, or use OpenCV 4 which now bundles FFMPEG with it. I would highly recommend you use OpenCV 4 unless there is something blocking you from using it. However to install OpenCV 4, use either pip install --upgrade opencv-python
or pip install --upgrade opencv-contrib-python
. I'm not sure which flavour you are using, but either one should work.
QUESTION
I have a timelapse running with gphoto2
but it seems to be renaming all files to the same date and time
ANSWER
Answered 2020-Jun-01 at 11:00The problem is that you created the shot_time
before and you use it for all files. Try to generate the shot_time
inside the loop.
For example:
QUESTION
I've worked with gphoto2 (2.5.20, on a RPi) before, and have been able to do the basics from the command line:
/usr/bin/gphoto2 --capture-image-and-download --filename=zzz.jpg --force-overwrite
/usr/bin/gphoto2 --capture-preview --filename=zzz.jpg --force-overwrite
The latter captures the preview image, which is a great deal smaller, and for some applications, is great; you can essentially make a webcam out of a DSLR.
However, after installing the gphoto2 library for python, this (which should be the equivalent) fails:
...ANSWER
Answered 2020-May-07 at 07:58Have a look at the gphoto2 program source. You might be able to find out what sequence of libgphoto2 functions the --capture-preview
command calls. You should then be able to reproduce that in Python.
QUESTION
As a regular user I can see my mounted camera with gio mount
,
ANSWER
Answered 2020-Feb-27 at 10:22This is because GIO uses a different backend for enumerating mounts when running as root, because the GVFS daemons which provide (for example) gphoto2 support run in a user session (on the D-Bus session bus) rather than system-wide. So root can’t talk to them.
Run your script as non-root, or you’ll have to do some plumbing to give your script explicit access to your D-Bus session bus (but then it’ll only work when your user session is active).
You shouldn’t need root privileges to list or unmount GIO mounts: permission for that is controlled by polkit, and you should get an authorisation prompt for it if it’s not allowed by default.
QUESTION
Here is how I capture image with my camera
...ANSWER
Answered 2020-Feb-19 at 03:14If you can figure out the name of the logger, you can add your own handler to it and do your own log processing.
Calling "getLogger" with your camera library's name would get you the logger.
Calling AddHandler on that logger with a custom handler would allow you to do your own log processing for logs coming from that logger.
Please see Python's Logging Cookbook for more info
Hope this helps
QUESTION
I am trying to mimic the behaviour of shell command gio mount
which unmounts all gphoto2 cameras
ANSWER
Answered 2020-Feb-16 at 20:12Get the root of the mount (https://developer.gnome.org/gio/stable/GMount.html#g-mount-get-root) and check its URI scheme (https://developer.gnome.org/gio/stable/GFile.html#g-file-has-uri-scheme). If the scheme is gphoto2
, you can unmount it.
See the C implementation of gio mount -s
.
QUESTION
I´m working on a webcam-project. It is for generating timelapse videos of sunset/sundown.
I´m using a raspberrypi to generate them with gphoto2 + DSLR.
At the end of the day the images should get to an video, with audio and an overlay logo. And it should be scaled to 1920 pixel. I got a nice solution an it worked.
Producing the timelapse video an scale it:
ffmpeg -y -framerate 25 -start_number 0000001 -i /var/www/html/webcam/2020-01-05_bilder/%7d.jpg -vf scale=1920:-1 -pix_fmt yuv420p /var/www/html/webcam/2020-01-05-tag-output-1920.mp4
Taking the output of (1) and add an overlay-logo, add audio
ffmpeg -y -i '/var/www/html/webcam/2020-01-05-tag-output-1920.mp4' -i '/var/www/html/webcam-scripts/graphics/logo.png' -i '/var/www/html/webcam-scripts/sounds/chill_time_5.mp3' -shortest -filter_complex '[1][0]scale2ref=h=ow/mdar:w=iw/6[#A logo][liebfrauen]; [#A logo]format=argb,colorchannelmixer=aa=0.95[#B logo transparent]; [liebfrauen][#B logo transparent] overlay=(main_w-w)-(main_w*0.05):(main_h-h)-(main_h*0.01)' -c:v libx264 -crf 18 -preset slow -pix_fmt yuv420p -c:a aac -strict -2 '/var/www/html/webcam/2020-01-05-tag-1920.mp4
I tried to combine both actions, but I get an error:
...ANSWER
Answered 2020-Jan-07 at 18:48Don't mix -vf
and -filter_complex
. Do all filtering in one filtergraph.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install gphoto2
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page