Skip to content

🎥 Make videos programmatically with React

remotion.dev/brand: Add source-only trim close-up

JonnyBurger36a18eb2c8ff
diff --git a/packages/brand/src/Root.tsx b/packages/brand/src/Root.tsx
index e55c1cdbf0..84bde84f41 100644
--- a/packages/brand/src/Root.tsx
+++ b/packages/brand/src/Root.tsx
@@ -108,8 +108,8 @@ import {
import {OuterStudio, studioDurationInFrames} from './HomepageAssets/Studio';
import {TemplateRecorderEndcardComposition} from './HomepageAssets/TemplateRecorderEndcard';
import {KeyframeMove} from './KeyframeMove';
-import './index.css';
import {Logo} from './Logo';
+import './index.css';
import {LogoHorn, calculateLogoHornMetadata} from './LogoHorn';
import {NestingCompositions} from './NestingCompositions';
import {PitchCorrection} from './PitchCorrection';
@@ -143,6 +143,7 @@ import {SvgLogoCompositions} from './SvgLogos';
import {TimelineAudioRollingEditComposition} from './TimelineAudioRollingEditComposition';
import {TimelineLayoutReveal} from './TimelineLayoutReveal';
import {TimelineLeftDragComposition} from './TimelineLeftDragComposition';
+import {TimelineSourceOnlyTrimComposition} from './TimelineSourceOnlyTrimComposition';
import {TimelineVideoRollingEditComposition} from './TimelineVideoRollingEditComposition';
import {Codex, codexSchema} from './video-elements/Codex';
import {
@@ -836,6 +837,14 @@ export const Scene11: React.FC<{platform: EndCardPlatform}> = ({platform}) => {
width={2560}
height={1312}
/>
+ <Composition
+ id="TimelineSourceOnlyTrim"
+ component={TimelineSourceOnlyTrimComposition}
+ durationInFrames={420}
+ fps={60}
+ width={2440}
+ height={1440}
+ />
<Folder name="NestingCompositions">
<NestingCompositions />
</Folder>
diff --git a/packages/brand/src/TimelineSourceOnlyTrimComposition.tsx b/packages/brand/src/TimelineSourceOnlyTrimComposition.tsx
new file mode 100644
index 0000000000..f27a4ed324
--- /dev/null
+++ b/packages/brand/src/TimelineSourceOnlyTrimComposition.tsx
@@ -0,0 +1,349 @@
+import {MacOSCursor} from '@remotion/mac-cursors';
+import {Video} from '@remotion/media';
+import {AbsoluteFill, Easing, interpolate, useCurrentFrame} from 'remotion';
+
+export const TimelineSourceOnlyTrimComposition = () => {
+ const frame = useCurrentFrame();
+
+ return (
+ <AbsoluteFill
+ name="Canvas Capture"
+ durationInFrames={420}
+ style={{
+ width: 2440,
+ height: 1440,
+ rotate: '-0.86742 0.430898 0.248816 56.222342deg',
+ scale: 1.959,
+ translate: '-334.2px 128.9px',
+ transformOrigin: '12.49% 13.28%',
+ }}
+ >
+ <Video
+ src="https://remotion.media/studio-close-ups/timeline-source-only-trim-dd01a0a88786.mp4"
+ durationInFrames={420}
+ style={{
+ position: 'absolute',
+ }}
+ />
+ <MacOSCursor
+ cursor={interpolate(
+ frame,
+ [16, 104, 367, 369, 371],
+ ['auto', 'custom', 'auto', 'custom', 'auto'],
+ {
+ easing: Easing.step1,
+ extrapolateLeft: 'clamp',
+ extrapolateRight: 'clamp',
+ },
+ )}
+ customCursor={interpolate(
+ frame,
+ [104, 369],
+ [
+ 'url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2032%2032%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M5%206H3V26H5M27%206H29V26H27M8%2016H24M8%2016L12%2012M8%2016L12%2020M24%2016L20%2012M24%2016L20%2020%22%20stroke%3D%22white%22%20stroke-width%3D%225%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%0A%3Cpath%20d%3D%22M5%206H3V26H5M27%206H29V26H27M8%2016H24M8%2016L12%2012M8%2016L12%2020M24%2016L20%2012M24%2016L20%2020%22%20stroke%3D%22black%22%20stroke-width%3D%222.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%0A%3C%2Fsvg%3E") 2 12, ew-resize',
+ 'url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2032%2032%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cg%20filter%3D%22url(%23shadow)%22%3E%0A%3Cpath%20d%3D%22M23%204.5H18C16.9%204.5%2016%205.4%2016%206.5V25.5C16%2026.6%2016.9%2027.5%2018%2027.5H23%22%20stroke%3D%22white%22%20stroke-width%3D%225%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%0A%3Cpath%20d%3D%22M23%204.5H18C16.9%204.5%2016%205.4%2016%206.5V25.5C16%2026.6%2016.9%2027.5%2018%2027.5H23%22%20stroke%3D%22black%22%20stroke-width%3D%222.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%0A%3C%2Fg%3E%0A%3Cdefs%3E%0A%3Cfilter%20id%3D%22shadow%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2232%22%20height%3D%2232%22%20filterUnits%3D%22userSpaceOnUse%22%3E%0A%3CfeDropShadow%20dx%3D%220%22%20dy%3D%221.5%22%20stdDeviation%3D%221%22%20flood-color%3D%22black%22%20flood-opacity%3D%220.35%22%2F%3E%0A%3C%2Ffilter%3E%0A%3C%2Fdefs%3E%0A%3C%2Fsvg%3E") 12 12, e-resize',
+ ],
+ {
+ easing: Easing.step1,
+ extrapolateLeft: 'clamp',
+ extrapolateRight: 'clamp',
+ },
+ )}
+ style={{
+ position: 'absolute',
+ left: 0,
+ top: 0,
+ scale: interpolate(
+ frame,
+ [0, 141, 332, 393, 397],
+ [
+ 3.141425503630228, 2.8272829532672055, 3.141425503630228,
+ 2.8272829532672055, 3.141425503630228,
+ ],
+ {
+ easing: Easing.step1,
+ extrapolateLeft: 'clamp',
+ extrapolateRight: 'clamp',
+ },
+ ),
+ translate: interpolate(
+ frame,
+ [
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
+ 110, 111, 112, 113, 116, 117, 181, 182, 183, 184, 185, 186, 187,
+ 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200,
+ 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213,
+ 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226,
+ 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252,
+ 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265,
+ 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278,
+ 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291,
+ 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 304, 305, 366,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
+ 380, 381, 382, 383, 384, 385, 386, 387, 388, 389,
+ ],
+ [
+ '1336.8606196952653px 1503.896103896104px',
+ '1355.1937825953573px 1520.130892729318px',
+ '1374.889047959914px 1536.80744452398px',
+ '1385.3809182943041px 1547.29931485837px',
+ '1390.326209223847px 1553.901216893343px',
+ '1393.1608548931383px 1558.3924736680642px',
+ '1395.5414664076081px 1560.773085182534px',
+ '1395.5414664076081px 1563.1536966970039px',
+ '1396.731772164843px 1567.644953471725px',
+ '1399.5664178341344px 1572.1362102464466px',
+ '1404.5117087636772px 1578.7381122814195px',
+ '1414.1077819817976px 1584.5792003272318px',
+ '1439.361897944575px 1598.7033439001943px',
+ '1481.8815829839452px 1612.5575212189385px',
+ '1509.356784947336px 1620.3988137846407px',
+ '1603.1455159014215px 1632.6331935780754px',
+ '1630.6207178648124px 1636.5477042642397px',
+ '1744.4605787912874px 1636.5477042642397px',
+ '1808.9088863892014px 1629.6022088148072px',
+ '1887.5672359136927px 1600.4335821658656px',
+ '1945.7572348910933px 1571.0931588096942px',
+ '1988.2769199304632px 1550.281214848144px',
+ '2018.3658860824216px 1535.2244605787914px',
+ '2046.9086818693117px 1519.4191635136517px',
+ '2056.5047550874324px 1513.5535330810922px',
+ '2066.1008283055526px 1507.6879026485326px',
+ '2069.401779323039px 1506.0312915431025px',
+ '2085.292974741794px 1496.3984047448614px',
+ '2094.889047959914px 1490.5327743123019px',
+ '2107.479292361182px 1484.2131097249207px',
+ '2117.075365579303px 1478.3474792923612px',
+ '2126.978218631762px 1471.7210348706412px',
+ '2131.923509561305px 1465.0945904489213px',
+ '2135.212189385418px 1458.468146027201px',
+ '2136.4024951426527px 1453.9523468657328px',
+ '2136.4024951426527px 1444.3317312608651px',
+ '2136.4024951426527px 1438.0243378668576px',
+ '2108.632784538296px 1416.0098169546989px',
+ '2085.0720932610698px 1400.3026894365478px',
+ '2022.8939564372636px 1355.9300541977707px',
+ '1984.2765108906842px 1331.1913283566828px',
+ '1957.1694447285px 1313.128131710809px',
+ '1934.8972287554966px 1298.9794457510993px',
+ '1916.5395234686573px 1285.7388281010328px',
+ '1903.9247366806421px 1277.3207894467737px',
+ '1894.3041210757747px 1269.7985479087843px',
+ '1887.6776766540547px 1264.8287145924942px',
+ '1883.1618774925862px 1260.3129154310257px',
+ '1878.1920441762961px 1255.3430821147356px',
+ '1873.2222108600063px 1250.3732487984457px',
+ '1866.595766438286px 1245.4034154821557px',
+ '1861.6259331219962px 1238.7769710604357px',
+ '1857.1101339605277px 1234.2611718989672px',
+ '1850.4836895388078px 1227.6347274772472px',
+ '1841.7465998568362px 1214.7008896615196px',
+ '1837.2308006953676px 1210.185090500051px',
+ '1830.6043562736477px 1203.558646078331px',
+ '1825.6345229573576px 1196.9322016566111px',
+ '1820.6646896410675px 1190.3057572348912px',
+ '1815.6948563247777px 1183.679312813171px',
+ '1810.7250230084876px 1178.7094794968812px',
+ '1805.7551896921975px 1172.083035075161px',
+ '1800.7853563759077px 1165.456590653441px',
+ '1794.1589119541875px 1158.830146231721px',
+ '1785.421822272216px 1145.8963084159934px',
+ '1782.108600061356px 1142.5830862051334px',
+ '1777.138766745066px 1135.9566417834135px',
+ '1772.168933428776px 1129.3301973616935px',
+ '1767.199100112486px 1122.7037529399734px',
+ '1762.6833009510176px 1118.187953778505px',
+ '1756.0568565292974px 1108.248287145925px',
+ '1752.7436343184374px 1104.935064935065px',
+ '1742.8039676858575px 1094.995398302485px',
+ '1741.1473565804274px 1091.682176091625px',
+ '1736.1775232641376px 1086.712342775335px',
+ '1731.661724102669px 1082.1965436138664px',
+ '1727.599959096022px 1076.4781675017896px',
+ '1725.1948051948052px 1074.0730136005727px',
+ '1723.992228244197px 1072.8704366499642px',
+ '1719.4764290827284px 1068.8086716433174px',
+ '1716.61724102669px 1064.292872481849px',
+ '1715.4146640760814px 1063.0902955312404px',
+ '1709.6962879640046px 1059.0285305245936px',
+ '1706.8370999079661px 1054.512731363125px',
+ '1703.9779118519277px 1049.9969322016566px',
+ '1701.118723795889px 1044.2785560895798px',
+ '1699.9161468452808px 1041.873402188363px',
+ '1699.9161468452808px 1040.8794355251048px',
+ '1698.9221801820227px 1039.885468861847px',
+ '1698.9221801820227px 1037.48031496063px',
+ '1698.9221801820227px 1036.2777380100215px',
+ '1697.7196032314143px 1034.081194396155px',
+ '1697.7196032314143px 1033.087227732897px',
+ '1697.7196032314143px 1033.087227732897px',
+ '1697.7196032314143px 1032.2159730033745px',
+ '1697.7196032314143px 1032.2159730033745px',
+ '1697.7196032314143px 1031.3079046937314px',
+ '1696.7256365681562px 1030.3139380304735px',
+ '1696.7256365681562px 1030.3139380304735px',
+ '1696.7256365681562px 1029.4917680744452px',
+ '1696.7256365681562px 1029.4917680744452px',
+ '1695.9525513856222px 1029.4917680744452px',
+ '1694.7867880151346px 1029.4917680744452px',
+ '1692.921566622354px 1029.4917680744452px',
+ '1692.921566622354px 1029.4917680744452px',
+ '1686.270579813887px 1029.4917680744452px',
+ '1686.270579813887px 1029.4917680744452px',
+ '1683.4972901114634px 1029.4917680744452px',
+ '1676.355455568054px 1029.4917680744452px',
+ '1676.355455568054px 1029.4917680744452px',
+ '1671.3733510583904px 1029.4917680744452px',
+ '1670.170774107782px 1029.4917680744452px',
+ '1670.170774107782px 1029.4917680744452px',
+ '1663.0657531444933px 1030.6698026383067px',
+ '1657.2246650986808px 1031.1483791798753px',
+ '1657.2246650986808px 1031.1483791798753px',
+ '1652.2057470088967px 1031.823294815421px',
+ '1649.9723898149095px 1031.8355660087943px',
+ '1643.996318641988px 1032.9890581859086px',
+ '1638.0447898558134px 1033.0136005726556px',
+ '1636.7685857449637px 1033.6026178545865px',
+ '1633.1363125063913px 1034.191635136517px',
+ '1628.6205133449228px 1034.7806524184477px',
+ '1628.6205133449228px 1034.7806524184477px',
+ '1622.4112894979037px 1035.3696697003784px',
+ '1622.4112894979037px 1035.3696697003784px',
+ '1614.7417936394315px 1036.8790264853258px',
+ '1606.667348399632px 1038.4497392371409px',
+ '1606.667348399632px 1038.4497392371409px',
+ '1599.5500562429697px 1038.5969935576236px',
+ '1591.4878821965438px 1039.7627569281112px',
+ '1591.4878821965438px 1039.7627569281112px',
+ '1582.5789958073424px 1039.7750281214849px',
+ '1573.2528888434401px 1039.7750281214849px',
+ '1573.2528888434401px 1039.7750281214849px',
+ '1565.8165456590655px 1039.7750281214849px',
+ '1556.3431843746805px 1041.2966560998057px',
+ '1556.3431843746805px 1041.2966560998057px',
+ '1544.6610082830555px 1041.3825544534207px',
+ '1544.6610082830555px 1041.3825544534207px',
+ '1530.8804581245527px 1042.9900807853564px',
+ '1520.7812659781164px 1043.0023519787298px',
+ '1520.7812659781164px 1043.0023519787298px',
+ '1510.8415993455365px 1043.0023519787298px',
+ '1502.39901830453px 1043.0023519787298px',
+ '1502.39901830453px 1043.0023519787298px',
+ '1492.2875549647204px 1044.4994375703038px',
+ '1482.9000920339504px 1044.6098783106656px',
+ '1482.9000920339504px 1044.6098783106656px',
+ '1473.8439513242663px 1044.6098783106656px',
+ '1466.6407608139891px 1044.6098783106656px',
+ '1466.6407608139891px 1044.6098783106656px',
+ '1460.7628591880562px 1045.7879128745271px',
+ '1453.4860415175376px 1045.7879128745271px',
+ '1453.4860415175376px 1045.7879128745271px',
+ '1445.0189180897842px 1045.7879128745271px',
+ '1445.0189180897842px 1045.7879128745271px',
+ '1441.349831271091px 1045.7879128745271px',
+ '1440.2945086409654px 1045.7879128745271px',
+ '1435.3246753246754px 1045.7879128745271px',
+ '1430.6861642294714px 1045.7879128745271px',
+ '1430.6861642294714px 1045.7879128745271px',
+ '1424.7714490234175px 1046.9659474383884px',
+ '1424.7714490234175px 1046.9659474383884px',
+ '1419.4089375191738px 1047.4077103998363px',
+ '1419.4089375191738px 1047.4077103998363px',
+ '1414.4759177830044px 1048.1439820022497px',
+ '1410.5859494835872px 1048.1439820022497px',
+ '1410.5859494835872px 1048.1439820022497px',
+ '1405.1007260456079px 1048.6839145106862px',
+ '1405.1007260456079px 1048.6839145106862px',
+ '1396.8053993250844px 1049.3097453727376px',
+ '1396.8053993250844px 1049.3097453727376px',
+ '1388.7554964720318px 1049.3097453727376px',
+ '1388.7554964720318px 1049.3097453727376px',
+ '1382.9512220063402px 1049.3097453727376px',
+ '1382.9512220063402px 1049.3097453727376px',
+ '1378.312710911136px 1049.3097453727376px',
+ '1376.9015236731773px 1049.3097453727376px',
+ '1374.6313528990695px 1049.3097453727376px',
+ '1373.4655895285816px 1049.3097453727376px',
+ '1370.999079660497px 1049.3097453727376px',
+ '1369.894672256877px 1049.3097453727376px',
+ '1367.5876879026487px 1049.3097453727376px',
+ '1366.5937212393906px 1049.3097453727376px',
+ '1365.7470088966152px 1049.3097453727376px',
+ '1363.6486348297371px 1049.3097453727376px',
+ '1363.6486348297371px 1049.3097453727376px',
+ '1358.8260558339298px 1050.340525616116px',
+ '1356.3350035790982px 1050.4755087432252px',
+ '1356.3350035790982px 1050.4755087432252px',
+ '1351.3160854893138px 1050.4755087432252px',
+ '1348.8250332344821px 1050.4755087432252px',
+ '1348.8250332344821px 1050.4755087432252px',
+ '1343.9779118519277px 1050.4755087432252px',
+ '1340.6156048675734px 1050.4755087432252px',
+ '1340.6156048675734px 1050.4755087432252px',
+ '1337.2778402699662px 1050.4755087432252px',
+ '1334.7131608548932px 1050.4755087432252px',
+ '1333.670109418141px 1050.4755087432252px',
+ '1333.670109418141px 1050.4755087432252px',
+ '1331.4244810307803px 1050.4755087432252px',
+ '1330.3323448205338px 1050.4755087432252px',
+ '1328.172614786788px 1050.4755087432252px',
+ '1327.0804785765415px 1050.4755087432252px',
+ '1327.0804785765415px 1050.4755087432252px',
+ '1325.301155537376px 1050.4755087432252px',
+ '1324.3194600674915px 1050.4755087432252px',
+ '1323.3009510174866px 1050.4755087432252px',
+ '1322.2701707741078px 1050.4755087432252px',
+ '1321.2516617241026px 1050.4755087432252px',
+ '1320.2331526740975px 1050.4755087432252px',
+ '1320.2331526740975px 1050.4755087432252px',
+ '1319.202372430719px 1050.4755087432252px',
+ '1318.2206769608345px 1050.4755087432252px',
+ '1316.3677267614275px 1050.4755087432252px',
+ '1315.4842008385315px 1050.4755087432252px',
+ '1315.4842008385315px 1050.4755087432252px',
+ '1314.5025053686472px 1050.4755087432252px',
+ '1314.5025053686472px 1050.4755087432252px',
+ '1313.5208098987628px 1050.4755087432252px',
+ '1313.5208098987628px 1050.4755087432252px',
+ '1312.6127415891197px 1050.4755087432252px',
+ '1312.6127415891197px 1050.4755087432252px',
+ '1312.6127415891197px 1053.5433070866143px',
+ '1315.6191839656408px 1083.6322732385725px',
+ '1332.234379793435px 1146.2030882503323px',
+ '1332.234379793435px 1146.2030882503323px',
+ '1354.6415788935474px 1249.5019940689233px',
+ '1359.0223949279068px 1284.5976071172922px',
+ '1366.888229880356px 1354.2611718989672px',
+ '1366.888229880356px 1410.9050005112997px',
+ '1366.888229880356px 1431.3242662848963px',
+ '1366.888229880356px 1447.8290213723285px',
+ '1366.888229880356px 1454.4309234073014px',
+ '1366.888229880356px 1458.9221801820227px',
+ '1365.6856529297474px 1463.4134369567441px',
+ '1365.6856529297474px 1465.794048471214px',
+ '1365.6856529297474px 1466.7757439410982px',
+ '1365.6856529297474px 1468.9354739748442px',
+ '1364.483075979139px 1471.3160854893138px',
+ '1362.826464873709px 1475.8073422640352px',
+ '1361.169853768279px 1482.4092442990082px',
+ '1359.513242662849px 1489.011146333981px',
+ '1358.3106657122405px 1493.5024031087023px',
+ '1358.3106657122405px 1494.6927088659372px',
+ '1357.1080887616322px 1497.073320380407px',
+ ],
+ {
+ extrapolateLeft: 'clamp',
+ extrapolateRight: 'clamp',
+ },
+ ),
+ }}
+ />
+ </AbsoluteFill>
+ );
+};