c2pa-vtt 0.1.0

C2PA manifest embedding for WebVTT subtitle and caption files
Documentation
  • Coverage
  • 8.33%
    1 out of 12 items documented0 out of 5 items with examples
  • Size
  • Source code size: 8.17 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 358.36 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 8s Average build duration of successful builds.
  • all releases: 7s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • writerslogic/c2pa-vtt
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • dcondrey

Overview

Embeds and extracts C2PA manifest references in WebVTT files using NOTE blocks with ASCII armour delimiters. The manifest is placed immediately after the WEBVTT header, where it survives HLS/DASH segmentation.

WEBVTT

NOTE -----BEGIN C2PA MANIFEST----- https://example.com/m.c2pa -----END C2PA MANIFEST-----

00:00:00.000 --> 00:00:05.000
Hello world

Zero dependencies.

Quick Start

[dependencies]
c2pa-vtt = "0.1"

Embed

use c2pa_vtt::embed_manifest;

let vtt = "WEBVTT\n\n00:00:00.000 --> 00:00:05.000\nHello\n";
let signed = embed_manifest(vtt, "https://example.com/m.c2pa").unwrap();

Extract

use c2pa_vtt::extract_manifest;

let result = extract_manifest(signed_vtt).unwrap();
assert_eq!(result.reference, "https://example.com/m.c2pa");

Remove

use c2pa_vtt::remove_manifest;

let clean = remove_manifest(signed_vtt).unwrap();

Related Crates

Crate Description
c2pa-structured-text Structured text embedding via ASCII armour delimiters
c2pa-text-binding Soft binding and content fingerprinting for text assets
c2pa-warc WARC web archive embedding
c2pa-rs Official C2PA SDK

License

Licensed under either of Apache License, Version 2.0 or MIT License at your option.

Built by WritersLogic