🎥 Make videos programmatically with React
import path from 'node:path';
import {cachedExampleMediaPaths} from './cached-example-media';
const examplePackage = path.join(__dirname, '..', '..', 'example');
const musicVisualizationPackage = path.join(
__dirname,
'..',
'..',
'template-music-visualization',
);
const docsPackage = path.join(__dirname, '..', '..', 'docs');
const lambdaPackage = path.join(__dirname, '..', '..', 'lambda');
export const exampleVideos = {
bigBuckBunny: cachedExampleMediaPaths.bigBuckBunny,
transparentWebm: path.join(docsPackage, '/static/img/transparent-video.webm'),
framerWithoutFileExtension: path.join(
examplePackage,
'public',
'framermp4withoutfileextension',
),
framerWebm: path.join(examplePackage, 'public', 'framer.webm'),
corrupted: cachedExampleMediaPaths.corrupted,
customDar: path.join(examplePackage, 'public', 'custom-dar.mp4'),
screenrecording: path.join(examplePackage, 'public', 'quick.mov'),
nofps: path.join(examplePackage, 'public', 'nofps.webm'),
variablefps: cachedExampleMediaPaths.variablefps,
zerotimestamp: path.join(examplePackage, 'public', 'zero-timestamp.mp4'),
webcam: path.join(examplePackage, 'public', 'webcam.webm'),
iphonevideo: cachedExampleMediaPaths.iphonevideo,
av1: path.join(examplePackage, 'public', 'av1.webm'),
framer24fps: path.join(
examplePackage,
'src',
'resources',
'framer-24fps.mp4',
),
music: cachedExampleMediaPaths.music,
notavideo: path.join(examplePackage, 'public', 'giphy.gif'),
notafile: path.join(examplePackage, 'public', 'doesnotexist'),
transparentwithdar: path.join(
examplePackage,
'public',
'transparent-with-dar.webm',
),
prores: path.join(examplePackage, 'public', 'prores.mov'),
iphonehevc: cachedExampleMediaPaths.iphonehevc,
matroskaPcm16: path.join(examplePackage, 'public', 'matroska-pcm16.mkv'),
mp4withmp3: path.join(examplePackage, 'public', 'mp4-mp3.mp4'),
av1bbb: path.join(examplePackage, 'public', 'av1-bbb.webm'),
av1mp4: path.join(examplePackage, 'public', 'av1-bbb.mp4'),
av1mp4WithColr: path.join(examplePackage, 'public', 'av1.mp4'),
vp8Vorbis: path.join(examplePackage, 'public', 'vp8-vorbis.webm'),
vp9: path.join(examplePackage, 'public', 'vp9.webm'),
stretchedVp8: cachedExampleMediaPaths.stretchedVp8,
matroskaMp3: path.join(examplePackage, 'public', 'matroska-mp3.mkv'),
shortmp3: path.join(examplePackage, 'public', 'whip.mp3'),
mpeg1layer3: path.join(examplePackage, 'src', 'resources', 'sound1.mp3'),
matroskaH265Aac: path.join(examplePackage, 'public', 'matroska-h265-aac.mkv'),
opusWebm: path.join(examplePackage, 'public', 'opus.webm'),
avi: path.join(examplePackage, 'public', 'example.avi'),
aviWithoutIdx: path.join(examplePackage, 'public', 'example-without-idx.avi'),
opus51Webm: path.join(examplePackage, 'public', 'vp8-opus-5-1-channels.webm'),
profColrTyp: path.join(__dirname, '..', 'videos', 'prof-color-type.mp4'),
chirp: path.join(examplePackage, 'public', 'chirp.wav'),
iphonelivefoto: path.join(__dirname, '..', 'videos', 'mehmet.mov'),
transportstream: path.join(__dirname, '..', 'videos', '0.ts'),
h262: path.join(__dirname, '..', 'videos', 'h262.ts'),
gif: path.join(examplePackage, 'public', 'giphy.gif'),
png: path.join(docsPackage, 'static', 'img', 'logo.png'),
jpeg: path.join(docsPackage, 'static', 'img', 'freelancers', 'ray.jpeg'),
aac: path.join(__dirname, '..', 'videos', 'sample3.aac'),
bmp: path.join(
lambdaPackage,
'src',
'test',
'integration',
'renders',
'regular-audio.bmp',
),
flac: path.join(__dirname, '..', 'videos', 'sample.flac'),
webp: path.join(__dirname, '..', 'videos', '1.webp'),
noFramesInBeginning: path.join(
__dirname,
'..',
'videos',
'no-frames-in-beginning.webm',
),
pdf: path.join(
docsPackage,
'static',
'documents',
'RemotionSeedFundingPressRelease.pdf',
),
unknown: __filename,
unevendim: path.join(__dirname, '..', 'videos', 'unevendim.webm'),
syncsafe: path.join(__dirname, '..', 'videos', 'syncsafe-id3.mp3'),
separatedAudio: path.join(__dirname, '..', 'videos', 'separated-audio.m3u8'),
mp3infosection: path.join(__dirname, '..', 'videos', 'mp3-infosection.mp3'),
mp3vbr: path.join(__dirname, '..', 'videos', 'vbr.mp3'),
mp3Mpeg25: path.join(__dirname, '..', 'videos', 'mp3-mpeg25.mp3'),
multipleAudio: path.join(
__dirname,
'..',
'videos',
'multiple-audio-streams.m3u8',
),
localplaylist: path.join(
__dirname,
'..',
'videos',
'local-playlist',
'output.m3u8',
),
mp3nomagicword: path.join(
musicVisualizationPackage,
'public',
'demo-track.mp3',
),
empty: path.join(__dirname, '..', 'videos', 'empty.mp4'),
subsequentMdat: path.join(__dirname, '..', 'videos', 'subsequent-mdats.mp4'),
garbageAtEnd: path.join(__dirname, '..', 'videos', 'garbage-at-end.mp4'),
redHeartWebm: path.join(__dirname, '..', 'videos', 'red-heart-1x.webm'),
webmCodecDerivedFromSps: path.join(
__dirname,
'..',
'videos',
'webm-codec-from-sps.webm',
),
fragmentedMp4WithNoDurationMetadata: path.join(
__dirname,
'..',
'videos',
'fragmented-mp4-with-no-duration-metadata.mp4',
),
m4a: path.join(__dirname, '..', 'videos', 'voice-note.m4a'),
problematicFragmentedM4a: path.join(
__dirname,
'..',
'videos',
'problematic-fragmented.m4a',
),
waveFormatExtensible: path.join(
__dirname,
'..',
'videos',
'wave-format-extensible.wav',
),
junk: path.join(__dirname, '..', 'videos', 'junk.wav'),
audioWith64msoffsetEditlist: path.join(
__dirname,
'..',
'videos',
'audio-with-64msoffset-editlist.mp4',
),
};
export {downloadCachedExampleMedia} from './cached-example-media';
export {
getPrivateExampleVideo,
getRemoteExampleVideo,
remoteExampleVideos,
} from './remote-videos';