Skip to content

Can I connect GPU frames to another interface without copying? #2148

Closed

Description

@caffeinism

It would be great if everything could be done in ffmpeg, but I discovered that overlay_cuda doesn't support transparent frames (in fact, I realized there are no frames with alpha channels supported on the GPU to begin with). I want to decode video using nvdec (cuvid) in pyav, copy it to PyTorch for processing, then move it back to pyav for encoding with nvenc.

However, I see no signs that anyone has attempted this, so I'm wondering if it's actually possible. Is there anyone who might be able to help?

Activity

  1. caffeinism commented on Feb 3, 2026

    @caffeinism
    ContributorAuthor

    ... Looking at the logs, it appears pyav immediately transfers decoded frames to the CPU and frees the original CUDA memory. Is it not possible to process?

  2. caffeinism commented on Feb 3, 2026

    @caffeinism
    ContributorAuthor
  3. calllivecn commented on Feb 5, 2026

    @calllivecn

    I have the same need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions