mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
transcode: export existing code in mod.ts
This commit is contained in:
parent
6ce64822e1
commit
d36efb7a30
3 changed files with 5 additions and 3 deletions
|
|
@ -2,6 +2,6 @@
|
||||||
"name": "@ditto/transcode",
|
"name": "@ditto/transcode",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./transcode.ts"
|
".": "./mod.ts"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
export type FFmpegFlags = {
|
export interface FFmpegFlags {
|
||||||
'c:v'?: string;
|
'c:v'?: string;
|
||||||
'preset'?: string;
|
'preset'?: string;
|
||||||
'loglevel'?: string;
|
'loglevel'?: string;
|
||||||
|
|
@ -8,7 +8,7 @@ export type FFmpegFlags = {
|
||||||
'movflags'?: string;
|
'movflags'?: string;
|
||||||
'f'?: string;
|
'f'?: string;
|
||||||
[key: string]: string | undefined;
|
[key: string]: string | undefined;
|
||||||
};
|
}
|
||||||
|
|
||||||
export function ffmpeg(input: ReadableStream<Uint8Array>, flags: FFmpegFlags): ReadableStream<Uint8Array> {
|
export function ffmpeg(input: ReadableStream<Uint8Array>, flags: FFmpegFlags): ReadableStream<Uint8Array> {
|
||||||
const args = ['-i', 'pipe:0']; // Input from stdin
|
const args = ['-i', 'pipe:0']; // Input from stdin
|
||||||
|
|
|
||||||
2
packages/transcode/mod.ts
Normal file
2
packages/transcode/mod.ts
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
export { ffmpeg, type FFmpegFlags } from './ffmpeg.ts';
|
||||||
|
export { transcodeVideo } from './transcode.ts';
|
||||||
Loading…
Add table
Reference in a new issue