Skip to main content

Module chapter

Module chapter 

Source
Expand description

Chapter information.

This module provides the ChapterInfo struct for representing chapter markers within a media container (e.g., MKV, MP4, M4A).

§Examples

use ff_format::chapter::ChapterInfo;
use ff_format::Rational;
use std::time::Duration;

let chapter = ChapterInfo::builder()
    .id(1)
    .title("Opening")
    .start(Duration::from_secs(0))
    .end(Duration::from_secs(120))
    .time_base(Rational::new(1, 1000))
    .build();

assert_eq!(chapter.id(), 1);
assert_eq!(chapter.title(), Some("Opening"));
assert_eq!(chapter.duration(), Duration::from_secs(120));

Structs§

ChapterInfo
Information about a chapter within a media file.
ChapterInfoBuilder
Builder for constructing ChapterInfo.