Skip to content

🎥 Make videos programmatically with React

Internal: Group roller ski footage and music tracks

Jonny Burgera85b74a4bb6b
diff --git a/packages/jonnys-videos/remotion.config.ts b/packages/jonnys-videos/remotion.config.ts
index 5bd71a3474..46b9dd749f 100644
--- a/packages/jonnys-videos/remotion.config.ts
+++ b/packages/jonnys-videos/remotion.config.ts
@@ -14,4 +14,4 @@ Config.setDefaultPremountInSeconds(2);
Config.setExperimentalTracksEnabled(true);
Config.setExperimentalSequenceActivityEnabled(true);
Config.setShowPremounting(false);
-Config.setExperimentalSequenceActivityLimit(150);
+Config.setExperimentalSequenceActivityLimit(300);
diff --git a/packages/jonnys-videos/src/roller-skis-new/RollerSkiCommute.tsx b/packages/jonnys-videos/src/roller-skis-new/RollerSkiCommute.tsx
index 4a77340f12..2e5c54968e 100644
--- a/packages/jonnys-videos/src/roller-skis-new/RollerSkiCommute.tsx
+++ b/packages/jonnys-videos/src/roller-skis-new/RollerSkiCommute.tsx
@@ -3,12 +3,7 @@ import {linearTiming, TransitionSeries} from '@remotion/transitions';
import {fade} from '@remotion/transitions/fade';
import {pushCut} from '@remotion/transitions/push-cut';
import React from 'react';
-import {
- AbsoluteFill,
- interpolate,
- useCurrentFrame,
- useVideoConfig,
-} from 'remotion';
+import {Track, interpolate, useCurrentFrame, useVideoConfig} from 'remotion';
import {LightLeakOverlay} from './elements/LightLeakOverlay';
import {Arrival} from './scenes/Arrival';
import {BestCommute} from './scenes/BestCommute';
@@ -26,7 +21,7 @@ export const RollerSkiCommute: React.FC = () => {
const frame = useCurrentFrame();
return (
- <AbsoluteFill style={{backgroundColor: 'black'}}>
+ <>
<TransitionSeries name="Roller ski commute">
<TransitionSeries.Sequence
name="Intro"
@@ -110,61 +105,63 @@ export const RollerSkiCommute: React.FC = () => {
<EndCard />
</TransitionSeries.Sequence>
</TransitionSeries>
- <Audio
- name="Music"
- src={
- 'https://remotion.media/jonnys-videos/roller-skis-new/music/sunset-render-deja-vu.mp3'
- }
- trimBefore={1207}
- durationInFrames={4048}
- premountFor={fps}
- volume={interpolate(
- frame,
- [
- 0, 20, 520, 529, 611, 617, 656, 662, 722, 728, 786, 792, 969, 984,
- 2000, 2006, 2052, 2058, 2480, 2492, 2990, 3002, 3238, 3242, 3281,
- 3300, 4036, 4048,
- ],
- [
- 0, 0.07, 0.07, 0.5, 0.5, 0.14, 0.14, 0.5, 0.5, 0.14, 0.14, 0.5, 0.5,
- 0.08, 0.08, 0.22, 0.22, 0.08, 0.08, 0.11, 0.11, 0.08, 0.08, 0, 0,
- 0.08, 0.08, 0,
- ],
- {extrapolateLeft: 'clamp', extrapolateRight: 'clamp'},
- )}
- />
- <Audio
- name="Music (drop)"
- src={
- 'https://remotion.media/jonnys-videos/roller-skis-new/music/sunset-render-deja-vu.mp3'
- }
- from={4042}
- trimBefore={3468}
- durationInFrames={1720}
- premountFor={fps}
- volume={interpolate(
- frame,
- [4042, 4046, 4392, 4404, 4689, 4699, 5740, 5762],
- [0, 0.55, 0.55, 0.1, 0.1, 0.07, 0.07, 0],
- {extrapolateLeft: 'clamp', extrapolateRight: 'clamp'},
- )}
- />
- <Audio
- name="Music (outro)"
- src={
- 'https://remotion.media/jonnys-videos/roller-skis-new/music/sunset-render-deja-vu.mp3'
- }
- from={5750}
- trimBefore={6067}
- durationInFrames={120}
- premountFor={fps}
- volume={interpolate(
- frame,
- [5750, 5762, 5840, 5870],
- [0, 0.45, 0.45, 0],
- {extrapolateLeft: 'clamp', extrapolateRight: 'clamp'},
- )}
- />
- </AbsoluteFill>
+ <Track name="Music">
+ <Audio
+ name="Music"
+ src={
+ 'https://remotion.media/jonnys-videos/roller-skis-new/music/sunset-render-deja-vu.mp3'
+ }
+ trimBefore={1207}
+ durationInFrames={4048}
+ premountFor={fps}
+ volume={interpolate(
+ frame,
+ [
+ 0, 20, 520, 529, 611, 617, 656, 662, 722, 728, 786, 792, 969, 984,
+ 2000, 2006, 2052, 2058, 2480, 2492, 2990, 3002, 3238, 3242, 3281,
+ 3300, 4036, 4048,
+ ],
+ [
+ 0, 0.07, 0.07, 0.5, 0.5, 0.14, 0.14, 0.5, 0.5, 0.14, 0.14, 0.5,
+ 0.5, 0.08, 0.08, 0.22, 0.22, 0.08, 0.08, 0.11, 0.11, 0.08, 0.08,
+ 0, 0, 0.08, 0.08, 0,
+ ],
+ {extrapolateLeft: 'clamp', extrapolateRight: 'clamp'},
+ )}
+ />
+ <Audio
+ name="Music (drop)"
+ src={
+ 'https://remotion.media/jonnys-videos/roller-skis-new/music/sunset-render-deja-vu.mp3'
+ }
+ from={4042}
+ trimBefore={3468}
+ durationInFrames={1720}
+ premountFor={fps}
+ volume={interpolate(
+ frame,
+ [4042, 4046, 4392, 4404, 4689, 4699, 5740, 5762],
+ [0, 0.55, 0.55, 0.1, 0.1, 0.07, 0.07, 0],
+ {extrapolateLeft: 'clamp', extrapolateRight: 'clamp'},
+ )}
+ />
+ <Audio
+ name="Music (outro)"
+ src={
+ 'https://remotion.media/jonnys-videos/roller-skis-new/music/sunset-render-deja-vu.mp3'
+ }
+ from={5750}
+ trimBefore={6067}
+ durationInFrames={120}
+ premountFor={fps}
+ volume={interpolate(
+ frame,
+ [5750, 5762, 5840, 5870],
+ [0, 0.45, 0.45, 0],
+ {extrapolateLeft: 'clamp', extrapolateRight: 'clamp'},
+ )}
+ />
+ </Track>
+ </>
);
};
diff --git a/packages/jonnys-videos/src/roller-skis-new/scenes/BestCommute.tsx b/packages/jonnys-videos/src/roller-skis-new/scenes/BestCommute.tsx
index 1db3ea54a1..af0fd2e519 100644
--- a/packages/jonnys-videos/src/roller-skis-new/scenes/BestCommute.tsx
+++ b/packages/jonnys-videos/src/roller-skis-new/scenes/BestCommute.tsx
@@ -6,6 +6,7 @@ import {
Interactive,
interpolate,
Series,
+ Track,
useCurrentFrame,
useVideoConfig,
type InteractiveTransformProps,
@@ -226,44 +227,46 @@ const BestCommuteInner: React.FC<InteractiveTransformProps> = ({style}) => {
objectFit="cover"
style={{width: '100%', height: '100%'}}
/>
- <Video
- name="Chickens"
- src={
- 'https://remotion.media/jonnys-videos/roller-skis/footage/IMG_0463.MOV'
- }
- from={347}
- durationInFrames={38}
- trimBefore={219}
- muted
- premountFor={fps}
- objectFit="cover"
- style={{position: 'absolute', width: '100%', height: '100%'}}
- />
- <Video
- name="Cows"
- src={
- 'https://remotion.media/jonnys-videos/roller-skis/footage/IMG_0459.MOV'
- }
- from={384}
- durationInFrames={30}
- trimBefore={1794}
- muted
- premountFor={fps}
- objectFit="cover"
- style={{position: 'absolute', width: '100%', height: '100%'}}
- />
- <Video
- name="Mountains"
- src={
- 'https://remotion.media/jonnys-videos/roller-skis/footage/IMG_0461.MOV'
- }
- from={414}
- trimBefore={6}
- muted
- premountFor={fps}
- objectFit="cover"
- style={{position: 'absolute', width: '100%', height: '100%'}}
- />
+ <Track name="Chickens, cows, mountains">
+ <Video
+ name="Chickens"
+ src={
+ 'https://remotion.media/jonnys-videos/roller-skis/footage/IMG_0463.MOV'
+ }
+ from={347}
+ durationInFrames={38}
+ trimBefore={219}
+ muted
+ premountFor={fps}
+ objectFit="cover"
+ style={{position: 'absolute', width: '100%', height: '100%'}}
+ />
+ <Video
+ name="Cows"
+ src={
+ 'https://remotion.media/jonnys-videos/roller-skis/footage/IMG_0459.MOV'
+ }
+ from={384}
+ durationInFrames={30}
+ trimBefore={1794}
+ muted
+ premountFor={fps}
+ objectFit="cover"
+ style={{position: 'absolute', width: '100%', height: '100%'}}
+ />
+ <Video
+ name="Mountains"
+ src={
+ 'https://remotion.media/jonnys-videos/roller-skis/footage/IMG_0461.MOV'
+ }
+ from={414}
+ trimBefore={6}
+ muted
+ premountFor={fps}
+ objectFit="cover"
+ style={{position: 'absolute', width: '100%', height: '100%'}}
+ />
+ </Track>
<PoppingWordCaptions
combineTokensWithinMilliseconds={null}
name="Captions"