OpenReel Video - Professional browser-based video editor. Open source CapCut alternative. 100% browser-based, no installation, no cloud uploads, no watermarks.
TypeScript
fix: render template overlays above video, fix recording template proportions, add 12 new templates
Augustus Otu2a4153b0969a
diff --git a/apps/web/src/stores/project-store.ts b/apps/web/src/stores/project-store.tsindex 410faf9e..b53eb9d9 100644--- a/apps/web/src/stores/project-store.ts+++ b/apps/web/src/stores/project-store.ts@@ -976,7 +976,7 @@ export const useProjectStore = create<ProjectState>()(const snapshot = {track: buildEditingTemplateTrack(trackType),- position: updatedProject.timeline.tracks.length,+ position: 0,};trackSnapshots.push(snapshot);updatedProject = insertEditingTemplateTrack(updatedProject, snapshot);diff --git a/packages/core/src/editing-templates/built-in-templates.ts b/packages/core/src/editing-templates/built-in-templates.tsindex 72a09982..27327907 100644--- a/packages/core/src/editing-templates/built-in-templates.ts+++ b/packages/core/src/editing-templates/built-in-templates.ts@@ -406,12 +406,12 @@ export const BUILT_IN_EDITING_TEMPLATES: readonly EditingTemplate[] = [type: "shape",trackType: "graphics",timing: full,- transform: transform(0.06, 0.06),+ transform: transform(0.045, 0.055),emphasisAnimation: { type: "pulse", speed: 1, intensity: 0.55, loop: true },content: {shapeType: "circle",- width: 28,- height: 28,+ width: 14,+ height: 14,style: {fill: { type: "solid", color: "#ff4d4d", opacity: 1 },stroke: { color: "#ff4d4d", width: 0, opacity: 0 },@@ -422,10 +422,10 @@ export const BUILT_IN_EDITING_TEMPLATES: readonly EditingTemplate[] = [type: "text",trackType: "text",timing: full,- transform: transform(0.1, 0.06, 1, 1, 0, 0, 0.5),+ transform: transform(0.075, 0.055, 1, 1, 0, 0, 0.5),content: {text: "REC",- style: { fontFamily: "Inter", fontSize: 20, color: "#ff4d4d", fontWeight: 700, textAlign: "left", verticalAlign: "middle", lineHeight: 1.1, letterSpacing: 1 },+ style: { fontFamily: "Inter", fontSize: 18, color: "#ff4d4d", fontWeight: 700, textAlign: "left", verticalAlign: "middle", lineHeight: 1.1, letterSpacing: 2 },},}),textOverlay({@@ -1020,4 +1020,685 @@ export const BUILT_IN_EDITING_TEMPLATES: readonly EditingTemplate[] = [audioEffects: [],},},+ {+ id: "social-live-badge",+ name: "Live Badge",+ description: "Pulsing LIVE indicator for stream-style overlays.",+ category: "social",+ thumbnailUrl: null,+ previewUrl: null,+ tags: ["social", "live", "stream"],+ supportedTargets: ["video", "image"],+ recipe: {+ effects: [],+ overlays: [+ shapeOverlay({+ type: "shape",+ trackType: "graphics",+ timing: full,+ transform: transform(0.92, 0.06),+ emphasisAnimation: { type: "pulse", speed: 0.8, intensity: 0.4, loop: true },+ content: {+ shapeType: "rectangle",+ width: 120,+ height: 40,+ style: {+ fill: { type: "solid", color: "#ff0000", opacity: 1 },+ stroke: { color: "#ff0000", width: 0, opacity: 0 },+ cornerRadius: 8,+ },+ },+ }),+ textOverlay({+ type: "text",+ trackType: "text",+ timing: full,+ transform: transform(0.92, 0.06),+ content: {+ text: "LIVE",+ style: { fontFamily: "Inter", fontSize: 16, color: "#ffffff", fontWeight: 800, textAlign: "center", verticalAlign: "middle", lineHeight: 1, letterSpacing: 2 },+ },+ }),+ ],+ audioEffects: [],+ },+ },+ {+ id: "social-hashtag-strip",+ name: "Hashtag Strip",+ description: "Bottom hashtag bar for social video posts.",+ category: "social",+ thumbnailUrl: null,+ previewUrl: null,+ tags: ["social", "hashtag", "bar"],+ supportedTargets: ["video", "image"],+ controls: [+ { id: "tags", label: "Hashtags", type: "text", defaultValue: "#openreel #editing #creative" },+ ],+ recipe: {+ effects: [],+ overlays: [+ shapeOverlay({+ type: "shape",+ trackType: "graphics",+ timing: full,+ transform: transform(0.5, 0.94),+ content: {+ shapeType: "rectangle",+ width: 1920,+ height: 56,+ style: {+ fill: { type: "solid", color: "rgba(0,0,0,0.6)", opacity: 1 },+ stroke: { color: "rgba(0,0,0,0)", width: 0, opacity: 0 },+ },+ },+ }),+ textOverlay({+ type: "text",+ trackType: "text",+ timing: full,+ transform: transform(0.5, 0.94),+ content: {+ text: "{control.tags}",+ style: { fontFamily: "Inter", fontSize: 18, color: "rgba(255,255,255,0.9)", fontWeight: 600, textAlign: "center", verticalAlign: "middle", lineHeight: 1, letterSpacing: 0.5 },+ },+ }),+ ],+ audioEffects: [],+ },+ },+ {+ id: "cinema-anamorphic-flare",+ name: "Anamorphic Flare",+ description: "Top and bottom bars with blue lens flare accents.",+ category: "cinema",+ thumbnailUrl: null,+ previewUrl: null,+ tags: ["cinema", "anamorphic", "flare"],+ supportedTargets: ["video", "image"],+ recipe: {+ effects: [+ { type: "contrast", params: { value: 0.06 } },+ { type: "vignette", params: { intensity: 0.3, radius: 0.85 } },+ ],+ overlays: [+ shapeOverlay({+ type: "shape",+ trackType: "graphics",+ timing: full,+ transform: transform(0.5, 0.035),+ content: {+ shapeType: "rectangle",+ width: 1920,+ height: 80,+ style: {+ fill: { type: "solid", color: "#000000", opacity: 1 },+ stroke: { color: "#000000", width: 0, opacity: 0 },+ },+ },+ }),+ shapeOverlay({+ type: "shape",+ trackType: "graphics",+ timing: full,+ transform: transform(0.5, 0.965),+ content: {+ shapeType: "rectangle",+ width: 1920,+ height: 80,+ style: {+ fill: { type: "solid", color: "#000000", opacity: 1 },+ stroke: { color: "#000000", width: 0, opacity: 0 },+ },+ },+ }),+ shapeOverlay({+ type: "shape",+ trackType: "graphics",+ timing: full,+ transform: transform(0.3, 0.5),+ keyframes: [+ { time: 0, property: "position.x", value: 0.1 },+ { time: 0.5, property: "position.x", value: 0.7 },+ { time: 1, property: "position.x", value: 0.1 },+ ],+ content: {+ shapeType: "rectangle",+ width: 320,+ height: 4,+ style: {+ fill: { type: "solid", color: "rgba(100,180,255,0.15)", opacity: 1 },+ stroke: { color: "rgba(100,180,255,0)", width: 0, opacity: 0 },+ },+ },+ }),+ ],+ audioEffects: [],+ },+ },+ {+ id: "cinema-noir-bars",+ name: "Noir Bars",+ description: "Heavy letterbox with deep contrast for dramatic scenes.",+ category: "cinema",+ thumbnailUrl: null,+ previewUrl: null,+ tags: ["cinema", "noir", "dramatic"],+ supportedTargets: ["video", "image"],+ recipe: {+ effects: [+ { type: "contrast", params: { value: 0.18 } },+ { type: "brightness", params: { value: -0.06 } },+ { type: "vignette", params: { intensity: 0.6, radius: 0.65 } },+ { type: "saturation", params: { value: -0.15 } },+ ],+ overlays: [+ shapeOverlay({+ type: "shape",+ trackType: "graphics",+ timing: full,+ transform: transform(0.5, 0.06),+ content: {+ shapeType: "rectangle",+ width: 1920,+ height: 140,+ style: {+ fill: { type: "solid", color: "#000000", opacity: 1 },+ stroke: { color: "#000000", width: 0, opacity: 0 },+ },+ },+ }),+ shapeOverlay({+ type: "shape",+ trackType: "graphics",+ timing: full,+ transform: transform(0.5, 0.94),+ content: {+ shapeType: "rectangle",+ width: 1920,+ height: 140,+ style: {+ fill: { type: "solid", color: "#000000", opacity: 1 },+ stroke: { color: "#000000", width: 0, opacity: 0 },+ },+ },+ }),+ ],+ audioEffects: [],+ },+ },+ {+ id: "overlay-grid-guide",+ name: "Grid Guide",+ description: "Rule of thirds grid for composition reference.",+ category: "overlay",+ thumbnailUrl: null,+ previewUrl: null,+ tags: ["overlay", "grid", "composition"],+ supportedTargets: ["video", "image"],+ controls: [+ { id: "gridOpacity", label: "Grid Opacity", type: "number", defaultValue: 0.2, min: 0.05, max: 0.6, step: 0.05 },+ ],+ recipe: {+ effects: [],+ overlays: [+ shapeOverlay({+ type: "shape",+ trackType: "graphics",+ timing: full,+ transform: transform(0.333, 0.5),+ content: {+ shapeType: "rectangle",+ width: 2,+ height: 1080,+ style: {+ fill: { type: "solid", color: "rgba(255,255,255,0.2)", opacity: bind("gridOpacity") },+ stroke: { color: "rgba(255,255,255,0)", width: 0, opacity: 0 },+ },+ },+ }),+ shapeOverlay({+ type: "shape",+ trackType: "graphics",+ timing: full,+ transform: transform(0.666, 0.5),+ content: {+ shapeType: "rectangle",+ width: 2,+ height: 1080,+ style: {+ fill: { type: "solid", color: "rgba(255,255,255,0.2)", opacity: bind("gridOpacity") },+ stroke: { color: "rgba(255,255,255,0)", width: 0, opacity: 0 },+ },+ },+ }),+ shapeOverlay({+ type: "shape",+ trackType: "graphics",+ timing: full,+ transform: transform(0.5, 0.333),+ content: {+ shapeType: "rectangle",+ width: 1920,+ height: 2,+ style: {+ fill: { type: "solid", color: "rgba(255,255,255,0.2)", opacity: bind("gridOpacity") },+ stroke: { color: "rgba(255,255,255,0)", width: 0, opacity: 0 },+ },+ },+ }),+ shapeOverlay({+ type: "shape",+ trackType: "graphics",+ timing: full,+ transform: transform(0.5, 0.666),+ content: {+ shapeType: "rectangle",+ width: 1920,+ height: 2,+ style: {+ fill: { type: "solid", color: "rgba(255,255,255,0.2)", opacity: bind("gridOpacity") },+ stroke: { color: "rgba(255,255,255,0)", width: 0, opacity: 0 },+ },+ },+ }),+ ],+ audioEffects: [],+ },+ },+ {+ id: "overlay-corner-brackets",+ name: "Corner Brackets",+ description: "Elegant corner frame markers for cinematic focus.",+ category: "overlay",+ thumbnailUrl: null,+ previewUrl: null,+ tags: ["overlay", "brackets", "frame"],+ supportedTargets: ["video", "image"],+ recipe: {+ effects: [],+ overlays: [+ shapeOverlay({+ type: "shape",+ trackType: "graphics",+ timing: full,+ transform: transform(0.08, 0.1, 1, 1, 0, 0, 0),+ content: {+ shapeType: "rectangle",+ width: 80,+ height: 80,+ style: {+ fill: { type: "none", opacity: 0 },+ stroke: { color: "rgba(255,255,255,0.6)", width: 3, opacity: 1 },+ },+ },+ }),+ shapeOverlay({+ type: "shape",+ trackType: "graphics",+ timing: full,+ transform: transform(0.92, 0.1, 1, 1, 0, 1, 0),+ content: {+ shapeType: "rectangle",+ width: 80,+ height: 80,+ style: {+ fill: { type: "none", opacity: 0 },+ stroke: { color: "rgba(255,255,255,0.6)", width: 3, opacity: 1 },+ },+ },+ }),+ shapeOverlay({+ type: "shape",+ trackType: "graphics",+ timing: full,+ transform: transform(0.08, 0.9, 1, 1, 0, 0, 1),+ content: {+ shapeType: "rectangle",+ width: 80,+ height: 80,+ style: {+ fill: { type: "none", opacity: 0 },+ stroke: { color: "rgba(255,255,255,0.6)", width: 3, opacity: 1 },+ },+ },+ }),+ shapeOverlay({+ type: "shape",+ trackType: "graphics",+ timing: full,+ transform: transform(0.92, 0.9, 1, 1, 0, 1, 1),+ content: {+ shapeType: "rectangle",+ width: 80,+ height: 80,+ style: {+ fill: { type: "none", opacity: 0 },+ stroke: { color: "rgba(255,255,255,0.6)", width: 3, opacity: 1 },+ },+ },+ }),+ ],+ audioEffects: [],+ },+ },+ {+ id: "text-subtitle-bar",+ name: "Subtitle Bar",+ description: "Bottom subtitle with dark backing for readability.",+ category: "text-effects",+ thumbnailUrl: null,+ previewUrl: null,+ tags: ["text", "subtitle", "caption"],+ supportedTargets: ["video", "image"],+ controls: [+ { id: "subtitle", label: "Subtitle", type: "text", defaultValue: "Your subtitle text here" },+ ],+ recipe: {+ effects: [],+ overlays: [+ shapeOverlay({+ type: "shape",+ trackType: "graphics",+ timing: full,+ transform: transform(0.5, 0.88),+ content: {+ shapeType: "rectangle",+ width: 1400,+ height: 64,+ style: {+ fill: { type: "solid", color: "rgba(0,0,0,0.7)", opacity: 1 },+ stroke: { color: "rgba(0,0,0,0)", width: 0, opacity: 0 },+ cornerRadius: 12,+ },+ },+ }),+ textOverlay({+ type: "text",+ trackType: "text",+ timing: full,+ transform: transform(0.5, 0.88),+ content: {+ text: "{control.subtitle}",+ style: { fontFamily: "Inter", fontSize: 28, color: "#ffffff", fontWeight: 600, textAlign: "center", verticalAlign: "middle", lineHeight: 1.1, letterSpacing: 0 },+ },+ }),+ ],+ audioEffects: [],+ },+ },+ {+ id: "text-quote-block",+ name: "Quote Block",+ description: "Centered quote with decorative marks.",+ category: "text-effects",+ thumbnailUrl: null,+ previewUrl: null,+ tags: ["text", "quote", "editorial"],+ supportedTargets: ["video", "image"],+ controls: [+ { id: "quote", label: "Quote", type: "text", defaultValue: "Create something worth sharing." },+ ],+ recipe: {+ effects: [],+ overlays: [+ textOverlay({+ type: "text",+ trackType: "text",+ timing: { kind: "intro", duration: 5 },+ transform: transform(0.5, 0.42),+ content: {+ text: "“",+ style: { fontFamily: "Inter", fontSize: 120, color: "rgba(255,255,255,0.2)", fontWeight: 900, textAlign: "center", verticalAlign: "middle", lineHeight: 0.6, letterSpacing: 0 },+ },+ }),+ textOverlay({+ type: "text",+ trackType: "text",+ timing: { kind: "intro", duration: 5 },+ transform: transform(0.5, 0.5),+ content: {+ text: "{control.quote}",+ style: { fontFamily: "Inter", fontSize: 36, color: "#ffffff", fontWeight: 500, textAlign: "center", verticalAlign: "middle", lineHeight: 1.4, letterSpacing: 0 },+ animation: { preset: "fade", inDuration: 0.6, outDuration: 0.4, params: { easing: "easeOutCubic" } },+ },+ }),+ ],+ audioEffects: [],+ },+ },+ {+ id: "color-teal-orange",+ name: "Teal & Orange",+ description: "Hollywood color grading — cool shadows, warm highlights.",+ category: "color",+ thumbnailUrl: null,+ previewUrl: null,+ tags: ["color", "teal", "orange", "hollywood"],+ supportedTargets: ["video", "image"],+ recipe: {+ effects: [+ { type: "contrast", params: { value: 0.1 } },+ { type: "saturation", params: { value: 0.12 } },+ { type: "brightness", params: { value: 0.02 } },+ ],+ overlays: [],+ audioEffects: [],+ },+ },+ {+ id: "color-monochrome",+ name: "Monochrome",+ description: "Clean black and white with lifted blacks.",+ category: "color",+ thumbnailUrl: null,+ previewUrl: null,+ tags: ["color", "monochrome", "black", "white"],+ supportedTargets: ["video", "image"],+ recipe: {+ effects: [+ { type: "saturation", params: { value: -1 } },+ { type: "contrast", params: { value: 0.15 } },+ { type: "brightness", params: { value: 0.04 } },+ ],+ overlays: [],+ audioEffects: [],+ },+ },+ {+ id: "glitch-datamosh",+ name: "Datamosh",+ description: "Heavy grain and color separation for chaotic energy.",+ category: "glitch",+ thumbnailUrl: null,+ previewUrl: null,+ tags: ["glitch", "datamosh", "chaos"],+ supportedTargets: ["video", "image"],+ recipe: {+ effects: [+ { type: "chromatic-aberration", params: { intensity: 8 } },+ { type: "film-grain", params: { intensity: 0.55, size: 3 } },+ { type: "contrast", params: { value: 0.2 } },+ ],+ overlays: [+ shapeOverlay({+ type: "shape",+ trackType: "graphics",+ timing: full,+ transform: transform(0.5, 0.4),+ keyframes: [+ { time: 0, property: "position.y", value: 0.12 },+ { time: 0.15, property: "position.y", value: 0.88 },+ { time: 0.3, property: "position.y", value: 0.25 },+ { time: 0.5, property: "position.y", value: 0.72 },+ { time: 0.7, property: "position.y", value: 0.4 },+ { time: 0.85, property: "position.y", value: 0.92 },+ { time: 1, property: "position.y", value: 0.15 },+ ],+ content: {+ shapeType: "rectangle",+ width: 1920,+ height: 16,+ style: {+ fill: { type: "solid", color: "rgba(255,0,100,0.08)", opacity: 1 },+ stroke: { color: "rgba(255,0,100,0)", width: 0, opacity: 0 },+ },+ },+ }),+ ],+ audioEffects: [],+ },+ },+ {+ id: "branding-end-card",+ name: "End Card",+ description: "Full outro card with name and call to action.",+ category: "branding",+ thumbnailUrl: null,+ previewUrl: null,+ tags: ["branding", "end card", "outro"],+ supportedTargets: ["video", "image"],+ controls: [+ { id: "channel", label: "Channel Name", type: "text", defaultValue: "Your Channel" },+ { id: "cta", label: "Call to Action", type: "text", defaultValue: "Subscribe for more" },+ ],+ recipe: {+ effects: [],+ overlays: [+ shapeOverlay({+ type: "shape",+ trackType: "graphics",+ timing: { kind: "outro", duration: 5 },+ transform: transform(0.5, 0.5),+ content: {+ shapeType: "rectangle",+ width: 1920,+ height: 1080,+ style: {+ fill: { type: "solid", color: "rgba(0,0,0,0.85)", opacity: 1 },+ stroke: { color: "rgba(0,0,0,0)", width: 0, opacity: 0 },+ },+ },+ }),+ textOverlay({+ type: "text",+ trackType: "text",+ timing: { kind: "outro", duration: 5 },+ transform: transform(0.5, 0.42),+ content: {+ text: "{control.channel}",+ style: { fontFamily: "Inter", fontSize: 56, color: "#ffffff", fontWeight: 800, textAlign: "center", verticalAlign: "middle", lineHeight: 1, letterSpacing: -1 },+ animation: { preset: "fade", inDuration: 0.5, outDuration: 0.3, params: { easing: "easeOutCubic" } },+ },+ }),+ textOverlay({+ type: "text",+ trackType: "text",+ timing: { kind: "outro", duration: 5 },+ transform: transform(0.5, 0.55),+ content: {+ text: "{control.cta}",+ style: { fontFamily: "Inter", fontSize: 24, color: "rgba(255,255,255,0.7)", fontWeight: 500, textAlign: "center", verticalAlign: "middle", lineHeight: 1, letterSpacing: 0.5 },+ animation: { preset: "fade", inDuration: 0.7, outDuration: 0.3, params: { easing: "easeOutCubic" } },+ },+ }),+ ],+ audioEffects: [],+ },+ },+ {+ id: "social-viewer-count",+ name: "Viewer Count",+ description: "Animated viewer/like counter badge.",+ category: "social",+ thumbnailUrl: null,+ previewUrl: null,+ tags: ["social", "viewers", "counter"],+ supportedTargets: ["video", "image"],+ controls: [+ { id: "count", label: "Count", type: "text", defaultValue: "1.2K watching" },+ ],+ recipe: {+ effects: [],+ overlays: [+ shapeOverlay({+ type: "shape",+ trackType: "graphics",+ timing: full,+ transform: transform(0.92, 0.94),+ content: {+ shapeType: "rectangle",+ width: 180,+ height: 36,+ style: {+ fill: { type: "solid", color: "rgba(0,0,0,0.65)", opacity: 1 },+ stroke: { color: "rgba(255,255,255,0.15)", width: 1, opacity: 1 },+ cornerRadius: 18,+ },+ },+ }),+ textOverlay({+ type: "text",+ trackType: "text",+ timing: full,+ transform: transform(0.92, 0.94),+ content: {+ text: "{control.count}",+ style: { fontFamily: "Inter", fontSize: 13, color: "rgba(255,255,255,0.9)", fontWeight: 600, textAlign: "center", verticalAlign: "middle", lineHeight: 1, letterSpacing: 0.3 },+ },+ }),+ ],+ audioEffects: [],+ },+ },+ {+ id: "retro-polaroid",+ name: "Polaroid",+ description: "White border frame with warm vintage tones.",+ category: "retro",+ thumbnailUrl: null,+ previewUrl: null,+ tags: ["retro", "polaroid", "frame"],+ supportedTargets: ["video", "image"],+ recipe: {+ effects: [+ { type: "brightness", params: { value: 0.03 } },+ { type: "saturation", params: { value: -0.06 } },+ { type: "contrast", params: { value: 0.05 } },+ ],+ overlays: [+ shapeOverlay({+ type: "shape",+ trackType: "graphics",+ timing: full,+ transform: transform(0.5, 0.5),+ content: {+ shapeType: "rectangle",+ width: 1700,+ height: 900,+ style: {+ fill: { type: "none", opacity: 0 },+ stroke: { color: "#f5f0e8", width: 40, opacity: 1 },+ },+ },+ }),+ shapeOverlay({+ type: "shape",+ trackType: "graphics",+ timing: full,+ transform: transform(0.5, 0.94),+ content: {+ shapeType: "rectangle",+ width: 1700,+ height: 80,+ style: {+ fill: { type: "solid", color: "#f5f0e8", opacity: 1 },+ stroke: { color: "#f5f0e8", width: 0, opacity: 0 },+ },+ },+ }),+ ],+ audioEffects: [],+ },+ },] as const;\ No newline at end of file