Todas as legendas devem ser processadas em JSON. As legendas devem usar o tipo Caption, que é o seguinte:
import type { Caption } from "@remotion/captions";
Esta é a definição:
type Caption = {
text: string;
startMs: number;
endMs: number;
timestampMs: number | null;
confidence: number | null;
pageBreakAfter?: boolean;
};
Gerando legendas
Para transcrever arquivos de vídeo e áudio e gerar legendas, carregue o arquivo transcribe-captions.md para mais instruções.
Exibindo legendas
Para exibir legendas em seu vídeo, carregue o arquivo display-captions.md para mais instruções.
Importando legendas
Para importar legendas de um arquivo .srt, carregue o arquivo import-srt-captions.md para mais instruções.
Pós-criação
Após terminar, carregue esta skill: Remotion Best Practices
Se ainda não tiver feito, abra o Remotion Studio, a menos que instruído de outra forma.