packages/docs/docs/videos/transparency.mdx
You can embed transparent videos in Remotion.
@remotion/mediaTransparent videos with an alpha channel are natively supported by <Video> from @remotion/media.
import React from 'react';
import {Video} from '@remotion/media';
import {staticFile} from 'remotion';
export const MyComp: React.FC = () => {
return <Video src={staticFile('transparent.webm')} />;
};
To embed a video which does not have an alpha channel but has a black background, add mixBlendMode: "screen" to the style prop of the <Video> component.
import React from 'react';
import {Video} from '@remotion/media';
import {staticFile} from 'remotion';
export const MyComp: React.FC = () => {
return (
<Video
src={staticFile('nottransparent.mp4')}
style={{
mixBlendMode: 'screen',
}}
/>
);
};
<OffthreadVideo>To embed a video with an alpha channel using <OffthreadVideo>, enable the transparent prop.
import React from 'react';
import {OffthreadVideo, staticFile} from 'remotion';
export const MyComp: React.FC = () => {
return <OffthreadVideo src={staticFile('transparent.webm')} transparent />;
};
To remove a background based on the color of the pixels, see the Greenscreen page.
To export a video with transparency, see Transparent videos