-
Notifications
You must be signed in to change notification settings - Fork 12
Tutorial.4 Two tasks in parallel
Giuliano Catrambone edited this page May 15, 2018
·
2 revisions
This tutorial adds two contents into MMS in parallel.
Reference manual for
Create a file (demo_3.json) having the following content
{
"Type": "Workflow",
"Label": "1",
"Variables": {
"TitleOfVideo_1": "My Title of the video_1 content",
"TitleOfVideo_2": "My Title of the video_2 content"
},
"Task": {
"Type": "GroupOfTasks",
"Parameters": {
"ExecutionType": "parallel",
"Tasks": [
{
"Label": "${TitleOfVideo_1}",
"Type": "Add-Content",
"Parameters": {
"SourceURL": "http://techslides.com/demos/sample-videos/small.mp4",
"FileFormat": "mp4",
"ContentType": "video",
"UserData": { "MyData": "this is my video data" },
"Title": "${TitleOfVideo_1}"
}
},
{
"Label": "${TitleOfVideo_2}",
"Type": "Add-Content",
"Parameters": {
"SourceURL": "http://techslides.com/demos/sample-videos/small.mp4",
"FileFormat": "mp4",
"ContentType": "video",
"UserData": { "MyData": "this is my video data" },
"Title": "${TitleOfVideo_2}"
}
}
]
}
}
}
Run the following HTTP POST having as input userKey, APIKey and demo_3.json:
- curl -k -v -X POST -u 654:SU1.8AO1O2z0gdezR99BIPvAz2y4LNUsCKcKJrSrQ_S4lS33iZ4zGJ8kfWxQqmOhKL -d @demo_3.json -H "Content-Type: application/json" https://mms-api.catrasoft.cloud/catramms/v1/ingestion
The return will be:
- { "workflow": { "ingestionRootKey": 252, "label": "1" }, "tasks": [ { "ingestionJobKey": 841, "label": "My Title of the video_1 content" }, { "ingestionJobKey": 842, "label": "My Title of the video_2 content" } ] }
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/252
The return will be:
{
"workflow" :
{
"ingestionRootKey" : 252,
"label" : "1",
"tasks" :
[
{
"downloadingProgress" : 100,
"endIngestion" : "2018-05-15T12:46:45Z",
"errorMessage" : null,
"ingestionJobKey" : 841,
"ingestionType" : "Add-Content",
"label" : "My Title of the video_1 content",
"mediaItemKey" : 3,
"physicalPathKey" : null,
"startIngestion" : "2018-05-15T12:46:42Z",
"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
}
},
{
"downloadingProgress" : 100,
"endIngestion" : "2018-05-15T12:46:45Z",
"errorMessage" : null,
"ingestionJobKey" : 842,
"ingestionType" : "Add-Content",
"label" : "My Title of the video_2 content",
"mediaItemKey" : 4,
"physicalPathKey" : null,
"startIngestion" : "2018-05-15T12:46:42Z",
"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
}
}
]
}
}
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/252/842
The return will be:
{
"workflow" :
{
"ingestionRootKey" : 252,
"label" : "1",
"tasks" :
[
{
"downloadingProgress" : 100,
"endIngestion" : "2018-05-15T12:46:45Z",
"errorMessage" : null,
"ingestionJobKey" : 842,
"ingestionType" : "Add-Content",
"label" : "My Title of the video_2 content",
"mediaItemKey" : 4,
"physicalPathKey" : null,
"startIngestion" : "2018-05-15T12:46:42Z",
"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