# Get video codec info
`GET https://octopus.livepush.io/streams/{stream_id}/videos/{video_id}/codecinfo`
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.
- **Tag:** Videos
- **Operation ID:** `getVideoCodecInfo`
- **Authentication:** Bearer token required
- **Docs:** https://developers.livepush.io/videos/get-video-codec-info/

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `stream_id` | string | yes | Unique identifier of the stream. |
| `video_id` | string | yes | Unique identifier of the video. |


### Example request

```bash
curl -X GET 'https://octopus.livepush.io/streams/st_xxxxxxxxxxxxx/videos/vd_xxxxxxxxxxxx/codecinfo' \
  -H 'Authorization: Bearer YOUR_API_TOKEN'
```


### Responses


#### 200 — Get video codec info.

- `hasAudioTrack` (boolean)
- `duration` (number)
- `width` (integer)
- `height` (integer)
- `fps` (number)
- `codecs` (VideoItemMediaInfoCodec[])
  - `type` (VideoCodecType)
  - `codec` (string)
- `tracks` (object[])


```json
{
  "hasAudioTrack": false,
  "duration": 0,
  "width": 0,
  "height": 0,
  "fps": 0,
  "codecs": [
    {
      "type": "video",
      "codec": "string"
    }
  ],
  "tracks": [
    {}
  ]
}
```


#### 401 — Response


#### 404 — Not found for this account.

