How to save images into the SD card using gphoto2.
I'm using gphoto library to save the camera images into the voxl core-board by following https://docs.modalai.com/voxl-libgphoto2/
I am looking for a way to save the images into the SD card instead of saving them into the internal memory of the voxl core-board.
As well as I am looking for a way to have filenames numbered as they're saved instead of asking to overwrite the previous photos (like capt001.arw, capt002.arw, and so on).
Command: gphoto2 --capture-image-and-download
Hi @Alex123 ,
Have you tried using the
I'll try this and let you know.
And how can I save the images on SD card?
@Alex123 If you save a file to the
/sdcard/directory it will be saved onto the SD card.
I've tried it using --filename FILENAME option, but it's saving images only in a specified pattern. It's not ignoring the overwrite option.
The image name should be different from the previous images in my case.
Using voxl core-board, when we run "docker run -i -t --rm -v /dev/bus/usb/:/dev/bus/usb --net=host --privileged libgphoto2" command, we get
In this, we are unable to get an SD card.
root@apq8096:/# cd mnt/
In adb shell,
/ # ls
WEBSERVER data flight_controller lost+found proc srv usr
bin dev home media run sys var
boot dsp lib mnt sbin system vendor
build.prop etc lib64 opt sdcard target
cache firmware linuxrc persist share tmp
we can get an SD card in the /mnt directory.
/ # cd mnt/
/mnt # ls
So if we are in "root@apq8096:/#" then how to access the /sdcard/ directory?
And how to write an image into sdcard?
I've tried like this,
gphoto2 --capture-image-and-download --folder=/mnt/sdcard/
It's not saving the images into an SD card.
It looks like in order to access the
sdcarddirectory in Docker you will have to mount it similar to how the
/dev/bus/usbdirectory is mounted.
You can do this by adding another mounting path to the Docker run command, similar to:
docker run -i -t --rm -v /dev/bus/usb/:/dev/bus/usb -v /sdcard:/sdcard --net=host --privileged libgphoto2
You should now be able to access the
/sdcarddirectory in Docker.
As for the naming issues, I'm not positive on the correct answer however gphoto2 has fairly good documentation on their different command line options here: http://www.gphoto.org/doc/manual/ref-gphoto2-cli.html#cli-examples
Yes, it's working.
@Alex123 Glad I could help!