File naming

From edgertronic high speed video camera
Jump to navigation Jump to search

Software 2.2 and older file naming

Default file naming scheme

If no filename pattern is specified, the camera will use "&D", which behaves as follows:


where &T is replaced with the seconds from the start of the computer epoc (Jan 1, 1970) GMT.

For multishot videos, the file naming convention was:


where &b is replaced with the multishot buffer number.

For selective save, the start and end frame are included in the filename:


A similar pattern is used for the metadata file:


Directory naming

The video files and metadata files were stored in the directory named DCIM. The directory can either be on the SD card, USB storage device, or network storage device. The camera creates the directory if it doesn't exist.

User specified file naming

CAMAPI allows you to specify the filename pattern via the methods run(), reconfigure_run(), trigger(), and selective_save(). The CAMAPI methods run() and reconfigure_run() accept a dictionary with the key requested_filename_pattern.

File naming parameters

The following ampersand parameters can be included in the filename pattern. When the video file or associated metadata file is saved, the camera will substitute the actual value in place of each ampersand parameter.

Variable Camera Setting
&D Default version 2.2 naming scheme (described above)
&a Camera name - string assigned via run() or reconfigure_run() or configure_save()
&m Camera model - SC1 SC2X, etc.
&n Serial number
&b Multishot buffer
&d Trigger date (DD-MMM-YY)
&e Ending frame number where frame 0 is the trigger frame
&s Starting frame number where frame 0 is the trigger frame
&t Trigger time (HH-MM-SS)
&T Trigger time (seconds since Jan 1, 1970)

To keep from overwriting an existing files, once the above substitutions are done, if the created filename will overwrite an existing file, then an underscore and a number is appended to make the filename unique.

CAMAPI file naming support

There are several ways CAMAPI supports user specified filenames, list in highest to lowest priority order:

  • selective_save() parameter
  • trigger() parameter
  • reconfigure_run() with requested_filename_pattern key in dictionary parameter
  • run() with requested_filename_pattern key in dictionary parameter
  • camera default filename_patttern value ("&D")

The filename is determined at the time the camera starts saving the movie file and metadata file. If the user trims the video while saving, the filename might change if the ending video frame number is included in the filename.