Skip to main content

Module chapter

Module chapter 

Source
Expand description

Chapters (FFmpeg’s AVChapter): a titled span of the presentation.

A demuxer gives them as Demuxer::chapters (a QuickTime chapter text track or Nero chpl in MP4/MOV, Chapters in Matroska/WebM); a muxer takes them with Muxer::set_chapters.

Structs§

Chapter
One chapter: [start, end) in time_base units on the presentation timeline, and its metadata (title, …).

Constants§

MAX_CHAPTERS
The most chapters a demuxer reads from one file: far above any real one, it bounds what a hostile index can make a reader build.

Functions§

fill_ends
Give every chapter whose position in open is set (its end is not recorded) an end, as FFmpeg’s compute_chapters_end does: the next start in time order when that is later, else the end of the file (duration_us microseconds, when known), and never before its own start.
in_time_order
chapters by start, as listed where starts are equal. A chapter track can hold no other order, and FFmpeg’s Matroska demuxer skips a chapter listed after a later one, so muxers write them this way.
trim
Chapters for an output cut to the window [start_s, end_s) (seconds), moved so the window begins at zero: what FFmpeg does with -ss / -t. Chapters outside the window are left out, the rest clipped.