transcode: export existing code in mod.ts

This commit is contained in:
Alex Gleason 2025-02-27 22:06:03 -06:00
parent 6ce64822e1
commit d36efb7a30
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
3 changed files with 5 additions and 3 deletions

View file

@ -2,6 +2,6 @@
"name": "@ditto/transcode",
"version": "1.0.0",
"exports": {
".": "./transcode.ts"
".": "./mod.ts"
}
}

View file

@ -1,4 +1,4 @@
export type FFmpegFlags = {
export interface FFmpegFlags {
'c:v'?: string;
'preset'?: string;
'loglevel'?: string;
@ -8,7 +8,7 @@ export type FFmpegFlags = {
'movflags'?: string;
'f'?: string;
[key: string]: string | undefined;
};
}
export function ffmpeg(input: ReadableStream<Uint8Array>, flags: FFmpegFlags): ReadableStream<Uint8Array> {
const args = ['-i', 'pipe:0']; // Input from stdin

View file

@ -0,0 +1,2 @@
export { ffmpeg, type FFmpegFlags } from './ffmpeg.ts';
export { transcodeVideo } from './transcode.ts';