MCPcopy Create free account
hub / github.com/TomClive/SeeDance2Stitcher / outputName

Function outputName

server.js:102–125  ·  view source on GitHub ↗
(session, options)

Source from the content-addressed store, hash-verified

100}
101
102function 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
127function uniqueOutputPath(filename) {
128 const parsed = path.parse(filename);

Callers 2

handleExportFunction · 0.85
handleExportCollageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected