🎥 Make videos programmatically with React
remotion.dev/brand: Add Remotion update announcement video
JonnyBurger2e009b434539
diff --git a/bun.lock b/bun.lockindex bb02556bd1..d7ba6fc197 100644--- a/bun.lock+++ b/bun.lock@@ -110,12 +110,15 @@"@mediabunny/prores": "catalog:",},"devDependencies": {+ "@code-hike/lighter": "1.0.3","@remotion/captions": "workspace:*","@remotion/cli": "workspace:*","@remotion/effects": "workspace:*","@remotion/eslint-config-internal": "workspace:*","@remotion/fonts": "workspace:*","@remotion/google-fonts": "workspace:*",+ "@remotion/layout-utils": "workspace:*",+ "@remotion/light-leaks": "workspace:*","@remotion/mac-cursors": "workspace:*","@remotion/media": "workspace:*","@remotion/media-utils": "workspace:*",@@ -131,6 +134,7 @@"@types/opentype.js": "1.3.4","@types/styled-components": "5.1.34","@typescript/native-preview": "catalog:",+ "codehike": "1.0.4","eslint": "catalog:","mediabunny": "catalog:","opentype.js": "1.3.4",diff --git a/packages/brand/package.json b/packages/brand/package.jsonindex 1369ddaf50..744ad519a9 100644--- a/packages/brand/package.json+++ b/packages/brand/package.json@@ -19,11 +19,14 @@"@mediabunny/prores": "catalog:"},"devDependencies": {+ "@code-hike/lighter": "1.0.3","@remotion/cli": "workspace:*","@remotion/effects": "workspace:*","@remotion/eslint-config-internal": "workspace:*","@remotion/fonts": "workspace:*","@remotion/google-fonts": "workspace:*",+ "@remotion/layout-utils": "workspace:*",+ "@remotion/light-leaks": "workspace:*","@remotion/mac-cursors": "workspace:*","@remotion/media": "workspace:*","@remotion/media-utils": "workspace:*",@@ -40,6 +43,7 @@"@types/opentype.js": "1.3.4","@types/styled-components": "5.1.34","@typescript/native-preview": "catalog:",+ "codehike": "1.0.4","eslint": "catalog:","mediabunny": "catalog:","opentype.js": "1.3.4",diff --git a/packages/brand/src/Root.tsx b/packages/brand/src/Root.tsxindex 1dec8936ab..650af3d44f 100644--- a/packages/brand/src/Root.tsx+++ b/packages/brand/src/Root.tsx@@ -3,6 +3,7 @@ import {ThreeDCheck} from './3DCheck';import {AnimatedBanner} from './animated-logo/AnimatedBanner';import {AnimatedLogo} from './animated-logo/AnimatedLogo';import {AnimatedLogoStringer} from './animated-logo/AnimatedLogoStinger';+import {WhatsNewInRemotion} from './announcements/whats-new-in-remotion/Root';import {AppIcons} from './AppIcons';import {ApplicationRenderButton,@@ -618,6 +619,9 @@ export const RemotionRoot: React.FC = () => {/></Folder><Folder name="SocialMediaAnnouncements">+ <Folder name="whats-new-in-remotion">+ <WhatsNewInRemotion />+ </Folder><Folder name="effect-showcases"><Compositionid="corner-pin-effect-showcase"diff --git a/packages/brand/src/announcements/whats-new-in-remotion/AnimatedList.tsx b/packages/brand/src/announcements/whats-new-in-remotion/AnimatedList.tsxnew file mode 100644index 0000000000..1076f48bbd--- /dev/null+++ b/packages/brand/src/announcements/whats-new-in-remotion/AnimatedList.tsx@@ -0,0 +1,93 @@+import {Audio} from '@remotion/media';+import {+ AbsoluteFill,+ Sequence,+ interpolate,+ spring,+ useCurrentFrame,+ useVideoConfig,+} from 'remotion';+import {assetUrl} from './assets';++export type ListItem = {+ label: string;+ /** Frame at which item appears. Use -1 for immediately visible (no animation, no sound). */+ appearFrame: number;+};++type AnimatedListProps = {+ title: string;+ items: ListItem[];+};++export const AnimatedList: React.FC<AnimatedListProps> = ({title, items}) => {+ const frame = useCurrentFrame();+ const {fps} = useVideoConfig();++ return (+ <AbsoluteFill+ style={{+ backgroundColor: 'white',+ flexDirection: 'column',+ display: 'flex',+ padding: '0 40px',+ }}+ >+ <div+ style={{+ flex: 1,+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'center',+ fontFamily: 'GT Planar',+ fontSize: 42,+ fontWeight: 700,+ color: '#111',+ borderBottom: '1px solid #e0e0e0',+ }}+ >+ {title}+ </div>+ {items.map((item, i) => {+ const isImmediate = item.appearFrame < 0;+ const progress = isImmediate+ ? 1+ : spring({+ frame: frame - item.appearFrame,+ fps,+ config: {damping: 200},+ durationInFrames: 12,+ });+ const translateY = isImmediate+ ? 0+ : interpolate(progress, [0, 1], [20, 0]);++ return (+ <div+ key={item.label}+ style={{+ flex: 1,+ display: 'flex',+ alignItems: 'center',+ fontFamily: 'GT Planar',+ fontSize: 34,+ fontWeight: 500,+ color: '#333',+ opacity: progress,+ transform: `translateY(${translateY}px)`,+ borderBottom: i < items.length - 1 ? '1px solid #e0e0e0' : 'none',+ paddingLeft: 20,+ }}+ >+ {!isImmediate && (+ <Sequence from={item.appearFrame} layout="none">+ <Audio src={assetUrl('list-item-sfx.m4a')} volume={0.8} />+ </Sequence>+ )}+ {item.label}+ </div>+ );+ })}+ </AbsoluteFill>+ );+};diff --git a/packages/brand/src/announcements/whats-new-in-remotion/CodeBRoll.tsx b/packages/brand/src/announcements/whats-new-in-remotion/CodeBRoll.tsxnew file mode 100644index 0000000000..09e278c6f2--- /dev/null+++ b/packages/brand/src/announcements/whats-new-in-remotion/CodeBRoll.tsx@@ -0,0 +1,108 @@+import {getThemeColors} from '@code-hike/lighter';+import {highlight} from 'codehike/code';+import React, {useEffect, useState} from 'react';+import {+ AbsoluteFill,+ Sequence,+ interpolate,+ useCurrentFrame,+ useVideoConfig,+} from 'remotion';+import type {ThemeColors} from './calculate-metadata/theme';+import {ThemeProvider} from './calculate-metadata/theme';+import {CodeTransition} from './CodeTransition';++const THEME = 'github-light';++type CodeBRollProps = {+ readonly code: string;+ /** Previous code for transition animation. Default: none */+ readonly previousCode?: string;+ /** Duration in seconds. Default: 4 */+ readonly durationSeconds?: number;+ /** Fade in/out duration in seconds. Default: 0.2 */+ readonly fadeDuration?: number;+ /** Language for syntax highlighting. Default: "tsx" */+ readonly lang?: string;+ /** Top explainer text. Default: "" */+ readonly topExplainer?: string;+};++export const CodeBRoll: React.FC<CodeBRollProps> = ({+ code,+ previousCode,+ durationSeconds = 4,+ fadeDuration = 0.2,+ lang = 'tsx',+ topExplainer = '',+}) => {+ const frame = useCurrentFrame();+ const {fps} = useVideoConfig();++ const duration = Math.round(durationSeconds * fps);+ const fade = fadeDuration * fps;++ const opacity = interpolate(+ frame,+ [0, fade, duration - fade, duration],+ [0, 1, 1, 0],+ {extrapolateLeft: 'clamp', extrapolateRight: 'clamp'},+ );++ const [data, setData] = useState<{+ highlighted: Awaited<ReturnType<typeof highlight>>;+ previousHighlighted: Awaited<ReturnType<typeof highlight>> | null;+ themeColors: ThemeColors;+ } | null>(null);++ useEffect(() => {+ const promises: Promise<unknown>[] = [+ highlight({value: code, lang, meta: ''}, THEME),+ getThemeColors(THEME),+ ];+ if (previousCode) {+ promises.push(highlight({value: previousCode, lang, meta: ''}, THEME));+ }++ Promise.all(promises).then((results) => {+ setData({+ highlighted: results[0] as Awaited<ReturnType<typeof highlight>>,+ themeColors: results[1] as ThemeColors,+ previousHighlighted: results[2]+ ? (results[2] as Awaited<ReturnType<typeof highlight>>)+ : null,+ });+ });+ }, [code, previousCode, lang]);++ if (!data) return null;++ const transitionDelay = data.previousHighlighted ? Math.round(fps) : 0;++ return (+ <AbsoluteFill style={{opacity}}>+ <ThemeProvider themeColors={data.themeColors}>+ <AbsoluteFill style={{backgroundColor: data.themeColors.background}}>+ {data.previousHighlighted &&+ transitionDelay > 0 &&+ frame < transitionDelay && (+ <CodeTransition+ previousCode={null}+ currentCode={data.previousHighlighted}+ nextCode={null}+ topExplainerContent={topExplainer}+ />+ )}+ <Sequence from={transitionDelay} layout="none">+ <CodeTransition+ previousCode={data.previousHighlighted}+ currentCode={data.highlighted}+ nextCode={null}+ topExplainerContent={topExplainer}+ />+ </Sequence>+ </AbsoluteFill>+ </ThemeProvider>+ </AbsoluteFill>+ );+};diff --git a/packages/brand/src/announcements/whats-new-in-remotion/CodeTransition.tsx b/packages/brand/src/announcements/whats-new-in-remotion/CodeTransition.tsxnew file mode 100644index 0000000000..8968612d05--- /dev/null+++ b/packages/brand/src/announcements/whats-new-in-remotion/CodeTransition.tsx@@ -0,0 +1,186 @@+import type {AnnotationHandler, HighlightedCode} from 'codehike/code';+import {Pre} from 'codehike/code';+import {+ calculateTransitions,+ getStartingSnapshot,+} from 'codehike/utils/token-transitions';+import React, {useLayoutEffect, useMemo} from 'react';+import {+ AbsoluteFill,+ continueRender,+ delayRender,+ Easing,+ interpolate,+ useCurrentFrame,+ useVideoConfig,+} from 'remotion';+import {callout} from './annotations/Callout';+import {errorInline, errorMessage} from './annotations/Error';+import {tokenTransitions} from './annotations/InlineToken';+import {getTextDimensions} from './calculate-metadata/get-text-dimensions';+import {fontFamily, fontSize, lineHeight, tabSize} from './code-font';+import {applyStyle} from './code-utils';+import {PADDING_X, TOP_EXPLAINER_HEIGHT, TopExplainer} from './TopExplainer';++export function CodeTransition({+ previousCode,+ currentCode,+ nextCode,+ topExplainerContent,+}: {+ readonly previousCode: HighlightedCode | null;+ readonly currentCode: HighlightedCode;+ readonly nextCode: HighlightedCode | null;+ readonly topExplainerContent: React.ReactNode;+}) {+ const frame = useCurrentFrame();+ const {height, durationInFrames, width} = useVideoConfig();++ const previousRef = React.useRef<HTMLPreElement>(null);+ const currentRef = React.useRef<HTMLPreElement>(null);+ const nextRef = React.useRef<HTMLPreElement>(null);++ const [handle] = React.useState(() => delayRender());++ const prevCode: HighlightedCode = useMemo(() => {+ return previousCode || {...currentCode, tokens: [], annotations: []};+ }, [currentCode, previousCode]);++ const nexCode: HighlightedCode = useMemo(() => {+ return nextCode || {...currentCode, tokens: [], annotations: []};+ }, [currentCode, nextCode]);++ const code = useMemo(() => {+ return currentCode;+ }, [currentCode]);++ const progress = ({delay}: {delay: number}) => {+ return interpolate(frame, [delay, delay + 7], [0, 1], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ easing: Easing.in(Easing.ease),+ });+ };++ const endProgress = interpolate(+ frame,+ [durationInFrames - 7, durationInFrames - 1],+ [0, 1],+ {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ easing: Easing.out(Easing.ease),+ },+ );++ useLayoutEffect(() => {+ const oldSnapshot = getStartingSnapshot(previousRef.current!);++ const transitionFromPrevious = calculateTransitions(+ currentRef.current!,+ oldSnapshot,+ );++ transitionFromPrevious.forEach(({element, keyframes, options}) => {+ if (endProgress === 0) {+ applyStyle({+ element,+ keyframes,+ progress: progress({delay: options.fill === 'both' ? 7 : 0}),+ });+ }+ });++ const transitionToNext = calculateTransitions(+ currentRef.current!,+ getStartingSnapshot(nextRef.current!),+ );++ transitionToNext.forEach(({element, keyframes, options}) => {+ if (options.fill === 'both' && endProgress > 0) {+ applyStyle({+ element,+ keyframes: {+ opacity: keyframes.opacity+ ? (keyframes.opacity.slice().reverse() as [number, number])+ : undefined,+ },+ progress: endProgress,+ });+ }+ });+ continueRender(handle);+ });++ const handlers: AnnotationHandler[] = useMemo(() => {+ return [tokenTransitions, callout, errorInline, errorMessage];+ }, []);++ const oldDimensions = getTextDimensions(prevCode.code);+ const newDimensions = getTextDimensions(code.code);+ const interpolatedHeight = interpolate(+ progress({delay: 0}),+ [0, 1],+ [oldDimensions.height, newDimensions.height],+ );+ const paddingY =+ (height - interpolatedHeight) / 2 - (TOP_EXPLAINER_HEIGHT / 3) * 2;++ const style: React.CSSProperties = useMemo(() => {+ return {+ position: 'relative',+ fontSize,+ lineHeight,+ fontFamily,+ tabSize,+ marginTop: 0,+ marginBottom: 0,+ };+ }, []);++ const padX = width > 1044 ? PADDING_X * 2.5 : PADDING_X;++ return (+ <AbsoluteFill>+ <TopExplainer>{topExplainerContent}</TopExplainer>+ <div+ style={{+ flex: 1,+ position: 'relative',+ }}+ >+ <AbsoluteFill+ style={{+ paddingTop: paddingY,+ paddingLeft: padX,+ opacity: 0,+ }}+ >+ <Pre+ ref={previousRef}+ code={prevCode}+ handlers={handlers}+ style={style}+ />+ </AbsoluteFill>+ <AbsoluteFill+ style={{+ paddingTop: paddingY,+ paddingLeft: padX,+ }}+ >+ <Pre ref={currentRef} code={code} handlers={handlers} style={style} />+ </AbsoluteFill>+ <AbsoluteFill+ style={{+ paddingTop: paddingY,+ paddingLeft: padX,+ opacity: 0,+ }}+ >+ <Pre ref={nextRef} code={nexCode} handlers={handlers} style={style} />+ </AbsoluteFill>+ </div>+ </AbsoluteFill>+ );+}diff --git a/packages/brand/src/announcements/whats-new-in-remotion/CodeTransitionDemo.tsx b/packages/brand/src/announcements/whats-new-in-remotion/CodeTransitionDemo.tsxnew file mode 100644index 0000000000..b7df1a3847--- /dev/null+++ b/packages/brand/src/announcements/whats-new-in-remotion/CodeTransitionDemo.tsx@@ -0,0 +1,71 @@+import {getThemeColors} from '@code-hike/lighter';+import {highlight} from 'codehike/code';+import React, {useEffect, useState} from 'react';+import {AbsoluteFill} from 'remotion';+import type {ThemeColors} from './calculate-metadata/theme';+import {ThemeProvider} from './calculate-metadata/theme';+import {CodeTransition} from './CodeTransition';++const CODE_BEFORE = `+import { LightLeak } from "@remotion/light-leaks";++<TransitionSeries>+ <TransitionSeries.Sequence durationInFrames={60}>+ <SceneA />+ </TransitionSeries.Sequence>+ <TransitionSeries.Sequence durationInFrames={60}>+ <SceneB />+ </TransitionSeries.Sequence>+</TransitionSeries>+`.trim();++const CODE_AFTER = `+import { LightLeak } from "@remotion/light-leaks";++<TransitionSeries>+ <TransitionSeries.Sequence durationInFrames={60}>+ <SceneA />+ </TransitionSeries.Sequence>+ <TransitionSeries.Overlay durationInFrames={15}>+ <LightLeak seed={4} />+ </TransitionSeries.Overlay>+ <TransitionSeries.Sequence durationInFrames={60}>+ <SceneB />+ </TransitionSeries.Sequence>+</TransitionSeries>+`.trim();++const THEME = 'github-light';++export const CodeTransitionDemo: React.FC = () => {+ const [data, setData] = useState<{+ before: Awaited<ReturnType<typeof highlight>>;+ after: Awaited<ReturnType<typeof highlight>>;+ themeColors: ThemeColors;+ } | null>(null);++ useEffect(() => {+ Promise.all([+ highlight({value: CODE_BEFORE, lang: 'tsx', meta: ''}, THEME),+ highlight({value: CODE_AFTER, lang: 'tsx', meta: ''}, THEME),+ getThemeColors(THEME),+ ]).then(([before, after, themeColors]) => {+ setData({before, after, themeColors});+ });+ }, []);++ if (!data) return null;++ return (+ <ThemeProvider themeColors={data.themeColors}>+ <AbsoluteFill style={{backgroundColor: data.themeColors.background}}>+ <CodeTransition+ previousCode={data.before}+ currentCode={data.after}+ nextCode={null}+ topExplainerContent="Adding a Light Leak transition"+ />+ </AbsoluteFill>+ </ThemeProvider>+ );+};diff --git a/packages/brand/src/announcements/whats-new-in-remotion/Composition.tsx b/packages/brand/src/announcements/whats-new-in-remotion/Composition.tsxnew file mode 100644index 0000000000..c9ea2026f3--- /dev/null+++ b/packages/brand/src/announcements/whats-new-in-remotion/Composition.tsx@@ -0,0 +1,163 @@+import {LightLeak} from '@remotion/light-leaks';+import {Audio} from '@remotion/media';+import {TransitionSeries} from '@remotion/transitions';+import {AbsoluteFill, Sequence} from 'remotion';+import {z} from 'zod';+import {Scene1} from './Scene1';+import {Scene2} from './Scene2';+import {Scene3} from './Scene3';+import {Scene4} from './Scene4';+import {Scene5} from './Scene5';+import {Scene6} from './Scene6';+import {Scene7} from './Scene7';+import {Scene8} from './Scene8';+import {Scene9} from './Scene9';+import {Scene10} from './Scene10';+import {Scene11} from './Scene11';++export const MyCompositionSchema = z.object({+ platform: z.enum(['youtube', 'x', 'linkedin']),+});++export type MyCompositionProps = z.infer<typeof MyCompositionSchema>;++export const VIDEO_FILES = [+ 'whats1.mov',+ 'whats2.mov',+ 'whats3.mov',+ 'whats4.mov',+ 'whats5.mov',+ 'whats6.mov',+ 'whats7.mov',+ 'whats8.mov',+ 'whats9.mov',+ 'whats10.mov',+ 'whats11.mov',+];++// Leading silence end (seconds) and trailing silence start (seconds) for each video+// Detected via ffmpeg silencedetect using adaptive per-video EBU R128 loudness threshold+export const SILENCES: Record<+ string,+ {leadingEnd: number; trailingStart: number}+> = {+ 'whats1.mov': {leadingEnd: 0.9, trailingStart: 4.67},+ 'whats2.mov': {leadingEnd: 6.37, trailingStart: 31.8},+ 'whats3.mov': {leadingEnd: 2.3, trailingStart: 44.5},+ 'whats4.mov': {leadingEnd: 1.5, trailingStart: 38.77},+ 'whats5.mov': {leadingEnd: 3.04, trailingStart: 25.31},+ 'whats6.mov': {leadingEnd: 2.32, trailingStart: 31.64},+ 'whats7.mov': {leadingEnd: 4.21, trailingStart: 39.27},+ 'whats8.mov': {leadingEnd: 2.7, trailingStart: 29},+ 'whats9.mov': {leadingEnd: 1.5, trailingStart: 18.5},+ 'whats10.mov': {leadingEnd: 1.84, trailingStart: 15.85},+ 'whats11.mov': {leadingEnd: 3.27, trailingStart: 28},+};++export const MyComposition: React.FC<MyCompositionProps> = ({platform}) => {+ return (+ <AbsoluteFill style={{backgroundColor: 'black'}}>+ <TransitionSeries>+ <TransitionSeries.Sequence+ durationInFrames={114}+ premountFor={30}+ name="Intro"+ >+ <Scene1 />+ </TransitionSeries.Sequence>+ <TransitionSeries.Sequence+ durationInFrames={763}+ premountFor={30}+ name="Light Leaks"+ >+ <Scene2 />+ </TransitionSeries.Sequence>+ <TransitionSeries.Overlay durationInFrames={15}>+ <AbsoluteFill>+ <LightLeak seed={14} style={{opacity: 0.7}} />+ </AbsoluteFill>+ <AbsoluteFill>+ <LightLeak seed={10} style={{opacity: 0.7}} />+ </AbsoluteFill>+ <Sequence name="Light leak whoosh" layout="none">+ <Audio src="https://remotion.media/whoosh.wav" volume={0.1} />+ </Sequence>+ </TransitionSeries.Overlay>+ <TransitionSeries.Sequence+ durationInFrames={1266}+ premountFor={30}+ name="Sound Effects"+ >+ <Scene3 />+ </TransitionSeries.Sequence>+ <TransitionSeries.Overlay durationInFrames={15}>+ <AbsoluteFill>+ <LightLeak seed={8} style={{opacity: 0.7}} />+ </AbsoluteFill>+ <AbsoluteFill>+ <LightLeak seed={19} style={{opacity: 0.7}} />+ </AbsoluteFill>+ <Sequence name="Light leak whoosh" layout="none">+ <Audio src="https://remotion.media/whoosh.wav" volume={0.1} />+ </Sequence>+ </TransitionSeries.Overlay>+ <TransitionSeries.Sequence+ durationInFrames={1119}+ premountFor={30}+ name="Render on Vercel"+ >+ <Scene4 />+ </TransitionSeries.Sequence>+ <TransitionSeries.Sequence+ durationInFrames={669}+ premountFor={30}+ name="New Skills"+ >+ <Scene5 />+ </TransitionSeries.Sequence>+ <TransitionSeries.Sequence+ durationInFrames={881}+ premountFor={30}+ name="Web Renderer Progress"+ >+ <Scene6 />+ </TransitionSeries.Sequence>+ <TransitionSeries.Sequence+ durationInFrames={1053}+ premountFor={30}+ name="Work better with Agents"+ >+ <Scene7 />+ </TransitionSeries.Sequence>+ <TransitionSeries.Sequence+ durationInFrames={789}+ premountFor={30}+ name="Rspack"+ >+ <Scene8 />+ </TransitionSeries.Sequence>+ <TransitionSeries.Sequence+ durationInFrames={510}+ premountFor={30}+ name="Preview: Visual Mode"+ >+ <Scene9 />+ </TransitionSeries.Sequence>+ <TransitionSeries.Sequence+ durationInFrames={421}+ premountFor={30}+ name="Mediabunny"+ >+ <Scene10 />+ </TransitionSeries.Sequence>+ <TransitionSeries.Sequence+ durationInFrames={742}+ premountFor={30}+ name="Outro"+ >+ <Scene11 platform={platform} />+ </TransitionSeries.Sequence>+ </TransitionSeries>+ </AbsoluteFill>+ );+};diff --git a/packages/brand/src/announcements/whats-new-in-remotion/EndCard.tsx b/packages/brand/src/announcements/whats-new-in-remotion/EndCard.tsxnew file mode 100644index 0000000000..383bd13710--- /dev/null+++ b/packages/brand/src/announcements/whats-new-in-remotion/EndCard.tsx@@ -0,0 +1,197 @@+import React from 'react';+import {+ AbsoluteFill,+ Img,+ interpolate,+ spring,+ useCurrentFrame,+ useVideoConfig,+} from 'remotion';+import {assetUrl} from './assets';++const AVATAR = assetUrl('remotion-avatar.png');+const FOLLOW_BUTTON_HEIGHT = 120;+const SPACE_BETWEEN = 24;+const FONT: React.CSSProperties = {+ fontFamily: 'GT Planar',+ fontWeight: 700,+};++export type EndCardPlatform = 'youtube' | 'x' | 'linkedin';++const CHANNELS: {platform: EndCardPlatform | 'instagram'; label: string}[] = [+ {platform: 'youtube', label: '@remotion_dev'},+ {platform: 'x', label: '@remotion'},+ {platform: 'instagram', label: '@remotion'},+ {platform: 'linkedin', label: 'Remotion'},+];++const CTA_TEXT: Record<EndCardPlatform, string> = {+ youtube: 'Subscribe',+ x: 'Follow',+ linkedin: 'Follow',+};++const YouTubeIcon: React.FC<{readonly height: number}> = ({height}) => (+ <svg height={height} viewBox="0 0 576 512">+ <path+ fill="black"+ d="M549.655 124.083c-6.281-23.65-24.787-42.276-48.284-48.597C458.781 64 288 64 288 64S117.22 64 74.629 75.486c-23.497 6.322-42.003 24.947-48.284 48.597-11.412 42.867-11.412 132.305-11.412 132.305s0 89.438 11.412 132.305c6.281 23.65 24.787 41.5 48.284 47.821C117.22 448 288 448 288 448s170.78 0 213.371-11.486c23.497-6.321 42.003-24.171 48.284-47.821 11.412-42.867 11.412-132.305 11.412-132.305s0-89.438-11.412-132.305zm-317.51 213.508V175.185l142.739 81.205-142.739 81.201z"+ />+ </svg>+);++const XIcon: React.FC<{readonly height: number}> = ({height}) => (+ <svg height={height} viewBox="0 0 512 512">+ <path+ fill="black"+ d="M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z"+ />+ </svg>+);++const InstagramIcon: React.FC<{readonly height: number}> = ({height}) => (+ <svg height={height} viewBox="0 0 448 512">+ <path+ fill="black"+ d="M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z"+ />+ </svg>+);++const LinkedInIcon: React.FC<{readonly height: number}> = ({height}) => (+ <svg height={height} viewBox="0 0 448 512">+ <path+ fill="black"+ d="M100.28 448H7.4V148.9h92.88zM53.79 108.1C24.09 108.1 0 83.5 0 53.8a53.79 53.79 0 0 1 107.58 0c0 29.7-24.1 54.3-53.79 54.3zM447.9 448h-92.68V302.4c0-34.7-.7-79.2-48.29-79.2-48.29 0-55.69 37.7-55.69 76.7V448h-92.78V148.9h89.08v40.8h1.3c12.4-23.5 42.69-48.3 87.88-48.3 94 0 111.28 61.9 111.28 142.3V448z"+ />+ </svg>+);++const PlatformIcon: React.FC<{+ readonly platform: string;+ readonly height: number;+}> = ({platform, height}) => {+ if (platform === 'youtube') return <YouTubeIcon height={height} />;+ if (platform === 'x') return <XIcon height={height} />;+ if (platform === 'instagram') return <InstagramIcon height={height} />;+ if (platform === 'linkedin') return <LinkedInIcon height={height} />;+ return null;+};++export const EndCard: React.FC<{readonly platform: EndCardPlatform}> = ({+ platform,+}) => {+ const frame = useCurrentFrame();+ const {fps} = useVideoConfig();++ const slideDelay = Math.round(1.2 * fps) + 20;+ const slideDuration = 30;++ const slideUp = spring({+ fps,+ frame,+ config: {damping: 200},+ delay: slideDelay,+ durationInFrames: slideDuration,+ });++ const otherChannels = CHANNELS.filter((c) => c.platform !== platform);++ return (+ <AbsoluteFill+ style={{+ backgroundColor: 'white',+ justifyContent: 'center',+ padding: 60,+ }}+ >+ <div+ style={{+ transform: `translateY(${interpolate(slideUp, [0, 1], [200, 0])}px)`,+ }}+ >+ {/* Avatar + CTA button */}+ <div style={{display: 'flex', alignItems: 'center'}}>+ <Img+ src={AVATAR}+ style={{+ height: FOLLOW_BUTTON_HEIGHT,+ width: FOLLOW_BUTTON_HEIGHT,+ borderRadius: '50%',+ boxShadow: '0px 0px 20px rgba(0, 0, 0, 0.2)',+ }}+ />+ <div style={{width: SPACE_BETWEEN}} />+ <div+ style={{+ height: FOLLOW_BUTTON_HEIGHT,+ borderRadius: FOLLOW_BUTTON_HEIGHT / 2,+ width: 340,+ backgroundColor: 'black',+ color: 'white',+ display: 'flex',+ justifyContent: 'center',+ alignItems: 'center',+ fontSize: 44,+ ...FONT,+ fontWeight: 400,+ }}+ >+ {CTA_TEXT[platform]}+ </div>+ </div>+ {/* Other channel rows */}+ <div style={{height: 60}} />+ {otherChannels.map((channel, i) => {+ const opacity = spring({+ fps,+ frame,+ config: {damping: 200},+ delay:+ slideDelay ++ ((otherChannels.length - 1 - i) / otherChannels.length) *+ (slideDuration - 15),+ durationInFrames: 15,+ });++ return (+ <div+ key={channel.platform}+ style={{+ display: 'flex',+ alignItems: 'center',+ paddingTop: 16,+ paddingBottom: 16,+ opacity,+ }}+ >+ <div+ style={{+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'center',+ height: 50,+ width: FOLLOW_BUTTON_HEIGHT,+ }}+ >+ <PlatformIcon platform={channel.platform} height={50} />+ </div>+ <div style={{width: SPACE_BETWEEN}} />+ <div+ style={{+ fontSize: 42,+ ...FONT,+ fontWeight: 500,+ color: 'black',+ }}+ >+ {channel.label}+ </div>+ </div>+ );+ })}+ </div>+ </AbsoluteFill>+ );+};diff --git a/packages/brand/src/announcements/whats-new-in-remotion/ImageBRoll.tsx b/packages/brand/src/announcements/whats-new-in-remotion/ImageBRoll.tsxnew file mode 100644index 0000000000..dbcdf487f7--- /dev/null+++ b/packages/brand/src/announcements/whats-new-in-remotion/ImageBRoll.tsx@@ -0,0 +1,73 @@+import {+ AbsoluteFill,+ Img,+ interpolate,+ useCurrentFrame,+ useVideoConfig,+} from 'remotion';+import {assetUrl} from './assets';++type ImageBRollProps = {+ /** Filename in public/ */+ src: string;+ /** Duration in seconds. Default: 4 */+ durationSeconds?: number;+ /** Fade in/out duration in seconds. Default: 0.2 */+ fadeDuration?: number;+ /** Scale factor for Ken Burns zoom. Default: 1.15 */+ scale?: number;+ /** Pan translateY range in percent. Default: -15 */+ panY?: number;+};++export const ImageBRoll: React.FC<ImageBRollProps> = ({+ src,+ durationSeconds = 4,+ fadeDuration = 0.2,+ scale = 1.15,+ panY = -15,+}) => {+ const frame = useCurrentFrame();+ const {fps} = useVideoConfig();++ const duration = Math.round(durationSeconds * fps);+ const fade = fadeDuration * fps;++ const opacity = interpolate(+ frame,+ [0, fade, duration - fade, duration],+ [0, 1, 1, 0],+ {extrapolateLeft: 'clamp', extrapolateRight: 'clamp'},+ );++ const currentScale = interpolate(frame, [0, duration], [1, scale], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ });++ const translateY = interpolate(frame, [0, duration], [0, panY], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ });++ return (+ <AbsoluteFill+ style={{+ backgroundColor: 'white',+ justifyContent: 'center',+ alignItems: 'center',+ opacity,+ }}+ >+ <Img+ src={assetUrl(src)}+ style={{+ height: '100%',+ objectFit: 'contain',+ transformOrigin: 'top center',+ transform: `scale(${currentScale}) translateY(${translateY}%)`,+ }}+ />+ </AbsoluteFill>+ );+};diff --git a/packages/brand/src/announcements/whats-new-in-remotion/LightLeakGrid.tsx b/packages/brand/src/announcements/whats-new-in-remotion/LightLeakGrid.tsxnew file mode 100644index 0000000000..c3a90e27cf--- /dev/null+++ b/packages/brand/src/announcements/whats-new-in-remotion/LightLeakGrid.tsx@@ -0,0 +1,51 @@+import {LightLeak} from '@remotion/light-leaks';+import {AbsoluteFill, Series} from 'remotion';++const SLOTS: {+ hueShift: number;+ seeds: [number, number, number];+ style: React.CSSProperties;+}[] = [+ {+ hueShift: 0,+ seeds: [1, 3, 5],+ style: {width: '50%', height: '50%', top: 0, left: 0},+ },+ {+ hueShift: 200,+ seeds: [7, 9, 11],+ style: {width: '50%', height: '50%', top: 0, left: '50%'},+ },+ {+ hueShift: 120,+ seeds: [13, 15, 17],+ style: {width: '50%', height: '50%', top: '50%', left: 0},+ },+ {+ hueShift: 300,+ seeds: [21, 23, 25],+ style: {width: '50%', height: '50%', top: '50%', left: '50%'},+ },+];++export const LightLeakGrid: React.FC<{durationInFrames: number}> = ({+ durationInFrames,+}) => {+ const variationDuration = Math.ceil(durationInFrames / 3);++ return (+ <AbsoluteFill style={{backgroundColor: 'black'}}>+ {SLOTS.map((slot) => (+ <AbsoluteFill key={slot.hueShift} style={slot.style}>+ <Series>+ {slot.seeds.map((seed) => (+ <Series.Sequence key={seed} durationInFrames={variationDuration}>+ <LightLeak seed={seed} hueShift={slot.hueShift} />+ </Series.Sequence>+ ))}+ </Series>+ </AbsoluteFill>+ ))}+ </AbsoluteFill>+ );+};diff --git a/packages/brand/src/announcements/whats-new-in-remotion/LowerThird.tsx b/packages/brand/src/announcements/whats-new-in-remotion/LowerThird.tsxnew file mode 100644index 0000000000..0439c3a19a--- /dev/null+++ b/packages/brand/src/announcements/whats-new-in-remotion/LowerThird.tsx@@ -0,0 +1,69 @@+import React from 'react';+import {+ AbsoluteFill,+ interpolate,+ spring,+ useCurrentFrame,+ useVideoConfig,+} from 'remotion';+import {BLUE} from './NumberedChapter';++type LowerThirdProps = {+ readonly name: string;+ readonly title: string;+ readonly durationInFrames?: number;+};++export const LowerThird: React.FC<LowerThirdProps> = ({+ name,+ title,+ durationInFrames,+}) => {+ const {fps} = useVideoConfig();+ const frame = useCurrentFrame();++ const entry = spring({+ fps,+ frame,+ config: {damping: 200},+ });++ const exit = durationInFrames+ ? spring({+ fps,+ frame: frame - durationInFrames + 15,+ config: {damping: 200},+ })+ : 0;++ const progress = entry - exit;++ return (+ <AbsoluteFill+ style={{+ padding: 70,+ justifyContent: 'flex-end',+ alignItems: 'flex-start',+ }}+ >+ <div+ style={{+ backgroundColor: 'white',+ fontFamily: 'GT Planar',+ fontFeatureSettings: "'ss03' 1",+ padding: '24px 44px',+ borderRadius: 18,+ boxShadow: '0 0 30px rgba(0, 0, 0, 0.1)',+ transform: `translateY(${interpolate(progress, [0, 1], [400, 0])}px) rotateZ(${interpolate(progress, [0, 1], [-Math.PI * 0.03, 0])}rad)`,+ }}+ >+ <div style={{fontSize: 50, fontWeight: 700, color: '#111'}}>{name}</div>+ <div+ style={{fontSize: 36, fontWeight: 400, marginTop: -12, color: BLUE}}+ >+ {title}+ </div>+ </div>+ </AbsoluteFill>+ );+};diff --git a/packages/brand/src/announcements/whats-new-in-remotion/NumberedChapter.tsx b/packages/brand/src/announcements/whats-new-in-remotion/NumberedChapter.tsxnew file mode 100644index 0000000000..5066bcaf8f--- /dev/null+++ b/packages/brand/src/announcements/whats-new-in-remotion/NumberedChapter.tsx@@ -0,0 +1,111 @@+import {Audio} from '@remotion/media';+import {+ AbsoluteFill,+ continueRender,+ delayRender,+ Sequence,+ spring,+ useCurrentFrame,+ useVideoConfig,+} from 'remotion';+import {assetUrl} from './assets';++export const BLUE = '#4290f5';++let fontLoaded = false;++const loadFont = async () => {+ if (fontLoaded) return;+ const handle = delayRender();+ const face = new FontFace(+ 'Variable',+ `url(${assetUrl('variable.woff2')}) format('woff2')`,+ );+ await face.load();+ fontLoaded = true;+ // eslint-disable-next-line @typescript-eslint/no-explicit-any+ (document.fonts as any).add(face);+ continueRender(handle);+};++loadFont();++type NumberedChapterProps = {+ chapterNumber: number;+ chapterTitle: string;+};++export const NumberedChapter: React.FC<NumberedChapterProps> = ({+ chapterNumber,+ chapterTitle,+}) => {+ const {fps} = useVideoConfig();+ const frame = useCurrentFrame();++ const delay = fps;++ const jump1 = spring({+ fps,+ frame: frame - delay,+ config: {damping: 200},+ durationInFrames: 10,+ });++ const jump2 = spring({+ fps,+ frame: frame - delay - 7,+ config: {damping: 200},+ durationInFrames: 10,+ });++ return (+ <AbsoluteFill>+ <Sequence from={30} layout="none">+ <Audio src={assetUrl('chime.mp3')} volume={0.05} />+ </Sequence>++ <AbsoluteFill+ style={{+ backgroundColor: 'white',+ justifyContent: 'center',+ alignItems: 'center',+ }}+ >+ <div+ style={{+ height: 120,+ width: 120,+ display: 'flex',+ justifyContent: 'center',+ alignItems: 'center',+ color: 'white',+ backgroundColor: BLUE,+ fontSize: 50,+ fontWeight: 700,+ borderRadius: '50%',+ fontFamily: 'Variable',+ fontFeatureSettings: "'ss03' 1",+ scale: String(jump1),+ translate: `0 ${-jump2 * 50}px`,+ }}+ >+ {chapterNumber}+ </div>+ </AbsoluteFill>+ <AbsoluteFill+ style={{+ justifyContent: 'center',+ alignItems: 'center',+ fontFamily: 'GT Planar',+ fontWeight: 500,+ fontSize: 46,+ translate: `0 ${-jump2 * 100 + 150}px`,+ opacity: jump2,+ marginTop: 15,+ }}+ >+ <h2>{chapterTitle}</h2>+ </AbsoluteFill>+ </AbsoluteFill>+ );+};diff --git a/packages/brand/src/announcements/whats-new-in-remotion/Prompt.tsx b/packages/brand/src/announcements/whats-new-in-remotion/Prompt.tsxnew file mode 100644index 0000000000..10c9ac2a73--- /dev/null+++ b/packages/brand/src/announcements/whats-new-in-remotion/Prompt.tsx@@ -0,0 +1,140 @@+import {Audio} from '@remotion/media';+import {+ AbsoluteFill,+ Easing,+ interpolate,+ spring,+ useCurrentFrame,+ useVideoConfig,+} from 'remotion';+import {assetUrl} from './assets';+import {Thinking} from './Thinking';++const TYPING_DURATION_SECONDS = 2;+const TYPING_DELAY_SECONDS = 0.5;+const THINKING_FADE_SECONDS = 0.15;+const CURSOR_BLINK_FRAMES = 16;+const FONT_SIZE = 38;+const CHAR_WIDTH = 23;+const BOX_WIDTH = 1300;+const CONTENT_WIDTH = BOX_WIDTH - 56 * 2;+const LINE_HEIGHT = 54;+const POSTERIZE_FRAMES = 3;++export type PromptProps = {+ prompt: string;+ thinkingIndex: number;+};++const Cursor: React.FC<{frame: number}> = ({frame}) => {+ const opacity = interpolate(+ frame % CURSOR_BLINK_FRAMES,+ [0, CURSOR_BLINK_FRAMES / 2, CURSOR_BLINK_FRAMES],+ [1, 0, 1],+ {extrapolateLeft: 'clamp', extrapolateRight: 'clamp'},+ );++ return (+ <span+ style={{+ opacity,+ display: 'inline-block',+ width: 20,+ height: FONT_SIZE,+ backgroundColor: 'white',+ marginLeft: 4,+ verticalAlign: 'text-bottom',+ }}+ />+ );+};++export const Prompt: React.FC<PromptProps> = ({prompt, thinkingIndex}) => {+ const rawFrame = useCurrentFrame();+ const {fps} = useVideoConfig();+ const frame = Math.floor(rawFrame / POSTERIZE_FRAMES) * POSTERIZE_FRAMES;++ const delayFrames = TYPING_DELAY_SECONDS * fps;+ const typingFrames = TYPING_DURATION_SECONDS * fps;+ const framesPerChar = typingFrames / prompt.length;+ const typingFrame = Math.max(0, frame - delayFrames);+ const typedChars = Math.min(+ prompt.length,+ Math.floor(typingFrame / framesPerChar),+ );+ const typedText = prompt.slice(0, typedChars);++ const typingEndFrame = delayFrames + typingFrames;+ const thinkingFadeFrames = THINKING_FADE_SECONDS * fps;+ const thinkingOpacity = interpolate(+ frame,+ [typingEndFrame, typingEndFrame + thinkingFadeFrames],+ [0, 1],+ {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ easing: Easing.in(Easing.ease),+ },+ );++ const enterProgress = spring({+ frame,+ fps,+ config: {damping: 200},+ });+ const translateY = interpolate(enterProgress, [0, 1], [400, 0]);+ const scale = interpolate(enterProgress, [0, 1], [0.9, 1]);++ const fullTextWithPrefix = '❯ ' + prompt;+ const charsPerLine = Math.floor(CONTENT_WIDTH / CHAR_WIDTH);+ const numLines = Math.ceil(fullTextWithPrefix.length / charsPerLine);+ const textHeight = numLines * LINE_HEIGHT;++ const totalHeight = 32 * 2 + textHeight + 24 + 4 + 90;++ return (+ <AbsoluteFill+ style={{+ justifyContent: 'flex-end',+ alignItems: 'center',+ paddingBottom: 80,+ }}+ >+ <Audio src={assetUrl('prompt-sfx.wav')} volume={0.3} />+ <div+ style={{+ backgroundColor: '#292C34',+ padding: '32px 56px',+ boxShadow:+ '0 8px 32px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.2)',+ width: BOX_WIDTH,+ height: totalHeight,+ textAlign: 'left',+ transform: `translateY(${translateY}px) scale(${scale})`,+ }}+ >+ <span+ style={{+ color: 'white',+ fontSize: FONT_SIZE,+ fontFamily: 'monospace',+ fontWeight: 500,+ }}+ >+ ❯ {typedText}+ </span>+ <Cursor frame={frame} />+ <div+ style={{+ height: 4,+ backgroundColor: '#595A5F',+ marginTop: 24,+ }}+ />+ <div style={{opacity: thinkingOpacity}}>+ <Thinking index={thinkingIndex} />+ </div>+ </div>+ </AbsoluteFill>+ );+};diff --git a/packages/brand/src/announcements/whats-new-in-remotion/Root.tsx b/packages/brand/src/announcements/whats-new-in-remotion/Root.tsxnew file mode 100644index 0000000000..fb2b2b4be4--- /dev/null+++ b/packages/brand/src/announcements/whats-new-in-remotion/Root.tsx@@ -0,0 +1,160 @@+import type {CalculateMetadataFunction} from 'remotion';+import {Composition, Folder} from 'remotion';+import {CodeTransitionDemo} from './CodeTransitionDemo';+import type {MyCompositionProps} from './Composition';+import {+ MyComposition,+ MyCompositionSchema,+ SILENCES,+ VIDEO_FILES,+} from './Composition';+import './index.css';+import {Scene1} from './Scene1';+import {Scene2} from './Scene2';+import {Scene3} from './Scene3';+import {Scene4} from './Scene4';+import {Scene5} from './Scene5';+import {Scene6} from './Scene6';+import {Scene7} from './Scene7';+import {Scene8} from './Scene8';+import {Scene9} from './Scene9';+import {Scene10} from './Scene10';+import {Scene11} from './Scene11';++const FPS = 30;++const calculateMetadata: CalculateMetadataFunction<MyCompositionProps> = ({+ props,+}) => {+ let totalFrames = 0;+ for (const file of VIDEO_FILES) {+ const silence = SILENCES[file];+ const trimBefore = Math.floor(silence.leadingEnd * FPS);+ const trimAfter = Math.ceil(silence.trailingStart * FPS);+ totalFrames += trimAfter - trimBefore;+ }++ return {+ durationInFrames: totalFrames,+ defaultOutName: `whats-new-${props.platform}`,+ };+};++export const WhatsNewInRemotion: React.FC = () => {+ return (+ <>+ <Folder name="Chapters">+ <Composition+ id="Chapter01-Intro"+ component={Scene1}+ durationInFrames={114}+ fps={30}+ width={1920}+ height={1080}+ />+ <Composition+ id="Chapter02-LightLeaks"+ component={Scene2}+ durationInFrames={763}+ fps={30}+ width={1920}+ height={1080}+ />+ <Composition+ id="Chapter03-SoundEffects"+ component={Scene3}+ durationInFrames={1266}+ fps={30}+ width={1920}+ height={1080}+ />+ <Composition+ id="Chapter04-RenderOnVercel"+ component={Scene4}+ durationInFrames={1119}+ fps={30}+ width={1920}+ height={1080}+ />+ <Composition+ id="Chapter05-NewSkills"+ component={Scene5}+ durationInFrames={669}+ fps={30}+ width={1920}+ height={1080}+ />+ <Composition+ id="Chapter06-WebRendererProgress"+ component={Scene6}+ durationInFrames={881}+ fps={30}+ width={1920}+ height={1080}+ />+ <Composition+ id="Chapter07-Agents"+ component={Scene7}+ durationInFrames={1053}+ fps={30}+ width={1920}+ height={1080}+ />+ <Composition+ id="Chapter08-Rspack"+ component={Scene8}+ durationInFrames={789}+ fps={30}+ width={1920}+ height={1080}+ />+ <Composition+ id="Chapter09-VisualMode"+ component={Scene9}+ durationInFrames={510}+ fps={30}+ width={1920}+ height={1080}+ />+ <Composition+ id="Chapter10-Mediabunny"+ component={Scene10}+ durationInFrames={421}+ fps={30}+ width={1920}+ height={1080}+ />+ <Composition+ id="Chapter11-Outro"+ component={Scene11}+ durationInFrames={742}+ fps={30}+ width={1920}+ height={1080}+ schema={MyCompositionSchema}+ defaultProps={{platform: 'youtube'}}+ />+ </Folder>+ <Composition+ id="WhatsNew"+ component={MyComposition}+ durationInFrames={300}+ fps={FPS}+ width={1920}+ height={1080}+ schema={MyCompositionSchema}+ defaultProps={{platform: 'youtube'} satisfies MyCompositionProps}+ calculateMetadata={calculateMetadata}+ />++ <Composition+ id="CodeTransitionDemo"+ component={CodeTransitionDemo}+ durationInFrames={90}+ fps={FPS}+ width={1920}+ height={1080}+ />+ </>+ );+};diff --git a/packages/brand/src/announcements/whats-new-in-remotion/Scene1.tsx b/packages/brand/src/announcements/whats-new-in-remotion/Scene1.tsxnew file mode 100644index 0000000000..f862960157--- /dev/null+++ b/packages/brand/src/announcements/whats-new-in-remotion/Scene1.tsx@@ -0,0 +1,31 @@+import {Video} from '@remotion/media';+import {AbsoluteFill, Sequence, useVideoConfig} from 'remotion';+import {assetUrl} from './assets';+import {SILENCES} from './Composition';+import {LowerThird} from './LowerThird';++const FILE = 'whats1.mov';++export const Scene1: React.FC = () => {+ const {fps} = useVideoConfig();+ const silence = SILENCES[FILE];+ const trimBefore = Math.floor(silence.leadingEnd * fps);+ const trimAfter = Math.ceil(silence.trailingStart * fps);++ return (+ <AbsoluteFill>+ <Video+ src={assetUrl(FILE)}+ trimBefore={trimBefore}+ trimAfter={trimAfter}+ />+ <Sequence from={15} layout="none">+ <LowerThird+ name="Jonny Burger"+ title="Chief Hacker, Remotion"+ durationInFrames={Math.ceil(trimAfter - trimBefore - 15)}+ />+ </Sequence>+ </AbsoluteFill>+ );+};diff --git a/packages/brand/src/announcements/whats-new-in-remotion/Scene10.tsx b/packages/brand/src/announcements/whats-new-in-remotion/Scene10.tsxnew file mode 100644index 0000000000..049f38667a--- /dev/null+++ b/packages/brand/src/announcements/whats-new-in-remotion/Scene10.tsx@@ -0,0 +1,122 @@+import {Video} from '@remotion/media';+import {+ AbsoluteFill,+ Sequence,+ interpolate,+ spring,+ useCurrentFrame,+ useVideoConfig,+} from 'remotion';+import {assetUrl} from './assets';+import {SILENCES} from './Composition';++const FILE = 'whats10.mov';++const VisualModeDemo: React.FC = () => {+ const frame = useCurrentFrame();+ const {fps} = useVideoConfig();++ const zoomProgress = spring({+ frame,+ fps,+ config: {damping: 200},+ durationInFrames: 30,+ });+ const scale = interpolate(zoomProgress, [0, 1], [1, 1.5]);++ return (+ <AbsoluteFill+ style={{+ backgroundColor: '#141414',+ justifyContent: 'center',+ alignItems: 'center',+ overflow: 'hidden',+ }}+ >+ <Video+ src={assetUrl('visual-mode-demo.mov')}+ muted+ trimBefore={Math.floor(2 * fps)}+ playbackRate={3}+ style={{+ height: '100%',+ objectFit: 'contain',+ transformOrigin: 'bottom left',+ transform: `scale(${scale})`,+ }}+ />+ </AbsoluteFill>+ );+};++export const Scene10: React.FC = () => {+ const {fps} = useVideoConfig();+ const silence = SILENCES[FILE];+ const trimBefore = Math.floor(silence.leadingEnd * fps);+ const trimAfter = Math.ceil(silence.trailingStart * fps);++ return (+ <AbsoluteFill>+ <Video+ src={assetUrl(FILE)}+ trimBefore={trimBefore}+ trimAfter={trimAfter}+ />+ <Sequence+ from={30}+ durationInFrames={Math.round(5 * fps)}+ premountFor={30}+ >+ <VisualModeDemo />+ </Sequence>+ <Sequence+ from={30 + Math.round(5 * fps)}+ durationInFrames={Math.round(5 * fps)}+ premountFor={30}+ >+ <AbsoluteFill+ style={{+ backgroundColor: '#141414',+ justifyContent: 'center',+ alignItems: 'center',+ }}+ >+ <Video+ src={assetUrl('visual-mode-demo-2.mov')}+ muted+ trimBefore={Math.floor(fps)}+ playbackRate={2}+ style={{+ height: '70%',+ objectFit: 'contain',+ }}+ />+ </AbsoluteFill>+ </Sequence>+ <Sequence+ from={30 + Math.round(10 * fps)}+ durationInFrames={Math.round(3 * fps)}+ premountFor={30}+ >+ <AbsoluteFill+ style={{+ backgroundColor: '#181818',+ justifyContent: 'center',+ alignItems: 'center',+ }}+ >+ <Video+ src={assetUrl('visual-mode-demo-3.mov')}+ muted+ trimBefore={Math.floor(5 * fps)}+ playbackRate={2}+ style={{+ height: '80%',+ objectFit: 'contain',+ }}+ />+ </AbsoluteFill>+ </Sequence>+ </AbsoluteFill>+ );+};diff --git a/packages/brand/src/announcements/whats-new-in-remotion/Scene11.tsx b/packages/brand/src/announcements/whats-new-in-remotion/Scene11.tsxnew file mode 100644index 0000000000..134f1129b5--- /dev/null+++ b/packages/brand/src/announcements/whats-new-in-remotion/Scene11.tsx@@ -0,0 +1,42 @@+import {Video} from '@remotion/media';+import {AbsoluteFill, interpolate, useVideoConfig} from 'remotion';+import {assetUrl} from './assets';+import {SILENCES} from './Composition';+import type {EndCardPlatform} from './EndCard';+import {EndCard} from './EndCard';+import {SlideInOverlay, useSlideInProgress} from './SlideInOverlay';++const FILE = 'whats11.mov';++export const Scene11: React.FC<{platform: EndCardPlatform}> = ({platform}) => {+ const {fps} = useVideoConfig();+ const silence = SILENCES[FILE];+ const trimBefore = Math.floor(silence.leadingEnd * fps);+ const trimAfter = Math.ceil(silence.trailingStart * fps);+ const sceneDuration = silence.trailingStart - silence.leadingEnd;++ const overlayStartAt = sceneDuration - 7 - 1;+ const overlayProgress = useSlideInProgress({+ startAt: overlayStartAt,+ holdDuration: 9999,+ });+ const videoX = interpolate(overlayProgress, [0, 1], [0, -20]);++ return (+ <AbsoluteFill name={'Video'}>+ <AbsoluteFill+ style={{transform: `translateX(${videoX}%)`}}+ name={'Container'}+ >+ <Video+ src={assetUrl(FILE)}+ trimBefore={trimBefore}+ trimAfter={trimAfter}+ />+ </AbsoluteFill>+ <SlideInOverlay startAt={overlayStartAt} holdDuration={9999}>+ <EndCard platform={platform} />+ </SlideInOverlay>+ </AbsoluteFill>+ );+};diff --git a/packages/brand/src/announcements/whats-new-in-remotion/Scene2.tsx b/packages/brand/src/announcements/whats-new-in-remotion/Scene2.tsxnew file mode 100644index 0000000000..019765d1a5--- /dev/null+++ b/packages/brand/src/announcements/whats-new-in-remotion/Scene2.tsx@@ -0,0 +1,93 @@+import {Video} from '@remotion/media';+import {+ AbsoluteFill,+ Sequence,+ interpolate,+ useCurrentFrame,+ useVideoConfig,+} from 'remotion';+import {assetUrl} from './assets';+import {SILENCES} from './Composition';+import {LightLeakGrid} from './LightLeakGrid';+import {NumberedChapter} from './NumberedChapter';+import {Prompt} from './Prompt';+import {SlideInOverlay, useSlideInProgress} from './SlideInOverlay';+import {VideoBRoll} from './VideoBRoll';++const FILE = 'whats2.mov';++export const Scene2: React.FC = () => {+ const frame = useCurrentFrame();+ const {fps} = useVideoConfig();+ const silence = SILENCES[FILE];+ const trimBefore = Math.floor(silence.leadingEnd * fps);+ const trimAfter = Math.ceil(silence.trailingStart * fps);++ // Light leak overlay: 8s to 14s with 0.2s fade+ const llStart = 8 * fps;+ const llEnd = 14 * fps;+ const llFade = 0.2 * fps;+ const llOpacity = interpolate(+ frame,+ [llStart, llStart + llFade, llEnd - llFade, llEnd],+ [0, 1, 1, 0],+ {extrapolateLeft: 'clamp', extrapolateRight: 'clamp'},+ );++ const overlayProgress = useSlideInProgress({startAt: 0.5});+ const videoX = interpolate(overlayProgress, [0, 1], [0, -20]);++ return (+ <AbsoluteFill>+ <AbsoluteFill style={{transform: `translateX(${videoX}%)`}}>+ <Video+ src={assetUrl(FILE)}+ trimBefore={trimBefore}+ trimAfter={trimAfter}+ />+ </AbsoluteFill>+ <SlideInOverlay startAt={0.5}>+ <NumberedChapter chapterNumber={1} chapterTitle="Light Leaks" />+ </SlideInOverlay>+ <Sequence from={540} durationInFrames={Math.round(3 * fps)} layout="none">+ <VideoBRoll src="screen-recording.mov" />+ </Sequence>+ <Sequence+ from={655}+ durationInFrames={Math.round(3.7 * fps)}+ layout="none"+ >+ {(() => {+ const promptDuration = Math.round(3.7 * fps);+ const fadeOut = 0.2 * fps;+ const localFrame = frame - 655;+ const promptOpacity = interpolate(+ localFrame,+ [promptDuration - fadeOut, promptDuration],+ [1, 0],+ {extrapolateLeft: 'clamp', extrapolateRight: 'clamp'},+ );+ return (+ <AbsoluteFill style={{opacity: promptOpacity}}>+ <Prompt+ prompt="Add a Light Leak transition between scenes"+ thinkingIndex={5}+ />+ </AbsoluteFill>+ );+ })()}+ </Sequence>+ {llOpacity > 0 && (+ <Sequence+ from={Math.floor(llStart)}+ durationInFrames={Math.ceil(llEnd - llStart)}+ layout="none"+ >+ <AbsoluteFill style={{opacity: llOpacity}}>+ <LightLeakGrid durationInFrames={Math.ceil(llEnd - llStart)} />+ </AbsoluteFill>+ </Sequence>+ )}+ </AbsoluteFill>+ );+};diff --git a/packages/brand/src/announcements/whats-new-in-remotion/Scene3.tsx b/packages/brand/src/announcements/whats-new-in-remotion/Scene3.tsxnew file mode 100644index 0000000000..85401f5f98--- /dev/null+++ b/packages/brand/src/announcements/whats-new-in-remotion/Scene3.tsx@@ -0,0 +1,139 @@+import {Video} from '@remotion/media';+import {+ AbsoluteFill,+ Sequence,+ interpolate,+ useCurrentFrame,+ useVideoConfig,+} from 'remotion';+import {assetUrl} from './assets';+import {SILENCES} from './Composition';+import {ImageBRoll} from './ImageBRoll';+import {NumberedChapter} from './NumberedChapter';+import {SlideInOverlay, useSlideInProgress} from './SlideInOverlay';++const FILE = 'whats3.mov';++const SFX_URLS = [+ 'https://remotion.media/whip.wav',+ 'https://remotion.media/whoosh.wav',+ 'https://remotion.media/page-turn.wav',+ 'https://remotion.media/switch.wav',+ 'https://remotion.media/mouse-click.wav',+ 'https://remotion.media/shutter-modern.wav',+ 'https://remotion.media/shutter-old.wav',+ 'https://remotion.media/ding.wav',+ 'https://remotion.media/bruh.wav',+ 'https://remotion.media/vine-boom.wav',+ 'https://remotion.media/windows-xp-error.wav',+];++// Repeat URLs enough to fill scroll+const REPEATED_URLS = [0, 1, 2, 3].flatMap((repetition) =>+ SFX_URLS.map((url) => ({id: `${repetition}-${url}`, url})),+);++const SfxUrlList: React.FC = () => {+ const frame = useCurrentFrame();+ const {fps} = useVideoConfig();++ const LINE_HEIGHT = 160;+ const SCROLL_SPEED = 40; // pixels per second++ const scrollY = -(frame / fps) * SCROLL_SPEED;++ const FADE_HEIGHT = 200;++ return (+ <AbsoluteFill style={{backgroundColor: 'white', overflow: 'hidden'}}>+ <div+ style={{+ transform: `translateY(${scrollY}px)`,+ padding: '80px 40px',+ }}+ >+ {REPEATED_URLS.map(({id, url}) => (+ <div+ key={id}+ style={{+ fontFamily: 'GT Planar',+ fontSize: 38,+ fontWeight: 500,+ color: '#333',+ height: LINE_HEIGHT,+ display: 'flex',+ alignItems: 'center',+ whiteSpace: 'nowrap',+ borderBottom: '1px solid #e0e0e0',+ marginLeft: -40,+ marginRight: -40,+ paddingLeft: 40,+ }}+ >+ {url.replace('https://', '')}+ </div>+ ))}+ </div>+ {/* Top fade mask */}+ <AbsoluteFill+ style={{+ height: FADE_HEIGHT,+ bottom: 'auto',+ background:+ 'linear-gradient(to bottom, white, rgba(255, 255, 255, 0))',+ pointerEvents: 'none',+ }}+ />+ {/* Bottom fade mask */}+ <AbsoluteFill+ style={{+ height: FADE_HEIGHT,+ top: 'auto',+ background: 'linear-gradient(to top, white, rgba(255, 255, 255, 0))',+ pointerEvents: 'none',+ }}+ />+ </AbsoluteFill>+ );+};++export const Scene3: React.FC = () => {+ const {fps} = useVideoConfig();+ const silence = SILENCES[FILE];+ const trimBefore = Math.floor(silence.leadingEnd * fps);+ const trimAfter = Math.ceil(silence.trailingStart * fps);++ // Combine progress from both overlays to shift background+ const overlay1Progress = useSlideInProgress({startAt: 0.5});+ const overlay2Progress = useSlideInProgress({+ startAt: 590 / fps,+ slideInDuration: 1,+ holdDuration: 3.5,+ slideOutDuration: 1,+ });+ const combinedProgress = Math.max(overlay1Progress, overlay2Progress);+ const videoX = interpolate(combinedProgress, [0, 1], [0, -20]);++ return (+ <AbsoluteFill>+ <AbsoluteFill style={{transform: `translateX(${videoX}%)`}}>+ <Video+ src={assetUrl(FILE)}+ trimBefore={trimBefore}+ trimAfter={trimAfter}+ />+ </AbsoluteFill>+ <SlideInOverlay startAt={0.5}>+ <NumberedChapter chapterNumber={2} chapterTitle="Sound Effects" />+ </SlideInOverlay>+ <Sequence from={440} durationInFrames={Math.round(4 * fps)} layout="none">+ <ImageBRoll src="sfx-screenshot.png" />+ </Sequence>+ <Sequence from={590} layout="none">+ <SlideInOverlay startAt={0}>+ <SfxUrlList />+ </SlideInOverlay>+ </Sequence>+ </AbsoluteFill>+ );+};diff --git a/packages/brand/src/announcements/whats-new-in-remotion/Scene4.tsx b/packages/brand/src/announcements/whats-new-in-remotion/Scene4.tsxnew file mode 100644index 0000000000..d9b7840043--- /dev/null+++ b/packages/brand/src/announcements/whats-new-in-remotion/Scene4.tsx@@ -0,0 +1,110 @@+import {Video} from '@remotion/media';+import {AbsoluteFill, Sequence, interpolate, useVideoConfig} from 'remotion';+import {assetUrl} from './assets';+import {CodeBRoll} from './CodeBRoll';+import {SILENCES} from './Composition';+import {ImageBRoll} from './ImageBRoll';+import {SlideInOverlay, useSlideInProgress} from './SlideInOverlay';+import {UpperReference} from './UpperReference';+import {VideoBRoll} from './VideoBRoll';++const VERCEL_CODE = `+const { sandboxFilePath } = await renderMediaOnVercel({+ sandbox,+ compositionId: 'MyComp',+ inputProps: { title: 'Hello World' },+});+`.trim();++const FILE = 'whats4.mov';++export const Scene4: React.FC = () => {+ const {fps} = useVideoConfig();+ const silence = SILENCES[FILE];+ const trimBefore = Math.floor(silence.leadingEnd * fps);+ const trimAfter = Math.ceil(silence.trailingStart * fps);++ const TETRA_DURATION = 4.16;+ const SLIDE_OUT = 1;+ const overlayProgress = useSlideInProgress({+ startAt: 0.5,+ holdDuration: TETRA_DURATION - SLIDE_OUT - 2,+ });+ const videoX = interpolate(overlayProgress, [0, 1], [0, -20]);++ return (+ <AbsoluteFill>+ <AbsoluteFill style={{transform: `translateX(${videoX}%)`}}>+ <Video+ src={assetUrl(FILE)}+ trimBefore={trimBefore}+ trimAfter={trimAfter}+ />+ </AbsoluteFill>+ <SlideInOverlay+ startAt={0.5}+ holdDuration={TETRA_DURATION - SLIDE_OUT - 2}+ backgroundColor="black"+ >+ <AbsoluteFill+ style={{+ justifyContent: 'center',+ alignItems: 'center',+ }}+ >+ <Video+ src={assetUrl('tetrahedron.mp4')}+ muted+ style={{+ height: '100%',+ objectFit: 'contain',+ }}+ />+ </AbsoluteFill>+ </SlideInOverlay>+ <Sequence+ from={160}+ durationInFrames={Math.round(3 * fps)}+ premountFor={30}+ >+ <AbsoluteFill+ style={{+ backgroundColor: 'black',+ justifyContent: 'center',+ alignItems: 'center',+ }}+ >+ <Video+ src={assetUrl('remotion-on-vercel.mp4')}+ muted+ style={{+ height: '100%',+ objectFit: 'contain',+ }}+ />+ </AbsoluteFill>+ </Sequence>+ <Sequence from={368} durationInFrames={Math.round(4 * fps)} layout="none">+ <ImageBRoll src="vercel-screenshot.png" panY={0} scale={1.12} />+ </Sequence>+ <Sequence from={615} durationInFrames={Math.round(4 * fps)} layout="none">+ <VideoBRoll src="vercel-screen-recording.mov" durationSeconds={4} />+ </Sequence>+ <Sequence from={920} durationInFrames={Math.round(4 * fps)} layout="none">+ <CodeBRoll+ code={VERCEL_CODE}+ lang="ts"+ durationSeconds={4}+ topExplainer="renderMediaOnVercel()"+ />+ </Sequence>+ <Sequence from={1040} layout="none">+ <UpperReference+ text="The tutorial is out now out on YouTube!"+ fontSize={36}+ durationInFrames={Math.ceil(trimAfter - trimBefore - 1040)}+ />+ </Sequence>+ </AbsoluteFill>+ );+};diff --git a/packages/brand/src/announcements/whats-new-in-remotion/Scene5.tsx b/packages/brand/src/announcements/whats-new-in-remotion/Scene5.tsxnew file mode 100644index 0000000000..55d6ecbacb--- /dev/null+++ b/packages/brand/src/announcements/whats-new-in-remotion/Scene5.tsx@@ -0,0 +1,81 @@+import {Video} from '@remotion/media';+import {+ AbsoluteFill,+ interpolate,+ useCurrentFrame,+ useVideoConfig,+} from 'remotion';+import {AnimatedList} from './AnimatedList';+import {assetUrl} from './assets';+import {SILENCES} from './Composition';+import {NumberedChapter} from './NumberedChapter';+import {SlideInOverlay, useSlideInProgress} from './SlideInOverlay';++const FILE = 'whats5.mov';++const SKILLS_LIST = [+ {label: 'Voiceovers with ElevenLabs', appearFrame: 255},+ {label: 'Working with FFmpeg', appearFrame: 330},+ {label: 'Audio visualization', appearFrame: 420},+ {label: 'Exporting transparent videos', appearFrame: 520},+];++const FADE_START = 185;+const FADE_DURATION = 8;++const OverlayContent: React.FC = () => {+ const frame = useCurrentFrame();++ const chapterOpacity = interpolate(+ frame,+ [FADE_START, FADE_START + FADE_DURATION],+ [1, 0],+ {extrapolateLeft: 'clamp', extrapolateRight: 'clamp'},+ );+ const listOpacity = interpolate(+ frame,+ [FADE_START + FADE_DURATION, FADE_START + FADE_DURATION * 2],+ [0, 1],+ {extrapolateLeft: 'clamp', extrapolateRight: 'clamp'},+ );++ return (+ <AbsoluteFill style={{backgroundColor: 'white'}}>+ <AbsoluteFill style={{opacity: chapterOpacity}}>+ <NumberedChapter chapterNumber={4} chapterTitle="New Skills" />+ </AbsoluteFill>+ <AbsoluteFill style={{opacity: listOpacity}}>+ <AnimatedList title="New Skills" items={SKILLS_LIST} />+ </AbsoluteFill>+ </AbsoluteFill>+ );+};++export const Scene5: React.FC = () => {+ const {fps} = useVideoConfig();+ const silence = SILENCES[FILE];+ const trimBefore = Math.floor(silence.leadingEnd * fps);+ const trimAfter = Math.ceil(silence.trailingStart * fps);+ const sceneDuration = silence.trailingStart - silence.leadingEnd;++ const overlayProgress = useSlideInProgress({+ startAt: 0.5,+ holdDuration: sceneDuration - 0.5 - 1 - 1,+ });+ const videoX = interpolate(overlayProgress, [0, 1], [0, -20]);++ return (+ <AbsoluteFill>+ <AbsoluteFill style={{transform: `translateX(${videoX}%)`}}>+ <Video+ src={assetUrl(FILE)}+ trimBefore={trimBefore}+ trimAfter={trimAfter}+ />+ </AbsoluteFill>+ <SlideInOverlay startAt={0.5} holdDuration={sceneDuration - 0.5 - 1 - 1}>+ <OverlayContent />+ </SlideInOverlay>+ </AbsoluteFill>+ );+};diff --git a/packages/brand/src/announcements/whats-new-in-remotion/Scene6.tsx b/packages/brand/src/announcements/whats-new-in-remotion/Scene6.tsxnew file mode 100644index 0000000000..fab8d490fa--- /dev/null+++ b/packages/brand/src/announcements/whats-new-in-remotion/Scene6.tsx@@ -0,0 +1,121 @@+import {Video} from '@remotion/media';+import {AbsoluteFill, Sequence, interpolate, useVideoConfig} from 'remotion';+import {assetUrl} from './assets';+import {SILENCES} from './Composition';+import {NumberedChapter} from './NumberedChapter';+import {SlideInOverlay, useSlideInProgress} from './SlideInOverlay';+import {UpperReference} from './UpperReference';+import {WebRendererDemo} from './WebRendererDemo';++const FILE = 'whats6.mov';++const CSS_PROPERTIES = [+ 'border-style',+ 'border-width',+ 'border-color',+ 'box-shadow',+ 'text-shadow',+ 'font-style',+ 'object-fit',+ 'filter',+ 'paint-order',+ '-webkit-text-stroke',+];++const CssPropertyList: React.FC = () => {+ return (+ <AbsoluteFill+ style={{+ backgroundColor: 'white',+ flexDirection: 'column',+ display: 'flex',+ padding: '0 40px',+ }}+ >+ <div+ style={{+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'center',+ fontFamily: 'GT Planar',+ fontSize: 32,+ fontWeight: 700,+ color: '#111',+ borderBottom: '1px solid #e0e0e0',+ height: 80,+ flexShrink: 0,+ }}+ >+ New CSS Properties+ </div>+ {CSS_PROPERTIES.map((prop, i) => (+ <div+ key={prop}+ style={{+ flex: 1,+ display: 'flex',+ alignItems: 'center',+ fontFamily: 'GT Planar',+ fontSize: 28,+ fontWeight: 500,+ color: '#333',+ borderBottom:+ i < CSS_PROPERTIES.length - 1 ? '1px solid #e0e0e0' : 'none',+ paddingLeft: 24,+ }}+ >+ {prop}+ </div>+ ))}+ </AbsoluteFill>+ );+};++export const Scene6: React.FC = () => {+ const {fps} = useVideoConfig();+ const silence = SILENCES[FILE];+ const trimBefore = Math.floor(silence.leadingEnd * fps);+ const trimAfter = Math.ceil(silence.trailingStart * fps);+ const sceneDuration = silence.trailingStart - silence.leadingEnd;+ const listStartAt = sceneDuration - 3 - 1; // 5s before end, minus 1s for slide-in++ const overlayProgress = useSlideInProgress({startAt: 0.5, holdDuration: 2.5});+ const overlay2Progress = useSlideInProgress({startAt: listStartAt});+ const combinedProgress = Math.max(overlayProgress, overlay2Progress);+ const videoX = interpolate(combinedProgress, [0, 1], [0, -20]);++ return (+ <AbsoluteFill>+ <AbsoluteFill style={{transform: `translateX(${videoX}%)`}}>+ <Video+ src={assetUrl(FILE)}+ trimBefore={trimBefore}+ trimAfter={trimAfter}+ />+ </AbsoluteFill>+ <SlideInOverlay startAt={0.5} holdDuration={2.5}>+ <NumberedChapter chapterNumber={5} chapterTitle="Web Renderer Update" />+ </SlideInOverlay>+ <Sequence+ from={180}+ durationInFrames={Math.round(15 * fps)}+ premountFor={30}+ >+ <WebRendererDemo />+ </Sequence>+ <Sequence from={190} layout="none">+ <UpperReference+ text="Fun fact: This video was edited with Claude Code and rendered completely client-side!"+ fontSize={30}+ maxWidth={800}+ durationInFrames={Math.round(5 * fps)}+ />+ </Sequence>+ <Sequence from={Math.round(listStartAt * fps)} layout="none">+ <SlideInOverlay startAt={0}>+ <CssPropertyList />+ </SlideInOverlay>+ </Sequence>+ </AbsoluteFill>+ );+};diff --git a/packages/brand/src/announcements/whats-new-in-remotion/Scene7.tsx b/packages/brand/src/announcements/whats-new-in-remotion/Scene7.tsxnew file mode 100644index 0000000000..39feff1c3b--- /dev/null+++ b/packages/brand/src/announcements/whats-new-in-remotion/Scene7.tsx@@ -0,0 +1,105 @@+import {Video} from '@remotion/media';+import {+ AbsoluteFill,+ Sequence,+ interpolate,+ useCurrentFrame,+ useVideoConfig,+} from 'remotion';+import {AnimatedList} from './AnimatedList';+import {assetUrl} from './assets';+import {SILENCES} from './Composition';+import {NumberedChapter} from './NumberedChapter';+import {SlideInOverlay, useSlideInProgress} from './SlideInOverlay';++const FILE = 'whats7.mov';++const AgentsBRoll: React.FC = () => {+ const frame = useCurrentFrame();+ const {fps} = useVideoConfig();+ const duration = Math.round(5 * fps);+ const fade = 0.2 * fps;++ const opacity = interpolate(+ frame,+ [0, fade, duration - fade, duration],+ [0, 1, 1, 0],+ {extrapolateLeft: 'clamp', extrapolateRight: 'clamp'},+ );+ const scale = interpolate(frame, [0, duration], [1, 1.08], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ });++ return (+ <AbsoluteFill+ style={{+ backgroundColor: '#141414',+ justifyContent: 'center',+ alignItems: 'center',+ opacity,+ }}+ >+ <Video+ src={assetUrl('agents-screen-recording.mov')}+ muted+ playbackRate={2}+ style={{+ height: '70%',+ objectFit: 'contain',+ transformOrigin: 'top center',+ transform: `scale(${scale})`,+ }}+ />+ </AbsoluteFill>+ );+};++export const Scene7: React.FC = () => {+ const {fps} = useVideoConfig();+ const silence = SILENCES[FILE];+ const trimBefore = Math.floor(silence.leadingEnd * fps);+ const trimAfter = Math.ceil(silence.trailingStart * fps);++ const overlayProgress = useSlideInProgress({startAt: 0.5, holdDuration: 2.5});+ const listHoldDuration = (970 - 700) / fps;+ const overlay2Progress = useSlideInProgress({+ startAt: 700 / fps,+ holdDuration: listHoldDuration,+ });+ const combinedProgress = Math.max(overlayProgress, overlay2Progress);+ const videoX = interpolate(combinedProgress, [0, 1], [0, -20]);++ return (+ <AbsoluteFill>+ <AbsoluteFill style={{transform: `translateX(${videoX}%)`}}>+ <Video+ src={assetUrl(FILE)}+ trimBefore={trimBefore}+ trimAfter={trimAfter}+ />+ </AbsoluteFill>+ <SlideInOverlay startAt={0.5} holdDuration={2.5}>+ <NumberedChapter+ chapterNumber={6}+ chapterTitle="Work better with Agents"+ />+ </SlideInOverlay>+ <Sequence from={530} durationInFrames={Math.round(5 * fps)} layout="none">+ <AgentsBRoll />+ </Sequence>+ <Sequence from={700} layout="none">+ <SlideInOverlay startAt={0} holdDuration={listHoldDuration}>+ <AnimatedList+ title="Agentic flow"+ items={[+ {label: 'Single Studio Server', appearFrame: -1},+ {label: 'No multiple lockfile warning', appearFrame: 40},+ {label: 'Zod 4 supported', appearFrame: 240},+ ]}+ />+ </SlideInOverlay>+ </Sequence>+ </AbsoluteFill>+ );+};diff --git a/packages/brand/src/announcements/whats-new-in-remotion/Scene8.tsx b/packages/brand/src/announcements/whats-new-in-remotion/Scene8.tsxnew file mode 100644index 0000000000..f22cfa30a4--- /dev/null+++ b/packages/brand/src/announcements/whats-new-in-remotion/Scene8.tsx@@ -0,0 +1,62 @@+import {Video} from '@remotion/media';+import {AbsoluteFill, Sequence, interpolate, useVideoConfig} from 'remotion';+import {assetUrl} from './assets';+import {CodeBRoll} from './CodeBRoll';+import {SILENCES} from './Composition';+import {NumberedChapter} from './NumberedChapter';+import {SlideInOverlay, useSlideInProgress} from './SlideInOverlay';++const FILE = 'whats8.mov';++const CODE_BEFORE = `+import { Config } from "@remotion/cli/config";+import { enableTailwind } from "@remotion/tailwind-v4";++Config.setVideoImageFormat("jpeg");+Config.setOverwriteOutput(true);+Config.overrideWebpackConfig(enableTailwind);+`.trim();++const CODE_AFTER = `+import { Config } from "@remotion/cli/config";+import { enableTailwind } from "@remotion/tailwind-v4";++Config.setVideoImageFormat("jpeg");+Config.setOverwriteOutput(true);+Config.overrideWebpackConfig(enableTailwind);+Config.setExperimentalRspackEnabled(true);+`.trim();++export const Scene8: React.FC = () => {+ const {fps} = useVideoConfig();+ const silence = SILENCES[FILE];+ const trimBefore = Math.floor(silence.leadingEnd * fps);+ const trimAfter = Math.ceil(silence.trailingStart * fps);++ const overlayProgress = useSlideInProgress({startAt: 0.5, holdDuration: 2.5});+ const videoX = interpolate(overlayProgress, [0, 1], [0, -20]);++ return (+ <AbsoluteFill>+ <AbsoluteFill style={{transform: `translateX(${videoX}%)`}}>+ <Video+ src={assetUrl(FILE)}+ trimBefore={trimBefore}+ trimAfter={trimAfter}+ />+ </AbsoluteFill>+ <SlideInOverlay startAt={0.5} holdDuration={2.5}>+ <NumberedChapter chapterNumber={7} chapterTitle="Rspack" />+ </SlideInOverlay>+ <Sequence from={180} durationInFrames={Math.round(4 * fps)} layout="none">+ <CodeBRoll+ code={CODE_AFTER}+ previousCode={CODE_BEFORE}+ lang="ts"+ durationSeconds={4}+ topExplainer="remotion.config.ts"+ />+ </Sequence>+ </AbsoluteFill>+ );+};diff --git a/packages/brand/src/announcements/whats-new-in-remotion/Scene9.tsx b/packages/brand/src/announcements/whats-new-in-remotion/Scene9.tsxnew file mode 100644index 0000000000..3ab49e6b44--- /dev/null+++ b/packages/brand/src/announcements/whats-new-in-remotion/Scene9.tsx@@ -0,0 +1,36 @@+import {Video} from '@remotion/media';+import {AbsoluteFill, interpolate, useVideoConfig} from 'remotion';+import {assetUrl} from './assets';+import {SILENCES} from './Composition';+import {NumberedChapter} from './NumberedChapter';+import {SlideInOverlay, useSlideInProgress} from './SlideInOverlay';++const FILE = 'whats9.mov';++export const Scene9: React.FC = () => {+ const {fps} = useVideoConfig();+ const silence = SILENCES[FILE];+ const trimBefore = Math.floor(silence.leadingEnd * fps);+ const trimAfter = Math.ceil(silence.trailingStart * fps);++ const overlayProgress = useSlideInProgress({startAt: 0.5, holdDuration: 2.5});+ const videoX = interpolate(overlayProgress, [0, 1], [0, -20]);++ return (+ <AbsoluteFill>+ <AbsoluteFill style={{transform: `translateX(${videoX}%)`}}>+ <Video+ src={assetUrl(FILE)}+ trimBefore={trimBefore}+ trimAfter={trimAfter}+ />+ </AbsoluteFill>+ <SlideInOverlay startAt={0.5} holdDuration={2.5}>+ <NumberedChapter+ chapterNumber={8}+ chapterTitle="Preview: Visual Mode"+ />+ </SlideInOverlay>+ </AbsoluteFill>+ );+};diff --git a/packages/brand/src/announcements/whats-new-in-remotion/SlideInOverlay.tsx b/packages/brand/src/announcements/whats-new-in-remotion/SlideInOverlay.tsxnew file mode 100644index 0000000000..849f66df12--- /dev/null+++ b/packages/brand/src/announcements/whats-new-in-remotion/SlideInOverlay.tsx@@ -0,0 +1,95 @@+import {+ AbsoluteFill,+ Easing,+ interpolate,+ useCurrentFrame,+ useVideoConfig,+} from 'remotion';++type SlideInOverlayProps = {+ /** Content rendered inside the sliding panel */+ children: React.ReactNode;+ /** When the slide-in starts, in seconds */+ startAt: number;+ /** Duration of the slide-in animation, in seconds. Default: 1 */+ slideInDuration?: number;+ /** Duration the overlay stays fully visible, in seconds. Default: 3.5 */+ holdDuration?: number;+ /** Duration of the slide-out animation, in seconds. Default: 1 */+ slideOutDuration?: number;+ /** Width of the overlay as a percentage of the composition. Default: 40 */+ widthPercent?: number;+ /** Background color of the overlay panel. Default: "white" */+ backgroundColor?: string;+};++export const useSlideInProgress = ({+ startAt,+ slideInDuration = 1,+ holdDuration = 3.5,+ slideOutDuration = 1,+}: {+ startAt: number;+ slideInDuration?: number;+ holdDuration?: number;+ slideOutDuration?: number;+}) => {+ const frame = useCurrentFrame();+ const {fps} = useVideoConfig();++ const inStart = startAt * fps;+ const inDuration = slideInDuration * fps;+ const outStart = inStart + inDuration + holdDuration * fps;+ const outDuration = slideOutDuration * fps;++ const slideIn = interpolate(frame, [inStart, inStart + inDuration], [0, 1], {+ easing: Easing.out(Easing.cubic),+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ });+ const slideOut = interpolate(+ frame,+ [outStart, outStart + outDuration],+ [0, 1],+ {+ easing: Easing.in(Easing.cubic),+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ },+ );++ return slideIn - slideOut;+};++export const SlideInOverlay: React.FC<SlideInOverlayProps> = ({+ children,+ startAt,+ slideInDuration = 1,+ holdDuration = 3.5,+ slideOutDuration = 1,+ widthPercent = 40,+ backgroundColor = 'white',+}) => {+ const progress = useSlideInProgress({+ startAt,+ slideInDuration,+ holdDuration,+ slideOutDuration,+ });++ const overlayX = interpolate(progress, [0, 1], [102, 0]);++ return (+ <AbsoluteFill+ style={{+ left: `${100 - widthPercent}%`,+ width: `${widthPercent}%`,+ transform: `translateX(${overlayX}%)`,+ backgroundColor,+ overflow: 'hidden',+ }}+ >+ {children}+ </AbsoluteFill>+ );+};diff --git a/packages/brand/src/announcements/whats-new-in-remotion/Thinking.tsx b/packages/brand/src/announcements/whats-new-in-remotion/Thinking.tsxnew file mode 100644index 0000000000..cd100d9504--- /dev/null+++ b/packages/brand/src/announcements/whats-new-in-remotion/Thinking.tsx@@ -0,0 +1,51 @@+import {useCurrentFrame, useVideoConfig} from 'remotion';+import {MESSAGES} from './messages';++const SPINNER_CHARS = ['·', '✻', '✽', '✶', '✳', '✢'];+const BASE_COLOR = '#D47556';+const HIGHLIGHT_COLOR = '#E08468';++export type ThinkingProps = {+ index: number;+};++export const Thinking: React.FC<ThinkingProps> = ({index}) => {+ const frame = useCurrentFrame();+ const {fps} = useVideoConfig();++ const text = MESSAGES[index % MESSAGES.length] + '…';+ const characters = text+ .split('')+ .map((char, charIndex) => ({char, id: `${char}-${charIndex}`}));++ const framesPerChar = Math.round((150 / 1000) * fps);+ const spinnerIndex = Math.floor(frame / framesPerChar) % SPINNER_CHARS.length;+ const spinnerChar = SPINNER_CHARS[spinnerIndex];++ const framesPerHighlight = Math.round((100 / 1000) * fps);+ const highlightIndex = Math.floor(frame / framesPerHighlight) % text.length;++ return (+ <div+ style={{+ color: BASE_COLOR,+ fontSize: 38,+ fontFamily: 'monospace',+ fontWeight: 500,+ marginTop: 24,+ }}+ >+ {spinnerChar}{' '}+ {characters.map(({char, id}, i) => (+ <span+ key={id}+ style={{+ color: i === highlightIndex ? HIGHLIGHT_COLOR : BASE_COLOR,+ }}+ >+ {char}+ </span>+ ))}+ </div>+ );+};diff --git a/packages/brand/src/announcements/whats-new-in-remotion/TopExplainer.tsx b/packages/brand/src/announcements/whats-new-in-remotion/TopExplainer.tsxnew file mode 100644index 0000000000..4f3b9bff58--- /dev/null+++ b/packages/brand/src/announcements/whats-new-in-remotion/TopExplainer.tsx@@ -0,0 +1,28 @@+import React from 'react';+import {fontSize} from './code-font';++export const PADDING_X = 83;+export const TOP_EXPLAINER_HEIGHT = 100;++export const TopExplainer: React.FC<{+ readonly children: React.ReactNode;+}> = ({children}) => {+ return (+ <div+ style={{+ color: '#080D15',+ fontFamily: 'GT Planar',+ height: 100,+ borderBottom: '2px solid rgba(0, 0, 0, 0.1)',+ fontSize,+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'center',+ opacity: 0.7,+ textAlign: 'center',+ }}+ >+ {children}+ </div>+ );+};diff --git a/packages/brand/src/announcements/whats-new-in-remotion/UpperReference.tsx b/packages/brand/src/announcements/whats-new-in-remotion/UpperReference.tsxnew file mode 100644index 0000000000..73091a0b8f--- /dev/null+++ b/packages/brand/src/announcements/whats-new-in-remotion/UpperReference.tsx@@ -0,0 +1,70 @@+import React from 'react';+import {+ AbsoluteFill,+ interpolate,+ spring,+ useCurrentFrame,+ useVideoConfig,+} from 'remotion';++const PADDING = 70;++type UpperReferenceProps = {+ readonly text: string;+ readonly fontSize?: number;+ readonly maxWidth?: number;+ readonly durationInFrames?: number;+};++export const UpperReference: React.FC<UpperReferenceProps> = ({+ text,+ fontSize = 70,+ maxWidth,+ durationInFrames,+}) => {+ const {fps} = useVideoConfig();+ const frame = useCurrentFrame();++ const entry = spring({+ fps,+ frame,+ config: {damping: 200},+ });++ const exit = durationInFrames+ ? spring({+ fps,+ frame: frame - durationInFrames + 15,+ config: {damping: 200},+ })+ : 0;++ const progress = entry - exit;++ return (+ <AbsoluteFill+ style={{+ padding: PADDING,+ justifyContent: 'flex-start',+ alignItems: 'flex-start',+ }}+ >+ <div+ style={{+ backgroundColor: 'white',+ fontFamily: 'GT Planar',+ padding: '24px 44px',+ fontSize,+ top: PADDING,+ borderRadius: 18,+ boxShadow: '0 0 30px rgba(0, 0, 0, 0.1)',+ fontWeight: 'bold',+ maxWidth,+ transform: `translateY(${-interpolate(progress, [0, 1], [400, 0])}px) rotateZ(${interpolate(progress, [0, 1], [Math.PI * 0.05, 0])}rad)`,+ }}+ >+ {text}+ </div>+ </AbsoluteFill>+ );+};diff --git a/packages/brand/src/announcements/whats-new-in-remotion/VideoBRoll.tsx b/packages/brand/src/announcements/whats-new-in-remotion/VideoBRoll.tsxnew file mode 100644index 0000000000..205bd68d96--- /dev/null+++ b/packages/brand/src/announcements/whats-new-in-remotion/VideoBRoll.tsx@@ -0,0 +1,77 @@+import {Video} from '@remotion/media';+import {+ AbsoluteFill,+ interpolate,+ useCurrentFrame,+ useVideoConfig,+} from 'remotion';+import {assetUrl} from './assets';++type VideoBRollProps = {+ /** Filename in public/ */+ src: string;+ /** Duration in seconds. Default: 3 */+ durationSeconds?: number;+ /** Fade in/out duration in seconds. Default: 0.2 */+ fadeDuration?: number;+ /** Scale factor for Ken Burns zoom. Default: 1.05 */+ scale?: number;+ /** Background color. Default: "white" */+ backgroundColor?: string;+ /** Trim start in seconds. Default: 0 */+ trimBeforeSeconds?: number;+ /** Playback rate. Default: 1 */+ playbackRate?: number;+};++export const VideoBRoll: React.FC<VideoBRollProps> = ({+ src,+ durationSeconds = 3,+ fadeDuration = 0.2,+ scale = 1.05,+ backgroundColor = 'white',+ trimBeforeSeconds = 0,+ playbackRate = 1,+}) => {+ const frame = useCurrentFrame();+ const {fps} = useVideoConfig();++ const duration = Math.round(durationSeconds * fps);+ const fade = fadeDuration * fps;++ const opacity = interpolate(+ frame,+ [0, fade, duration - fade, duration],+ [0, 1, 1, 0],+ {extrapolateLeft: 'clamp', extrapolateRight: 'clamp'},+ );++ const currentScale = interpolate(frame, [0, duration], [1, scale], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ });++ return (+ <AbsoluteFill+ style={{+ backgroundColor,+ justifyContent: 'center',+ alignItems: 'center',+ opacity,+ }}+ >+ <Video+ src={assetUrl(src)}+ muted+ trimBefore={Math.floor(trimBeforeSeconds * fps)}+ playbackRate={playbackRate}+ style={{+ height: '100%',+ objectFit: 'contain',+ transformOrigin: 'top center',+ transform: `scale(${currentScale})`,+ }}+ />+ </AbsoluteFill>+ );+};diff --git a/packages/brand/src/announcements/whats-new-in-remotion/WebRendererDemo.tsx b/packages/brand/src/announcements/whats-new-in-remotion/WebRendererDemo.tsxnew file mode 100644index 0000000000..f66172078b--- /dev/null+++ b/packages/brand/src/announcements/whats-new-in-remotion/WebRendererDemo.tsx@@ -0,0 +1,61 @@+import {Video} from '@remotion/media';+import {+ AbsoluteFill,+ interpolate,+ spring,+ useCurrentFrame,+ useVideoConfig,+} from 'remotion';+import {assetUrl} from './assets';++const PAN_START = 227;++export const WebRendererDemo: React.FC = () => {+ const frame = useCurrentFrame();+ const {fps} = useVideoConfig();++ // Initial zoom from 1 to 1.5 with smooth spring+ const zoomProgress = spring({+ frame,+ fps,+ config: {damping: 200},+ durationInFrames: 30,+ });+ const baseScale = interpolate(zoomProgress, [0, 1], [1, 1.5]);++ // After PAN_START, pan from center to top-right+ const panProgress = spring({+ frame: frame - PAN_START,+ fps,+ config: {damping: 200},+ durationInFrames: 30,+ });++ // Transform origin goes from center to top-right+ const originX = interpolate(panProgress, [0, 1], [50, 100]);+ const originY = interpolate(panProgress, [0, 1], [50, 0]);++ return (+ <AbsoluteFill+ style={{+ backgroundColor: 'white',+ justifyContent: 'center',+ alignItems: 'center',+ overflow: 'hidden',+ }}+ >+ <Video+ src={assetUrl('web-renderer-demo.mp4')}+ muted+ trimBefore={Math.floor(4 * fps)}+ playbackRate={2}+ style={{+ height: '100%',+ objectFit: 'contain',+ transformOrigin: `${originX}% ${originY}%`,+ transform: `scale(${baseScale})`,+ }}+ />+ </AbsoluteFill>+ );+};diff --git a/packages/brand/src/announcements/whats-new-in-remotion/annotations/Callout.tsx b/packages/brand/src/announcements/whats-new-in-remotion/annotations/Callout.tsxnew file mode 100644index 0000000000..eb84687d24--- /dev/null+++ b/packages/brand/src/announcements/whats-new-in-remotion/annotations/Callout.tsx@@ -0,0 +1,71 @@+import type {AnnotationHandler, InlineAnnotation} from 'codehike/code';+import {InnerLine, Pre} from 'codehike/code';+import {mix, readableColor} from 'polished';+import {interpolate, useCurrentFrame} from 'remotion';+import {useThemeColors} from '../calculate-metadata/theme';++export const callout: AnnotationHandler = {+ name: 'callout',+ transform: (annotation: InlineAnnotation) => {+ const {name, query, lineNumber, fromColumn, toColumn, data} = annotation;+ return {+ name,+ query,+ fromLineNumber: lineNumber,+ toLineNumber: lineNumber,+ data: {...data, column: (fromColumn + toColumn) / 2},+ };+ },+ AnnotatedLine: ({annotation, ...props}) => {+ const {column, codeblock} = annotation.data;+ const {indentation} = props;+ const frame = useCurrentFrame();++ const opacity = interpolate(frame, [25, 35], [0, 1], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ });++ const themeColors = useThemeColors();++ const color = readableColor(themeColors.background);+ const calloutColor = mix(0.08, color, themeColors.background);++ return (+ <>+ <InnerLine merge={props} />+ <div+ style={{+ opacity,+ minWidth: `${column + 4}ch`,+ marginLeft: `${indentation}ch`,+ width: 'fit-content',+ backgroundColor: calloutColor,+ padding: '1rem 2rem',+ position: 'relative',+ marginTop: '0.25rem',+ whiteSpace: 'pre-wrap',+ color: themeColors.editor.foreground,+ }}+ >+ <div+ style={{+ left: `${column - indentation - 1}ch`,+ position: 'absolute',+ width: '1rem',+ height: '1rem',+ transform: 'rotate(45deg) translateY(-50%)',+ top: '-2px',+ backgroundColor: calloutColor,+ }}+ />+ {codeblock ? (+ <Pre code={codeblock} style={{margin: 0, fontFamily: 'inherit'}} />+ ) : (+ annotation.data.children || annotation.query+ )}+ </div>+ </>+ );+ },+};diff --git a/packages/brand/src/announcements/whats-new-in-remotion/annotations/Error.tsx b/packages/brand/src/announcements/whats-new-in-remotion/annotations/Error.tsxnew file mode 100644index 0000000000..a5b1b308af--- /dev/null+++ b/packages/brand/src/announcements/whats-new-in-remotion/annotations/Error.tsx@@ -0,0 +1,77 @@+import type {AnnotationHandler, InlineAnnotation} from 'codehike/code';+import {InnerToken} from 'codehike/code';+import {mix, readableColor} from 'polished';+import {interpolate, useCurrentFrame} from 'remotion';+import {useThemeColors} from '../calculate-metadata/theme';++export const errorInline: AnnotationHandler = {+ name: 'error',+ transform: (annotation: InlineAnnotation) => {+ const {query, lineNumber, data} = annotation;+ return [+ annotation,+ {+ name: 'error-message',+ query,+ fromLineNumber: lineNumber,+ toLineNumber: lineNumber,+ data,+ },+ ];+ },+ Inline: ({children}) => (+ <span+ style={{+ // @ts-expect-error - React types+ '--decoration': 'underline wavy red',+ }}+ >+ {children}+ </span>+ ),+ Token: (props) => {+ return (+ <InnerToken+ merge={props}+ style={{+ textDecoration: 'var(--decoration)',+ }}+ />+ );+ },+};++export const errorMessage: AnnotationHandler = {+ name: 'error-message',+ Block: ({annotation, children}) => {+ const frame = useCurrentFrame();+ const opacity = interpolate(frame, [25, 35], [0, 1], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ });+ const themeColors = useThemeColors();++ const color = readableColor(themeColors.background);+ const calloutColor = mix(0.08, color, themeColors.background);++ return (+ <>+ {children}+ <div+ style={{+ opacity,+ borderLeft: '4px solid red',+ marginLeft: '-1rem',+ backgroundColor: calloutColor,+ padding: '1rem 2rem',+ marginTop: '0.5rem',+ whiteSpace: 'pre-wrap',+ color: themeColors.editor.foreground,+ }}+ >+ {annotation.data.children || annotation.query}+ </div>+ </>+ );+ },+};diff --git a/packages/brand/src/announcements/whats-new-in-remotion/annotations/InlineToken.tsx b/packages/brand/src/announcements/whats-new-in-remotion/annotations/InlineToken.tsxnew file mode 100644index 0000000000..9e0e6193fa--- /dev/null+++ b/packages/brand/src/announcements/whats-new-in-remotion/annotations/InlineToken.tsx@@ -0,0 +1,9 @@+import type {AnnotationHandler} from 'codehike/code';+import {InnerToken} from 'codehike/code';++export const tokenTransitions: AnnotationHandler = {+ name: 'token-transitions',+ Token: ({...props}) => (+ <InnerToken merge={props} style={{display: 'inline-block'}} />+ ),+};diff --git a/packages/brand/src/announcements/whats-new-in-remotion/assets.ts b/packages/brand/src/announcements/whats-new-in-remotion/assets.tsnew file mode 100644index 0000000000..e17138da59--- /dev/null+++ b/packages/brand/src/announcements/whats-new-in-remotion/assets.ts@@ -0,0 +1,3 @@+const R2_PREFIX = 'https://remotion.media/announcements/whats-new-in-remotion';++export const assetUrl = (filename: string) => `${R2_PREFIX}/${filename}`;diff --git a/packages/brand/src/announcements/whats-new-in-remotion/calculate-metadata/get-text-dimensions.tsx b/packages/brand/src/announcements/whats-new-in-remotion/calculate-metadata/get-text-dimensions.tsxnew file mode 100644index 0000000000..bb346231eb--- /dev/null+++ b/packages/brand/src/announcements/whats-new-in-remotion/calculate-metadata/get-text-dimensions.tsx@@ -0,0 +1,22 @@+import {measureText} from '@remotion/layout-utils';+import {fontFamily, fontSize, lineHeight, tabSize} from '../code-font';++export const getTextDimensions = (contents: string) => {+ const widthPerCharacter = measureText({+ text: 'A',+ fontFamily,+ fontSize,+ validateFontIsLoaded: true,+ }).width;++ const lines = contents.trimEnd().split('\n');++ const maxCharacters = Math.max(+ ...lines+ .map((value) => value.replaceAll('\t', ' '.repeat(tabSize)).length)+ .flat(),+ );++ const codeWidth = widthPerCharacter * maxCharacters;+ return {width: codeWidth, height: lines.length * fontSize * lineHeight};+};diff --git a/packages/brand/src/announcements/whats-new-in-remotion/calculate-metadata/theme.tsx b/packages/brand/src/announcements/whats-new-in-remotion/calculate-metadata/theme.tsxnew file mode 100644index 0000000000..d8d1f074c3--- /dev/null+++ b/packages/brand/src/announcements/whats-new-in-remotion/calculate-metadata/theme.tsx@@ -0,0 +1,29 @@+import type {getThemeColors} from '@code-hike/lighter';+import React from 'react';++export type ThemeColors = Awaited<ReturnType<typeof getThemeColors>>;++export const ThemeColorsContext = React.createContext<ThemeColors | null>(null);++export const useThemeColors = () => {+ const themeColors = React.useContext(ThemeColorsContext);+ if (!themeColors) {+ throw new Error('ThemeColorsContext not found');+ }++ return themeColors;+};++export const ThemeProvider = ({+ children,+ themeColors,+}: {+ readonly children: React.ReactNode;+ readonly themeColors: ThemeColors;+}) => {+ return (+ <ThemeColorsContext.Provider value={themeColors}>+ {children}+ </ThemeColorsContext.Provider>+ );+};diff --git a/packages/brand/src/announcements/whats-new-in-remotion/code-font.ts b/packages/brand/src/announcements/whats-new-in-remotion/code-font.tsnew file mode 100644index 0000000000..bb6f6f850f--- /dev/null+++ b/packages/brand/src/announcements/whats-new-in-remotion/code-font.ts@@ -0,0 +1,11 @@+import {loadFont} from '@remotion/google-fonts/RobotoMono';++export const {fontFamily, waitUntilDone} = loadFont('normal', {+ subsets: ['latin'],+ weights: ['400', '700'],+});+export const fontSize = 34;+export const tabSize = 3;+export const lineHeight = 1.5;+export const horizontalPadding = 60;+export const verticalPadding = 84;diff --git a/packages/brand/src/announcements/whats-new-in-remotion/code-utils.ts b/packages/brand/src/announcements/whats-new-in-remotion/code-utils.tsnew file mode 100644index 0000000000..b52d27e466--- /dev/null+++ b/packages/brand/src/announcements/whats-new-in-remotion/code-utils.ts@@ -0,0 +1,28 @@+import type {TokenTransition} from 'codehike/utils/token-transitions';+import {interpolate, interpolateColors} from 'remotion';++export function applyStyle({+ element,+ keyframes,+ progress,+}: {+ element: HTMLElement;+ keyframes: TokenTransition['keyframes'];+ progress: number;+}) {+ const {translateX, translateY, color, opacity} = keyframes;++ if (opacity) {+ element.style.opacity = interpolate(progress, [0, 1], opacity).toString();+ }++ if (color) {+ element.style.color = interpolateColors(progress, [0, 1], color);+ }++ const x = translateX ? interpolate(progress, [0, 1], translateX) : 0;+ const y = translateY ? interpolate(progress, [0, 1], translateY) : 0;++ element.style.transform = `perspective(1000px) translate(${x}px, ${y}px)`;+ element.style.willChange = 'transform';+}diff --git a/packages/brand/src/announcements/whats-new-in-remotion/get-video-duration.ts b/packages/brand/src/announcements/whats-new-in-remotion/get-video-duration.tsnew file mode 100644index 0000000000..982cccbeee--- /dev/null+++ b/packages/brand/src/announcements/whats-new-in-remotion/get-video-duration.ts@@ -0,0 +1,13 @@+import {ALL_FORMATS, Input, UrlSource} from 'mediabunny';++export const getVideoDuration = async (src: string) => {+ const input = new Input({+ formats: ALL_FORMATS,+ source: new UrlSource(src, {+ getRetryDelay: () => null,+ }),+ });++ const durationInSeconds = await input.computeDuration();+ return durationInSeconds;+};diff --git a/packages/brand/src/announcements/whats-new-in-remotion/index.css b/packages/brand/src/announcements/whats-new-in-remotion/index.cssnew file mode 100644index 0000000000..d4b5078586--- /dev/null+++ b/packages/brand/src/announcements/whats-new-in-remotion/index.css@@ -0,0 +1 @@+@import 'tailwindcss';diff --git a/packages/brand/src/announcements/whats-new-in-remotion/index.ts b/packages/brand/src/announcements/whats-new-in-remotion/index.tsnew file mode 100644index 0000000000..9c8b78ba93--- /dev/null+++ b/packages/brand/src/announcements/whats-new-in-remotion/index.ts@@ -0,0 +1,4 @@+import {registerRoot} from 'remotion';+import {WhatsNewInRemotion} from './Root';++registerRoot(WhatsNewInRemotion);diff --git a/packages/brand/src/announcements/whats-new-in-remotion/messages.ts b/packages/brand/src/announcements/whats-new-in-remotion/messages.tsnew file mode 100644index 0000000000..7e17c75d22--- /dev/null+++ b/packages/brand/src/announcements/whats-new-in-remotion/messages.ts@@ -0,0 +1,58 @@+export const MESSAGES = [+ 'Accomplishing',+ 'Actioning',+ 'Actualizing',+ 'Baking',+ 'Brewing',+ 'Calculating',+ 'Cerebrating',+ 'Churning',+ 'Clauding',+ 'Coalescing',+ 'Cogitating',+ 'Computing',+ 'Conjuring',+ 'Considering',+ 'Cooking',+ 'Crafting',+ 'Creating',+ 'Crunching',+ 'Deliberating',+ 'Determining',+ 'Doing',+ 'Effecting',+ 'Finagling',+ 'Forging',+ 'Forming',+ 'Generating',+ 'Hatching',+ 'Herding',+ 'Honking',+ 'Hustling',+ 'Ideating',+ 'Inferring',+ 'Manifesting',+ 'Marinating',+ 'Moseying',+ 'Mulling',+ 'Mustering',+ 'Musing',+ 'Noodling',+ 'Percolating',+ 'Pondering',+ 'Processing',+ 'Puttering',+ 'Reticulating',+ 'Ruminating',+ 'Schlepping',+ 'Shucking',+ 'Simmering',+ 'Smooshing',+ 'Spinning',+ 'Stewing',+ 'Synthesizing',+ 'Thinking',+ 'Transmuting',+ 'Vibing',+ 'Working',+];