Media File
Validate against: http://json-schema.org/draft-07/schema#
Schema ID: http://schemas.digitallinguistics.io/Media-5.3.0.json
Type: object
Description
An object containing information about a media file. The file itself should be stored at the URL indicated in the mediaURL
field. Media files generally contain primary data. Examples might include audio/video recordings, scans of archival materials, photos taken during fieldwork, or scans of field notes.
Required Properties
filename
Properties
The following properties are defined for this object:
Type:
type
Type:
string
Read-only:
true
Description
The type of object. Must be set to
Media
.This item must have the following value:
"Media"
ID:
id
Description
A unique database identifier for this Media Item
Abbreviation:
abbreviation
Type:
string
Description
An abbreviation for referring to this file
Referenced Schema
This item must validate against the following schema:
Access Rights:
access
Type:
object
Description
Access rights for this media file
Referenced Schema
This item must validate against the following schema:
Content:
content
Description
A description of the content of this file, optionally in multiple languages
Referenced Schema
This item must validate against the following schema:
MIME Content Type:
contentType
Type:
string
Description
The media type of the file. Must be a valid MIME type. Examples:
audio/wav
,application/pdf
,video/mpeg
Creator (Person - Database Reference):
creator
Type:
object
Description
A database reference to the person who created this specific file
Referenced Schema
This item must validate against the following schema:
Date Created:
dateCreated
Type:
string
Description
The date and optionally time that this metadata object was originally created. Not the date the media file was created. For that, see the
dateRecorded
property.This item must also validate against exactly one of the following schemas:
Format:
date
Format:
date-time
Date Modified:
dateModified
Type:
string
Description
The date and optionally time that this metadata was last modified. Not the date that the media file was modified.
This item must also validate against exactly one of the following schemas:
Format:
date
Format:
date-time
Date Recorded:
dateRecorded
Type:
string
Description
The date and optionally time that this media file was recorded or photographed. Or, if the file is a scan of field notes, the date that the scan was made. Not the date that this metadata object was created. For that, see the
dateCreated
property.This item must also validate against exactly one of the following schemas:
Format:
date
Format:
date-time
End Time:
endTime
Type:
number
Description
Within an audiovisual file, the time at which the relevant linguistic data ends. Programs may use this field in different ways. For example, if the camera recorded for five minutes after the speaker finished talking, the
End Time
would be the time 5 minutes before the end of the file. The time stamp should be in seconds and milliseconds, separated by a period, e.g.12.573
, or1.234
, or167.780
, etc.Minimum:
0.001
Filename:
filename
Type:
string
Description
The filename for this media item without spaces, but including the extension
Regular expression to match:
^[^ ]+\.[^ ]+
Format (File Extension):
format
Type:
string
Description
The format (file extension) of the media file, without a period. Examples:
wav
,mp4
,pdf
Languages:
languages
Type:
array
Description
An array of the languages that are used in this media file
Items must be unique:
true
Items
Each item in this array must adhere to the following schema:
Language (Database Reference):
languages
Type:
object
Description
A database reference to this language
Referenced Schema
This item must validate against the following schema:
Length (in Time / Pages):
length
Type:
number
Description
The length of the file, in seconds and milliseconds if an audio/video file (in
SS.MMM
format), or pages if a documentMinimum:
0.001
Link:
link
Type:
string
Description
A URL where a presentational format for this resource may be viewed
Format:
uri
Location (Database Reference):
location
Type:
object
Description
A database reference to the location where the content in this media file was recorded or produced
Referenced Schema
This item must validate against the following schema:
Media URL:
mediaURL
Type:
string
Description
The URL where the media file can be found.
Format:
uri
Notes:
notes
Type:
array
Description
A collection of notes about this media item.
Items must be unique:
true
Items
Each item in this array must adhere to the following schema:
Note:
notes
Referenced Schema
This item must validate against the following schema:
Original Media Item:
original
Type:
string
Description
The URL of the Media object (not the URL to the media file itself) that this file is derived from
Format:
uri
Persons in File:
people
Type:
array
Description
A list of all the people who appear in this file. Often a list of speakers.
Items must be unique:
true
Items
Each item in this array must adhere to the following schema:
Person (Database Reference):
people
Type:
object
Description
A database reference to a person who appears in this file
Referenced Schema
This item must validate against the following schema:
File Size:
size
Type:
integer
Description
The size of the file, in bytes.
Minimum:
1
Start Time:
startTime
Type:
number
Description
Within an audiovisual file, the time at which the relevant linguistic data starts, or the time at which an offset should be calibrated from. This may also be used to synchronize the starting point of multiple media files associated with a single Text. For example, if the camera started recording five minutes before the speaker began speaking, the
Start Time
might be 5 minutes from the start of the file (so 300.00 seconds). The time stamp should be in seconds and milliseconds, separated by a period, e.g.12.573
, or1.2
, or167.78012
, etc.Minimum:
0
Tags:
tags
Type:
object
Description
A set of tags for this media item
Referenced Schema
This item must validate against the following schema:
URL:
url
Type:
string
Description
The URL where this media data can be retrieved. NOT the URL of the media file itself (for that, see the
mediaURL
attribute).Format:
uri
Additional Properties
Any additional properties must adhere to the following schema:
This schema imposes no restrictions. All values are valid.
Examples
The following are example values for this schema:
-
{ "abbreviation": "Omoiseke", "access": { "ELAR": "User" }, "content": "A folktale told by Helen Makana about a girl who gets married to dogs.", "contentType": "audio/wav", "creator": { "id": "791073ab-beec-484d-a608-a936abbf4e7c", "key": "DWH" }, "dateCreated": "2018-10-31T17:25:28.347Z", "dateModified": "2018-10-31T17:25:46.239Z", "dateRecorded": "2014-08-14", "filename": "Gusii_HM_2014-08-14_Omoiseke.wav", "format": "wav", "id": "6519aafc-9ce6-4101-83c2-e1d32555ff03", "languages": [ { "id": "434680a8-fd5a-4799-a5a7-e1f6f5d15d95", "key": "Gusii", "url": "https://api.digitallinguistics.io/languages/Gusii" } ], "length": 62.417, "location": { "id": "eaead014-2c97-47d7-a072-d09d8d7d80e8", "key": "KennedyFarm" }, "mediaURL": "https://files.digitallinguistics.io/audio/Gusii_HM_2014-08-14_Omoiseke.wav", "people": [ { "id": "2491b3cd-2749-438a-9eeb-70427d24d5ad", "key": "HM" } ], "size": 11010618, "type": "Media", "url": "https://api.digitallinguistics.io/languages/Gusii/media/Gusii_HM_2014-08-14_Omoiseke.wav" }
-
{ "abbreviation": "enderema", "access": { "ELAR": "User" }, "content": "Photo of *ɛ́ndɛrɛma* 'slippery vegetable vine'", "contentType": "image/jpeg", "creator": { "id": "791073ab-beec-484d-a608-a936abbf4e7c", "key": "DWH" }, "dateCreated": "2018-10-31T17:25:28.347Z", "dateModified": "2018-10-31T17:25:46.239Z", "dateRecorded": "2014-08-04", "filename": "Gusii_2014-08-04_enderema.jpg", "format": "jpg", "link": "https://files.digitallinguistics.io/images/Gusii_2014-08-04_enderema.jpg", "location": { "id": "eaead014-2c97-47d7-a072-d09d8d7d80e8", "key": "KennedyFarm" }, "mediaURL": "https://files.digitallinguistics.io/images/Gusii_2014-08-04_enderema.jpg", "notes": [ { "text": "ɛ́ndɛrɛma 'slippery vegetable vine'" } ], "people": [ { "id": "b430dd0d-5c8c-4a66-99f0-f9a0cc7e1524", "key": "JKM" } ], "size": 3374489, "url": "https://api.digitallinguistics.io/languages/Gusii/media/enderema.jpg" }
Developer Notes
This is a top-level database object