Appearance
GET /presets/[ID]
Description
Get information about presets. Supports fetching all presets or a specific preset by ID.
Authentication
- Required: Optional (access to
custompresets requires valid token) - Method: Bearer token
Request Headers
- Authorization:
Bearer [AUTH_TOKEN] - Accept:
application/json(for JSON responses)application/xml(for XML responses)
Query Parameters
Common Parameters (for both GET /presets/ and GET /presets/ID)
- format:
string(Optional)
Values:json,xml
Overrides theAcceptheader if provided. - human:
boolean(Optional)
Values:true,false
Causes the response to be in a structured, more human-readable form. - show_null:
boolean(Optional)
Values:true,false
If set to "true", the response will contain keys that are not set to a value. - expand_all:
boolean(Optional)
Values:true,false
Recursively look up referenced objects and embed the respective JSON as nested objects directly into the response. - expand:
string(Optional)
Comma separated referenced objects (e.g.codec,user). Looks up objects referenced by ids and embed the respective JSON as nested objects directly into the response.
Parameters for Fetching Multiple Presets (GET /presets/)
- start:
int(Optional)
Offset for paging. Default value:0. - limit:
int(Optional)
Number of preset items per page. Default value:1000(max:5000). - sort:
string(Optional)
Values: Any valid key name
Sorts the output along the given key name. For example, usecreated_atto sort the results by the creation date. - direction:
string(Optional)
Sort records in ascending ("1") or descending ("-1") order. Default value: "1". - type:
string(Optional)
Values:system,custom
Show only presets matching the desired type. When not authenticated, onlysystempresets are listed.
Example Request for Listing Multiple Presets
bash
curl -H "Authorization: Bearer AUTH_TOKEN" "https://api.xvid.com/v1/presets/?start=0&limit=2&show_null=true&human=true&type=system&sort=created_at"Example Response for Listing Multiple Presets
Success (200 OK)
json
{
"presets": [
{
"name": "Google WebM (.WebM)",
"description": "WebM (VP8/Vorbis) for HTML5/Web",
"user_data": "demo",
"target_format": {
"extension": "webm",
"container": "webm",
"vcodec": {
"codec": {
"id": "525ce63284aed52635e85d08",
"href": "https://api.xvid.com/v1/codecs/525ce63284aed52635e85d08"
},
"profile": "Default",
"passes": 1,
"caps": {
"interlaced": false,
"max_key_distance": 8,
"max_width": 1920,
"max_height": 1080,
"max_framerate": 60,
"max_bitrate": 40000,
"max_buffersize": 256
}
},
"acodec": {
"codec": {
"id": "525ce63284aed52635e85d09",
"href": "https://api.xvid.com/v1/codecs/525ce63284aed52635e85d09"
},
"profile": "0",
"passes": 1,
"caps": {
"max_bitdepth": 24,
"max_channels": 2,
"max_samplingrate": 96000,
"max_bitrate": 256
}
}
},
"settings": {
"logos": null,
"subtitle_policy": "ignore",
"max_segment_size": null,
"playlist_format": null,
"video": {
"quality_level": "85%",
"deinterlace": "auto",
"crop": "off",
"resize_policy": "keep",
"padding_policy": "no_pad",
"aspect_ratio_policy": "keep"
},
"audio": {
"quality_level": "85%",
"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"
}
]
},
"version": 1,
"type": "system",
"created_at": 1362119988773,
"updated_at": 1362119988773,
"id": "52a6bedea2ca79055aaa7881",
"href": "https://api.xvid.com/v1/presets/52a6bedea2ca79055aaa7881"
},
{
"name": "Adobe Flash (.FLV)",
"description": "Flash Video SD (H.264 Baseline/AAC LC) for Flash Player",
"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": 60,
"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": {
"logos": null,
"subtitle_policy": "ignore",
"max_segment_size": null,
"playlist_format": null,
"video": {
"quality_level": "85%",
"deinterlace": "auto",
"crop": "off",
"resize_policy": "keep",
"padding_policy": "no_pad",
"aspect_ratio_policy": "keep"
},
"audio": {
"quality_level": "85%",
"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"
}
]
},
"version": 1,
"type": "system",
"created_at": 1362119988773,
"updated_at": 1362119988773,
"id": "5260e39d84aea12008b69bc2",
"href": "https://api.xvid.com/v1/presets/5260e39d84aea12008b69bc2"
}
],
"total": 7,
"start": 2,
"limit": 2,
"first": {
"href": "https://api.xvid.com/v1/presets/?start=0&limit=2&show_null=true&human=true&type=system&sort=created_at"
},
"last": {
"href": "https://api.xvid.com/v1/presets/?start=6&limit=2&show_null=true&human=true&type=system&sort=created_at"
},
"next": {
"href": "https://api.xvid.com/v1/presets/?start=4&limit=2&show_null=true&human=true&type=system&sort=created_at"
},
"prev": {
"href": "https://api.xvid.com/v1/presets/?start=0&limit=2&show_null=true&human=true&type=system&sort=created_at"
}
}Example Request for Fetching a Specific Preset
bash
curl -H "Authorization: Bearer AUTH_TOKEN" "https://api.xvid.com/v1/presets/52a6bbdfa2ca79055aaa787f?human=true&show_null=true&expand=codec"Example Response for Fetching a Specific Preset
Success (200 OK)
json
{
"preset": {
"name": "H.264 Baseline (.MP4)",
"description": "MP4 (H.264 Baseline/AAC LC) for HTML5/Web",
"target_format": {
"extension": "mp4",
"container": "mp4",
"vcodec": {
"codec": {
"id": "525ce63284aed52635e85d05",
"name": "H.264",
"description": "H.264 Encoder",
"type": "video",
"created_at": 1362119988773,
"updated_at": 1362119988773,
"passes": [
1,
1
],
"autograph": [
true,
false
],
"profiles": [
{
"name": "Baseline",
"containers": [
"flv",
"mp4",
"mkv",
"mov",
"m4v"
],
"capabilities": {
"interlaced": [
false
],
"max_key_distance": [
1,
30
],
"max_width": [
64,
4096
],
"max_height": [
64,
3072
],
"max_framerate": [
5,
7.5,
10,
15,
23.976,
24,
25,
29.97,
30,
48,
50,
59.94,
60
],
"max_bitrate": [
64,
240000
],
"max_buffersize": [
22,
30000
],
"max_ref_frames": [
1,
5
]
}
},
{
"name": "Main",
"containers": [
"mp4",
"mkv",
"mov",
"m4v"
],
"capabilities": {
"interlaced": [
true,
false
],
"max_key_distance": [
1,
30
],
"max_width": [
64,
4096
],
"max_height": [
64,
3072
],
"max_framerate": [
5,
7.5,
10,
15,
23.976,
24,
25,
29.97,
30,
48,
50,
59.94,
60
],
"max_bitrate": [
64,
240000
],
"max_buffersize": [
22,
30000
],
"max_ref_frames": [
1,
5
]
}
},
{
"name": "High",
"containers": [
"mp4",
"mkv",
"m4v",
"mov"
],
"capabilities": {
"interlaced": [
true,
false
],
"max_key_distance": [
1,
30
],
"max_width": [
64,
4096
],
"max_height": [
64,
3072
],
"max_framerate": [
5,
7.5,
10,
15,
23.976,
24,
25,
29.97,
30,
48,
50,
59.94,
60
],
"max_bitrate": [
64,
300000
],
"max_buffersize": [
27,
37500
],
"max_ref_frames": [
1,
4
]
}
}
],
"version": 1,
"href": "https://api.xvid.com/v1/codecs/525ce63284aed52635e85d05"
},
"profile": "Baseline",
"passes": 1,
"caps": {
"interlaced": false,
"max_key_distance": 8,
"max_width": 1920,
"max_height": 1080,
"max_framerate": 60,
"max_bitrate": 20000,
"max_ref_frames": 5,
"max_buffersize": 3125
}
},
"acodec": {
"codec": {
"id": "525ce63284aed52635e85d06",
"name": "AAC",
"description": "MPEG-4 AAC Encoder",
"type": "audio",
"created_at": 1362119988773,
"updated_at": 1362119988773,
"passes": [
1,
1
],
"profiles": [
{
"name": "LC",
"containers": [
"flv",
"mp4",
"mkv",
"m4v",
"avi",
"mov",
"raw"
],
"capabilities": {
"max_bitdepth": [
8,
16,
20,
24
],
"max_channels": [
1,
2
],
"max_samplingrate": [
8000,
11025,
16000,
22050,
32000,
44100,
48000,
96000
],
"max_bitrate": [
16,
256
]
}
},
{
"name": "Main",
"containers": [
"mp4",
"mkv",
"raw"
],
"capabilities": {
"max_bitdepth": [
8,
16,
20,
24
],
"max_channels": [
1,
2
],
"max_samplingrate": [
8000,
11025,
16000,
22050,
32000,
44100,
48000,
96000
],
"max_bitrate": [
16,
320
]
}
}
],
"version": 1,
"href": "https://api.xvid.com/v1/codecs/525ce63284aed52635e85d06"
},
"profile": "LC",
"passes": 1,
"caps": {
"max_bitdepth": 16,
"max_channels": 2,
"max_samplingrate": 96000,
"max_bitrate": 192
}
}
},
"settings": {
"logos": null,
"subtitle_policy": "ignore",
"max_segment_size": null,
"playlist_format": null,
"video": {
"quality_level": "85%",
"deinterlace": "auto",
"crop": "off",
"resize_policy": "keep",
"padding_policy": "no_pad",
"aspect_ratio_policy": "keep"
},
"audio": {
"quality_level": "85%",
"resample_policy": "shrink_to_fit"
},
"thumbnails": [
{
"name": "thumbnails_small",
"format": "jpg",
"interval_or_count": "12",
"max_width": 120,
"max_height": 90,
"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"
}
]
},
"version": 1,
"type": "system",
"created_at": 1362119988773,
"updated_at": 1362119988773,
"id": "52a6bbdfa2ca79055aaa787f",
"href": "https://api.xvid.com/v1/presets/52a6bbdfa2ca79055aaa787f"
}
}Error Responses
400 Bad Request
json
{
"error": {
"error_code": "0x0180001",
"error_message": "Invalid Input"
}
}403 Forbidden
json
{
"error": {
"error_code": "0x0000003",
"error_message": "Invalid access token"
}
}404 Not Found
json
{
"error": {
"error_code": "0x0180002",
"error_message": "Preset does not exist"
}
}500 Internal Server Error
json
{
"error": {
"error_code": "0x0000001",
"error_message": "Internal Error"
}
}