🎥 Make videos programmatically with React
remotion.dev/brand: Make the Whats New video editable in Studio
Jonny Burgera14bb1777f79
diff --git a/packages/brand/src/announcements/whats-new-in-remotion/AnimatedList.tsx b/packages/brand/src/announcements/whats-new-in-remotion/AnimatedList.tsxdeleted file mode 100644index d1484bd405..0000000000--- a/packages/brand/src/announcements/whats-new-in-remotion/AnimatedList.tsx+++ /dev/null@@ -1,94 +0,0 @@-import {Audio} from '@remotion/media';-import {- AbsoluteFill,- 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 && (- <Audio- from={item.appearFrame}- src={assetUrl('list-item-sfx.m4a')}- volume={0.8}- />- )}- {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.tsxindex 09e278c6f2..5fcd1fc9c1 100644--- a/packages/brand/src/announcements/whats-new-in-remotion/CodeBRoll.tsx+++ b/packages/brand/src/announcements/whats-new-in-remotion/CodeBRoll.tsx@@ -18,10 +18,6 @@ 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: "" */@@ -31,24 +27,12 @@ type CodeBRollProps = {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;@@ -80,7 +64,15 @@ export const CodeBRoll: React.FC<CodeBRollProps> = ({const transitionDelay = data.previousHighlighted ? Math.round(fps) : 0;return (- <AbsoluteFill style={{opacity}}>+ <AbsoluteFill+ name="Code example fade"+ style={{+ opacity: interpolate(frame, [0, 6, 114, 120], [0, 1, 1, 0], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ }),+ }}+ ><ThemeProvider themeColors={data.themeColors}><AbsoluteFill style={{backgroundColor: data.themeColors.background}}>{data.previousHighlighted &&diff --git a/packages/brand/src/announcements/whats-new-in-remotion/Composition.tsx b/packages/brand/src/announcements/whats-new-in-remotion/Composition.tsxindex 34ce4bb7a0..d66299caa3 100644--- a/packages/brand/src/announcements/whats-new-in-remotion/Composition.tsx+++ b/packages/brand/src/announcements/whats-new-in-remotion/Composition.tsx@@ -21,39 +21,6 @@ export const MyCompositionSchema = z.object({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'}}>diff --git a/packages/brand/src/announcements/whats-new-in-remotion/EndCard.tsx b/packages/brand/src/announcements/whats-new-in-remotion/EndCard.tsxindex e9a6bef8be..d55cca2b64 100644--- a/packages/brand/src/announcements/whats-new-in-remotion/EndCard.tsx+++ b/packages/brand/src/announcements/whats-new-in-remotion/EndCard.tsx@@ -1,20 +1,13 @@import React from 'react';-import {- Easing,- Img,- Interactive,- interpolate,- spring,- useCurrentFrame,- useVideoConfig,-} from 'remotion';+import {Easing, Img, Interactive, interpolate, useCurrentFrame} from 'remotion';import {assetUrl} from './assets';export type EndCardPlatform = 'youtube' | 'x' | 'linkedin';const YouTubeIcon: React.FC<{readonly height: number}> = ({height}) => (<svg height={height} viewBox="0 0 576 512">- <path+ <Interactive.Path+ name="Social icon 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"/>@@ -23,7 +16,8 @@ const YouTubeIcon: React.FC<{readonly height: number}> = ({height}) => (const XIcon: React.FC<{readonly height: number}> = ({height}) => (<svg height={height} viewBox="0 0 512 512">- <path+ <Interactive.Path+ name="Social icon 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"/>@@ -32,7 +26,8 @@ const XIcon: React.FC<{readonly height: number}> = ({height}) => (const InstagramIcon: React.FC<{readonly height: number}> = ({height}) => (<svg height={height} viewBox="0 0 448 512">- <path+ <Interactive.Path+ name="Social icon 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"/>@@ -41,7 +36,8 @@ const InstagramIcon: React.FC<{readonly height: number}> = ({height}) => (const LinkedInIcon: React.FC<{readonly height: number}> = ({height}) => (<svg height={height} viewBox="0 0 448 512">- <path+ <Interactive.Path+ name="Social icon 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"/>@@ -52,7 +48,6 @@ export const EndCard: React.FC<{readonly platform: EndCardPlatform}> = ({platform,}) => {const frame = useCurrentFrame();- const {fps} = useVideoConfig();return (<Interactive.Div@@ -70,7 +65,8 @@ export const EndCard: React.FC<{readonly platform: EndCardPlatform}> = ({top: 0,}}>- <div+ <Interactive.Div+ name="End card content"style={{translate: interpolate(frame, [56, 86], ['0px 200px', '0px 0px'], {easing: Easing.spring({damping: 200}),@@ -117,12 +113,10 @@ export const EndCard: React.FC<{readonly platform: EndCardPlatform}> = ({style={{alignItems: 'center',display: 'flex',- opacity: spring({- fps,- frame,- config: {damping: 200},- delay: 66,- durationInFrames: 15,+ opacity: interpolate(frame, [66, 81], [0, 1], {+ easing: Easing.spring({damping: 200}),+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',}),paddingBottom: 16,paddingTop: 16,@@ -152,18 +146,54 @@ export const EndCard: React.FC<{readonly platform: EndCardPlatform}> = ({</div></Interactive.Div>)}- {platform === 'x' ? null : (+ {platform === 'x' ? null : platform === 'linkedin' ? (<Interactive.Divname="X channel"style={{alignItems: 'center',display: 'flex',- opacity: spring({- fps,- frame,- config: {damping: 200},- delay: platform === 'linkedin' ? 61 : 66,- durationInFrames: 15,+ opacity: interpolate(frame, [61, 76], [0, 1], {+ easing: Easing.spring({damping: 200}),+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ }),+ paddingBottom: 16,+ paddingTop: 16,+ }}+ >+ <div+ style={{+ alignItems: 'center',+ display: 'flex',+ height: 50,+ justifyContent: 'center',+ width: 120,+ }}+ >+ <XIcon height={50} />+ </div>+ <div style={{width: 24}} />+ <div+ style={{+ color: 'black',+ fontFamily: 'GT Planar',+ fontSize: 42,+ fontWeight: 500,+ }}+ >+ @remotion+ </div>+ </Interactive.Div>+ ) : (+ <Interactive.Div+ name="X channel"+ style={{+ alignItems: 'center',+ display: 'flex',+ opacity: interpolate(frame, [66, 81], [0, 1], {+ easing: Easing.spring({damping: 200}),+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',}),paddingBottom: 16,paddingTop: 16,@@ -193,57 +223,93 @@ export const EndCard: React.FC<{readonly platform: EndCardPlatform}> = ({</div></Interactive.Div>)}- <Interactive.Div- name="Instagram channel"- style={{- alignItems: 'center',- display: 'flex',- opacity: spring({- fps,- frame,- config: {damping: 200},- delay: platform === 'linkedin' ? 56 : 61,- durationInFrames: 15,- }),- paddingBottom: 16,- paddingTop: 16,- }}- >- <div+ {platform === 'linkedin' ? (+ <Interactive.Div+ name="Instagram channel"style={{alignItems: 'center',display: 'flex',- height: 50,- justifyContent: 'center',- width: 120,+ opacity: interpolate(frame, [56, 71], [0, 1], {+ easing: Easing.spring({damping: 200}),+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ }),+ paddingBottom: 16,+ paddingTop: 16,}}>- <InstagramIcon height={50} />- </div>- <div style={{width: 24}} />- <div+ <div+ style={{+ alignItems: 'center',+ display: 'flex',+ height: 50,+ justifyContent: 'center',+ width: 120,+ }}+ >+ <InstagramIcon height={50} />+ </div>+ <div style={{width: 24}} />+ <div+ style={{+ color: 'black',+ fontFamily: 'GT Planar',+ fontSize: 42,+ fontWeight: 500,+ }}+ >+ @remotion+ </div>+ </Interactive.Div>+ ) : (+ <Interactive.Div+ name="Instagram channel"style={{- color: 'black',- fontFamily: 'GT Planar',- fontSize: 42,- fontWeight: 500,+ alignItems: 'center',+ display: 'flex',+ opacity: interpolate(frame, [61, 76], [0, 1], {+ easing: Easing.spring({damping: 200}),+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ }),+ paddingBottom: 16,+ paddingTop: 16,}}>- @remotion- </div>- </Interactive.Div>+ <div+ style={{+ alignItems: 'center',+ display: 'flex',+ height: 50,+ justifyContent: 'center',+ width: 120,+ }}+ >+ <InstagramIcon height={50} />+ </div>+ <div style={{width: 24}} />+ <div+ style={{+ color: 'black',+ fontFamily: 'GT Planar',+ fontSize: 42,+ fontWeight: 500,+ }}+ >+ @remotion+ </div>+ </Interactive.Div>+ )}{platform === 'linkedin' ? null : (<Interactive.Divname="LinkedIn channel"style={{alignItems: 'center',display: 'flex',- opacity: spring({- fps,- frame,- config: {damping: 200},- delay: 56,- durationInFrames: 15,+ opacity: interpolate(frame, [56, 71], [0, 1], {+ easing: Easing.spring({damping: 200}),+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',}),paddingBottom: 16,paddingTop: 16,@@ -273,7 +339,7 @@ export const EndCard: React.FC<{readonly platform: EndCardPlatform}> = ({</div></Interactive.Div>)}- </div>+ </Interactive.Div></Interactive.Div>);};diff --git a/packages/brand/src/announcements/whats-new-in-remotion/ImageBRoll.tsx b/packages/brand/src/announcements/whats-new-in-remotion/ImageBRoll.tsxdeleted file mode 100644index dbcdf487f7..0000000000--- a/packages/brand/src/announcements/whats-new-in-remotion/ImageBRoll.tsx+++ /dev/null@@ -1,73 +0,0 @@-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.tsxindex c3a90e27cf..8822cd8902 100644--- a/packages/brand/src/announcements/whats-new-in-remotion/LightLeakGrid.tsx+++ b/packages/brand/src/announcements/whats-new-in-remotion/LightLeakGrid.tsx@@ -1,51 +1,95 @@import {LightLeak} from '@remotion/light-leaks';-import {AbsoluteFill, Series} from 'remotion';+import {AbsoluteFill, Interactive, 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>- );-};+export const LightLeakGrid: React.FC = () => (+ <AbsoluteFill style={{backgroundColor: 'black'}}>+ <Interactive.Div+ name="Warm light leaks"+ style={{+ position: 'absolute',+ width: '50%',+ height: '50%',+ top: 0,+ left: 0,+ }}+ >+ <Series>+ <Series.Sequence name="Warm variation 1" durationInFrames={60}>+ <LightLeak seed={1} hueShift={0} />+ </Series.Sequence>+ <Series.Sequence name="Warm variation 2" durationInFrames={60}>+ <LightLeak seed={3} hueShift={0} />+ </Series.Sequence>+ <Series.Sequence name="Warm variation 3" durationInFrames={60}>+ <LightLeak seed={5} hueShift={0} />+ </Series.Sequence>+ </Series>+ </Interactive.Div>+ <Interactive.Div+ name="Blue light leaks"+ style={{+ position: 'absolute',+ width: '50%',+ height: '50%',+ top: 0,+ left: '50%',+ }}+ >+ <Series>+ <Series.Sequence name="Blue variation 1" durationInFrames={60}>+ <LightLeak seed={7} hueShift={200} />+ </Series.Sequence>+ <Series.Sequence name="Blue variation 2" durationInFrames={60}>+ <LightLeak seed={9} hueShift={200} />+ </Series.Sequence>+ <Series.Sequence name="Blue variation 3" durationInFrames={60}>+ <LightLeak seed={11} hueShift={200} />+ </Series.Sequence>+ </Series>+ </Interactive.Div>+ <Interactive.Div+ name="Green light leaks"+ style={{+ position: 'absolute',+ width: '50%',+ height: '50%',+ top: '50%',+ left: 0,+ }}+ >+ <Series>+ <Series.Sequence name="Green variation 1" durationInFrames={60}>+ <LightLeak seed={13} hueShift={120} />+ </Series.Sequence>+ <Series.Sequence name="Green variation 2" durationInFrames={60}>+ <LightLeak seed={15} hueShift={120} />+ </Series.Sequence>+ <Series.Sequence name="Green variation 3" durationInFrames={60}>+ <LightLeak seed={17} hueShift={120} />+ </Series.Sequence>+ </Series>+ </Interactive.Div>+ <Interactive.Div+ name="Purple light leaks"+ style={{+ position: 'absolute',+ width: '50%',+ height: '50%',+ top: '50%',+ left: '50%',+ }}+ >+ <Series>+ <Series.Sequence name="Purple variation 1" durationInFrames={60}>+ <LightLeak seed={21} hueShift={300} />+ </Series.Sequence>+ <Series.Sequence name="Purple variation 2" durationInFrames={60}>+ <LightLeak seed={23} hueShift={300} />+ </Series.Sequence>+ <Series.Sequence name="Purple variation 3" durationInFrames={60}>+ <LightLeak seed={25} hueShift={300} />+ </Series.Sequence>+ </Series>+ </Interactive.Div>+ </AbsoluteFill>+);diff --git a/packages/brand/src/announcements/whats-new-in-remotion/LowerThird.tsx b/packages/brand/src/announcements/whats-new-in-remotion/LowerThird.tsxindex 0439c3a19a..25ee706c36 100644--- a/packages/brand/src/announcements/whats-new-in-remotion/LowerThird.tsx+++ b/packages/brand/src/announcements/whats-new-in-remotion/LowerThird.tsx@@ -1,43 +1,15 @@import React from 'react';import {AbsoluteFill,+ Easing,+ Interactive,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();+export const LowerThird: React.FC = () => {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 (<AbsoluteFillstyle={{@@ -46,7 +18,8 @@ export const LowerThird: React.FC<LowerThirdProps> = ({alignItems: 'flex-start',}}>- <div+ <Interactive.Div+ name="Presenter card"style={{backgroundColor: 'white',fontFamily: 'GT Planar',@@ -54,16 +27,54 @@ export const LowerThird: React.FC<LowerThirdProps> = ({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)`,+ translate: interpolate(+ frame,+ [0, 23, 84, 107],+ ['0px 400px', '0px 0px', '0px 0px', '0px 400px'],+ {+ easing: [+ Easing.spring({damping: 200}),+ Easing.linear,+ Easing.spring({damping: 200}),+ ],+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ },+ ),+ rotate: interpolate(+ frame,+ [0, 23, 84, 107],+ ['-5.4deg', '0deg', '0deg', '-5.4deg'],+ {+ easing: [+ Easing.spring({damping: 200}),+ Easing.linear,+ Easing.spring({damping: 200}),+ ],+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ },+ ),}}>- <div style={{fontSize: 50, fontWeight: 700, color: '#111'}}>{name}</div>- <div- style={{fontSize: 36, fontWeight: 400, marginTop: -12, color: BLUE}}+ <Interactive.Div+ name="Presenter name"+ style={{fontSize: 50, fontWeight: 700, color: '#111'}}+ >+ Jonny Burger+ </Interactive.Div>+ <Interactive.Div+ name="Presenter role"+ style={{+ fontSize: 36,+ fontWeight: 400,+ marginTop: -12,+ color: '#4290f5',+ }}>- {title}- </div>- </div>+ Chief Hacker, Remotion+ </Interactive.Div>+ </Interactive.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.tsxindex db373c740f..66c34382fe 100644--- a/packages/brand/src/announcements/whats-new-in-remotion/NumberedChapter.tsx+++ b/packages/brand/src/announcements/whats-new-in-remotion/NumberedChapter.tsx@@ -3,9 +3,10 @@ import {AbsoluteFill,continueRender,delayRender,- spring,+ Easing,+ Interactive,+ interpolate,useCurrentFrame,- useVideoConfig,} from 'remotion';import {assetUrl} from './assets';@@ -38,28 +39,16 @@ 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>- <Audio from={30} src={assetUrl('chime.mp3')} volume={0.05} />+ <Audio+ name="Chapter chime"+ from={30}+ src={assetUrl('chime.mp3')}+ volume={0.05}+ /><AbsoluteFillstyle={{@@ -68,7 +57,8 @@ export const NumberedChapter: React.FC<NumberedChapterProps> = ({alignItems: 'center',}}>- <div+ <Interactive.Div+ name="Chapter number"style={{height: 120,width: 120,@@ -76,18 +66,26 @@ export const NumberedChapter: React.FC<NumberedChapterProps> = ({justifyContent: 'center',alignItems: 'center',color: 'white',- backgroundColor: BLUE,+ backgroundColor: '#4290f5',fontSize: 50,fontWeight: 700,borderRadius: '50%',fontFamily: 'Variable',fontFeatureSettings: "'ss03' 1",- scale: String(jump1),- translate: `0 ${-jump2 * 50}px`,+ scale: interpolate(frame, [30, 40], [0, 1], {+ easing: Easing.spring({damping: 200}),+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ }),+ translate: interpolate(frame, [37, 47], ['0px 0px', '0px -50px'], {+ easing: Easing.spring({damping: 200}),+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ }),}}>{chapterNumber}- </div>+ </Interactive.Div></AbsoluteFill><AbsoluteFillstyle={{@@ -96,12 +94,20 @@ export const NumberedChapter: React.FC<NumberedChapterProps> = ({fontFamily: 'GT Planar',fontWeight: 500,fontSize: 46,- translate: `0 ${-jump2 * 100 + 150}px`,- opacity: jump2,+ translate: interpolate(frame, [37, 47], ['0px 150px', '0px 50px'], {+ easing: Easing.spring({damping: 200}),+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ }),+ opacity: interpolate(frame, [37, 47], [0, 1], {+ easing: Easing.spring({damping: 200}),+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ }),marginTop: 15,}}>- <h2>{chapterTitle}</h2>+ <Interactive.H2 name="Chapter title">{chapterTitle}</Interactive.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.tsxindex 10c9ac2a73..70db986800 100644--- a/packages/brand/src/announcements/whats-new-in-remotion/Prompt.tsx+++ b/packages/brand/src/announcements/whats-new-in-remotion/Prompt.tsx@@ -2,8 +2,8 @@ import {Audio} from '@remotion/media';import {AbsoluteFill,Easing,+ Interactive,interpolate,- spring,useCurrentFrame,useVideoConfig,} from 'remotion';@@ -12,7 +12,6 @@ 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;@@ -50,41 +49,21 @@ const Cursor: React.FC<{frame: number}> = ({frame}) => {};export const Prompt: React.FC<PromptProps> = ({prompt, thinkingIndex}) => {- const rawFrame = useCurrentFrame();+ const frame = useCurrentFrame();const {fps} = useVideoConfig();- const frame = Math.floor(rawFrame / POSTERIZE_FRAMES) * POSTERIZE_FRAMES;+ const typingAnimationFrame =+ Math.floor(frame / 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 typingFrame = Math.max(0, typingAnimationFrame - 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);@@ -100,30 +79,46 @@ export const Prompt: React.FC<PromptProps> = ({prompt, thinkingIndex}) => {paddingBottom: 80,}}>- <Audio src={assetUrl('prompt-sfx.wav')} volume={0.3} />- <div+ <Audio+ name="Prompt typing sound"+ src={assetUrl('prompt-sfx.wav')}+ volume={0.3}+ />+ <Interactive.Div+ name="Agent prompt card"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,+ width: 1300,height: totalHeight,textAlign: 'left',- transform: `translateY(${translateY}px) scale(${scale})`,+ translate: interpolate(frame, [0, 23], ['0px 400px', '0px 0px'], {+ easing: Easing.spring({damping: 200, allowTail: true}),+ posterize: 3,+ extrapolateLeft: 'clamp',+ extrapolateRight: 'extend',+ }),+ scale: interpolate(frame, [0, 23], [0.9, 1], {+ easing: Easing.spring({damping: 200, allowTail: true}),+ posterize: 3,+ extrapolateLeft: 'clamp',+ extrapolateRight: 'extend',+ }),}}><spanstyle={{color: 'white',- fontSize: FONT_SIZE,+ fontSize: 38,fontFamily: 'monospace',fontWeight: 500,}}>❯ {typedText}</span>- <Cursor frame={frame} />+ <Cursor frame={typingAnimationFrame} /><divstyle={{height: 4,@@ -131,10 +126,19 @@ export const Prompt: React.FC<PromptProps> = ({prompt, thinkingIndex}) => {marginTop: 24,}}/>- <div style={{opacity: thinkingOpacity}}>+ <div+ style={{+ opacity: interpolate(frame, [2.5 * fps, 2.65 * fps], [0, 1], {+ easing: Easing.in(Easing.ease),+ posterize: 3,+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ }),+ }}+ ><Thinking index={thinkingIndex} /></div>- </div>+ </Interactive.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.tsxindex fb2b2b4be4..f7f8e6ac1b 100644--- a/packages/brand/src/announcements/whats-new-in-remotion/Root.tsx+++ b/packages/brand/src/announcements/whats-new-in-remotion/Root.tsx@@ -2,12 +2,7 @@ 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 {MyComposition, MyCompositionSchema} from './Composition';import './index.css';import {Scene1} from './Scene1';import {Scene2} from './Scene2';@@ -21,21 +16,10 @@ 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}`,};};@@ -138,12 +122,12 @@ export const WhatsNewInRemotion: React.FC = () => {<Compositionid="WhatsNew"component={MyComposition}- durationInFrames={300}- fps={FPS}+ durationInFrames={8327}+ fps={30}width={1920}height={1080}schema={MyCompositionSchema}- defaultProps={{platform: 'youtube'} satisfies MyCompositionProps}+ defaultProps={{platform: 'youtube'}}calculateMetadata={calculateMetadata}/>@@ -151,7 +135,7 @@ export const WhatsNewInRemotion: React.FC = () => {id="CodeTransitionDemo"component={CodeTransitionDemo}durationInFrames={90}- fps={FPS}+ fps={30}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.tsxindex f862960157..2921d27dac 100644--- a/packages/brand/src/announcements/whats-new-in-remotion/Scene1.tsx+++ b/packages/brand/src/announcements/whats-new-in-remotion/Scene1.tsx@@ -1,30 +1,19 @@import {Video} from '@remotion/media';-import {AbsoluteFill, Sequence, useVideoConfig} from 'remotion';+import {AbsoluteFill, Sequence} 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}+ name="Presenter video"+ src={assetUrl('whats1.mov')}+ trimBefore={27}+ trimAfter={141}/>- <Sequence from={15} layout="none">- <LowerThird- name="Jonny Burger"- title="Chief Hacker, Remotion"- durationInFrames={Math.ceil(trimAfter - trimBefore - 15)}- />+ <Sequence name="Presenter introduction" from={15} layout="none">+ <LowerThird /></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.tsxindex 049f38667a..dde4b89394 100644--- a/packages/brand/src/announcements/whats-new-in-remotion/Scene10.tsx+++ b/packages/brand/src/announcements/whats-new-in-remotion/Scene10.tsx@@ -1,28 +1,15 @@import {Video} from '@remotion/media';import {AbsoluteFill,+ Easing,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@@ -34,15 +21,20 @@ const VisualModeDemo: React.FC = () => {}}><Video+ name="Visual mode zoom demo"src={assetUrl('visual-mode-demo.mov')}muted- trimBefore={Math.floor(2 * fps)}+ trimBefore={60}playbackRate={3}style={{height: '100%',objectFit: 'contain',transformOrigin: 'bottom left',- transform: `scale(${scale})`,+ scale: interpolate(frame, [0, 30], [1, 1.5], {+ easing: Easing.spring({damping: 200}),+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ }),}}/></AbsoluteFill>@@ -50,28 +42,26 @@ const VisualModeDemo: React.FC = () => {};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}+ name="Presenter video"+ src={assetUrl('whats10.mov')}+ trimBefore={55}+ trimAfter={476}/><Sequence+ name="Visual mode zoom"from={30}- durationInFrames={Math.round(5 * fps)}+ durationInFrames={150}premountFor={30}><VisualModeDemo /></Sequence><Sequence- from={30 + Math.round(5 * fps)}- durationInFrames={Math.round(5 * fps)}+ name="Visual mode editing"+ from={180}+ durationInFrames={150}premountFor={30}><AbsoluteFill@@ -82,9 +72,10 @@ export const Scene10: React.FC = () => {}}><Video+ name="Visual mode editing demo"src={assetUrl('visual-mode-demo-2.mov')}muted- trimBefore={Math.floor(fps)}+ trimBefore={30}playbackRate={2}style={{height: '70%',@@ -94,8 +85,9 @@ export const Scene10: React.FC = () => {</AbsoluteFill></Sequence><Sequence- from={30 + Math.round(10 * fps)}- durationInFrames={Math.round(3 * fps)}+ name="Visual mode demo"+ from={330}+ durationInFrames={90}premountFor={30}><AbsoluteFill@@ -106,9 +98,10 @@ export const Scene10: React.FC = () => {}}><Video+ name="Visual mode final demo"src={assetUrl('visual-mode-demo-3.mov')}muted- trimBefore={Math.floor(5 * fps)}+ trimBefore={150}playbackRate={2}style={{height: '80%',diff --git a/packages/brand/src/announcements/whats-new-in-remotion/Scene11.tsx b/packages/brand/src/announcements/whats-new-in-remotion/Scene11.tsxindex 78e7950214..e41c63bc33 100644--- a/packages/brand/src/announcements/whats-new-in-remotion/Scene11.tsx+++ b/packages/brand/src/announcements/whats-new-in-remotion/Scene11.tsx@@ -1,18 +1,18 @@import {Video} from '@remotion/media';-import {Easing, interpolate, useCurrentFrame, useVideoConfig} from 'remotion';+import {+ Easing,+ Interactive,+ interpolate,+ useCurrentFrame,+ useVideoConfig,+} from 'remotion';import {assetUrl} from './assets';-import {SILENCES} from './Composition';import type {EndCardPlatform} from './EndCard';import {EndCard} from './EndCard';-const FILE = 'whats11.mov';-export const Scene11: React.FC<{platform: EndCardPlatform}> = ({platform}) => {const frame = useCurrentFrame();const {fps} = useVideoConfig();- const silence = SILENCES[FILE];- const trimBefore = Math.floor(silence.leadingEnd * fps);- const trimAfter = Math.ceil(silence.trailingStart * fps);return (<>@@ -30,11 +30,12 @@ export const Scene11: React.FC<{platform: EndCardPlatform}> = ({platform}) => {},),}}- src={assetUrl(FILE)}- trimBefore={trimBefore}- trimAfter={trimAfter}+ src={assetUrl('whats11.mov')}+ trimBefore={98}+ trimAfter={840}/>- <div+ <Interactive.Div+ name="End card panel"style={{backgroundColor: 'white',bottom: 0,@@ -56,7 +57,7 @@ export const Scene11: React.FC<{platform: EndCardPlatform}> = ({platform}) => {}}><EndCard platform={platform} />- </div>+ </Interactive.Div></>);};diff --git a/packages/brand/src/announcements/whats-new-in-remotion/Scene2.tsx b/packages/brand/src/announcements/whats-new-in-remotion/Scene2.tsxindex 551eaaec84..46d58aae4f 100644--- a/packages/brand/src/announcements/whats-new-in-remotion/Scene2.tsx+++ b/packages/brand/src/announcements/whats-new-in-remotion/Scene2.tsx@@ -1,91 +1,173 @@import {Video} from '@remotion/media';import {AbsoluteFill,+ Easing,+ Interactive,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}%)`}}>+ <Interactive.Div+ name="Presenter position"+ style={{+ position: 'absolute',+ top: 0,+ left: 0,+ width: '100%',+ height: '100%',+ display: 'flex',+ flexDirection: 'column',+ translate: interpolate(+ frame,+ [15, 45, 150, 180],+ ['0% 0px', '-20% 0px', '-20% 0px', '0% 0px'],+ {+ easing: [+ Easing.out(Easing.cubic),+ Easing.linear,+ Easing.in(Easing.cubic),+ ],+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ },+ ),+ }}+ ><Video- src={assetUrl(FILE)}- trimBefore={trimBefore}- trimAfter={trimAfter}+ name="Presenter video"+ src={assetUrl('whats2.mov')}+ trimBefore={191}+ trimAfter={954}/>- </AbsoluteFill>- <SlideInOverlay startAt={0.5}>+ </Interactive.Div>+ <Interactive.Div+ name="Chapter panel"+ style={{+ position: 'absolute',+ top: 0,+ bottom: 0,+ left: '60%',+ width: '40%',+ display: 'flex',+ flexDirection: 'column',+ overflow: 'hidden',+ backgroundColor: 'white',+ translate: interpolate(+ frame,+ [15, 45, 150, 180],+ ['102% 0px', '0% 0px', '0% 0px', '102% 0px'],+ {+ easing: [+ Easing.out(Easing.cubic),+ Easing.linear,+ Easing.in(Easing.cubic),+ ],+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ },+ ),+ }}+ ><NumberedChapter chapterNumber={1} chapterTitle="Light Leaks" />- </SlideInOverlay>- <Sequence from={540} durationInFrames={Math.round(3 * fps)} layout="none">- <VideoBRoll src="screen-recording.mov" />+ </Interactive.Div>+ <Sequence+ name="Light leak screen recording"+ from={540}+ durationInFrames={90}+ layout="none"+ >+ <Interactive.Div+ name="screen-recording background"+ style={{+ position: 'absolute',+ inset: 0,+ display: 'flex',+ justifyContent: 'center',+ alignItems: 'center',+ backgroundColor: 'white',+ opacity: interpolate(frame, [540, 546, 624, 630], [0, 1, 1, 0], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ }),+ }}+ >+ <Interactive.Div+ name="B-roll zoom"+ style={{+ height: '100%',+ transformOrigin: 'top center',+ scale: interpolate(frame, [540, 630], [1, 1.05], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ }),+ }}+ >+ <Video+ name="screen-recording"+ src={assetUrl('screen-recording.mov')}+ muted+ style={{+ height: '100%',+ objectFit: 'contain',+ translate: interpolate(+ frame,+ [540, 630],+ ['0px 0%', '0px 0%'],+ {extrapolateLeft: 'clamp', extrapolateRight: 'clamp'},+ ),+ }}+ />+ </Interactive.Div>+ </Interactive.Div></Sequence><Sequence+ name="Agent prompt"from={655}- durationInFrames={Math.round(3.7 * fps)}+ durationInFrames={111}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>- );- })()}+ <Interactive.Div+ name="Light leak prompt"+ style={{+ position: 'absolute',+ inset: 0,+ opacity: interpolate(frame, [760, 766], [1, 0], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ }),+ }}+ >+ <Prompt+ prompt="Add a Light Leak transition between scenes"+ thinkingIndex={5}+ />+ </Interactive.Div></Sequence>- {llOpacity > 0 && (- <AbsoluteFill- from={Math.floor(llStart)}- durationInFrames={Math.ceil(llEnd - llStart)}- style={{opacity: llOpacity}}+ <Sequence name="Light leak variations" from={240} durationInFrames={180}>+ <Interactive.Div+ name="Light leak grid fade"+ style={{+ position: 'absolute',+ inset: 0,+ opacity: interpolate(frame, [240, 246, 414, 420], [0, 1, 1, 0], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ }),+ }}>- <LightLeakGrid durationInFrames={Math.ceil(llEnd - llStart)} />- </AbsoluteFill>- )}+ <LightLeakGrid />+ </Interactive.Div>+ </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.tsxindex 85401f5f98..e00e269090 100644--- a/packages/brand/src/announcements/whats-new-in-remotion/Scene3.tsx+++ b/packages/brand/src/announcements/whats-new-in-remotion/Scene3.tsx@@ -1,18 +1,16 @@import {Video} from '@remotion/media';import {AbsoluteFill,+ Easing,+ Img,+ Interactive,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',@@ -37,18 +35,12 @@ 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+ <Interactive.Div+ name="Scrolling sound effect URLs"style={{- transform: `translateY(${scrollY}px)`,+ translate: interpolate(frame, [0, fps], ['0px 0px', '0px -40px']),padding: '80px 40px',}}>@@ -60,7 +52,7 @@ const SfxUrlList: React.FC = () => {fontSize: 38,fontWeight: 500,color: '#333',- height: LINE_HEIGHT,+ height: 160,display: 'flex',alignItems: 'center',whiteSpace: 'nowrap',@@ -73,11 +65,11 @@ const SfxUrlList: React.FC = () => {{url.replace('https://', '')}</div>))}- </div>+ </Interactive.Div>{/* Top fade mask */}<AbsoluteFillstyle={{- height: FADE_HEIGHT,+ height: 200,bottom: 'auto',background:'linear-gradient(to bottom, white, rgba(255, 255, 255, 0))',@@ -87,7 +79,7 @@ const SfxUrlList: React.FC = () => {{/* Bottom fade mask */}<AbsoluteFillstyle={{- height: FADE_HEIGHT,+ height: 200,top: 'auto',background: 'linear-gradient(to top, white, rgba(255, 255, 255, 0))',pointerEvents: 'none',@@ -98,41 +90,166 @@ const SfxUrlList: React.FC = () => {};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]);+ const frame = useCurrentFrame();return (<AbsoluteFill>- <AbsoluteFill style={{transform: `translateX(${videoX}%)`}}>+ <Interactive.Div+ name="Presenter position"+ style={{+ position: 'absolute',+ top: 0,+ left: 0,+ width: '100%',+ height: '100%',+ display: 'flex',+ flexDirection: 'column',+ translate: interpolate(+ frame,+ [15, 45, 150, 180, 590, 620, 725, 755],+ [+ '0% 0px',+ '-20% 0px',+ '-20% 0px',+ '0% 0px',+ '0% 0px',+ '-20% 0px',+ '-20% 0px',+ '0% 0px',+ ],+ {+ easing: [+ Easing.out(Easing.cubic),+ Easing.linear,+ Easing.in(Easing.cubic),+ Easing.linear,+ Easing.out(Easing.cubic),+ Easing.linear,+ Easing.in(Easing.cubic),+ ],+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ },+ ),+ }}+ ><Video- src={assetUrl(FILE)}- trimBefore={trimBefore}- trimAfter={trimAfter}+ name="Presenter video"+ src={assetUrl('whats3.mov')}+ trimBefore={69}+ trimAfter={1335}/>- </AbsoluteFill>- <SlideInOverlay startAt={0.5}>+ </Interactive.Div>+ <Interactive.Div+ name="Chapter panel"+ style={{+ position: 'absolute',+ top: 0,+ bottom: 0,+ left: '60%',+ width: '40%',+ display: 'flex',+ flexDirection: 'column',+ overflow: 'hidden',+ backgroundColor: 'white',+ translate: interpolate(+ frame,+ [15, 45, 150, 180],+ ['102% 0px', '0% 0px', '0% 0px', '102% 0px'],+ {+ easing: [+ Easing.out(Easing.cubic),+ Easing.linear,+ Easing.in(Easing.cubic),+ ],+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ },+ ),+ }}+ ><NumberedChapter chapterNumber={2} chapterTitle="Sound Effects" />- </SlideInOverlay>- <Sequence from={440} durationInFrames={Math.round(4 * fps)} layout="none">- <ImageBRoll src="sfx-screenshot.png" />+ </Interactive.Div>+ <Sequence+ name="Sound effects website"+ from={440}+ durationInFrames={120}+ layout="none"+ >+ <Interactive.Div+ name="sfx-screenshot background"+ style={{+ position: 'absolute',+ inset: 0,+ display: 'flex',+ justifyContent: 'center',+ alignItems: 'center',+ backgroundColor: 'white',+ opacity: interpolate(frame, [440, 446, 554, 560], [0, 1, 1, 0], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ }),+ }}+ >+ <Interactive.Div+ name="B-roll zoom"+ style={{+ height: '100%',+ transformOrigin: 'top center',+ scale: interpolate(frame, [440, 560], [1, 1.15], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ }),+ }}+ >+ <Img+ name="sfx-screenshot"+ src={assetUrl('sfx-screenshot.png')}+ style={{+ height: '100%',+ objectFit: 'contain',+ translate: interpolate(+ frame,+ [440, 560],+ ['0px 0%', '0px -15%'],+ {extrapolateLeft: 'clamp', extrapolateRight: 'clamp'},+ ),+ }}+ />+ </Interactive.Div>+ </Interactive.Div></Sequence>- <Sequence from={590} layout="none">- <SlideInOverlay startAt={0}>+ <Sequence name="Sound effects URLs" from={590} layout="none">+ <Interactive.Div+ name="Details panel"+ style={{+ position: 'absolute',+ top: 0,+ bottom: 0,+ left: '60%',+ width: '40%',+ display: 'flex',+ flexDirection: 'column',+ overflow: 'hidden',+ backgroundColor: 'white',+ translate: interpolate(+ frame,+ [590, 620, 725, 755],+ ['102% 0px', '0% 0px', '0% 0px', '102% 0px'],+ {+ easing: [+ Easing.out(Easing.cubic),+ Easing.linear,+ Easing.in(Easing.cubic),+ ],+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ },+ ),+ }}+ ><SfxUrlList />- </SlideInOverlay>+ </Interactive.Div></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.tsxindex d9b7840043..acd1011ee4 100644--- a/packages/brand/src/announcements/whats-new-in-remotion/Scene4.tsx+++ b/packages/brand/src/announcements/whats-new-in-remotion/Scene4.tsx@@ -1,12 +1,15 @@import {Video} from '@remotion/media';-import {AbsoluteFill, Sequence, interpolate, useVideoConfig} from 'remotion';+import {+ AbsoluteFill,+ Easing,+ Img,+ Interactive,+ Sequence,+ interpolate,+ useCurrentFrame,+} 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({@@ -16,35 +19,71 @@ const { sandboxFilePath } = await renderMediaOnVercel({});`.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]);+ const frame = useCurrentFrame();return (<AbsoluteFill>- <AbsoluteFill style={{transform: `translateX(${videoX}%)`}}>+ <Interactive.Div+ name="Presenter position"+ style={{+ position: 'absolute',+ top: 0,+ left: 0,+ width: '100%',+ height: '100%',+ display: 'flex',+ flexDirection: 'column',+ translate: interpolate(+ frame,+ [15, 45, 79.8, 109.8],+ ['0% 0px', '-20% 0px', '-20% 0px', '0% 0px'],+ {+ easing: [+ Easing.out(Easing.cubic),+ Easing.linear,+ Easing.in(Easing.cubic),+ ],+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ },+ ),+ }}+ ><Video- src={assetUrl(FILE)}- trimBefore={trimBefore}- trimAfter={trimAfter}+ name="Presenter video"+ src={assetUrl('whats4.mov')}+ trimBefore={45}+ trimAfter={1164}/>- </AbsoluteFill>- <SlideInOverlay- startAt={0.5}- holdDuration={TETRA_DURATION - SLIDE_OUT - 2}- backgroundColor="black"+ </Interactive.Div>+ <Interactive.Div+ name="Chapter panel"+ style={{+ position: 'absolute',+ top: 0,+ bottom: 0,+ left: '60%',+ width: '40%',+ display: 'flex',+ flexDirection: 'column',+ overflow: 'hidden',+ backgroundColor: 'black',+ translate: interpolate(+ frame,+ [15, 45, 79.8, 109.8],+ ['102% 0px', '0% 0px', '0% 0px', '102% 0px'],+ {+ easing: [+ Easing.out(Easing.cubic),+ Easing.linear,+ Easing.in(Easing.cubic),+ ],+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ },+ ),+ }}><AbsoluteFillstyle={{@@ -53,6 +92,7 @@ export const Scene4: React.FC = () => {}}><Video+ name="Vercel tetrahedron"src={assetUrl('tetrahedron.mp4')}mutedstyle={{@@ -61,10 +101,11 @@ export const Scene4: React.FC = () => {}}/></AbsoluteFill>- </SlideInOverlay>+ </Interactive.Div><Sequence+ name="Vercel announcement"from={160}- durationInFrames={Math.round(3 * fps)}+ durationInFrames={90}premountFor={30}><AbsoluteFill@@ -75,6 +116,7 @@ export const Scene4: React.FC = () => {}}><Video+ name="Render on Vercel announcement"src={assetUrl('remotion-on-vercel.mp4')}mutedstyle={{@@ -84,26 +126,169 @@ export const Scene4: React.FC = () => {/></AbsoluteFill></Sequence>- <Sequence from={368} durationInFrames={Math.round(4 * fps)} layout="none">- <ImageBRoll src="vercel-screenshot.png" panY={0} scale={1.12} />+ <Sequence+ name="Vercel website"+ from={368}+ durationInFrames={120}+ layout="none"+ >+ <Interactive.Div+ name="vercel-screenshot background"+ style={{+ position: 'absolute',+ inset: 0,+ display: 'flex',+ justifyContent: 'center',+ alignItems: 'center',+ backgroundColor: 'white',+ opacity: interpolate(frame, [368, 374, 482, 488], [0, 1, 1, 0], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ }),+ }}+ >+ <Interactive.Div+ name="B-roll zoom"+ style={{+ height: '100%',+ transformOrigin: 'top center',+ scale: interpolate(frame, [368, 488], [1, 1.12], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ }),+ }}+ >+ <Img+ name="vercel-screenshot"+ src={assetUrl('vercel-screenshot.png')}+ style={{+ height: '100%',+ objectFit: 'contain',+ translate: interpolate(+ frame,+ [368, 488],+ ['0px 0%', '0px 0%'],+ {extrapolateLeft: 'clamp', extrapolateRight: 'clamp'},+ ),+ }}+ />+ </Interactive.Div>+ </Interactive.Div></Sequence>- <Sequence from={615} durationInFrames={Math.round(4 * fps)} layout="none">- <VideoBRoll src="vercel-screen-recording.mov" durationSeconds={4} />+ <Sequence+ name="Vercel screen recording"+ from={615}+ durationInFrames={120}+ layout="none"+ >+ <Interactive.Div+ name="vercel-screen-recording background"+ style={{+ position: 'absolute',+ inset: 0,+ display: 'flex',+ justifyContent: 'center',+ alignItems: 'center',+ backgroundColor: 'white',+ opacity: interpolate(frame, [615, 621, 729, 735], [0, 1, 1, 0], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ }),+ }}+ >+ <Interactive.Div+ name="B-roll zoom"+ style={{+ height: '100%',+ transformOrigin: 'top center',+ scale: interpolate(frame, [615, 735], [1, 1.05], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ }),+ }}+ >+ <Video+ name="vercel-screen-recording"+ src={assetUrl('vercel-screen-recording.mov')}+ muted+ style={{+ height: '100%',+ objectFit: 'contain',+ translate: interpolate(+ frame,+ [615, 735],+ ['0px 0%', '0px 0%'],+ {extrapolateLeft: 'clamp', extrapolateRight: 'clamp'},+ ),+ }}+ />+ </Interactive.Div>+ </Interactive.Div></Sequence>- <Sequence from={920} durationInFrames={Math.round(4 * fps)} layout="none">+ <Sequence+ name="Vercel code example"+ from={920}+ durationInFrames={120}+ layout="none"+ ><CodeBRollcode={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 name="YouTube tutorial" from={1040} layout="none">+ <AbsoluteFill+ style={{+ padding: 70,+ justifyContent: 'flex-start',+ alignItems: 'flex-start',+ }}+ >+ <Interactive.Div+ name="YouTube tutorial reference"+ style={{+ backgroundColor: 'white',+ fontFamily: 'GT Planar',+ padding: '24px 44px',+ fontSize: 36,+ top: 70,+ borderRadius: 18,+ boxShadow: '0 0 30px rgba(0, 0, 0, 0.1)',+ fontWeight: 'bold',+ translate: interpolate(+ frame,+ [1040, 1063, 1104, 1127],+ ['0px -400px', '0px 0px', '0px 0px', '0px -400px'],+ {+ easing: [+ Easing.spring({damping: 200}),+ Easing.linear,+ Easing.spring({damping: 200}),+ ],+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ },+ ),+ rotate: interpolate(+ frame,+ [1040, 1063, 1104, 1127],+ ['9deg', '0deg', '0deg', '9deg'],+ {+ easing: [+ Easing.spring({damping: 200}),+ Easing.linear,+ Easing.spring({damping: 200}),+ ],+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ },+ ),+ }}+ >+ The tutorial is out now out on YouTube!+ </Interactive.Div>+ </AbsoluteFill></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.tsxindex 55d6ecbacb..cc45c557d2 100644--- a/packages/brand/src/announcements/whats-new-in-remotion/Scene5.tsx+++ b/packages/brand/src/announcements/whats-new-in-remotion/Scene5.tsx@@ -1,81 +1,285 @@-import {Video} from '@remotion/media';+import {Audio, Video} from '@remotion/media';import {AbsoluteFill,+ Easing,+ Interactive,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}}>+ <AbsoluteFill+ name="Chapter title fade"+ style={{+ opacity: interpolate(frame, [185, 193], [1, 0], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ }),+ }}+ ><NumberedChapter chapterNumber={4} chapterTitle="New Skills" /></AbsoluteFill>- <AbsoluteFill style={{opacity: listOpacity}}>- <AnimatedList title="New Skills" items={SKILLS_LIST} />+ <AbsoluteFill+ name="Skills list fade"+ style={{+ opacity: interpolate(frame, [193, 201], [0, 1], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ }),+ }}+ >+ <AbsoluteFill+ style={{+ backgroundColor: 'white',+ flexDirection: 'column',+ display: 'flex',+ padding: '0 40px',+ }}+ >+ <Interactive.Div+ name="New Skills heading"+ style={{+ flex: 1,+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'center',+ fontFamily: 'GT Planar',+ fontSize: 42,+ fontWeight: 700,+ color: '#111',+ borderBottom: '1px solid #e0e0e0',+ }}+ >+ New Skills+ </Interactive.Div>+ <Interactive.Div+ name="Voiceovers with ElevenLabs"+ style={{+ flex: 1,+ display: 'flex',+ alignItems: 'center',+ fontFamily: 'GT Planar',+ fontSize: 34,+ fontWeight: 500,+ color: '#333',+ paddingLeft: 20,+ borderBottom: '1px solid #e0e0e0',+ opacity: interpolate(frame, [255, 267], [0, 1], {+ easing: Easing.spring({damping: 200}),+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ }),+ translate: interpolate(+ frame,+ [255, 267],+ ['0px 20px', '0px 0px'],+ {+ easing: Easing.spring({damping: 200}),+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ },+ ),+ }}+ >+ Voiceovers with ElevenLabs+ </Interactive.Div>+ <Audio+ name="Voiceovers with ElevenLabs sound"+ from={255}+ src={assetUrl('list-item-sfx.m4a')}+ volume={0.8}+ />+ <Interactive.Div+ name="Working with FFmpeg"+ style={{+ flex: 1,+ display: 'flex',+ alignItems: 'center',+ fontFamily: 'GT Planar',+ fontSize: 34,+ fontWeight: 500,+ color: '#333',+ paddingLeft: 20,+ borderBottom: '1px solid #e0e0e0',+ opacity: interpolate(frame, [330, 342], [0, 1], {+ easing: Easing.spring({damping: 200}),+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ }),+ translate: interpolate(+ frame,+ [330, 342],+ ['0px 20px', '0px 0px'],+ {+ easing: Easing.spring({damping: 200}),+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ },+ ),+ }}+ >+ Working with FFmpeg+ </Interactive.Div>+ <Audio+ name="Working with FFmpeg sound"+ from={330}+ src={assetUrl('list-item-sfx.m4a')}+ volume={0.8}+ />+ <Interactive.Div+ name="Audio visualization"+ style={{+ flex: 1,+ display: 'flex',+ alignItems: 'center',+ fontFamily: 'GT Planar',+ fontSize: 34,+ fontWeight: 500,+ color: '#333',+ paddingLeft: 20,+ borderBottom: '1px solid #e0e0e0',+ opacity: interpolate(frame, [420, 432], [0, 1], {+ easing: Easing.spring({damping: 200}),+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ }),+ translate: interpolate(+ frame,+ [420, 432],+ ['0px 20px', '0px 0px'],+ {+ easing: Easing.spring({damping: 200}),+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ },+ ),+ }}+ >+ Audio visualization+ </Interactive.Div>+ <Audio+ name="Audio visualization sound"+ from={420}+ src={assetUrl('list-item-sfx.m4a')}+ volume={0.8}+ />+ <Interactive.Div+ name="Exporting transparent videos"+ style={{+ flex: 1,+ display: 'flex',+ alignItems: 'center',+ fontFamily: 'GT Planar',+ fontSize: 34,+ fontWeight: 500,+ color: '#333',+ paddingLeft: 20,+ borderBottom: 'none',+ opacity: interpolate(frame, [520, 532], [0, 1], {+ easing: Easing.spring({damping: 200}),+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ }),+ translate: interpolate(+ frame,+ [520, 532],+ ['0px 20px', '0px 0px'],+ {+ easing: Easing.spring({damping: 200}),+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ },+ ),+ }}+ >+ Exporting transparent videos+ </Interactive.Div>+ <Audio+ name="Exporting transparent videos sound"+ from={520}+ src={assetUrl('list-item-sfx.m4a')}+ volume={0.8}+ />+ </AbsoluteFill></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]);+ const frame = useCurrentFrame();return (<AbsoluteFill>- <AbsoluteFill style={{transform: `translateX(${videoX}%)`}}>+ <Interactive.Div+ name="Presenter position"+ style={{+ position: 'absolute',+ top: 0,+ left: 0,+ width: '100%',+ height: '100%',+ display: 'flex',+ flexDirection: 'column',+ translate: interpolate(+ frame,+ [15, 45, 638.1, 668.1],+ ['0% 0px', '-20% 0px', '-20% 0px', '0% 0px'],+ {+ easing: [+ Easing.out(Easing.cubic),+ Easing.linear,+ Easing.in(Easing.cubic),+ ],+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ },+ ),+ }}+ ><Video- src={assetUrl(FILE)}- trimBefore={trimBefore}- trimAfter={trimAfter}+ name="Presenter video"+ src={assetUrl('whats5.mov')}+ trimBefore={91}+ trimAfter={760}/>- </AbsoluteFill>- <SlideInOverlay startAt={0.5} holdDuration={sceneDuration - 0.5 - 1 - 1}>+ </Interactive.Div>+ <Interactive.Div+ name="Chapter panel"+ style={{+ position: 'absolute',+ top: 0,+ bottom: 0,+ left: '60%',+ width: '40%',+ display: 'flex',+ flexDirection: 'column',+ overflow: 'hidden',+ backgroundColor: 'white',+ translate: interpolate(+ frame,+ [15, 45, 638.1, 668.1],+ ['102% 0px', '0% 0px', '0% 0px', '102% 0px'],+ {+ easing: [+ Easing.out(Easing.cubic),+ Easing.linear,+ Easing.in(Easing.cubic),+ ],+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ },+ ),+ }}+ ><OverlayContent />- </SlideInOverlay>+ </Interactive.Div></AbsoluteFill>);};diff --git a/packages/brand/src/announcements/whats-new-in-remotion/Scene6.tsx b/packages/brand/src/announcements/whats-new-in-remotion/Scene6.tsxindex fab8d490fa..882aea5981 100644--- a/packages/brand/src/announcements/whats-new-in-remotion/Scene6.tsx+++ b/packages/brand/src/announcements/whats-new-in-remotion/Scene6.tsx@@ -1,27 +1,16 @@import {Video} from '@remotion/media';-import {AbsoluteFill, Sequence, interpolate, useVideoConfig} from 'remotion';+import {+ AbsoluteFill,+ Easing,+ Interactive,+ Sequence,+ interpolate,+ useCurrentFrame,+} 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@@ -32,7 +21,8 @@ const CssPropertyList: React.FC = () => {padding: '0 40px',}}>- <div+ <Interactive.Div+ name="New CSS properties heading"style={{display: 'flex',alignItems: 'center',@@ -47,74 +37,346 @@ const CssPropertyList: React.FC = () => {}}>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>- ))}+ </Interactive.Div>+ <Interactive.Div+ name="border-style"+ style={{+ flex: 1,+ display: 'flex',+ alignItems: 'center',+ fontFamily: 'GT Planar',+ fontSize: 28,+ fontWeight: 500,+ color: '#333',+ borderBottom: '1px solid #e0e0e0',+ paddingLeft: 24,+ }}+ >+ border-style+ </Interactive.Div>+ <Interactive.Div+ name="border-width"+ style={{+ flex: 1,+ display: 'flex',+ alignItems: 'center',+ fontFamily: 'GT Planar',+ fontSize: 28,+ fontWeight: 500,+ color: '#333',+ borderBottom: '1px solid #e0e0e0',+ paddingLeft: 24,+ }}+ >+ border-width+ </Interactive.Div>+ <Interactive.Div+ name="border-color"+ style={{+ flex: 1,+ display: 'flex',+ alignItems: 'center',+ fontFamily: 'GT Planar',+ fontSize: 28,+ fontWeight: 500,+ color: '#333',+ borderBottom: '1px solid #e0e0e0',+ paddingLeft: 24,+ }}+ >+ border-color+ </Interactive.Div>+ <Interactive.Div+ name="box-shadow"+ style={{+ flex: 1,+ display: 'flex',+ alignItems: 'center',+ fontFamily: 'GT Planar',+ fontSize: 28,+ fontWeight: 500,+ color: '#333',+ borderBottom: '1px solid #e0e0e0',+ paddingLeft: 24,+ }}+ >+ box-shadow+ </Interactive.Div>+ <Interactive.Div+ name="text-shadow"+ style={{+ flex: 1,+ display: 'flex',+ alignItems: 'center',+ fontFamily: 'GT Planar',+ fontSize: 28,+ fontWeight: 500,+ color: '#333',+ borderBottom: '1px solid #e0e0e0',+ paddingLeft: 24,+ }}+ >+ text-shadow+ </Interactive.Div>+ <Interactive.Div+ name="font-style"+ style={{+ flex: 1,+ display: 'flex',+ alignItems: 'center',+ fontFamily: 'GT Planar',+ fontSize: 28,+ fontWeight: 500,+ color: '#333',+ borderBottom: '1px solid #e0e0e0',+ paddingLeft: 24,+ }}+ >+ font-style+ </Interactive.Div>+ <Interactive.Div+ name="object-fit"+ style={{+ flex: 1,+ display: 'flex',+ alignItems: 'center',+ fontFamily: 'GT Planar',+ fontSize: 28,+ fontWeight: 500,+ color: '#333',+ borderBottom: '1px solid #e0e0e0',+ paddingLeft: 24,+ }}+ >+ object-fit+ </Interactive.Div>+ <Interactive.Div+ name="filter"+ style={{+ flex: 1,+ display: 'flex',+ alignItems: 'center',+ fontFamily: 'GT Planar',+ fontSize: 28,+ fontWeight: 500,+ color: '#333',+ borderBottom: '1px solid #e0e0e0',+ paddingLeft: 24,+ }}+ >+ filter+ </Interactive.Div>+ <Interactive.Div+ name="paint-order"+ style={{+ flex: 1,+ display: 'flex',+ alignItems: 'center',+ fontFamily: 'GT Planar',+ fontSize: 28,+ fontWeight: 500,+ color: '#333',+ borderBottom: '1px solid #e0e0e0',+ paddingLeft: 24,+ }}+ >+ paint-order+ </Interactive.Div>+ <Interactive.Div+ name="-webkit-text-stroke"+ style={{+ flex: 1,+ display: 'flex',+ alignItems: 'center',+ fontFamily: 'GT Planar',+ fontSize: 28,+ fontWeight: 500,+ color: '#333',+ borderBottom: 'none',+ paddingLeft: 24,+ }}+ >+ -webkit-text-stroke+ </Interactive.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]);+ const frame = useCurrentFrame();return (<AbsoluteFill>- <AbsoluteFill style={{transform: `translateX(${videoX}%)`}}>+ <Interactive.Div+ name="Presenter position"+ style={{+ position: 'absolute',+ top: 0,+ left: 0,+ width: '100%',+ height: '100%',+ display: 'flex',+ flexDirection: 'column',+ translate: interpolate(+ frame,+ [15, 45, 120, 150, 759.6, 789.6, 894.6, 924.6],+ [+ '0% 0px',+ '-20% 0px',+ '-20% 0px',+ '0% 0px',+ '0% 0px',+ '-20% 0px',+ '-20% 0px',+ '0% 0px',+ ],+ {+ easing: [+ Easing.out(Easing.cubic),+ Easing.linear,+ Easing.in(Easing.cubic),+ Easing.linear,+ Easing.out(Easing.cubic),+ Easing.linear,+ Easing.in(Easing.cubic),+ ],+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ },+ ),+ }}+ ><Video- src={assetUrl(FILE)}- trimBefore={trimBefore}- trimAfter={trimAfter}+ name="Presenter video"+ src={assetUrl('whats6.mov')}+ trimBefore={69}+ trimAfter={950}/>- </AbsoluteFill>- <SlideInOverlay startAt={0.5} holdDuration={2.5}>+ </Interactive.Div>+ <Interactive.Div+ name="Chapter panel"+ style={{+ position: 'absolute',+ top: 0,+ bottom: 0,+ left: '60%',+ width: '40%',+ display: 'flex',+ flexDirection: 'column',+ overflow: 'hidden',+ backgroundColor: 'white',+ translate: interpolate(+ frame,+ [15, 45, 120, 150],+ ['102% 0px', '0% 0px', '0% 0px', '102% 0px'],+ {+ easing: [+ Easing.out(Easing.cubic),+ Easing.linear,+ Easing.in(Easing.cubic),+ ],+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ },+ ),+ }}+ ><NumberedChapter chapterNumber={5} chapterTitle="Web Renderer Update" />- </SlideInOverlay>+ </Interactive.Div><Sequence+ name="Web renderer demo"from={180}- durationInFrames={Math.round(15 * fps)}+ durationInFrames={450}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 name="Web renderer note" from={190} layout="none">+ <AbsoluteFill+ style={{+ padding: 70,+ justifyContent: 'flex-start',+ alignItems: 'flex-start',+ }}+ >+ <Interactive.Div+ name="Client-side rendering reference"+ style={{+ backgroundColor: 'white',+ fontFamily: 'GT Planar',+ padding: '24px 44px',+ fontSize: 30,+ top: 70,+ borderRadius: 18,+ boxShadow: '0 0 30px rgba(0, 0, 0, 0.1)',+ fontWeight: 'bold',+ maxWidth: 800,+ translate: interpolate(+ frame,+ [190, 213, 325, 348],+ ['0px -400px', '0px 0px', '0px 0px', '0px -400px'],+ {+ easing: [+ Easing.spring({damping: 200}),+ Easing.linear,+ Easing.spring({damping: 200}),+ ],+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ },+ ),+ rotate: interpolate(+ frame,+ [190, 213, 325, 348],+ ['9deg', '0deg', '0deg', '9deg'],+ {+ easing: [+ Easing.spring({damping: 200}),+ Easing.linear,+ Easing.spring({damping: 200}),+ ],+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ },+ ),+ }}+ >+ Fun fact: This video was edited with Claude Code and rendered+ completely client-side!+ </Interactive.Div>+ </AbsoluteFill></Sequence>- <Sequence from={Math.round(listStartAt * fps)} layout="none">- <SlideInOverlay startAt={0}>+ <Sequence name="Supported CSS properties" from={760} layout="none">+ <Interactive.Div+ name="Details panel"+ style={{+ position: 'absolute',+ top: 0,+ bottom: 0,+ left: '60%',+ width: '40%',+ display: 'flex',+ flexDirection: 'column',+ overflow: 'hidden',+ backgroundColor: 'white',+ translate: interpolate(+ frame,+ [760, 790, 895, 925],+ ['102% 0px', '0% 0px', '0% 0px', '102% 0px'],+ {+ easing: [+ Easing.out(Easing.cubic),+ Easing.linear,+ Easing.in(Easing.cubic),+ ],+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ },+ ),+ }}+ ><CssPropertyList />- </SlideInOverlay>+ </Interactive.Div></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.tsxindex 39feff1c3b..e1d98ed805 100644--- a/packages/brand/src/announcements/whats-new-in-remotion/Scene7.tsx+++ b/packages/brand/src/announcements/whats-new-in-remotion/Scene7.tsx@@ -1,46 +1,31 @@-import {Video} from '@remotion/media';+import {Audio, Video} from '@remotion/media';import {AbsoluteFill,+ Easing,+ Interactive,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 (<AbsoluteFillstyle={{backgroundColor: '#141414',justifyContent: 'center',alignItems: 'center',- opacity,+ opacity: interpolate(frame, [0, 6, 144, 150], [0, 1, 1, 0], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ }),}}><Video+ name="Agent workflow screen recording"src={assetUrl('agents-screen-recording.mov')}mutedplaybackRate={2}@@ -48,7 +33,10 @@ const AgentsBRoll: React.FC = () => {height: '70%',objectFit: 'contain',transformOrigin: 'top center',- transform: `scale(${scale})`,+ scale: interpolate(frame, [0, 150], [1, 1.08], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ }),}}/></AbsoluteFill>@@ -56,49 +44,242 @@ const AgentsBRoll: React.FC = () => {};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]);+ const frame = useCurrentFrame();return (<AbsoluteFill>- <AbsoluteFill style={{transform: `translateX(${videoX}%)`}}>+ <Interactive.Div+ name="Presenter position"+ style={{+ position: 'absolute',+ top: 0,+ left: 0,+ width: '100%',+ height: '100%',+ display: 'flex',+ flexDirection: 'column',+ translate: interpolate(+ frame,+ [15, 45, 120, 150, 700, 730, 1000, 1030],+ [+ '0% 0px',+ '-20% 0px',+ '-20% 0px',+ '0% 0px',+ '0% 0px',+ '-20% 0px',+ '-20% 0px',+ '0% 0px',+ ],+ {+ easing: [+ Easing.out(Easing.cubic),+ Easing.linear,+ Easing.in(Easing.cubic),+ Easing.linear,+ Easing.out(Easing.cubic),+ Easing.linear,+ Easing.in(Easing.cubic),+ ],+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ },+ ),+ }}+ ><Video- src={assetUrl(FILE)}- trimBefore={trimBefore}- trimAfter={trimAfter}+ name="Presenter video"+ src={assetUrl('whats7.mov')}+ trimBefore={126}+ trimAfter={1179}/>- </AbsoluteFill>- <SlideInOverlay startAt={0.5} holdDuration={2.5}>+ </Interactive.Div>+ <Interactive.Div+ name="Chapter panel"+ style={{+ position: 'absolute',+ top: 0,+ bottom: 0,+ left: '60%',+ width: '40%',+ display: 'flex',+ flexDirection: 'column',+ overflow: 'hidden',+ backgroundColor: 'white',+ translate: interpolate(+ frame,+ [15, 45, 120, 150],+ ['102% 0px', '0% 0px', '0% 0px', '102% 0px'],+ {+ easing: [+ Easing.out(Easing.cubic),+ Easing.linear,+ Easing.in(Easing.cubic),+ ],+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ },+ ),+ }}+ ><NumberedChapterchapterNumber={6}chapterTitle="Work better with Agents"/>- </SlideInOverlay>- <Sequence from={530} durationInFrames={Math.round(5 * fps)} layout="none">+ </Interactive.Div>+ <Sequence+ name="Agents screen recording"+ from={530}+ durationInFrames={150}+ 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 name="Agent improvements" from={700} layout="none">+ <Interactive.Div+ name="Details panel"+ style={{+ position: 'absolute',+ top: 0,+ bottom: 0,+ left: '60%',+ width: '40%',+ display: 'flex',+ flexDirection: 'column',+ overflow: 'hidden',+ backgroundColor: 'white',+ translate: interpolate(+ frame,+ [700, 730, 1000, 1030],+ ['102% 0px', '0% 0px', '0% 0px', '102% 0px'],+ {+ easing: [+ Easing.out(Easing.cubic),+ Easing.linear,+ Easing.in(Easing.cubic),+ ],+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ },+ ),+ }}+ >+ <AbsoluteFill+ style={{+ backgroundColor: 'white',+ flexDirection: 'column',+ display: 'flex',+ padding: '0 40px',+ }}+ >+ <Interactive.Div+ name="Agentic flow heading"+ style={{+ flex: 1,+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'center',+ fontFamily: 'GT Planar',+ fontSize: 42,+ fontWeight: 700,+ color: '#111',+ borderBottom: '1px solid #e0e0e0',+ }}+ >+ Agentic flow+ </Interactive.Div>+ <Interactive.Div+ name="Single Studio Server"+ style={{+ flex: 1,+ display: 'flex',+ alignItems: 'center',+ fontFamily: 'GT Planar',+ fontSize: 34,+ fontWeight: 500,+ color: '#333',+ paddingLeft: 20,+ borderBottom: '1px solid #e0e0e0',+ }}+ >+ Single Studio Server+ </Interactive.Div>+ <Interactive.Div+ name="No multiple lockfile warning"+ style={{+ flex: 1,+ display: 'flex',+ alignItems: 'center',+ fontFamily: 'GT Planar',+ fontSize: 34,+ fontWeight: 500,+ color: '#333',+ paddingLeft: 20,+ borderBottom: '1px solid #e0e0e0',+ opacity: interpolate(frame, [740, 752], [0, 1], {+ easing: Easing.spring({damping: 200}),+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ }),+ translate: interpolate(+ frame,+ [740, 752],+ ['0px 20px', '0px 0px'],+ {+ easing: Easing.spring({damping: 200}),+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ },+ ),+ }}+ >+ No multiple lockfile warning+ </Interactive.Div>+ <Audio+ name="No multiple lockfile warning sound"+ from={40}+ src={assetUrl('list-item-sfx.m4a')}+ volume={0.8}+ />+ <Interactive.Div+ name="Zod 4 supported"+ style={{+ flex: 1,+ display: 'flex',+ alignItems: 'center',+ fontFamily: 'GT Planar',+ fontSize: 34,+ fontWeight: 500,+ color: '#333',+ paddingLeft: 20,+ borderBottom: 'none',+ opacity: interpolate(frame, [940, 952], [0, 1], {+ easing: Easing.spring({damping: 200}),+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ }),+ translate: interpolate(+ frame,+ [940, 952],+ ['0px 20px', '0px 0px'],+ {+ easing: Easing.spring({damping: 200}),+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ },+ ),+ }}+ >+ Zod 4 supported+ </Interactive.Div>+ <Audio+ name="Zod 4 supported sound"+ from={240}+ src={assetUrl('list-item-sfx.m4a')}+ volume={0.8}+ />+ </AbsoluteFill>+ </Interactive.Div></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.tsxindex f22cfa30a4..0f536e390b 100644--- a/packages/brand/src/announcements/whats-new-in-remotion/Scene8.tsx+++ b/packages/brand/src/announcements/whats-new-in-remotion/Scene8.tsx@@ -1,12 +1,15 @@import {Video} from '@remotion/media';-import {AbsoluteFill, Sequence, interpolate, useVideoConfig} from 'remotion';+import {+ AbsoluteFill,+ Easing,+ Interactive,+ Sequence,+ interpolate,+ useCurrentFrame,+} 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";@@ -28,32 +31,83 @@ 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]);+ const frame = useCurrentFrame();return (<AbsoluteFill>- <AbsoluteFill style={{transform: `translateX(${videoX}%)`}}>+ <Interactive.Div+ name="Presenter position"+ style={{+ position: 'absolute',+ top: 0,+ left: 0,+ width: '100%',+ height: '100%',+ display: 'flex',+ flexDirection: 'column',+ translate: interpolate(+ frame,+ [15, 45, 120, 150],+ ['0% 0px', '-20% 0px', '-20% 0px', '0% 0px'],+ {+ easing: [+ Easing.out(Easing.cubic),+ Easing.linear,+ Easing.in(Easing.cubic),+ ],+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ },+ ),+ }}+ ><Video- src={assetUrl(FILE)}- trimBefore={trimBefore}- trimAfter={trimAfter}+ name="Presenter video"+ src={assetUrl('whats8.mov')}+ trimBefore={81}+ trimAfter={870}/>- </AbsoluteFill>- <SlideInOverlay startAt={0.5} holdDuration={2.5}>+ </Interactive.Div>+ <Interactive.Div+ name="Chapter panel"+ style={{+ position: 'absolute',+ top: 0,+ bottom: 0,+ left: '60%',+ width: '40%',+ display: 'flex',+ flexDirection: 'column',+ overflow: 'hidden',+ backgroundColor: 'white',+ translate: interpolate(+ frame,+ [15, 45, 120, 150],+ ['102% 0px', '0% 0px', '0% 0px', '102% 0px'],+ {+ easing: [+ Easing.out(Easing.cubic),+ Easing.linear,+ Easing.in(Easing.cubic),+ ],+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ },+ ),+ }}+ ><NumberedChapter chapterNumber={7} chapterTitle="Rspack" />- </SlideInOverlay>- <Sequence from={180} durationInFrames={Math.round(4 * fps)} layout="none">+ </Interactive.Div>+ <Sequence+ name="Rspack configuration"+ from={180}+ durationInFrames={120}+ layout="none"+ ><CodeBRollcode={CODE_AFTER}previousCode={CODE_BEFORE}lang="ts"- durationSeconds={4}topExplainer="remotion.config.ts"/></Sequence>diff --git a/packages/brand/src/announcements/whats-new-in-remotion/Scene9.tsx b/packages/brand/src/announcements/whats-new-in-remotion/Scene9.tsxindex 3ab49e6b44..5cffb79725 100644--- a/packages/brand/src/announcements/whats-new-in-remotion/Scene9.tsx+++ b/packages/brand/src/announcements/whats-new-in-remotion/Scene9.tsx@@ -1,36 +1,85 @@import {Video} from '@remotion/media';-import {AbsoluteFill, interpolate, useVideoConfig} from 'remotion';+import {+ AbsoluteFill,+ Easing,+ Interactive,+ interpolate,+ useCurrentFrame,+} 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]);+ const frame = useCurrentFrame();return (<AbsoluteFill>- <AbsoluteFill style={{transform: `translateX(${videoX}%)`}}>+ <Interactive.Div+ name="Presenter position"+ style={{+ position: 'absolute',+ top: 0,+ left: 0,+ width: '100%',+ height: '100%',+ display: 'flex',+ flexDirection: 'column',+ translate: interpolate(+ frame,+ [15, 45, 120, 150],+ ['0% 0px', '-20% 0px', '-20% 0px', '0% 0px'],+ {+ easing: [+ Easing.out(Easing.cubic),+ Easing.linear,+ Easing.in(Easing.cubic),+ ],+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ },+ ),+ }}+ ><Video- src={assetUrl(FILE)}- trimBefore={trimBefore}- trimAfter={trimAfter}+ name="Presenter video"+ src={assetUrl('whats9.mov')}+ trimBefore={45}+ trimAfter={555}/>- </AbsoluteFill>- <SlideInOverlay startAt={0.5} holdDuration={2.5}>+ </Interactive.Div>+ <Interactive.Div+ name="Chapter panel"+ style={{+ position: 'absolute',+ top: 0,+ bottom: 0,+ left: '60%',+ width: '40%',+ display: 'flex',+ flexDirection: 'column',+ overflow: 'hidden',+ backgroundColor: 'white',+ translate: interpolate(+ frame,+ [15, 45, 120, 150],+ ['102% 0px', '0% 0px', '0% 0px', '102% 0px'],+ {+ easing: [+ Easing.out(Easing.cubic),+ Easing.linear,+ Easing.in(Easing.cubic),+ ],+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ },+ ),+ }}+ ><NumberedChapterchapterNumber={8}chapterTitle="Preview: Visual Mode"/>- </SlideInOverlay>+ </Interactive.Div></AbsoluteFill>);};diff --git a/packages/brand/src/announcements/whats-new-in-remotion/SlideInOverlay.tsx b/packages/brand/src/announcements/whats-new-in-remotion/SlideInOverlay.tsxdeleted file mode 100644index 16466a467d..0000000000--- a/packages/brand/src/announcements/whats-new-in-remotion/SlideInOverlay.tsx+++ /dev/null@@ -1,96 +0,0 @@-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',- }}- showInTimeline={false}- >- {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.tsxindex cd100d9504..181a5bae38 100644--- a/packages/brand/src/announcements/whats-new-in-remotion/Thinking.tsx+++ b/packages/brand/src/announcements/whats-new-in-remotion/Thinking.tsx@@ -1,4 +1,4 @@-import {useCurrentFrame, useVideoConfig} from 'remotion';+import {Interactive, useCurrentFrame, useVideoConfig} from 'remotion';import {MESSAGES} from './messages';const SPINNER_CHARS = ['·', '✻', '✽', '✶', '✳', '✢'];@@ -26,9 +26,10 @@ export const Thinking: React.FC<ThinkingProps> = ({index}) => {const highlightIndex = Math.floor(frame / framesPerHighlight) % text.length;return (- <div+ <Interactive.Div+ name="Agent thinking indicator"style={{- color: BASE_COLOR,+ color: '#D47556',fontSize: 38,fontFamily: 'monospace',fontWeight: 500,@@ -46,6 +47,6 @@ export const Thinking: React.FC<ThinkingProps> = ({index}) => {{char}</span>))}- </div>+ </Interactive.Div>);};diff --git a/packages/brand/src/announcements/whats-new-in-remotion/TopExplainer.tsx b/packages/brand/src/announcements/whats-new-in-remotion/TopExplainer.tsxindex 4f3b9bff58..c2fbabb4ef 100644--- a/packages/brand/src/announcements/whats-new-in-remotion/TopExplainer.tsx+++ b/packages/brand/src/announcements/whats-new-in-remotion/TopExplainer.tsx@@ -1,5 +1,5 @@import React from 'react';-import {fontSize} from './code-font';+import {Interactive} from 'remotion';export const PADDING_X = 83;export const TOP_EXPLAINER_HEIGHT = 100;@@ -8,13 +8,14 @@ export const TopExplainer: React.FC<{readonly children: React.ReactNode;}> = ({children}) => {return (- <div+ <Interactive.Div+ name="Code example heading"style={{color: '#080D15',fontFamily: 'GT Planar',height: 100,borderBottom: '2px solid rgba(0, 0, 0, 0.1)',- fontSize,+ fontSize: 34,display: 'flex',alignItems: 'center',justifyContent: 'center',@@ -23,6 +24,6 @@ export const TopExplainer: React.FC<{}}>{children}- </div>+ </Interactive.Div>);};diff --git a/packages/brand/src/announcements/whats-new-in-remotion/UpperReference.tsx b/packages/brand/src/announcements/whats-new-in-remotion/UpperReference.tsxdeleted file mode 100644index 73091a0b8f..0000000000--- a/packages/brand/src/announcements/whats-new-in-remotion/UpperReference.tsx+++ /dev/null@@ -1,70 +0,0 @@-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.tsxdeleted file mode 100644index 205bd68d96..0000000000--- a/packages/brand/src/announcements/whats-new-in-remotion/VideoBRoll.tsx+++ /dev/null@@ -1,77 +0,0 @@-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.tsxindex f66172078b..93d6286a08 100644--- a/packages/brand/src/announcements/whats-new-in-remotion/WebRendererDemo.tsx+++ b/packages/brand/src/announcements/whats-new-in-remotion/WebRendererDemo.tsx@@ -1,39 +1,9 @@import {Video} from '@remotion/media';-import {- AbsoluteFill,- interpolate,- spring,- useCurrentFrame,- useVideoConfig,-} from 'remotion';+import {AbsoluteFill, Easing, interpolate, useCurrentFrame} 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@@ -45,15 +15,29 @@ export const WebRendererDemo: React.FC = () => {}}><Video+ name="Web renderer screen recording"src={assetUrl('web-renderer-demo.mp4')}muted- trimBefore={Math.floor(4 * fps)}+ trimBefore={120}playbackRate={2}style={{height: '100%',objectFit: 'contain',- transformOrigin: `${originX}% ${originY}%`,- transform: `scale(${baseScale})`,+ transformOrigin: interpolate(+ frame,+ [227, 257],+ ['50% 50%', '100% 0%'],+ {+ easing: Easing.spring({damping: 200}),+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ },+ ),+ scale: interpolate(frame, [0, 30], [1, 1.5], {+ easing: Easing.spring({damping: 200}),+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ }),}}/></AbsoluteFill>