Open gitboyzcf opened 10 months ago
https://github.com/hughfenghen/WebAV/blob/main/packages/av-cliper/src/mp4-utils/index.ts#L421
Try to release used data
tracks.forEach(({ track, id }) => {
file.releaseUsedSamples(id, track.samples.length)
track.samples = []
})
file.mdats = []
file.moofs = []
I used webSocket to receive H265 video streaming and referenced the following code: 👇
https://github.com/w3c/webcodecs/tree/main/samples/audio-video-player ,
In this code, mp4boxjs is used to parse some encoded videos (h264, h265, vp8...).
But what I am transferring in webSocket is not video files, but infinite video streams, which will lead to an infinite increase in memory. I have tried many methods to solve this problem, but they have not been solved. May I ask how to properly release this memory.