$npx -y skills add remotion-dev/remotion --skill remotion-captionsDealing with captions in Remotion
| 1 | All captions must be processed in JSON. The captions must use the [`Caption`](https://www.remotion.dev/docs/captions/caption.md) type which is the following: |
| 2 | |
| 3 | ```ts |
| 4 | import type { Caption } from "@remotion/captions"; |
| 5 | ``` |
| 6 | |
| 7 | This is the definition: |
| 8 | |
| 9 | ```ts |
| 10 | type Caption = { |
| 11 | text: string; |
| 12 | startMs: number; |
| 13 | endMs: number; |
| 14 | timestampMs: number | null; |
| 15 | confidence: number | null; |
| 16 | }; |
| 17 | ``` |
| 18 | |
| 19 | ## Generating captions |
| 20 | |
| 21 | To transcribe video and audio files to generate captions, load the [transcribe-captions.md](transcribe-captions.md) file for more instructions. |
| 22 | |
| 23 | ## Displaying captions |
| 24 | |
| 25 | To display captions in your video, load the [display-captions.md](display-captions.md) file for more instructions. |
| 26 | |
| 27 | ## Importing captions |
| 28 | |
| 29 | To import captions from a .srt file, load the [import-srt-captions.md](import-srt-captions.md) file for more instructions. |