Skip to content

Commit

Permalink
Add functionality to record video and update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleshot committed Apr 1, 2024
1 parent cf7d7db commit 2f97d8e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# digiCamControlPython

Simple python class to use digiCamControl via the [single command system](https://digicamcontrol.com/doc/userguide/remoteutil) to control your camera.
[Digicamcontrol](https://digicamcontrol.com/) needs to be installed and running. Compatible cameras can be found [here](https://digicamcontrol.com/cameras).
Simple python class to use digiCamControl via the [single command system](https://digicamcontrol.com/doc/userguide/remoteutil) to control your camera. [Digicamcontrol](https://digicamcontrol.com/) needs to be installed and running. Supports cameras from many popular manufacturers such as Nikon, Canon, Sony as well as GoPro. A list of compatible cameras can be found [here](https://digicamcontrol.com/cameras).

## Example code:
``` Python
Expand All @@ -10,26 +9,27 @@ Simple python class to use digiCamControl via the [single command system](https:
import digiCamControlPython as dccp
camera = dccp.Camera()

camera.setIso(100)
camera.set_iso(100)
>>> Set the Iso to 100

camera.getShutterspeed()
camera.get_shutterspeed()
>>> Current shutterspeed: 1/125

camera.listCompression()
camera.list_compression()
>>> List of all possible compressionsettings: ['JPEG (BASIC)', 'JPEG (NORMAL)', 'JPEG (FINE)', 'RAW', 'RAW + JPEG (BASIC)', 'RAW + JPEG (NORMAL)', 'RAW + JPEG (FINE)']

camera.setAutofocus("off")
camera.set_autofocus("off")
>>> Autofocus is off.

camera.setTransfer("Save_to_PC_only")
camera.set_transfer("Save_to_PC_only")

camera.setFolder(r"C:\Images\")
camera.set_folder(r"C:\Images\")
>>> Set the session.folder to C:\Images\

camera.capture()
>>> Captured image.
>>> Current lastcaptured: Image1.jpg

```


16 changes: 16 additions & 0 deletions digiCamControlPython.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,22 @@ def list_whitebalance(self) -> list:
"""
return self.__list_cmd("whitebalance")

# %% Video
def start_video(self) -> int:
"""
Start recording a video.
:return: Value indicating the success of the operation
"""
self.show_live_view() # May be necessary
return self.run_cmd("do StartRecord")

def stop_video(self) -> int:
"""
Stop recording a video.
:return: Value indicating the success of the operation
"""
return self.run_cmd("do StopRecord")

# %% Commands
def run_cmd(self, cmd: str) -> int:
"""
Expand Down

0 comments on commit 2f97d8e

Please sign in to comment.