remotion-dev / remotion

🎥 Make videos programmatically with React
https://remotion.dev
Other
20.83k stars 1.05k forks source link

memory leak in safari #4412

Closed sssning closed 3 weeks ago

sssning commented 1 month ago

Bug Report 🐛

Remotion Version: 4.0.166

In safari, the page memory goes up all the time Image

Using the following component: index.js

import { Player } from "@remotion/player";
import VideoComposition from './VideoComposition'
const VideoPlayer = () => {
  return (
     <Player
        component={VideoComposition}
        durationInFrames={270}
        compositionWidth={375}
        compositionHeight={750}
        fps={30}
        loop
    />
  )
}

VideoComposition.js

import {  Sequence, OffthreadVideo } from "remotion";
export const VideoComposition = () => {
  return (
        <>
        <Sequence
            from={0}
            durationInFrames={60}
        >
            <OffthreadVideo src={'https://mdn.alipayobjects.com/wealth_community_transfer/afts/file/LRxrRISozEgAAAAAAAAAAAAAK5gwAQBr'}></OffthreadVideo>
        </Sequence>
        <Sequence
            from={60}
            durationInFrames={60}
        >
            <OffthreadVideo src={'https://mdn.alipayobjects.com/wealth_community_transfer/afts/file/8NU2RoAFknYAAAAAAAAAAAAAK5gwAQBr'}></OffthreadVideo>
        </Sequence>
        <Sequence
            from={120}
            durationInFrames={60}
        >
            <OffthreadVideo src={'https://mdn.alipayobjects.com/wealth_community_transfer/afts/file/KjsmSYP8egYAAAAAAAAAAAAAK5gwAQBr'}></OffthreadVideo>
        </Sequence>
        <Sequence
            from={180}
            durationInFrames={60}
        >
            <OffthreadVideo src={'https://mdn.alipayobjects.com/wealth_community_transfer/afts/file/Z6VTRL_2HIAAAAAAAAAAAAAAK5gwAQBr'}></OffthreadVideo>
        </Sequence>
        <Sequence
            from={240}
            durationInFrames={60}
        >
            <OffthreadVideo src={'https://mdn.alipayobjects.com/wealth_community_transfer/afts/file/gqnqQ5rlWesAAAAAAAAAAAAAK5gwAQBr'}></OffthreadVideo>
        </Sequence>
    </>
    );
}
sssning commented 1 month ago

The following phones all have the same situation iPhone Xs Max (OS: 14.4) iPhone 13  (OS: 15) iPhone X  (OS: 16.3.1) iPhone12pro (OS: 14.2) iPhone14pro (OS: 17.1.1) iphone12pro (OS:14.1) iphone14 (OS: 17.5.1)

JonnyBurger commented 1 month ago

Cannot reproduce this - I ran this composition in a plain player on loop for half an hour and memory usage seemed normal.

Are you passing any special props to the player or adding any extra states to it?