feat(arr): extract text subtitle tracks to srt
ffmpeg, spawned and left to die like ffprobe, maps one subtitle stream and converts it to SRT under §15's sidecar name. Text formats become legal translation sources; bitmap tracks never extract.
This commit is contained in:
@@ -94,6 +94,21 @@ pub enum Error {
|
||||
/// among them.
|
||||
#[error("no video file among the candidates")]
|
||||
NoCandidates,
|
||||
|
||||
/// `ffmpeg` failed extracting a subtitle track — a missing or bitmap
|
||||
/// stream included, which is how §15's "never extract an image track"
|
||||
/// surfaces when it is asked for anyway.
|
||||
#[error("ffmpeg failed extracting subtitle stream {stream} from {path}: {stderr}")]
|
||||
Extract {
|
||||
/// The video that was read.
|
||||
path: PathBuf,
|
||||
/// The subtitle stream that was mapped.
|
||||
stream: usize,
|
||||
/// Exit status, absent when the process was killed by a signal.
|
||||
status: Option<i32>,
|
||||
/// `ffmpeg`'s own diagnostics, truncated to something loggable.
|
||||
stderr: String,
|
||||
},
|
||||
}
|
||||
|
||||
impl Error {
|
||||
|
||||
Reference in New Issue
Block a user