The /sapi/subtitle endpoint is used for managing subtitle tracks. Subtitle tracks can be used to enrich a mediaclip with additional (mostly language-specific) subtitling.
Subtitling may not be part of your Online Video Platform license. Contact support for details.
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" }
In the example code a JSON encoded subtitle representation is shown. It refers a Language entity (id: 3, isocode de).
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" }
Where 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 id of the Media Clip this audio track should be related to.
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.