fix(transcode): keep webm extension so ffmpeg auto-detects vp9 alpha, and drop qtrle to save disk space
This commit is contained in:
1 parent
59a24f0c7e
commit
cd504dab3d
1 file changed
+8
-3
+8
-3
@@ -263,7 +263,12 @@ app.post('/api/export/transcode', upload.fields([
|
||||
return res.status(400).json({ error: 'Video-Datei fehlt für Server-Transcoding.' });
|
||||
}
|
||||
|
||||
const videoPath = req.files.video[0].path;
|
||||
const videoPathTemp = req.files.video[0].path;
|
||||
const originalName = req.files.video[0].originalname;
|
||||
const isWebmInput = originalName.toLowerCase().endsWith('.webm');
|
||||
const videoPath = videoPathTemp + (isWebmInput ? '.webm' : '.mp4');
|
||||
fs.renameSync(videoPathTemp, videoPath);
|
||||
|
||||
const audioPath = (req.files.audio && req.files.audio[0]) ? req.files.audio[0].path : null;
|
||||
const format = req.body.format || 'prores';
|
||||
const title = (req.body.title || 'Visualizer').replace(/[^a-zA-Z0-9_-]/g, '_');
|
||||
@@ -323,7 +328,7 @@ app.post('/api/export/transcode', upload.fields([
|
||||
enforceMaxHistory();
|
||||
|
||||
// Run sequentially in background
|
||||
runSequentialEncodes(session, videoPath, audioPath, ['prores', 'webm_alpha', 'qtrle', 'mp4']).catch(err => {
|
||||
runSequentialEncodes(session, videoPath, audioPath, ['prores', 'webm_alpha', 'mp4']).catch(err => {
|
||||
console.error(`[${sessionId}] Queue Error:`, err);
|
||||
});
|
||||
|
||||
@@ -426,7 +431,7 @@ app.post('/api/export/start', upload.single('audio'), async (req, res) => {
|
||||
session.formats.prores.ready = true;
|
||||
saveHistory();
|
||||
// Start remaining encodes from the ProRes master file using the original audioPath
|
||||
runSequentialEncodes(session, formats.prores.path, audioPath, ['webm_alpha', 'qtrle', 'mp4']).catch(err => {
|
||||
runSequentialEncodes(session, formats.prores.path, audioPath, ['webm_alpha', 'mp4']).catch(err => {
|
||||
console.error(`[${sessionId}] Background Queue Error:`, err);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user