You can also view
You are viewing documentation for version 10. This version is antiquated!
The current version is version 11

Advanced App Configuration

Beyond the three required settings for a App there are several optional advanced settings

Editing Your App

Processing Settings
Crop Video Length
Normalize Volume
Deblock Video
Autolevel Video
Watermark URL
Watermark X & Y Position
Watermark Height & Witdh
Watermark Opacity

Security Settings
Authorized Hosts
Publish Signature
Playback Signature

Notification Settings
Email Notification
Server Callback

Output Settings
S3 Bucket
FTP Server
YouTube

Editing App

You can edit an existing App by clicking on the settings link on the top left of your App's page on CameraTag.com.

Authorized Host

you may optionally provide one or more authorized hosts (domains) for your application. If you add an authorized host your App will only work with a camera embeded on that host or a subdomain of that host.

Every authorized host has an implicit wildcard before it (*.) so by adding mysite.com as an authorized host you would be authorizing *.mysite.com. This would allow video from a camera on mysite.com or subdomain.mysite.com.

The more specific you are with your authorized host the more restrictive. For example if you added subdmain.mysite.com as your authorized host the App would only accept videos embeded on subdmain.mysite.com (not mysite.com or somethingelse.mysite.com).

Publish Signature

When turned on only <camera> tags that contain valid data-signature and data-signature-expiration attributes will be allowed to publish videos to the server. The data-signature-expiration is a time (expressed in linux epoch format). The signatue is the HMAC-SHA1 hash of the data-signature-expiration with your API key. For example here is how you would generate the signature and signature expiration in Ruby:
expiration = (Time.now + 30.minutes).to_i
api_key = 'YOUR_API_KEY'
signature = OpenSSL::HMAC.hexdigest('sha1', api_key, expiration.to_s)
You would then use the culculated values in your <cmera> like so:
<camera id='[CAMERA_ID]' data-app-id='YOUR_APP_UUID' data-signature='CALCULATED_SIGNATURE' data-signature-expiration='EXPIRATION_IN_EPOCH_FORMAT'></camera>
This feature is only compatible with version 3 and higher of the JS Client. Ealier versions will always yield a signature error

Playback Signature

When turned on only <video> tags that contain valid data-signature and data-signature-expiration attributes will be allowed to play videos to the server. The data-signature-expiration is a time (expressed in linux epoch format). The signatue is the HMAC-SHA1 hash of the data-signature-expiration with your API key. For example here is how you would generate the signature and signature expiration in Ruby:
expiration = (Time.now + 30.minutes).to_i
api_key = 'YOUR_API_KEY'
signature = OpenSSL::HMAC.hexdigest('sha1', api_key, expiration.to_s)
You would then use the culculated values in your <video> like so:
<video id='[CAMERA_ID]' data-uuid='YOUR_VIDEO_UUID' data-signature='CALCULATED_SIGNATURE' data-signature-expiration='EXPIRATION_IN_EPOCH_FORMAT'></camera>
This feature is only compatible with version 6 and higher of the JS Client. Ealier versions will always yield a signature error

Crop Video Length

This parameter determines the maximum length of videos in the App. Uploded videos longer than the maximum length will be truncated to conform. Leave this value empty to have no limit on video length.

Normalize Volume

This feature will automatically adjust the volume of your video up or down to achieve a "normal" volume. This can help with videos that are very loud or too quiet.

Deblock Video

Turn this feature will put all video in this App through a deblock filter. This can help reduce the "blocking" artifacts that come from video compression

Autolevel Video

Turn this feature will will attempt to optimize the brightness and color levels of your video. It can help to compensate for videos created in poor lighting confditions.

Watermark URL

This is the URL of an image to be applied as a watermark (overlay) to your video. This should be a jpg, gif or png. Transparance is allowed. The watermark will be sized and positioned according to the attributes below.

Watermark X & Y

These fields define the position of the watermark over the video. Positive values are measures from the top (y) and left (x) of the video. Negative values are measured from the bottom (y) and right (x) of the video.

Watermark Height & Width

These fields determine thw height and width of the watermark. Cameratag will automaticall scale the image defined by "watermark url" to match the dimesnions you specify here.

Watermark Opacity

This is a number between 0 and 1 that deines how transparant the watermark will appear over teh video. 0 is completely transparent (invisible) and 1 is totally opaque.

Email Notifications

Add an email address to this box to be notified whenever a user publishes a video using this camera. (you can send to multiple adresses by seprating them with a semicolon)

Server Callback

