(session, options)
| 100 | } |
| 101 | |
| 102 | function outputName(session, options) { |
| 103 | const parts = [ |
| 104 | session.names.video1, |
| 105 | session.names.video2 |
| 106 | ]; |
| 107 | if (options.trimEnd1 > 0 || options.trimStart2 > 0) { |
| 108 | const trimParts = []; |
| 109 | if (options.trimEnd1 > 0) trimParts.push(`v1e${options.trimEnd1}f`); |
| 110 | if (options.trimStart2 > 0) trimParts.push(`v2s${options.trimStart2}f`); |
| 111 | parts.push(`rm-${trimParts.join("-")}`); |
| 112 | } else { |
| 113 | parts.push("no-trim"); |
| 114 | } |
| 115 | parts.push(options.mode); |
| 116 | if (options.blendFrames > 0 && options.mode === "blend") parts.push(`blend${options.blendFrames}f`); |
| 117 | if (options.toneMatch && options.toneScope === "full") parts.push("tonefull"); |
| 118 | if (options.toneMatch && options.toneScope !== "full" && options.toneFrames > 0) parts.push(`tone${options.toneFrames}f`); |
| 119 | if (options.interpolate) parts.push("mi"); |
| 120 | if (options.audioMode && options.audioMode !== "micro_crossfade") { |
| 121 | parts.push(`a-${options.audioMode.replace(/_/g, "")}`); |
| 122 | } |
| 123 | if (options.collage) parts.push(`cmp${options.collageSeconds || 5}s`); |
| 124 | return `${parts.join("_")}.mp4`; |
| 125 | } |
| 126 | |
| 127 | function uniqueOutputPath(filename) { |
| 128 | const parsed = path.parse(filename); |
no outgoing calls
no test coverage detected