mulmocast 2.1.2 → 2.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -144,7 +144,11 @@ const addTransitionEffects = (ffmpegContext, captionedVideoId, context, transiti
144
144
  }
145
145
  // Transition happens at the start of this beat
146
146
  const startAt = beatTimestamps[beatIndex] - 0.05; // 0.05 is to avoid flickering
147
- const duration = transition.duration;
147
+ // Limit transition duration to be no longer than either beat's duration
148
+ const prevBeatDuration = context.studio.beats[beatIndex - 1].duration ?? 1;
149
+ const currentBeatDuration = context.studio.beats[beatIndex].duration ?? 1;
150
+ const maxDuration = Math.min(prevBeatDuration, currentBeatDuration) * 0.9; // Use 90% to leave some margin
151
+ const duration = Math.min(transition.duration, maxDuration);
148
152
  const outputVideoId = `trans_${beatIndex}_o`;
149
153
  const processedVideoId = `${transitionVideoId}_f`;
150
154
  if (transition.type === "fade") {
@@ -185,14 +189,11 @@ const addTransitionEffects = (ffmpegContext, captionedVideoId, context, transiti
185
189
  // Cannot apply wipe without first frame
186
190
  return prevVideoId;
187
191
  }
188
- // Calculate the actual duration of the static frames
189
- // The _last frame was generated with the previous beat's actual duration
190
- const prevStudioBeat = context.studio.beats[beatIndex - 1];
191
- const prevBeatActualDuration = Math.max(prevStudioBeat.duration + getExtraPadding(context, beatIndex - 1), prevStudioBeat.movieDuration ?? 0);
192
- // xfade offset must be non-negative and within the first video's duration
193
- // Start the transition at the end of the first video minus the transition duration
194
- const xfadeOffset = Math.max(0, prevBeatActualDuration - duration);
195
- // Apply xfade with explicit pixel format
192
+ // For wipe transitions, use offset=0 so transition starts immediately and completes within duration
193
+ // This ensures 0-100% wipe happens exactly during the transition duration
194
+ const xfadeOffset = 0;
195
+ // Apply xfade with offset=0 for complete 0-100% transition
196
+ // Both input videos should be at least duration seconds long (ensured by static frame generation)
196
197
  const xfadeOutputId = `${transitionVideoId}_xfade`;
197
198
  ffmpegContext.filterComplex.push(`[${transitionVideoId}]format=yuv420p[${transitionVideoId}_fmt]`);
198
199
  ffmpegContext.filterComplex.push(`[${nextVideoId}]format=yuv420p[${nextVideoId}_fmt]`);
@@ -93,9 +93,33 @@ export const bgmAssets = {
93
93
  date: "2025-07-17",
94
94
  duration: "03:52",
95
95
  account: "@snakajima",
96
- original_license: "morning, piano solo, Japanese name, sexy",
96
+ original_license: "Generated by Suno with commercial use rights (PRO Plan)",
97
97
  prompt: "morning, piano solo, Japanese name, sexy",
98
98
  model: "v4.5+",
99
99
  },
100
+ {
101
+ name: "classical001.mp3",
102
+ title: "Whisper of the Bow",
103
+ url: "https://github.com/receptron/mulmocast-media/raw/refs/heads/main/bgms/classical001.mp3",
104
+ suno_url: "https://suno.com/s/q1CvybIhEpliJLdF",
105
+ date: "2025-10-1",
106
+ duration: "04:32",
107
+ account: "@snakajima",
108
+ original_license: "Generated by Suno with commercial use rights (PRO Plan)",
109
+ prompt: "classical, ballad, dramatic",
110
+ model: "v4.5+",
111
+ },
112
+ {
113
+ name: "classical002.mp3",
114
+ title: "Falling Through Time",
115
+ url: "https://github.com/receptron/mulmocast-media/raw/refs/heads/main/bgms/classical002.mp3",
116
+ suno_url: "https://suno.com/s/FTFd3XBYTGavoO1i",
117
+ date: "2025-10-01",
118
+ duration: "03:11",
119
+ account: "@snakajima",
120
+ original_license: "Generated by Suno with commercial use rights (PRO Plan)",
121
+ prompt: "classical, dramatic, piano-driven",
122
+ model: "v4.5+",
123
+ },
100
124
  ],
101
125
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mulmocast",
3
- "version": "2.1.2",
3
+ "version": "2.1.4",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "lib/index.node.js",