Appearance
GET /codecs/[ID]
Description
Get information about codecs. Supports fetching all codecs or a specific codec by ID.
Authentication
- Required: No
Request Headers
- Accept:
application/json(for JSON responses)application/xml(for XML responses)
Query Parameters
Common Parameters (for both GET /codecs/ and GET /codecs/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.
Parameters for Fetching Multiple Codecs (GET /codecs/)
- 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)
Values:1,-1
Sort records in ascending ("1") or descending ("-1") order. Default value: "1". - type:
string(Optional)
Values:audio,video
Restricts output to codecs of the specified type.
Example Request for Listing Multiple Codecs
bash
curl "https://api.xvid.com/v1/codecs/?human=true&show_null=true&limit=2"Example Response for Listing Multiple Codecs
Success (200 OK)
json
{
"codecs": [
{
"name": "H.265",
"description": "H.265 Encoder",
"type": "video",
"passes": [1, 1],
"autograph": [false],
"profiles": [
{
"name": "Main",
"containers": ["mkv"],
"capabilities": {
"interlaced": [false],
"max_key_distance": [1, 30],
"max_width": [64, 4096],
"max_height": [64, 4096],
"max_framerate": [5, 7.5, 10, 15, 23.976, 24, 25, 29.97, 30, 59.94, 60],
"max_bitrate": [64, 50000],
"max_buffersize": [128, 4096]
}
}
],
"version": 1,
"created_at": 1362119988773,
"updated_at": 1362119988773,
"id": "525ce63284aed52635e85d04",
"href": "https://api.xvid.com/v1/codecs/525ce63284aed52635e85d04"
},
{
"name": "H.264",
"description": "H.264 Encoder",
"type": "video",
"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, 59.94, 60],
"max_bitrate": [64, 20000],
"max_buffersize": [128, 2048],
"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, 59.94, 60],
"max_bitrate": [64, 50000],
"max_buffersize": [128, 2048],
"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, 59.94, 60],
"max_bitrate": [64, 60000],
"max_buffersize": [256, 2048],
"max_ref_frames": [1, 5]
}
}
],
"version": 1,
"created_at": 1362119988773,
"updated_at": 1362119988773,
"id": "525ce63284aed52635e85d05",
"href": "https://api.xvid.com/v1/codecs/525ce63284aed52635e85d05"
}
],
"total": 9,
"start": 0,
"limit": 2,
"first": {
"href": "https://api.xvid.com/v1/codecs/?start=0&limit=2&format=json&human=true"
},
"last": {
"href": "https://api.xvid.com/v1/codecs/?start=8&limit=2&format=json&human=true"
},
"next": {
"href": "https://api.xvid.com/v1/codecs/?start=2&limit=2&format=json&human=true"
},
"prev": {
"href": "https://api.xvid.com/v1/codecs/?start=0&limit=2&format=json&human=true"
}
}Example Request for Fetching a Specific Codec
bash
curl "https://api.xvid.com/v1/codecs/525ce63284aed52635e85d05?human=true&show_null=true"Example Response for Fetching a Specific Codec
Success (200 OK)
json
{
"codec": {
"name": "H.264",
"description": "H.264 Encoder",
"type": "video",
"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,
59.94,
60
],
"max_bitrate": [
64,
20000
],
"max_buffersize": [
128,
2048
],
"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,
59.94,
60
],
"max_bitrate": [
64,
50000
],
"max_buffersize": [
128,
2048
],
"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,
59.94,
60
],
"max_bitrate": [
64,
60000
],
"max_buffersize": [
256,
2048
],
"max_ref_frames": [
1,
5
]
}
}
],
"version": 1,
"created_at": 1362119988773,
"updated_at": 1362119988773,
"id": "525ce63284aed52635e85d05",
"href": "https://api.xvid.com/v1/codecs/525ce63284aed52635e85d05"
}
}Error Responses
400 Bad Request
json
{
"error": {
"error_code": "0x0000011",
"error_message": "Invalid Input"
}
}404 Not Found
json
{
"error": {
"error_code": "0x0190002",
"error_message": "Codec does not exist"
}
}500 Internal Server Error
json
{
"error": {
"error_code": "0x0000001",
"error_message": "Internal Error"
}
}