Metadata Configuration File
In certain situations, information to run a test is not available in the file metadata. Some examples include:
- No aperture information for manual aperture lenses
- No aperture/focal length information for adapted lenses
- Missing focus adjustment (AF Microadjustment, AF Fine Tune etc) information for cameras that do not supply this information in the file
FoCal offers a way for you to supply this information through the use of a configuration file.
The meta.json file
In order to supply missing metadata about files, you need to create a text file called meta.json and place it in the same directory as the files you will be analysing.
An example meta.config file is shown below:
[
{
"filenames": ["30", "31", "32"],
"afType": "live",
"afmaActive": true,
"shotAFMA": -20
},
{
"filenames": ["33", "34", "35"],
"afType": "live",
"afmaActive": true,
"shotAFMA": -10
},
{
"filenames": ["36", "37", "38"],
"afType": "live",
"afmaActive": true,
"shotAFMA": 0
},
{
"filenames": ["39", "40", "41"],
"afType": "live",
"afmaActive": true,
"shotAFMA": 10
},
{
"filenames": ["42", "43", "44"],
"afType": "live",
"afmaActive": true,
"shotAFMA": 20
}
]
Metadata config file options
Overview
The metadata config file is a json file (JavaScript Object Notation) – this is a flexible and well documented standard for defining information.
Key points:
- The file must be enclosed in square brackets as shown above (this is the json notation for an array)
- Each set of metadata that you want to apply to one or more files must be enclosed in curly braces (this is the json notation for an object)
- Each object must contain a selector – either filename or filenames – and then one or more metadata specifiers.
- Keys and values are separated with a colon.
- The name for each key (e.g. filename or afType) must be within quotes.
- Numbers and Boolean (true/false) values are NOT enclosed in quotes, but all other values should be.
Selecting Files
Each metadata set contains a selector which is either filename or filenames:
filename
Specify part or all of a single filename. For example, you could use set img123.jpg to match a single file, or 123 to match any file with the number 123 in the filename.
Example:
“filename”: “123”
filenames
The same logic as filename is used, but you can supply an array of filename within square brackets to match a number of files. This is used in the example above.
Example:
“filename”: [“30”, “31”, “32”]
This will apply the defined metadata to all files that contain the values, e.g. IMG1230.jpg, IMG1231.arw, IMG1232.nef, photo_321.jpg (the bold part shows the match).
Metadata Values
The following options are available to specify to FoCal the metadata that should be applied to a file. Any user specified metadata will take precedence over the metadata contained within the file if present.
aperture
Numeric value to specify the aperture.
Example:
“aperture”: 5.6
shutterSpeed
Numeric value to specify the shutter speed.
Example:
“shutterSpeed”: 0.1
iso
Numeric value to specify the ISO.
Example:
“iso”: 200
focalLength
Numeric value to specify the focal length (in mm) used for the shot.
Example:
“focalLength”: 50
minFocalLength
Numeric value to specify the minimum focal length (in mm) of the lens.
Example:
“minFocalLength”: 24
maxFocalLength
Numeric value to specify the maximum focal length (in mm) of the lens.
Example:
“maxFocalLength”: 70
lensSerialNumber
Text value to specify the lens serial number.
The value must be enclosed in quotes.
Example:
“lensSerialNumber”: “12341234”
focusDistance
Numeric value to specify the focus distance (in metres) for the shot.
Example:
“focusDistance”: 2.4
imageStabilisation
Boolean value (true/false) to specify if Image Stabilisation is active.
Example:
“imageStabilisation”: true
afmaActive
Boolean value (true/false) to specify if the Focus Adjustment is active. Note that this must be set to true in order for the shotAFMA value to be applied.
Example:
“afmaActive”: true
shotAFMA
Numeric value to specify the Focus Adjustment value applied for this shot.
Example:
“shotAFMA”: -7
defocusDir
Enumeration for the Defocus Direction. Options are:
- None
- Near
- Far
The value must be enclosed in quotes.
Example:
“defocusDir”: “None”
defocusAmount
Enumeration for the Defocus Amount. Options are:
- None
- Small
- Large
The value must be enclosed in quotes.
Example:
“defocusAmount”: “Small”
afType
Enumeration for the Autofocus Type. Options are:
- None
- PDAF
- Live
The value must be enclosed in quotes.
Example:
“afType”: “PDAF”