Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • P PyAV
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 37
    • Issues 37
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 26
    • Merge requests 26
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PyAV
  • PyAV
  • Issues
  • #128
Closed
Open
Issue created Sep 10, 2015 by Administrator@rootContributor

Refcount/Memory issues

Created by: mkassner

I m not versed with Pyhton refcounting and memory management but I have experienced some problems with av.VideoFrame

In my application I save numpy arrays to a video file using pyav. For this I call:

frame = av.VideoFrame(input_frame.width,input_frame.height,'bgr24') to create a frame for each image.

Since this is done inside a fn that is called continuously, I expect frame to go out of scope and be garbage collected. On MacOS this is the case and I don't have any trouble.

However on Linux I quickly run out of memory (I can watch the python process growing in memory use until the system hangs.)

A simple workaround is creating a single instance of frame attaching it to self. and re-using it by updating the planes.

Any ideas why this happens when I make new frames?

Assignee
Assign to
Time tracking