List all the Presets

GET /presets/

Authorization Header (optional)

  • Bearer token: OAuth 2.0 API access token. If token is provided, will return system as well as custom presets.

Parameters

  • start: offset for paging (optional)
  • limit: number of profile items per page (optional)
  • sort: The key by which to sort the result, e.g. "sort=created_at" to sort by creation date.
  • direction: Sort records in ascending ("1") or descending ("-1") order. Default value: "1".
  • format: json or xml. This will override the Request Accept header.
  • human: true or false. If true, the returned response will be in a structured, more human-readable form. Useful when calling the API through curl or from a browser.
  • type: "system" or "custom". Show only presets matching the desired type.
  • show_null: true or false. If set to "true", the response will contain also keys that are not set to a value.
  • expand_all: true or false. Recursively look up referenced objects (here: codec id) and embed the respective json as a nested object directly into the response.

Response

Besides the array of Presets, the resource will also return a total number of available Presets (only if start/limit are set). This can be used on the UI-side to determine how many pages there are and prepare pagination accordingly.

  • presets: array of Preset items 
  • total: number of total Preset items (optional, see above)
  • start: offset for paging
  • limit: number of preset items per page

Example:

GET /presets/
curl -H "Authorization: Bearer um9VmyJKTPGFqpkL_THjGE5rkXqfURDYqQ8MTBVidG3PtwkfABIdx6s_z9WlFl4_j" "https://api.xvid.com/v1/presets/?human=true&show_null=true&limit=2&start=2"
{
  "presets": [
    {
      "name": "FLV-FLV-H264-AAC",
      "description": "Flash Video (H.264 Baseline/AAC LC) for Flash Player SD",
      "target_format": {
        "extension": "flv",
        "container": "flv",
        "vcodec": {
          "codec": {
            "id": "525ce63284aed52635e85d05",
            "href": "https://api.xvid.com/v1/codecs/525ce63284aed52635e85d05"
          },
          "profile": "Baseline",
          "passes": 1,
          "caps": {
            "interlaced": false,
            "max_key_distance": 8,
            "max_width": 720,
            "max_height": 576,
            "max_framerate": 30,
            "max_bitrate": 4000,
            "max_ref_frames": 3,
            "max_buffersize": 384
          }
        },
        "acodec": {
          "codec": {
            "id": "525ce63284aed52635e85d06",
            "href": "https://api.xvid.com/v1/codecs/525ce63284aed52635e85d06"
          },
          "profile": "LC",
          "passes": 1,
          "caps": {
            "max_bitdepth": 16,
            "max_channels": 2,
            "max_samplingrate": 48000,
            "max_bitrate": 256
          }
        }
      },
      "settings": {
        "subtitle_policy": "ignore",
        "max_segment_size": null,
        "playlist_format": null,
        "video": {
          "deinterlace": "auto",
          "crop": "off",
          "resize_policy": "keep",
          "padding_policy": "no_pad",
          "aspect_ratio_policy": "keep"
        },
        "audio": {
          "resample_policy": "shrink_to_fit"
        },
        "thumbnails": [
          {
            "name": "thumbnails_small",
            "format": "jpg",
            "interval_or_count": "12",
            "max_width": 128,
            "max_height": 128,
            "resize_policy": "keep",
            "padding_policy": "no_pad"
          },
          {
            "name": "thumbnails_big",
            "format": "jpg",
            "interval_or_count": "20s",
            "max_width": 720,
            "max_height": 576,
            "resize_policy": "keep",
            "padding_policy": "no_pad"
          }
        ]
      },
      "logos": [],
      "type": "system",
      "version": 1,
      "user": {
        "id": null
      },
      "created_at": 1362119988773,
      "updated_at": 1362119988773,
      "id": "5260e39d84aea12008b69bc2",
      "href": "https://api.xvid.com/v1/presets/5260e39d84aea12008b69bc2"
    },
    {
      "name": "M4V-QT-H264-AAC",
      "description": "Apple Quicktime (H.264 Baseline/AAC LC) for Mac/iPad/iPhone",
      "target_format": {
        "extension": "m4v",
        "container": "m4v",
        "vcodec": {
          "codec": {
            "id": "525ce63284aed52635e85d05",
            "href": "https://api.xvid.com/v1/codecs/525ce63284aed52635e85d05"
          },
          "profile": "Main",
          "passes": 1,
          "caps": {
            "interlaced": false,
            "max_key_distance": 8,
            "max_width": 720,
            "max_height": 576,
            "max_framerate": 30,
            "max_bitrate": 8000,
            "max_ref_frames": 5,
            "max_buffersize": 2048
          }
        },
        "acodec": {
          "codec": {
            "id": "525ce63284aed52635e85d06",
            "href": "https://api.xvid.com/v1/codecs/525ce63284aed52635e85d06"
          },
          "profile": "LC",
          "passes": 1,
          "caps": {
            "max_bitdepth": 16,
            "max_channels": 2,
            "max_samplingrate": 44100,
            "max_bitrate": 160
          }
        }
      },
      "settings": {
        "subtitle_policy": "ignore",
        "max_segment_size": null,
        "playlist_format": null,
        "video": {
          "deinterlace": "auto",
          "crop": "off",
          "resize_policy": "keep",
          "padding_policy": "no_pad",
          "aspect_ratio_policy": "keep"
        },
        "audio": {
          "resample_policy": "shrink_to_fit"
        },
        "thumbnails": [
          {
            "name": "thumbnails_small",
            "format": "jpg",
            "interval_or_count": "12",
            "max_width": 128,
            "max_height": 128,
            "resize_policy": "keep",
            "padding_policy": "no_pad"
          },
          {
            "name": "thumbnails_big",
            "format": "jpg",
            "interval_or_count": "20s",
            "max_width": 720,
            "max_height": 576,
            "resize_policy": "keep",
            "padding_policy": "no_pad"
          }
        ]
      },
      "logos": [],
      "type": "system",
      "version": 1,
      "user": {
        "id": null
      },
      "created_at": 1362119988773,
      "updated_at": 1362119988773,
      "id": "5260e3e784aea12008b69bc3",
      "href": "https://api.xvid.com/v1/presets/5260e3e784aea12008b69bc3"
    }
  ],
  "total": 12,
  "start": 2,
  "limit": 2,
  "first": {
    "href": "https://api.xvid.com/v1/presets/?start=0&limit=2&human=true&show_null=true"
  },
  "last": {
    "href": "https://api.xvid.com/v1/presets/?start=10&limit=2&human=true&show_null=true"
  },
  "next": {
    "href": "https://api.xvid.com/v1/presets/?start=4&limit=2&human=true&show_null=true"
  },
  "prev": {
    "href": "https://api.xvid.com/v1/presets/?start=0&limit=2&human=true&show_null=true"
  }
}



  • No labels