mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-09-04 11:54:28 -07:00
feat(anki): add media timing review before card creation (#203)
This commit is contained in:
@@ -11,6 +11,12 @@ export type MediaInput =
|
||||
source?: string;
|
||||
inputOptions?: MediaInputOptions;
|
||||
singleResolvedStream?: boolean;
|
||||
/**
|
||||
* The file keeps the original media timestamps instead of starting at zero (a
|
||||
* stream-copied window of a longer source). Seek with `-ss` against those
|
||||
* absolute timestamps rather than relative to the file's own start time.
|
||||
*/
|
||||
absoluteTimestamps?: boolean;
|
||||
};
|
||||
|
||||
export type NormalizedMediaInput = {
|
||||
@@ -89,6 +95,10 @@ export function normalizeMediaInput(input: MediaInput): NormalizedMediaInput {
|
||||
inputArgs.push('-headers', headers);
|
||||
}
|
||||
|
||||
if (input.absoluteTimestamps) {
|
||||
inputArgs.push('-seek_timestamp', '1');
|
||||
}
|
||||
|
||||
return {
|
||||
path: input.path,
|
||||
inputArgs,
|
||||
|
||||
Reference in New Issue
Block a user