Get video codec info
GET
https://octopus.livepush.io/streams/{stream_id}/videos/{video_id}/codecinfo
Base URL https://octopus.livepush.io — Core Streams & Media APIs
Returns container and per-track codec details for a video: duration, resolution, frame rate and the audio and video codecs in use.
When the stored media info already lists codecs it is returned as-is; otherwise the API probes the file, caches the result on the video, and returns the fresh reading.
Requires a token with the streams.videos.write scope.
Authorization
Send a valid access token in the Authorization header.
bearerAuth— Bearer token (JWT)
Authorization: Bearer YOUR_API_TOKEN
Try it
Loading the request builder…
GET
https://octopus.livepush.io/streams/{stream_id}/videos/{video_id}/codecinfo
— This call only reads data.
Parameters
Path parameters
-
stream_idstring requiredUnique identifier of the stream.example: st_xxxxxxxxxxxxx -
video_idstring requiredUnique identifier of the video.example: vd_xxxxxxxxxxxx
Code samples
curl -X GET 'https://octopus.livepush.io/streams/st_xxxxxxxxxxxxx/videos/vd_xxxxxxxxxxxx/codecinfo' \
-H 'Authorization: Bearer YOUR_API_TOKEN'
const response = await fetch('https://octopus.livepush.io/streams/st_xxxxxxxxxxxxx/videos/vd_xxxxxxxxxxxx/codecinfo', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
},
});
if (!response.ok) {
throw new Error(`Livepush API error ${response.status}`);
}
const data = await response.json();
import requests
headers = {
'Authorization': 'Bearer YOUR_API_TOKEN',
}
response = requests.get('https://octopus.livepush.io/streams/st_xxxxxxxxxxxxx/videos/vd_xxxxxxxxxxxx/codecinfo', headers=headers, timeout=30)
response.raise_for_status()
data = response.json()
Responses
Get video codec info.
-
hasAudioTrackboolean -
durationnumber -
widthinteger -
heightinteger -
fpsnumber -
codecsVideoItemMediaInfoCodec[]-
typeVideoCodecTypevideoaudio -
codecstring
-
-
tracksobject[]
{
"hasAudioTrack": false,
"duration": 0,
"width": 0,
"height": 0,
"fps": 0,
"codecs": [
{
"type": "video",
"codec": "string"
}
],
"tracks": [
{}
]
}
No response body.
Not found for this account.