Failed to load resource (pexels video url) during lambda rendering process #4173
tonyabracadabra
started this conversation in
General
Replies: 1 comment 6 replies
-
@tonyabracadabra Unable to reproduce with the latest Remotion version: <Composition
id="OffthreadRemoteVideo"
component={OffthreadRemoteVideo}
fps={30}
calculateMetadata={calculateMetadataFn}
defaultProps={{
src: 'https://videos.pexels.com/video-files/5530402/5530402-uhd_3840_2160_25fps.mp4',
}}
/> import {getVideoMetadata} from '@remotion/media-utils';
import {CalculateMetadataFunction, OffthreadVideo} from 'remotion';
type Props = {
src: string;
};
const fps = 30;
export const calculateMetadataFn: CalculateMetadataFunction<Props> = async ({
props,
}) => {
const {src} = props;
const {durationInSeconds, width, height} = await getVideoMetadata(src);
return {
durationInFrames: Math.round(durationInSeconds * fps),
fps,
width,
height,
};
};
export const OffthreadRemoteVideo: React.FC<{
src: string;
}> = ({src}) => {
return <OffthreadVideo src={src} />;
}; renders fine on Lambda. Can you upgrade to the latest version and if it doesn't work, post also a component that has this problem? |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Failed to load pexel stock videos during rendering process, causing the render to fail, how am I suppose to deal with it. Advice needed!
This is how I use the pexel video in my remotion code
Attaching the cloudwatch logs
Attaching the function I used for rendering on lambda
it makes sense to me why it failed if somewhere in the rendering process fetches the url with
&time=0.03333333333333333&transparent=false&toneMapped=true
suffixBeta Was this translation helpful? Give feedback.
All reactions