Use the /sapi/subtitle endpoint for managing your media clip subtitles. Subtitles can be used to enrich a mediaclip with additional (mostly language-specific) captions.
1.0 | Object structure
{ type: "subtitle", id: "514", name: "", default: false, publicationid: "1", createddate: "2018-02-09T15:04:44Z", updateddate: "2018-02-09T15:04:44Z", isocode: "de", languageid: "3", status: "published" }
For more info on the Language entity see /sapi/language endpoint.
2.0 | Create/Update
PUT /sapi/subtitle
Example payload:
{ id:-1 isocode:"en" languageid:1 mediaclipid:"1082434" originalfilename:"en.srt" status:"published" uploadIdentifier:"f1afb28a8b2c227e87dd983da91a4a1d" }
The uploadIdentifier points to a requested and executed AWS S3 upload (see /sapi/awsupload). The upload should be a valid SRT (.srt) subtitle file.
Mediaclipid is the media clip’s id that the subtitle is associated with.
Example response:
{ IsDefaultLanguage:true createdBy:"support@bluebillywig.com" createddate:"2018-08-10T08:57:17Z" id:"186" isocode:"de" languageid:3 mediaclipid:"1082434" name:"English" originalfilename:"1162240_uhq.mp4" publicationid:"1" remotesrc:"eu-vms-dev-storage/upload/bb.dev/2018/08/10/f1afb28a8b2c227e87dd983da91a4a1d/f1afb28a8b2c227e87dd983da91a4a1d.srt" status:"published" type:"subtitle" updatedBy:"support@bluebillywig.com" updateddate:"2018-08-10T08:57:17Z" }
If the status property is set to published the subtitle track will be immediately available.
3.0 | Retrieve
GET /sapi/subtitle/{id}
Retrieves an subtitle track object JSON representation by ID.
To retrieve the subtitle track itself (in SRT format):
GET /subtitle/{id}.srt
Where ID is the ID of a valid subtitle object.
4.0 | Delete
DELETE /sapi/subtitle/{id}
Remove a subtitle object/track by ID.
This permanently removes subtitle track and its relation to the Mediaclip.