-
Notifications
You must be signed in to change notification settings - Fork 12
Tutorial.3 Add Content and Send email
Giuliano Catrambone edited this page May 15, 2018
·
9 revisions
This tutorial implements the following Workflow:
- a content is added into MMS
- on success an email is sent
Reference manual for
Create a file (demo_2.json) having the following content
{
"Type": "Workflow",
"Label": "1",
"Variables": {
"Title": "My Title of the content"
},
"Task": {
"Label": "This is my video",
"Type": "Add-Content",
"Parameters": {
"SourceURL": "http://techslides.com/demos/sample-videos/small.mp4",
"FileFormat": "mp4",
"ContentType": "video",
"UserData": { "MyData": "this is my data" },
"Title": "${Title}"
},
"OnSuccess": {
"Task": {
"Type": "Email-Notification",
"Parameters": {
"EmailAddress": "[email protected]",
"Subject": "Task finished",
"Message": "Task __INGESTIONJOBKEY__ has finished"
}
}
}
}
}
Run the following HTTP POST having as input userKey, APIKey and demo_2.json:
- curl -k -v -X POST -u 654:SU1.8AO1O2z0gdezR99BIPvAz2y4LNUsCKcKJrSrQ_S4lS33iZ4zGJ8kfWxQqmOhKL -d @demo_2.json -H "Content-Type: application/json" https://mms-api.catrasoft.cloud/catramms/v1/ingestion
The return will be:
- { "workflow": { "ingestionRootKey": 251, "label": "1" }, "tasks": [ { "ingestionJobKey": 839, "label": "This is my video" }, { "ingestionJobKey": 840, "label": "" } ] }
To get the status of the above ingestion, run the HTTP GET having as input the ingestionRootKey:
- curl -k -v -u 654:SU1.8AO1O2z0gdezR99BIPvAz2y4LNUsCKcKJrSrQ_S4lS33iZ4zGJ8kfWxQqmOhKL https://mms-api.catrasoft.cloud/catramms/v1/ingestion/251
The return will be:
{
"workflow" :
{
"ingestionRootKey" : 251,
"label" : "1",
"tasks" :
[
{
"downloadingProgress" : 100,
"endIngestion" : "2018-05-15T12:30:11Z",
"errorMessage" : null,
"ingestionJobKey" : 839,
"ingestionType" : "Add-Content",
"label" : "This is my video",
"mediaItemKey" : 2,
"physicalPathKey" : null,
"startIngestion" : "2018-05-15T12:30:08Z",
"status" : "End_TaskSuccess",
"uploadingProgress" : null,
"videoDetails" :
{
"audioBitRate" : 83050,
"audioChannels" : 1,
"audioCodecName" : "aac",
"audioSampleRate" : 48000,
"bitRate" : 551193,
"durationInMilliSeconds" : 5000,
"videoAvgFrameRate" : "30/1",
"videoBitRate" : 465641,
"videoCodecName" : "h264",
"videoHeight" : 320,
"videoProfile" : "Constrained Baseline",
"videoWidth" : 560
}
},
{
"endIngestion" : "2018-05-15T12:30:13Z",
"errorMessage" : null,
"ingestionJobKey" : 840,
"ingestionType" : "Email-Notification",
"label" : "",
"mediaItemKey" : null,
"physicalPathKey" : null,
"startIngestion" : "2018-05-15T12:30:08Z",
"status" : "End_TaskSuccess"
}
]
}
}
To get the status of the above ingestion, run the HTTP GET having as input the ingestionRootKey:
- curl -k -v -u 654:SU1.8AO1O2z0gdezR99BIPvAz2y4LNUsCKcKJrSrQ_S4lS33iZ4zGJ8kfWxQqmOhKL https://mms-api.catrasoft.cloud/catramms/v1/ingestion/251/839
The return will be:
{
"workflow" :
{
"ingestionRootKey" : 251,
"label" : "1",
"tasks" :
[
{
"downloadingProgress" : 100,
"endIngestion" : "2018-05-15T12:30:11Z",
"errorMessage" : null,
"ingestionJobKey" : 839,
"ingestionType" : "Add-Content",
"label" : "This is my video",
"mediaItemKey" : 2,
"physicalPathKey" : null,
"startIngestion" : "2018-05-15T12:30:08Z",
"status" : "End_TaskSuccess",
"uploadingProgress" : null,
"videoDetails" :
{
"audioBitRate" : 83050,
"audioChannels" : 1,
"audioCodecName" : "aac",
"audioSampleRate" : 48000,
"bitRate" : 551193,
"durationInMilliSeconds" : 5000,
"videoAvgFrameRate" : "30/1",
"videoBitRate" : 465641,
"videoCodecName" : "h264",
"videoHeight" : 320,
"videoProfile" : "Constrained Baseline",
"videoWidth" : 560
}
}
]
}
}
- tutorial videos: https://www.youtube.com/@CatraMMS/videos
- support email: [email protected]
- info email: [email protected]
- MMS GUI: https://mms-gui.catramms-cloud.com/catramms
- REST MMS API: https://app.swaggerhub.com/apis-docs/giulianoc/MediaManagementService
- API base URL: https://mms-api.catramms-cloud.com/catramms/1.0.1/...
- Delivery URL (authorization by parameter): https://delivery.catramms-cloud.com/catramms/1.0.1/...
- Delivery URL (authorization by path): https://delivery-path.catramms-cloud.com/catramms/1.0.1/...
- Push binary URL: https://binary.catramms-cloud.com/catramms/1.0.1/...
-
Tutorial
- User registration
- Add content - Pull
- Add content, on success send an email
- Two Tasks (Add content) to be executed in parallel
- Add a set of video encoding profiles
- Add two contents, send an email, concat, cut and encode
- Add a single image profile (Logo)
- Add a video, an image, encode the image, overlay the encoded image on the video
-
Workflow Ingestion
Workflow As Library
Add-Remove Content
Delivery
Social Network Delivery
Encoding (video-audio-image)
Media activities
Overlay
Frame Processing
Recorder
Communication
Utilities
Computer Vision