mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 03:19:46 +00:00
transcodeVideoStream -> transcodeVideo
This commit is contained in:
parent
25d5db8db6
commit
044930cc8d
2 changed files with 4 additions and 4 deletions
|
|
@ -1,8 +1,8 @@
|
|||
import { transcodeVideoStream } from './transcode.ts';
|
||||
import { transcodeVideo } from './transcode.ts';
|
||||
|
||||
Deno.test('transcodeVideoStream', async () => {
|
||||
Deno.test('transcodeVideo', async () => {
|
||||
await using file = await Deno.open(new URL('./buckbunny.mp4', import.meta.url));
|
||||
const output = await transcodeVideoStream(file.readable);
|
||||
const output = await transcodeVideo(file.readable);
|
||||
|
||||
await Deno.writeFile(new URL('./buckbunny-transcoded.mp4', import.meta.url), output);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
export async function transcodeVideoStream(input: ReadableStream<Uint8Array>): Promise<ReadableStream<Uint8Array>> {
|
||||
export async function transcodeVideo(input: ReadableStream<Uint8Array>): Promise<ReadableStream<Uint8Array>> {
|
||||
const opts = {
|
||||
'i': 'pipe:0', // Read input from stdin
|
||||
'c:v': 'libx264', // Convert to H.264
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue