Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

StepAPI CallDescription
Video Upload

/cv_backend/api/video_upload (POST)

Form Param

Param value

file

Video file
Upload a video that you wish to embed the brand art. Use the id that is returned on the JSON to the subsequent calls.
Check if video upload is done/cv_backend/api/video_upload/{id} (GET)Check wether the current video has been processed or not.
See List of Scenes

/cv_backend/api/video_upload/{id}/video

(GET)

Once the video is processed, check the scenes that our algorithm detected and that are fit for hosting brand art.
See List of Surfaces

/cv_backend/api/video_upload/{id}/video/scene/{sceneId} (GET)

Once a scene is selected, check the surfaces detected inside that scene
Bind an logo media file to a given scene

/cv_backend/api/video_upload/{videoUploadId}/video/scene/{sceneId}/logo (POST)

Form Param

Param value

art

Media file to be embedded
Binds a media file to a given scene for generating the final video
Generate the final video for a surface using the media file from the previous call

/cv_backend/api/video_upload/{videoUploadId}/video/custom (POST)

A JSON with the information about the placement, such as the example below, must be in the request body:

Code Block
{"surfaceList":[{"sceneId":4655,"surface":{
"id":36380,"x":297.2903225806451,
"y":720.6883365200764,"w":844.3870967741935,"h":342.791586998088,
"p1":null,"p2":null,"p3":null,"p4":null,"area":52731},
"warp":false,"noShadow":false,"noBlend":false,
"facebookSafe":false}]}
Generate the final video using the coordinates passed on the JSON and the media file from the previous request.
Check if logo embedding is done + get final url/cv_backend/api/video_upload/{id}  (GET)Check wether the logo embedding is done and, if it is completed, get the final video url from the VideoUpload entity.

4-

...

Overlay insertion

This user flow allows for a media file (image, gif or video) to be inserted inside a coordinate of the video as a watermark/bugoverlay.

API CALLS

StepAPI CallDescription
Video Upload

/cv_backend/api/video_upload (POST)

Form Param

Param value

file

Video file
Upload a video that you wish to embed the brand art. Use the id that is returned on the JSON to the subsequent calls.
Check if video upload is done/cv_backend/api/video_upload/{id} (GET)Check wether the current video has been processed or not.
Upload media asset to library

/cv_backend/api/logos (POST)

Form Param

Param value

art

Media file to be uploaded

Meta-data about the media asset library, including id of the logos to be used in subsequent requests. The most recent uploaded logo will be the first in list:

Code Block
{"error":null,"responseBody":[
{"id":484,"name":"klondike-logo.jpg","dateUploaded":1493647892185,"path":"http://s3.amazonaws.com/brohan/brunno/logos/stream2file1618265434626480490.jpg","thumbnailPath":"http://s3.amazonaws.com/brohan/brunno/logos/stream2file1618265434626480490.jpg"},{"id":382,"name":"stream2file742288568307428357.jpg","dateUploaded":1493126412830,"path":"http://s3.amazonaws.com/brohan/brunno/logos/stream2file7533403717266488896.jpg","thumbnailPath":"http://s3.amazonaws.com/brohan/brunno/logos/stream2file7533403717266488896.jpg"},{"id":377,"name":"giphy (71).gif","dateUploaded":1493052883389,"path":"http://s3.amazonaws.com/brohan/brunno/logos/stream2file8267622065328543321.gif","thumbnailPath":"http://s3.amazonaws.com/brohan/brunno/logos/stream2file8267622065328543321.gif"},{"id":256,"name":"uru.gif","dateUploaded":1489866443690,"path":"http://s3.amazonaws.com/brohan/brunno/logos/stream2file3007761349944365373.gif","thumbnailPath":"http://s3.amazonaws.com/brohan/brunno/logos/stream2file3007761349944365373.gif"},{"id":226,"name":"header-logo.png","dateUploaded":1488817602468,"path":"http://s3.amazonaws.com/brohan/brunno/logos/stream2file513496362857469646.png","thumbnailPath":"http://s3.amazonaws.com/brohan/brunno/logos/stream2file513496362857469646.png"},{"id":190,"name":"stream2file110216808001379524 (1).gif","dateUploaded":1487258877433,"path":"http://s3.amazonaws.com/brohan/brunno/logos/stream2file627527955211273161.gif","thumbnailPath":"http://s3.amazonaws.com/brohan/brunno/logos/stream2file627527955211273161.gif"},{"id":189,"name":"stream2file8123197123116094246.gif","dateUploaded":1487258631180,"path":"http://s3.amazonaws.com/brohan/brunno/logos/stream2file5137169752946663846.gif","thumbnailPath":"http://s3.amazonaws.com/brohan/brunno/logos/stream2file5137169752946663846.gif"},{"id":135,"name":"FriskiesNoPurina.png","dateUploaded":1487121163125,"path":"http://s3.amazonaws.com/brohan/brunno/logos/stream2file7018111325862312684.png","thumbnailPath":"http://s3.amazonaws.com/brohan/brunno/logos/stream2file7018111325862312684.png"},{"id":71,"name":"hp_3d.jpg","dateUploaded":1485304350438,"path":"http://s3.amazonaws.com/brohan/brunno/logos/stream2file6754910152804610695.jpg","thumbnailPath":null},{"id":10,"name":"kellogs.jpg","dateUploaded":1479314926862,"path":"http://s3.amazonaws.com/brohan/brunno/logos/stream2file3985102769436302708.jpg","thumbnailPath":null}
]}
Generate the watermark request.

/cv_backend/api/video_upload/{videoUploadId}/video/finalize/watermark (POST)

A JSON with the information about the placement, such as the example below, must be in the request body:

Code Block
{"filterType":"WATERMARK",
"initTimeLogo":0, //time in seconds
"endTimeLogo":9600, //time in seconds
"sceneId":24944, //id of the first scene
"x":0, //x starting at left side
"y":0, // y starting at upper side
"w":600,
"h":600,
"logoId":484 // id of the logo
}
Generate the final video using the coordinates passed on the JSON and the media file from the previous request.
Check if logo embedding is done + get final url/cv_backend/api/video_upload/{id}  (GET)Check wether the logo embedding is done and, if it is completed, get the final video url from the VideoUpload entity.

...

This user flow allows for the creation of constraints inside the current account regarding the type of media files that can be uploaded to that particular account/

 

API CALLS

StepAPI CallDescription
Rule Creation

/cv_backend/rules/add

(POST)

A JSON with the serialized rule, like the example below:

Code Block
{"ruleJson":
 "{\r\n\t\"minimumLength\" : 10, 
\r\n\t\"maximumLength\" : 30,
\r\n\t\"aspectRatio\": 1,
\r\n\t\"minimumHeight\": 200,
\r\n\t\"minimumWidth\": 200\r\n\r\n}", "ruleClass":"UploadFormatRule", "ruleTime":"ON_ANALYSIS"}

 

 

Creates an upload rule that will block upload of content not meeting those specifications. Returns the id of the created rule
Rule deletion/cv_backend/rules/delete/{id}
(DELETE)
Delete a given upload rule.

Other flows and functionalities

...