Skip to content

COMMAND.4 Push Binary upload

Giuliano Catrambone edited this page May 8, 2018 · 2 revisions

Overview

This API is used to upload the Binary into the MMS.

URI

/catramms/v1/binary/:ingestionJobKey

Method

POST

URL Params

Required

  • ingestionJobKey=[number] this field has to be the IngestionJobKey returned in the previous step. This field is important because it will be the key used by MMS to associate the binary to the previous ingested metadata example: ingestionJobKey=12

Optional

None

Payload Data

Source binary (i.e. binary file)

Success Response

Code

201 Created

Content

{ "contentLength": 6596335616, "writtenBytes": 6596335616, "elapsedUploadInSeconds": 25 }

Error Response

See Common Error Responses

Sample Call

Assuming:

  • UserKey: 5
  • APIKey: SU1.8ZO1O2zVeBMNv9lzZ0whABXSAdjWrR~rpcnI5eaHNO2gysrNdAv8BNoWZB1eLP
  • IngestionJobKey: 16

Single request:

curl -v -X POST -u 5:SU1.8ZO1O2zVeBMNv9lzZ0whABXSAdjWrR~rpcnI5eaHNO2gysrNdAv8BNoWZB1eLP -T score.mpg http://mms-binary.catrasoft.cloud/catramms/v1/binary/16

Multiple chunks:

In this scenario the media binary file is split in several chunks and the single chunks, one by one, are sent. It is already implemented the ingestionThroughChunks.sh script taking care of all the steps to do. In alternative, here follows all the steps to be done.

Let's assume the size of score.mpg is 209246 and we want to split it with chucks of 100000, the commands to run will be:

dd status=none if=score.mpg bs=1024 iflag=skip_bytes,count_bytes skip=0 count=100000 | curl -s -o /dev/null -w "%{response_code}" -X POST -H "Content-Range: bytes 0-99999/209246" -u 5:SU1.8ZO1O2zVeBMNv9lzZ0whABXSAdjWrR~rpcnI5eaHNO2gysrNdAv8BNoWZB1eLP --data-binary @- "http://mms-binary.catrasoft.cloud/catramms/v1/binary/16"

dd status=none if=score.mpg bs=1024 iflag=skip_bytes,count_bytes skip=100000 count=100000 | curl -s -o /dev/null -w "%{response_code}" -X POST -H "Content-Range: bytes 100000-199999/209246" -u 5:SU1.8ZO1O2zVeBMNv9lzZ0whABXSAdjWrR~rpcnI5eaHNO2gysrNdAv8BNoWZB1eLP --data-binary @- "http://mms-binary.catrasoft.cloud/catramms/v1/binary/16"

dd status=none if=score.mpg bs=1024 iflag=skip_bytes,count_bytes skip=200000 count=9246 | curl -s -o /dev/null -w "%{response_code}" -X POST -H "Content-Range: bytes 200000-209245/209246" -u 5:SU1.8ZO1O2zVeBMNv9lzZ0whABXSAdjWrR~rpcnI5eaHNO2gysrNdAv8BNoWZB1eLP --data-binary @- "http://mms-binary.catrasoft.cloud/catramms/v1/binary/16"

Remark:

  • In case the Content-Range start is 0, the system reset the binary if it exists and considers the chunk as the first chunk of the content
  • In case the Content-Range end + 1 is equal to the Content-Range Size, the system considers the chunk as the last chunk of the content and proceeds to ingest the content
  1. Home

    Tutorial
    1. User registration
    2. Add content - Pull
    3. Add content, on success send an email
    4. Two Tasks (Add content) to be executed in parallel
    5. Add a set of video encoding profiles
    6. Add two contents, send an email, concat, cut and encode
    7. Add a single image profile (Logo)
    8. Add a video, an image, encode the image, overlay the encoded image on the video
  2. REST API version 1 (latest)

    Registration
    1. User registration
    2. Login
    3. Create Workspace
    4. Share Workspace
    5. Update Workspace
    6. Update User
    Workflow Ingestion
    1. Workflow
    2. Status/metadata of an ingestion
    3. Group Of Tasks
    Workflow As Library
    1. Workflow as Library
    2. Create-Update a Workflow as Library
    3. Delete a Workflow as Library
    4. Use of a Workflow as Library
    Add-Remove Content
    1. Add a new Content
      1. Pull
      2. Push
    2. Remove a Content
    3. Information about the contents saved into MMS
    4. Retention of a Content
    Delivery
    1. Download HTTP of a Content
    2. FTP of a Content
    3. Local copy of a Content
    4. Live Proxy
    5. VOD Proxy
    6. Countdown
    7. Check Streaming
    Social Network Delivery
    1. POST a Content on Facebook
    2. POST a Content on YouTube
    3. YouTube Live Broadcast
    4. Facebook Live Broadcast
    Encoding (video-audio-image)
    1. Add encoding profiles
    2. Remove encoding profiles
    3. Encode
    4. Information about the encoding profiles saved into MMS
    5. Predefined MMS Encoding Profiles
    Media activities
    1. Concatenate videos having same codecs
    2. Cut
    3. Video speed
    4. Extract tracks
    5. Add silent audio
    Overlay
    1. Overlay an Image on a Video
    2. Overlay a Text on a Video
    3. Picture In Picture
    4. Intro Outro Overlay
    5. Live Grid
    Frame Processing
    1. Frame of a video
    2. Periodical Frames of a video
    3. I-Frames of a video
    4. Motion JPEG video generated by Periodical Frames of a video
    5. Motion JPEG video generated by I-Frames of a video
    6. Slideshow video by images
    Recorder
    1. Live Recorder
    2. Live Cut
    Communication
    1. HTTP Callback
    2. Notification through email
    Utilities
    1. Change File Format
    2. Media Cross Reference
    Computer Vision
    1. Face Recognition
    2. Face Identification
    Configuration
    1. YouTube
    2. Facebook
    3. Live URL
    4. FTP
    5. E-Mail
Clone this wiki locally