Dee Ferdinand commited on
Commit
f88cf50
·
1 Parent(s): 63afd10

feat: init Dee Video Studio — HyperFrames cloud render for testimonial/teaser/trailer videos

Browse files

- 4 workflows: testimonial (75s), teaser (30s), trailer (60s), community (60s)
- 6 royalty-free Pixabay music tracks auto-selected by workflow
- WebSocket real-time render progress
- Dark-mode Studio UI with drag-drop upload
- HuggingFace Docker Space ready (port 7860)

Files changed (1) hide show
  1. scripts/download-music.js +32 -0
scripts/download-music.js ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { createWriteStream, mkdirSync, existsSync, writeFileSync } from 'fs';
2
+ import { pipeline } from 'stream/promises';
3
+ import path from 'path';
4
+ import { fileURLToPath } from 'url';
5
+
6
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
7
+ const LIB = path.join(__dirname, '..', 'music', 'library');
8
+ mkdirSync(LIB, { recursive: true });
9
+
10
+ const TRACKS = [
11
+ { file: 'corporate-motivation.mp3', url: 'https://cdn.pixabay.com/download/audio/2022/05/27/audio_1808fbf07a.mp3', mood: 'corporate', bpm: 120, tags: ['corporate','testimonial','professional'] },
12
+ { file: 'inspiring-cinematic.mp3', url: 'https://cdn.pixabay.com/download/audio/2023/02/28/audio_a74ea30b0d.mp3', mood: 'cinematic', bpm: 90, tags: ['cinematic','trailer','emotional'] },
13
+ { file: 'upbeat-community.mp3', url: 'https://cdn.pixabay.com/download/audio/2022/08/02/audio_2dde668d05.mp3', mood: 'upbeat', bpm: 128, tags: ['community','energetic'] },
14
+ { file: 'warm-documentary.mp3', url: 'https://cdn.pixabay.com/download/audio/2023/01/30/audio_16b3ef0928.mp3', mood: 'warm', bpm: 75, tags: ['documentary','story','heartfelt'] },
15
+ { file: 'tech-corporate.mp3', url: 'https://cdn.pixabay.com/download/audio/2022/11/22/audio_4d566a5081.mp3', mood: 'tech', bpm: 110, tags: ['ai','tech','modern'] },
16
+ { file: 'action-sport.mp3', url: 'https://cdn.pixabay.com/download/audio/2022/06/08/audio_c8a2c5a45d.mp3', mood: 'energetic',bpm: 145, tags: ['viral','energetic','teaser'] },
17
+ ];
18
+
19
+ for (const track of TRACKS) {
20
+ const dest = path.join(LIB, track.file);
21
+ writeFileSync(path.join(LIB, track.file.replace(/\.mp3$/, '.json')),
22
+ JSON.stringify({ ...track, license: 'Pixabay License — free commercial use' }, null, 2));
23
+ if (existsSync(dest)) { console.log(`✓ ${track.file} (cached)`); continue; }
24
+ console.log(`⬇ ${track.file}...`);
25
+ try {
26
+ const res = await fetch(track.url);
27
+ if (!res.ok) { console.warn(` ✗ HTTP ${res.status}`); continue; }
28
+ await pipeline(res.body, createWriteStream(dest));
29
+ console.log(` ✓ done`);
30
+ } catch(e) { console.warn(` ✗ ${e.message}`); }
31
+ }
32
+ console.log('Music library ready.');