Add @ditto/transcode package

This commit is contained in:
Alex Gleason 2025-02-27 21:22:19 -06:00
parent 462c00a3e7
commit bd47ae5930
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
6 changed files with 11 additions and 1 deletions

View file

@ -11,6 +11,7 @@
"./packages/nip98",
"./packages/policies",
"./packages/ratelimiter",
"./packages/transcode",
"./packages/translators",
"./packages/uploaders"
],

1
packages/transcode/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
tmp/

View file

@ -0,0 +1,7 @@
{
"name": "@ditto/transcode",
"version": "1.0.0",
"exports": {
".": "./transcode.ts"
}
}

View file

@ -4,5 +4,6 @@ Deno.test('transcodeVideo', async () => {
await using file = await Deno.open(new URL('./buckbunny.mp4', import.meta.url));
const output = transcodeVideo(file.readable);
await Deno.writeFile(new URL('./buckbunny-transcoded.mp4', import.meta.url), output);
await Deno.mkdir(new URL('./tmp', import.meta.url), { recursive: true });
await Deno.writeFile(new URL('./tmp/buckbunny-transcoded.mp4', import.meta.url), output);
});