- version: 0.6.0
- Windows: pycharm 2023.3.1 Community Edition, python 3.9
- Linux: RHEl 7.5, python 3.9
- problem: memory leak on Linux but not on Windows
Read frame codes:
from decord import VideoReader
reader = VideoReader(url)
frame_count = len(reader)
frame_ids = np.linespace(0, frame_count - 1, 10, dtype=int).tolist()
frames = reader.get_batch(frame_ids).asnumpy()
I use decord to read video frames in a Fastapi view. There is no memory leak on Windows when debuging in pycharm, but leak on Linux when start python script directly. Memory only raise when requeset the api, without any signs of decreasing.
To debug memory leak, I call reader.del() after read frames. It works on Windows but meets Segmentation fault on Linux.
Finally, I use numpy.zeros() creating frames to replace decord reading frames, there is no memory leak.
Someone help me please.
Read frame codes:
I use decord to read video frames in a Fastapi view. There is no memory leak on Windows when debuging in pycharm, but leak on Linux when start python script directly. Memory only raise when requeset the api, without any signs of decreasing.
To debug memory leak, I call reader.del() after read frames. It works on Windows but meets Segmentation fault on Linux.
Finally, I use numpy.zeros() creating frames to replace decord reading frames, there is no memory leak.
Someone help me please.