// Add chapters at specific timestamps
await addChapters({
input: 'video.mp4',
output: 'chapters.mp4',
chapters: [
{ title: 'Introduction', start: 0 },
{ title: 'Chapter 1: Getting Started', start: 60 },
{ title: 'Chapter 2: Advanced Topics', start: 300 },
{ title: 'Conclusion', start: 540 },
]
});
Convenience wrapper to add chapters from chapter timestamps. Automatically creates chapter metadata and writes to output file.