Changeset 9ed940e in Klonkt
- Timestamp:
- 07/30/2026 08:00:25 AM (6 weeks ago)
- Branches:
- main
- Children:
- 79f00c5
- Parents:
- 7d01696
- File:
-
- 1 edited
-
src/routes/activitypub.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/routes/activitypub.js
r7d01696 r9ed940e 319 319 import('child_process').then(({ execFile }) => { 320 320 const poster = req.file.path + '.poster.jpg'; 321 execFile('ffmpeg', ['-y', '-ss', '1', '-i', req.file.path, '-frames:v', '1', '-vf', "scale='min(640,iw)':-2", poster], 321 // FFMPEG_PATH lets a static build in ~/bin do the work without a 322 // system install; unset means "whatever is on PATH", and neither is 323 // an error when absent. 324 execFile(process.env.FFMPEG_PATH || 'ffmpeg', ['-y', '-ss', '1', '-i', req.file.path, '-frames:v', '1', '-vf', "scale='min(640,iw)':-2", poster], 322 325 { timeout: 30000 }, (e) => { if (e && e.code !== 'ENOENT') console.warn('[media] poster failed:', e.message); }); 323 326 }).catch(() => { /* never blocks the upload */ });
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)