This commit is contained in:
sky
2025-08-12 15:41:14 -04:00
parent de79c682c8
commit ab8f6d936a

View File

@ -8,7 +8,7 @@ Bun.serve({
GET: async req => {
if(req.headers.get("X-Authentication") == process.env.PRIVATE_KEY) {
let path = "tmp/" + Bun.randomUUIDv7();
await `yt-dlp '${req.query.url}' -q -o "${path.mp4}"`
await `yt-dlp '${req.query.url}' -q -o "${path}.mp4"`
await $`ffmpeg -i ${path}.mp4 -map_metadata -1 -map 0 -map -0:v -b:a 64k ${path}.ogg`
await (Bun.file(path + ".mp4")).delete();
let response = new Response(await Bun.file(path + ".ogg").bytes(), {