Changeset 6dd26e5 in Klonkt for src/routes
- Timestamp:
- 07/30/2026 11:48:53 AM (6 weeks ago)
- Branches:
- main
- Children:
- 1f640ff
- Parents:
- 67f7150
- File:
-
- 1 edited
-
src/routes/activitypub.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/routes/activitypub.js
r67f7150 r6dd26e5 354 354 }).catch(() => { /* never blocks the upload */ }); 355 355 } 356 // Audio gets the same courtesy (Robins vraag, 30-7: vrolijk de kale 357 // audio-tegel op): ffmpeg draws the waveform into <name>.poster.png. 358 // White on transparent, so the tile's own gradient stays the backdrop 359 // and every audio post keeps its own hue. 360 if (mime.startsWith('audio/')) { 361 Promise.all([import('child_process'), import('ffmpeg-static')]).then(([{ execFile }, ff]) => { 362 const bin = process.env.FFMPEG_PATH || ff.default; 363 if (!bin) return; 364 const poster = req.file.path + '.poster.png'; 365 execFile(bin, ['-hide_banner', '-loglevel', 'error', '-y', '-i', req.file.path, '-filter_complex', 'showwavespic=s=800x256:colors=white', '-frames:v', '1', poster], 366 { timeout: 30000 }, (e) => { if (e && e.code !== 'ENOENT') console.warn('[media] waveform failed:', e.message); }); 367 }).catch(() => { /* never blocks the upload */ }); 368 } 356 369 res.status(201).json({ 357 370 url: '/media/reply-media/' + req.file.filename,
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)