Rewrite frontend as single self-contained HTML file — all CSS/JS inline, no external files to fail loading
This commit is contained in:
29
dist/server/services/muxer.js
vendored
Normal file
29
dist/server/services/muxer.js
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.muxAudioDescription = muxAudioDescription;
|
||||
const child_process_1 = require("child_process");
|
||||
const path_1 = __importDefault(require("path"));
|
||||
function muxAudioDescription(videoPath, audioPath, outputPath) {
|
||||
const ext = path_1.default.extname(outputPath).toLowerCase();
|
||||
const isMkv = ext === '.mkv';
|
||||
const cmd = [
|
||||
'ffmpeg -v error',
|
||||
`-i "${videoPath}"`,
|
||||
`-i "${audioPath}"`,
|
||||
'-map 0:v',
|
||||
'-map 0:a?',
|
||||
'-map 1:a',
|
||||
'-c:v copy',
|
||||
'-c:a copy',
|
||||
isMkv
|
||||
? '-metadata:s:a:1 title="Audio Description"'
|
||||
: '-metadata:s:a:1 title="Audio Description"',
|
||||
`"${outputPath}"`,
|
||||
'-y'
|
||||
].join(' ');
|
||||
(0, child_process_1.execSync)(cmd);
|
||||
}
|
||||
//# sourceMappingURL=muxer.js.map
|
||||
Reference in New Issue
Block a user