mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 03:19:46 +00:00
18 lines
463 B
TypeScript
18 lines
463 B
TypeScript
import { assertEquals } from '@std/assert';
|
|
|
|
import { ffprobe } from './ffprobe.ts';
|
|
|
|
Deno.test('ffprobe', async () => {
|
|
const uri = new URL('./buckbunny.mp4', import.meta.url);
|
|
|
|
const stream = ffprobe(uri, {
|
|
'v': 'error',
|
|
'select_streams': 'v:0',
|
|
'show_entries': 'stream=width,height',
|
|
'of': 'json',
|
|
});
|
|
|
|
const { streams: [dimensions] } = await new Response(stream).json();
|
|
|
|
assertEquals(dimensions, { width: 1920, height: 1080 });
|
|
});
|