mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 03:19:46 +00:00
Add @ditto/transcode package
This commit is contained in:
parent
462c00a3e7
commit
bd47ae5930
6 changed files with 11 additions and 1 deletions
|
|
@ -11,6 +11,7 @@
|
|||
"./packages/nip98",
|
||||
"./packages/policies",
|
||||
"./packages/ratelimiter",
|
||||
"./packages/transcode",
|
||||
"./packages/translators",
|
||||
"./packages/uploaders"
|
||||
],
|
||||
|
|
|
|||
1
packages/transcode/.gitignore
vendored
Normal file
1
packages/transcode/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
tmp/
|
||||
7
packages/transcode/deno.json
Normal file
7
packages/transcode/deno.json
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"name": "@ditto/transcode",
|
||||
"version": "1.0.0",
|
||||
"exports": {
|
||||
".": "./transcode.ts"
|
||||
}
|
||||
}
|
||||
|
|
@ -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);
|
||||
});
|
||||
Loading…
Add table
Reference in a new issue