|
|
|
|
@ -236,7 +236,7 @@ async function html5ifyDummy(filePath, outPath) {
|
|
|
|
|
await transferTimestamps(filePath, outPath);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function mergeFiles({ paths, outPath }) {
|
|
|
|
|
async function mergeFiles({ paths, outPath, allStreams }) {
|
|
|
|
|
console.log('Merging files', { paths }, 'to', outPath);
|
|
|
|
|
|
|
|
|
|
// https://blog.yo1.dog/fix-for-ffmpeg-protocol-not-on-whitelist-error-for-urls/
|
|
|
|
|
@ -244,7 +244,7 @@ async function mergeFiles({ paths, outPath }) {
|
|
|
|
|
'-f', 'concat', '-safe', '0', '-protocol_whitelist', 'file,pipe', '-i', '-',
|
|
|
|
|
'-c', 'copy',
|
|
|
|
|
|
|
|
|
|
'-map', '0',
|
|
|
|
|
...(allStreams ? ['-map', '0'] : []),
|
|
|
|
|
'-map_metadata', '0',
|
|
|
|
|
|
|
|
|
|
// See https://github.com/mifi/lossless-cut/issues/170
|
|
|
|
|
@ -269,11 +269,11 @@ async function mergeFiles({ paths, outPath }) {
|
|
|
|
|
console.log(result.stdout);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function mergeAnyFiles({ customOutDir, paths }) {
|
|
|
|
|
async function mergeAnyFiles({ customOutDir, paths, allStreams }) {
|
|
|
|
|
const firstPath = paths[0];
|
|
|
|
|
const ext = extname(firstPath);
|
|
|
|
|
const outPath = getOutPath(customOutDir, firstPath, `merged${ext}`);
|
|
|
|
|
return mergeFiles({ paths, outPath });
|
|
|
|
|
return mergeFiles({ paths, outPath, allStreams });
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function autoMergeSegments({ customOutDir, sourceFile, segmentPaths }) {
|
|
|
|
|
|