Discussion:
[Gphoto-user] Downloading raw images from D200
fusselpelusa
2007-05-08 19:44:09 UTC
Permalink
Hi,
i am impressed by the nice gphoto2 software! You guys are doing a great
job!!
I have however problems downloading .nef (hence the raw format from Nikon)
images. I did manually change the image format of my Nikon D200 to raw, and
on the memory card, there is .nef images. OK changing to ptp, i.e. store
medium is internal ram, and capture an image with --capture-image -F 1 -I 1
it will get stored as a jpg. Also the filename won't change, but thats i
guess a question that the Nikon does not know, an external hard drive is
connected and does not check the filenames to increase the numbering in the
name by 1. Well, as I am only taking images every 10s in the end, I have
lots of time to rename an image. But how to get the raw image down? do i
have to sepecify this in the command line? in --summary, it is written:
Capture Formats: JPEG Undefined Type
How can i change it to nef-format so it stays by default? My application
will be to get pictures in a 10s interval throughout the night. So the
option -F -I is great for that to not type a command line every 10s, which
could certainly then specify the exact file name with the right extension.
Thanks for your inputs
Thomas
--
View this message in context: http://www.nabble.com/Downloading-raw-images-from-D200-tf3711832.html#a10382697
Sent from the gphoto-user mailing list archive at Nabble.com.
Marcus Meissner
2007-05-08 20:05:25 UTC
Permalink
Post by fusselpelusa
Hi,
i am impressed by the nice gphoto2 software! You guys are doing a great
job!!
I have however problems downloading .nef (hence the raw format from Nikon)
images. I did manually change the image format of my Nikon D200 to raw, and
on the memory card, there is .nef images. OK changing to ptp, i.e. store
medium is internal ram, and capture an image with --capture-image -F 1 -I 1
it will get stored as a jpg. Also the filename won't change, but thats i
guess a question that the Nikon does not know, an external hard drive is
connected and does not check the filenames to increase the numbering in the
name by 1. Well, as I am only taking images every 10s in the end, I have
lots of time to rename an image. But how to get the raw image down? do i
Capture Formats: JPEG Undefined Type
How can i change it to nef-format so it stays by default? My application
will be to get pictures in a 10s interval throughout the night. So the
option -F -I is great for that to not type a command line every 10s, which
could certainly then specify the exact file name with the right extension.
Thanks for your inputs
Not sure if this works for the D200, but for the D70s
(with current libgphoto2 TRUNK, but should also work with 2.3.1 I think):

gphoto2 --get-config imgquality

... chose the NEF setting you want ...

gphoto2 --set-config imgquality=3
gphoto2 --capture-image -F 10000 -F 10

It retrieves captXXXX.jpg images for me, but these are actually
NEF files.

