Create Media Factory

You can use the REST API to create Media Factories programatically.

Request

POST https://www.cameratag.com/api/v15/apps/[YOUR_APP_UUID]/media_factories.json

Parameters

Below is a list of parameters that this endpoint accepts.

Parameter Accepted Values Description Required
api_key a valid user api_key All App endpoints require authentcation Required
name A string with no spaces or special characters The name of your application Required
type VideoFactory, AudioFactory, ImageFactory, CaptionFactory, AnimatedGifFactory, FilmstripFactory, WaveformFactory, NegativeWaveformFactory, OriginalFactory, The type of media factory you would like to create. Required
width a positive integer the width in pixels of the generated output
height a positive integer the height in pixels of the generated output
extension mp4, vp8, jpg, gif, png, mp3 the extension (and implicitly the codec) of the file to be generated
length a positive integer the max length (in seconds) for the generated output. This will crop incoming media
length a positive integer the max length (in seconds) for the generated output. This will crop incoming media
fg_color a hex value color the foreground color for WaveformFactories
language en-US, en-GB, es-ES, fr-FR, ja-JP, pt-BR, zh-CN, ar-SA, de-DE, it-IT, ru-RU For CaptionFactories, the language to use for captioning
overlays_attributes[0][url] A valid URL for a png or jpg image This image will be overlayed on your generated output
overlays_attributes[0][width] A positive integer The desired width of the overlay on your generated file
overlays_attributes[0][height] A positive integer The desired height of the overlay on your generated file
overlays_attributes[0][left] A positive or negative integer The position of your overlay (in pixels) from the left side of the frame in your generated file. Negative numbers will be interpreted from the right of the frame.
overlays_attributes[0][top] A positive or negative integer The position of your overlay (in pixels) from the top side of the frame in your generated file. Negative numbers will be interpreted from the bottom of the frame.

Example Response

{
  "id": 8,
  "type": "VideoFactory",
  "camera_id": "63f9c870-72c4-0130-04c5-123139045d73",
  "name": "720p",
  "width": 1280,
  "height": 720,
  "extension": "mp4",
  "length": "",
  "bitrate": null,
  "source": "camera",
  "is_system": null,
  "fg_color": null,
  "language": null
}