After a recording has been published it can take several seconds for your videos and thumbnails to be available. If you try to access the video or thumbnail URLs before they are finshed processing you will be served a placeholder image and/or thumbnail instead. If you need to be notified as to when axactly a video has finished processing you can use your CameraTag's server callback feature (found on your CameraTag's setup tab). As processing completes we will POST to a specified URL on your server with a JSON representation of your recording. Below is an example of a JSON representation of a recording that will be POSTed to your server:
{
  "uuid": "v-1237c41f-9038-44b7-b4cc-8cb1f13f6f76",
  "preview_thumbnail_url": "https://www.cameratag.com/assets/v-1237c41f-9038-44b7-b4cc-8cb1f13f6f76/720p_thumb.jpg",
  "preview_full_thumbnail_url": "https://www.cameratag.com/assets/v-1237c41f-9038-44b7-b4cc-8cb1f13f6f76/720p_thumb.jpg",
  "preview_mp4_url": "https://www.cameratag.com/assets/v-1237c41f-9038-44b7-b4cc-8cb1f13f6f76/720p_mp4.mp4",
  "preview_webm_url": "https://cameratag.com/videos/v-eed31052-1072-4457-bb62-aa49687e2be9/720p/mp4.mp4",
  "state": "processed",
  "name": "Bug Buck Bunny",
  "description": "A demo video",
  "type": "Video",
  "ad_server_type": null,
  "ad_server_url": null,
  "captions": [

  ],
  "app_uuid": "bd67aac0-7869-0130-7e72-22000aaa02b5",
  "camera_uuid": "bd67aac0-7869-0130-7e72-22000aaa02b5",
  "formats": [
    {
      "name": "720p",
      "width": 1280,
      "height": 720,
      "video_url": "https://www.cameratag.com/assets/v-1237c41f-9038-44b7-b4cc-8cb1f13f6f76/720p_mp4.mp4",
      "flv_url": null,
      "flv_stream": null,
      "mp4_url": "https://www.cameratag.com/assets/v-1237c41f-9038-44b7-b4cc-8cb1f13f6f76/720p_mp4.mp4",
      "mp4_stream": "rtmp://sa0xpxq1vz1ri.cloudfront.net/cfx/st&mp4:bd67aac0-7869-0130-7e72-22000aaa02b5/v-1237c41f-9038-44b7-b4cc-8cb1f13f6f76_720p_mp4.mp4?Expires=1507695167&Signature=g9xgwgroIGwOQtZBri1DV6HEIplDDs--dWf6XKvd-Z0KXYZRU~2TdY9yr9450x6ACxpP3KGJIaWWOxhiWLaPkvEhHhQmKmAPWJLxVXyUl4V~ZOh~pon1bJr0Vlv-GMyVzPlnfzsyUYmqoMCBuyWDj~70Q2enDfWs5XWMOOkkjjvRLjKhnqD4CNBuHE-v-3mx7~ke6pO3v3lVZ8RTJrmnZUmqtQXPMVNNRoTIiq1s93z6nDo4J0OyvaAq6BR87ShoKuZi99GoXnYLk3tKSfmKXHcaZUXwSbwg3Vbr-~cv0vUybpsiZs4rXFUxFWS7MNlP32H~qJfUV0lmno7pqJfPKA__&Key-Pair-Id=APKAIYEVFIMHKY7YWGKA",
      "webm_url": null,
      "webm_stream": null,
      "thumbnail_url": "https://www.cameratag.com/assets/v-1237c41f-9038-44b7-b4cc-8cb1f13f6f76/720p_thumb.jpg",
      "small_thumbnail_url": "https://www.cameratag.com/assets/v-1237c41f-9038-44b7-b4cc-8cb1f13f6f76/720p_thumb.jpg",
      "state": "COMPLETED",
      "completed_at": null,
      "length": 32
    }
  ]
}
Please note that the JSON repsonse is passed in the body of the POST and not as form parameters. Here is an example of how you would parse the response in ruby:
data = JSON.parse(request.raw_post)
video_uuid = data["uuid"]

S3 Bucket Name

The hosting of your recorded videos and thumbnails is part of your CameraTag plan. Sometimes, however, it's desirable to have the assets saved to your own servers as well. To accomplish this- enter the name of your Amazon S3 bucket in this field and we will save copies of all assets to your bucket as well.

PLEASE NOTE: In order for this to work you must give CameraTag write access to bucket by setting a bucket policy like the one below.

{
  "Version": "2008-10-17",
  "Id": "CameraTagBucketPolicy",
  "Statement": [
    {
      "Sid": "Stmt1295042087538",
      "Effect": "Allow",
      "Principal": {
        "AWS": "arn:aws:iam::625596148923:root"
      },
      "Action": [
        "s3:GetObjectAcl",
        "s3:GetObject",
        "s3:PutObjectAcl",
        "s3:PutObject",
        "s3:ListMultipartUploadParts"
      ],
      "Resource": "arn:aws:s3:::MY-BUCKET/*"
    },
    {
      "Sid": "Stmt1295042087538",
      "Effect": "Allow",
      "Principal": {
        "AWS": "arn:aws:iam::625596148923:root"
      },
      "Action": [
        "s3:ListBucketMultipartUploads",
        "s3:GetBucketLocation"
      ],
      "Resource": "arn:aws:s3:::MY-BUCKET"
    }
  ]
}

FTP Server

CameraTag can automatically upload published assets to your FTP server. Simple provide us with the details we'll need to connect to your server and as soon as the assets are ready we'll copy them over to your box:
  • Protocol: (SFTP ot FTP)
  • Server: The host name (without protocol) of your ftp server (e.g. storage.myserver.com)
  • Directory: The subdirecory in which you would like files copied (user root by default)
  • Username: Username with write access to your server
  • Password: Password for the above username

YouTube

CameraTag can automatically copy published assets to your YouTube channel. Simply auhorize us to add videos to your account- you will be automatically redirected to YouTube when turning this feature on.