audio_and_subtitle_info
Inspect a movie or episode's audio tracks and subtitles BEFORE playback, from Kodi's cached streamdetails (no playback). Name the item by type+id (a searchmedia movie/episode row) or by file.
Instructions
Inspect a movie or episode's audio tracks and subtitles BEFORE playback, from Kodi's cached streamdetails (no playback). Name the item by type+id (a searchmedia movie/episode row) or by file. Returns { "file", "audio":[{ "index", "codec", "channels", "language" }], "subtitle":[{ "index", "language" }], "video":[…] }. Embedded streams only: external .srt sidecars and files Kodi hasn't scanned come back as empty arrays; "index" maps to the audio/subtitle setters for embedded streams.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Library id of the item to inspect — the `movieid`/`episodeid` of a `searchmedia` result row, matching `type`. Give exactly one of `id` or `file`. | |
| file | No | Path of the file to inspect — the `file` field of a `searchmedia` result row; any path Kodi can reach works. Streamdetails are only populated for files Kodi has scanned into its library. Give exactly one of `id` or `file`. | |
| type | No | Kind of library id passed in `id` — picks the item key (movieid/episodeid). Required with `id`; not used with `file`. Songs are not accepted: audio files carry no selectable audio-track or subtitle streams. | |
| instance | No | Target Kodi instance. Omitted uses the default ("(null)"). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | The resolved file path of the inspected item. | |
| audio | Yes | Embedded audio tracks, in stream order. | |
| video | Yes | Video streams, in stream order. | |
| subtitle | Yes | Embedded subtitle tracks, in stream order. |