Nikon D7100 Slow capture / format SD card issue
ski trax <[email protected]> Fri, 26 Jan 2024 11:15:10 -0500
| Newsgroups | gmane.comp.multimedia.gphoto.user |
|---|---|
| Message-ID | <CAAOoJwPkd61-KVrAOWeiy0R8QeOq_pfpNK=VPERFS9b9CDcb_g@mail.gmail.com> |
--===============6991002094045831868== Content-Type: multipart/alternative; boundary="00000000000065db3f060fdb9a01" --00000000000065db3f060fdb9a01 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello, I am attempting to determine why there is such a difference in capture (write) speed when the SD card has been used and contains a number of images already vs. a freshly formatted card. I have a simple script running on a Raspberry Pi that configures a few camera settings on my Nikon D7100, captures an image and saves it to the camera's SD card. I am using a SanDisk Extreme 150MB/s SD card: #!/usr/bin/env python from subprocess import call call (["gphoto2","--camera","Nikon DSC D7100","--reset"]) call (["gphoto2","--set-config-index","capturetarget=3D1","--set-config","/main/= imgsettings/imagesize=3D2","--set-config","/main/imgsettings/iso=3D5","--se= t-config","/main/capturesettings/f-number=3D5","--set-config","/main/captur= esettings/shutterspeed=3D4","--capture-image","--debug","--debug-loglevel= =3Derror","--debug-logfile=3Dslowcapture.log"]) I have found that if the SD card has a number of images on it already, it takes over 30 seconds to record the image: pi@raspberrypi:/testlab $ time python new2.py New file is in location /store_00010001/DCIM/205D7100/DSC_2228.JPG on the camera real *0m32.941s* user 0m1.130s sys 0m1.402s However, if I format the SD card, the first few captures are much faster (~6 secs vs ~33 secs) pi@raspberrypi:/testlab $ time python new2.py New file is in location /store_00010001/DCIM/205D7100/DSC_2229.JPG on the camera real *0m5.974s* user 0m0.462s sys 0m0.230s pi@raspberrypi:/testlab $ time python new2.py New file is in location /store_00010001/DCIM/205D7100/DSC_2230.JPG on the camera real *0m5.930s* user 0m0.382s sys 0m0.195s pi@raspberrypi:/testlab $ gphoto2 --list-files There is no file in folder '/'. There is no file in folder '/store_00010001'. There is no file in folder '/store_00010001/DCIM'. There are 2 files in folder '/store_00010001/DCIM/205D7100'. #1 DSC_2229.JPG rd 1665 KB 2992x2000 image/jpeg 1705845872 #2 DSC_2230.JPG rd 1613 KB 2992x2000 image/jpeg 1705846448 Here are the versions I am using: pi@raspberrypi:/testlab $ gphoto2 --version gphoto2 2.5.28 Copyright (c) 2000-2021 Marcus Meissner and others gphoto2 comes with NO WARRANTY, to the extent permitted by law. You may redistribute copies of gphoto2 under the terms of the GNU General Public License. For more information about these matters, see the files named COPYING. This version of gphoto2 is using the following software versions and options: gphoto2 2.5.28 gcc, popt(m), exif, no cdk, no aa, jpeg, no readline libgphoto2 2.5.31 standard camlibs (SKIPPING lumix), gcc, no ltdl, EXIF libgphoto2_port 0.12.2 iolibs: disk ptpip serial usb usbdiskdirect usbscsi, gcc, no ltdl, EXIF, USB, serial without locking Log file: https://drive.google.com/file/d/1BPfzRSJuKhi7xeYCo69DAhbd4gaXoQER/view?usp= =3Ddrive_link The log above shows the slow capture before the format and then two much faster captures after the format. Understandably there are less files on a fresh card, but is there any reason why the camera has to enumerate all existing files on the SD card before writing? Can that be avoided either with some parameter? I appreciate any input in advance. Thanks, Matt --00000000000065db3f060fdb9a01 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Hello,<div><br></div><div>I am attempting to determine why= there is such a difference in capture (write) speed when the SD card has b= een used and contains a number of images already vs. a freshly formatted ca= rd.</div><div><br></div><div>I have a simple script running on a Raspberry = Pi that configures a few camera settings on my Nikon D7100, captures an ima= ge and saves it to the camera's SD card.=C2=A0 I am using a SanDisk Ext= reme 150MB/s SD card:</div><div><br></div><div><font face=3D"monospace">#!/= usr/bin/env python<br>from subprocess import call<br><br>call (["gphot= o2","--camera","Nikon DSC D7100","--reset&quo= t;])<br>call (["gphoto2","--set-config-index","cap= turetarget=3D1","--set-config","/main/imgsettings/image= size=3D2","--set-config","/main/imgsettings/iso=3D5&quo= t;,"--set-config","/main/capturesettings/f-number=3D5",= "--set-config","/main/capturesettings/shutterspeed=3D4"= ,"--capture-image","--debug","--debug-loglevel=3De= rror","--debug-logfile=3Dslowcapture.log"])<br></font></div>= <div><br></div><div>I have found that if the SD card has a number of images= on it already, it takes over 30 seconds to record the image:</div><div><br= ></div><div><font face=3D"monospace">pi@raspberrypi:/testlab $ time python = new2.py<br>New file is in location /store_00010001/DCIM/205D7100/DSC_2228.J= PG on the camera<br><br>real =C2=A0 =C2=A0<b>0m32.941s</b><br>user =C2=A0 = =C2=A00m1.130s<br>sys =C2=A0 =C2=A0 0m1.402s</font><br><br>However, if I fo= rmat the SD card, the first few captures are much faster (~6 secs vs ~33 se= cs)<br><br><font face=3D"monospace">pi@raspberrypi:/testlab $ time python n= ew2.py<br>New file is in location /store_00010001/DCIM/205D7100/DSC_2229.JP= G on the camera<br><br>real =C2=A0 =C2=A0<b>0m5.974s</b><br>user =C2=A0 =C2= =A00m0.462s<br>sys =C2=A0 =C2=A0 0m0.230s<br><br>pi@raspberrypi:/testlab $ = time python new2.py<br>New file is in location /store_00010001/DCIM/205D710= 0/DSC_2230.JPG on the camera<br><br>real =C2=A0 =C2=A0<b>0m5.930s</b><br>us= er =C2=A0 =C2=A00m0.382s<br>sys =C2=A0 =C2=A0 0m0.195s<br><br>pi@raspberryp= i:/testlab $ gphoto2 --list-files<br>There is no file in folder '/'= .<br>There is no file in folder '/store_00010001'.<br>There is no f= ile in folder '/store_00010001/DCIM'.<br>There are 2 files in folde= r '/store_00010001/DCIM/205D7100'.<br>#1 =C2=A0 =C2=A0 DSC_2229.JPG= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 rd =C2=A01665 KB 2992x200= 0 image/jpeg 1705845872<br>#2 =C2=A0 =C2=A0 DSC_2230.JPG =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 rd =C2=A01613 KB 2992x2000 image/jpeg 17058= 46448</font><br></div><div><br></div><div>Here are the versions I am using:= </div><div><br></div><div><font face=3D"monospace">pi@raspberrypi:/testlab = $ gphoto2 --version<br>gphoto2 2.5.28<br><br>Copyright (c) 2000-2021 Marcus= Meissner and others<br><br>gphoto2 comes with NO WARRANTY, to the extent p= ermitted by law. You may<br>redistribute copies of gphoto2 under the terms = of the GNU General Public<br>License. For more information about these matt= ers, see the files named COPYING.<br><br>This version of gphoto2 is using t= he following software versions and options:<br>gphoto2 =C2=A0 =C2=A0 =C2=A0= =C2=A0 2.5.28 =C2=A0 =C2=A0 =C2=A0 =C2=A0 gcc, popt(m), exif, no cdk, no a= a, jpeg, no readline<br>libgphoto2 =C2=A0 =C2=A0 =C2=A02.5.31 =C2=A0 =C2=A0= =C2=A0 =C2=A0 standard camlibs (SKIPPING lumix), gcc, no ltdl, EXIF<br>lib= gphoto2_port 0.12.2 =C2=A0 =C2=A0 =C2=A0 =C2=A0 iolibs: disk ptpip serial u= sb usbdiskdirect usbscsi, gcc, no ltdl, EXIF, USB, serial without locking</= font><br><br>Log file:<br><a href=3D"https://drive.google.com/file/d/1BPfzR= SJuKhi7xeYCo69DAhbd4gaXoQER/view?usp=3Ddrive_link">https://drive.google.com= /file/d/1BPfzRSJuKhi7xeYCo69DAhbd4gaXoQER/view?usp=3Ddrive_link</a><br><br>= The log above=C2=A0shows the slow capture before the format and then two mu= ch faster captures after the format.=C2=A0 Understandably there are less fi= les on a fresh card, but is there any reason why the camera has to enumerat= e all existing files on the SD card before writing?=C2=A0 Can that be avoid= ed either with some parameter?=C2=A0 =C2=A0I appreciate any input in advanc= e.</div><div><br></div><div>Thanks,<br>Matt</div><br></div> --00000000000065db3f060fdb9a01-- --===============6991002094045831868== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============6991002094045831868== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Gphoto-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gphoto-user --===============6991002094045831868==--