Ciao, Marcus
fusselpelusa
2007-05-08 22:30:10 UTC
Permalink
Post by Marcus Meissner
Post by fusselpelusa
Hi,
i am impressed by the nice gphoto2 software! You guys are doing a great
job!!
I have however problems downloading .nef (hence the raw format from Nikon)
images. I did manually change the image format of my Nikon D200 to raw, and
on the memory card, there is .nef images. OK changing to ptp, i.e. store
medium is internal ram, and capture an image with --capture-image -F 1 -I 1
it will get stored as a jpg. Also the filename won't change, but thats i
guess a question that the Nikon does not know, an external hard drive is
connected and does not check the filenames to increase the numbering in the
name by 1. Well, as I am only taking images every 10s in the end, I have
lots of time to rename an image. But how to get the raw image down? do i
Capture Formats: JPEG Undefined Type
How can i change it to nef-format so it stays by default? My application
will be to get pictures in a 10s interval throughout the night. So the
option -F -I is great for that to not type a command line every 10s, which
could certainly then specify the exact file name with the right extension.
Thanks for your inputs
Not sure if this works for the D200, but for the D70s
gphoto2 --get-config imgquality
... chose the NEF setting you want ...
gphoto2 --set-config imgquality=3
gphoto2 --capture-image -F 10000 -F 10
It retrieves captXXXX.jpg images for me, but these are actually
NEF files.
Ciao, Marcus
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Gphoto-user mailing list
https://lists.sourceforge.net/lists/listinfo/gphoto-user
Hm I did change the imgquality to 4 (NEF (raw) for the D200), tried to
capture 3 images with 10 seconds intervall, but only the first image got
shot and nothing happened after that.
So I had to ctrl+c.
The image taken only was 268KB large, whereas i expected to get ~15MB. Also
after that I did get some error message that a ptp error occured. I
unplugged the camera, plugged it in again and the error is gone then (by
typing the command gphoto2 --list-config i.e.)
OK now lets set image quality back to 3 (unknwon format as it is called in
get-config imgquality), but I get a segmentation fault back and ptp errors
again.
Now: is there a remote way to "reboot the camera" somehow? Right now i can
certainly do it by hand, but if it is on top of a mountain, this is not
possible any more.
Dos it matter which format is set manually at the camera? (right now it is
raw. perhaps i got a NEF image before and it was only written as jpg, as you
said.) As I recall it was set to image quality 3 though. Perhaps the
segmentation fault is that the camera settings do not match with the setting
gphoto2 gives?
Hm how can i reset it now and remotely?
Thanks a lot
Chers
Thomas
--
View this message in context: http://www.nabble.com/Downloading-raw-images-from-D200-tf3711832.html#a10385298
Sent from the gphoto-user mailing list archive at Nabble.com.
Marcus Meissner
2007-05-09 06:36:58 UTC
Permalink
Post by fusselpelusa
Post by Marcus Meissner
Not sure if this works for the D200, but for the D70s
gphoto2 --get-config imgquality
... chose the NEF setting you want ...
gphoto2 --set-config imgquality=3
gphoto2 --capture-image -F 10000 -F 10
It retrieves captXXXX.jpg images for me, but these are actually
NEF files.
Hm I did change the imgquality to 4 (NEF (raw) for the D200), tried to
capture 3 images with 10 seconds intervall, but only the first image got
shot and nothing happened after that.
So I had to ctrl+c.
The image taken only was 268KB large, whereas i expected to get ~15MB. Also
after that I did get some error message that a ptp error occured. I
unplugged the camera, plugged it in again and the error is gone then (by
typing the command gphoto2 --list-config i.e.)
Can you send me the --debug output of this?
Post by fusselpelusa
OK now lets set image quality back to 3 (unknwon format as it is called in
get-config imgquality), but I get a segmentation fault back and ptp errors
again.
Umm, segfaults should not happen. Can you try getting a backtrace using gdb
here?
Post by fusselpelusa
Now: is there a remote way to "reboot the camera" somehow? Right now i can
certainly do it by hand, but if it is on top of a mountain, this is not
possible any more.
A USB reset ... easiest way is to rmmod / modprobe the host controller,
otherwise you would have to write a libusb program which just does a
usb_reset(dev).
Post by fusselpelusa
Dos it matter which format is set manually at the camera? (right now it is
raw. perhaps i got a NEF image before and it was only written as jpg, as you
said.) As I recall it was set to image quality 3 though. Perhaps the
segmentation fault is that the camera settings do not match with the setting
gphoto2 gives?
Setting 3 might just be for my D70s. What is --get-config imquality reporting?
Post by fusselpelusa
Hm how can i reset it now and remotely?
See above.

