embedded

package
v0.1.151 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 19, 2026 License: GPL-2.0, GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package embedded detects embedded subtitle tracks in video files. Supports all containers and subtitle codecs that ffprobe can parse. Delegates stream detection to the subsync package (ffprobe wrapper).

This is local media inspection, not an acquisition source: the package deliberately lives outside internal/provider and implements only the search.TrackDetector seam. The detector always returns every normalized track (including bitmap formats); codec-usability policy is the search engine's, resolved from the embedded_subtitles config section.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Detector

type Detector struct{}

Detector detects embedded subtitle tracks via ffprobe.

Note: this type satisfies the search.TrackDetector interface, but the compile-time assertion lives in internal/wiring (composition root) to keep this package decoupled from search/.

func (Detector) DetectTracks

func (Detector) DetectTracks(ctx context.Context, videoPath string) ([]api.EmbeddedTrack, error)

DetectTracks returns all embedded subtitle tracks in the given video file, including bitmap formats (PGS, VobSub), normalized to api types. Errors (ffprobe failure, corrupt file, timeout) are returned to the caller, which owns logging/metrics/fail-open policy; "error" stays distinguishable from "no tracks" (nil, nil).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL