decord icon indicating copy to clipboard operation
decord copied to clipboard

Significant RAM usage increase on performing a get batch of 4K video

Open svats2k opened this issue 3 years ago • 3 comments

decord version (installed via pip): 0.6.0 OS: Ubuntu 20.04

Big bunny video downloaded from https://4kmedia.org/big-buck-bunny-4k-demo/

My code is the following:

import decord
vr = decord.VideoReader(<local file path>)
batch = vr.get_batch(range(3))

as soon as I try to get a batch of frames, the RAM usage builds up beyond 30 GB and the process gets killed.

svats2k avatar Dec 30 '21 05:12 svats2k

I do not observe this issue when I use decord frame seek as a part of a python application. However, when I seek a frame in a jupyter notebook session or in a repl session I observe the memory issue.

svats2k avatar Jan 11 '22 06:01 svats2k

As a workaround people in #208 suggested doing vr.seek(0) after the vr.get_batch(), which works for me. However, a fix for this would be much appreciated still.

sueskind avatar Jun 26 '22 15:06 sueskind

Thank you so much, it works for me!

tuanlda78202 avatar May 31 '23 09:05 tuanlda78202