Ciao, Marcus
fusselpelusa
2007-05-09 19:09:06 UTC
Permalink
Post by Marcus Meissner
Post by fusselpelusa
Post by Marcus Meissner
Not sure if this works for the D200, but for the D70s
(with current libgphoto2 TRUNK, but should also work with 2.3.1 I
gphoto2 --get-config imgquality
... chose the NEF setting you want ...
gphoto2 --set-config imgquality=3
gphoto2 --capture-image -F 10000 -F 10
It retrieves captXXXX.jpg images for me, but these are actually
NEF files.
Hm I did change the imgquality to 4 (NEF (raw) for the D200), tried to
capture 3 images with 10 seconds intervall, but only the first image got
shot and nothing happened after that.
So I had to ctrl+c.
The image taken only was 268KB large, whereas i expected to get ~15MB. Also
after that I did get some error message that a ptp error occured. I
unplugged the camera, plugged it in again and the error is gone then (by
typing the command gphoto2 --list-config i.e.)
Can you send me the --debug output of this?
Post by fusselpelusa
OK now lets set image quality back to 3 (unknwon format as it is called in
get-config imgquality), but I get a segmentation fault back and ptp errors
again.
Umm, segfaults should not happen. Can you try getting a backtrace using gdb
here?
Post by fusselpelusa
Now: is there a remote way to "reboot the camera" somehow? Right now i can
certainly do it by hand, but if it is on top of a mountain, this is not
possible any more.
A USB reset ... easiest way is to rmmod / modprobe the host controller,
otherwise you would have to write a libusb program which just does a
usb_reset(dev).
Post by fusselpelusa
Dos it matter which format is set manually at the camera? (right now it is
raw. perhaps i got a NEF image before and it was only written as jpg, as you
said.) As I recall it was set to image quality 3 though. Perhaps the
segmentation fault is that the camera settings do not match with the setting
gphoto2 gives?
Setting 3 might just be for my D70s. What is --get-config imquality reporting?
Post by fusselpelusa
Hm how can i reset it now and remotely?
See above.
Ciao, Marcus
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Gphoto-user mailing list
https://lists.sourceforge.net/lists/listinfo/gphoto-user
OK I did reboot as i could not figure out which module belongs to the Nikon.
I have two webcams connected to the same computer as well. (Philips Toucam
840k and a Quickcam messenger)

$ gphoto2 --auto-detect
Model Port
----------------------------------------------------------
Nikon DSC D200 (PTP mode) usb:
Nikon DSC D200 (PTP mode) usb:004,003

finds the camera. list config gives following error. I will send you Marcus
the debug file personanlly, I guess?

$ gphoto2 --list-config

*** Error ***
An error occurred in the io-library ('Could not claim the USB device'):
Could not claim interface 0 (Operation not permitted). Make sure no other
program or kernel module (such as sdc2xx, stv680, spca50x) is using the
device and you have read/write access to the device.
*** Error (-53: 'Could not claim the USB device') ***

For debugging messages, please use the --debug option.
Debugging messages may help finding a solution to your problem.
If you intend to send any error or debug messages to the gphoto
developer mailing list <gphoto-***@lists.sourceforge.net>, please run
gphoto2 as follows:

env LANG=C gphoto2 --debug --debug-logfile=my-logfile.txt --list-config

Please make sure there is sufficient quoting around the arguments.

Before the reboot I got
But as i first wanted to try your suggestion with rmmod, I did not try the
debug mode. Sorry as now it is a different story I guess.

$ gphoto2 --list-config

*** Error ***
PTP Protocol error, data expected
/main/settings/fastfs
/main/settings/capturetarget
/main/wifiprofiles/new/name
/main/wifiprofiles/new/essid
/main/wifiprofiles/new/ipaddr
/main/wifiprofiles/new/netmask
/main/wifiprofiles/new/gw
/main/wifiprofiles/new/accessmode
/main/wifiprofiles/new/channel
/main/wifiprofiles/new/encryption
/main/wifiprofiles/new/key
/main/wifiprofiles/new/write


The imgquality was set to 3 before, and this got me 15MB llarge images. When
set to 4 (NEF raw) the smaller size occured but I cannot set it back and
also it won't tell me the list any more

Thanks
Thomas
--
View this message in context: http://www.nabble.com/Downloading-raw-images-from-D200-tf3711832.html#a10400805
Sent from the gphoto-user mailing list archive at Nabble.com.
fusselpelusa
2007-05-09 19:51:48 UTC
Permalink
Post by Marcus Meissner
Post by fusselpelusa
Post by Marcus Meissner
Not sure if this works for the D200, but for the D70s
(with current libgphoto2 TRUNK, but should also work with 2.3.1 I
gphoto2 --get-config imgquality
... chose the NEF setting you want ...
gphoto2 --set-config imgquality=3
gphoto2 --capture-image -F 10000 -F 10
It retrieves captXXXX.jpg images for me, but these are actually
NEF files.
Hm I did change the imgquality to 4 (NEF (raw) for the D200), tried to
capture 3 images with 10 seconds intervall, but only the first image got
shot and nothing happened after that.
So I had to ctrl+c.
The image taken only was 268KB large, whereas i expected to get ~15MB. Also
after that I did get some error message that a ptp error occured. I
unplugged the camera, plugged it in again and the error is gone then (by
typing the command gphoto2 --list-config i.e.)
Can you send me the --debug output of this?
Post by fusselpelusa
OK now lets set image quality back to 3 (unknwon format as it is called in
get-config imgquality), but I get a segmentation fault back and ptp errors
again.
Umm, segfaults should not happen. Can you try getting a backtrace using gdb
here?
Post by fusselpelusa
Now: is there a remote way to "reboot the camera" somehow? Right now i can
certainly do it by hand, but if it is on top of a mountain, this is not
possible any more.
A USB reset ... easiest way is to rmmod / modprobe the host controller,
otherwise you would have to write a libusb program which just does a
usb_reset(dev).
Post by fusselpelusa
Dos it matter which format is set manually at the camera? (right now it is
raw. perhaps i got a NEF image before and it was only written as jpg, as you
said.) As I recall it was set to image quality 3 though. Perhaps the
segmentation fault is that the camera settings do not match with the setting
gphoto2 gives?
Setting 3 might just be for my D70s. What is --get-config imquality reporting?
Post by fusselpelusa
Hm how can i reset it now and remotely?
See above.
Ciao, Marcus
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Gphoto-user mailing list
https://lists.sourceforge.net/lists/listinfo/gphoto-user
Hi again,
I just unplugged the USB cable manually and plugged it in again and I got it
talk to me again:

gphoto2 --get-config imgquality
Label: Image Quality
Type: RADIO
Current: NEF (Raw)
Choice: 0 JPEG Basic
Choice: 1 JPEG Normal
Choice: 2 JPEG Fine
Choice: 3 Unknown value 0003
Choice: 4 NEF (Raw)
Choice: 5 NEF+BASIC
Choice: 6 Unknown value 0006

Then following

gphoto2 --set-config imgquality=3
Segmentation fault

Hm I am not really proficient in using gdb to backtrace the segfault, as I
just changed to linux i am still learning a lot ...

following error comes from list-config
$ gphoto2 --list-config

*** Error ***
PTP Protocol error, data expected
/main/settings/fastfs
/main/settings/capturetarget
/main/wifiprofiles/new/name
/main/wifiprofiles/new/essid
/main/wifiprofiles/new/ipaddr
/main/wifiprofiles/new/netmask
/main/wifiprofiles/new/gw
/main/wifiprofiles/new/accessmode
/main/wifiprofiles/new/channel
/main/wifiprofiles/new/encryption
/main/wifiprofiles/new/key
/main/wifiprofiles/new/write

I am sending you the debug file for this as well, Marcus.

The thing is, it did work before I changed it to NEF (raw), my guess is that
something is screwed up between the format, manually set at the camera (set
to raw) and the imgquality parameter which is set to 4 right now.

Thomas
--
View this message in context: http://www.nabble.com/Downloading-raw-images-from-D200-tf3711832.html#a10401590
Sent from the gphoto-user mailing list archive at Nabble.com.
fusselpelusa
2007-05-11 21:15:24 UTC
Permalink
Post by fusselpelusa
Hi,
i am impressed by the nice gphoto2 software! You guys are doing a great
job!!
I have however problems downloading .nef (hence the raw format from Nikon)
images. I did manually change the image format of my Nikon D200 to raw,
and on the memory card, there is .nef images. OK changing to ptp, i.e.
store medium is internal ram, and capture an image with --capture-image -F
1 -I 1 it will get stored as a jpg. Also the filename won't change, but
thats i guess a question that the Nikon does not know, an external hard
drive is connected and does not check the filenames to increase the
numbering in the name by 1. Well, as I am only taking images every 10s in
the end, I have lots of time to rename an image. But how to get the raw
image down? do i have to sepecify this in the command line? in --summary,
Capture Formats: JPEG Undefined Type
How can i change it to nef-format so it stays by default? My application
will be to get pictures in a 10s interval throughout the night. So the
option -F -I is great for that to not type a command line every 10s, which
could certainly then specify the exact file name with the right extension.
Thanks for your inputs
Thomas
Hi,
OK I did manually change the image quality at the D200 to jpg, fine. typed
gphoto2 --get-config imgquality and it was recognized as the current set
value(2). Then I changed it manually to NEF (raw), and i got back (3).
Changing it remotely resulted in a seg fault.
it seems that gphoto cannot deal with the different formats, D200 provides.
i don't know about the D70, but does it also provide NEF + jpg? Hence two
images? Might be the problem. Anyhow, as I am only using the plain raw
image, I will just leave it as is now and it works. Also I realized even if
I change the folder to where I want the images to be stored with the
--capture-image -F command, they are not. they are rather store in the
folder from where i typed the command. No big deal either, just have to know
to cd to th right folder first.

Marcus, if you want me to help you fix the set-imgquality for the D200,
please advice, which information you would need. am fairly new to linux as
well as to gphoto2. However, perhaps i could be of some help ...

Thanks for your inputs
Thomas
--
View this message in context: http://www.nabble.com/Downloading-raw-images-from-D200-tf3711832.html#a10439626
Sent from the gphoto-user mailing list archive at Nabble.com.
Continue reading on narkive:
Loading...