Nikon D40: USB Camera Control

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
27,230
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Mar 8, 2009

Demonstration of USB control of a Nikon D40 using gPhoto2 software in Linux (specifically Easy Peasy, the Ubuntu derivation for Asus Eee PC computers).

GPHOTO2 COMMAND PRIMER

The D40 can store photos in one of two places: the camera's internal memory or the SD memory card. You can select which one using:

gphoto2 --set-config capturetarget=0 # capture to internal memory
gphoto2 --set-config capturetarget=1 # capture to SD memory card


CAPTURING TO INTERNAL MEMORY

If you want to capture to internal memory you have to retrieve the photo before taking the next picture, so the sequence might be:

gphoto2 --set-config capturetarget=0 # run this once
gphoto2 --capture-image --get-file 2 # snap photo and download file

The value "2" is a 1-based index to the file you want. You can list the files by index like this:

gphoto2 --capture-image --list-files

If you omit --capture-image you will only see one file (index #1), called "/special/curve.ntc". If you include --capture-image the second file (index #2) will be "/store_00010001/capt0000.jpg", the newly-taken photo.

You can also capture multiple files, and then download them, like this:

gphoto2 --interval=2 --frames=4 --capture-image --filename=photo%Y%M%S.jpg --get-all-files

I haven't figured out how to get the camera shooting in quick mode (2.5 shots per second), though.


CAPTURING TO SD MEMORY CARD

In this case, you can capture as many photos as will fit in the memory card and then download them later by any means (including using a card reader or the --list-files, --get-files, and --get-all-files options):

gphoto2 --set-config capturetarget=1 # run this once
gphoto2 --capture-image # run this as many times as you like

You can also do time-lapse:

gphoto2 --interval=2 --frames=4 --capture-image

The photos will be stored in the memory card, exactly the same as if you had taken them manually.

Category:

Science & Technology

Tags:

License:

Standard YouTube License

  • likes, 2 dislikes

Link to this comment:

Share to:

Uploader Comments (arturormk)

  • i have that same netbook, i have never been able to set it up to my wireless connections, always says 'pending' any tips to get it to work?

  • @ClatteredTorso I never had any problems with Wifi, either with the standard Xandros or with Ubuntu.

    (Now I use Lubuntu on the EeePC 4G, and instead of gPhoto2 I use a custom Python module written following the specs published by Nikon which allows much better control of the camera.)

  • The camera lcd lighting up after each shot will drain the battery rather quickly. Camera Control Pro or ControlMyNikon I think will not light up the LCD.

  • @nikstacker I know this is 1 year old, but YouTube would never let me post replies and now I just realized that the new YouTube interface does let me :)

    My trick to keep the screen off when under computer control is to plug a dummy jack into the video output. I now use the Nikon protocol directly to control the camera (from Python), but there is no function to keep the screen off in that protocol.

  • The image display in this video is just Nautilus. You could make the pictures larger with Control+mouse wheel and then select reverse sort by date in the View menu so the latest image is always first.

see all

All Comments (11)

Sign In or Sign Up now to post a comment!
  • Thank you for sharing this !

  • did it!

    thanks!

  • Awesome!

  • very well!! Nice vid and great explanations!!! I just config my equip and start to make a time elapse movie.

    Tnks!!

    sorry for my horrible english

    grettings from Brasil

  • FREE** Download any Camera Manual. Old, New and Ancient. -

    cameraownermanuals (dot) com

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more