News for hackers. Stuff that matters.
Re:I designed my own fast game streaming video codec by averne_ on Tuesday July 29, 2025 @10:22AM (#44723746)
Do you mind going in some detail as to why they suck? Not a dig, just genuinely curious.
Re:I designed my own fast game streaming video codec by Almondsetat on Tuesday July 29, 2025 @10:36AM (#44723971)
95% GPU usage but only x2 faster than the reference SIMD encoder/decoder
Re:I designed my own fast game streaming video codec by actionfromafar on Tuesday July 29, 2025 @11:17AM (#44724453)
What I wonder is, how do you get the video frames to be compressed from the video card into the encoder?

The only frame capture APIs I know, take the image from the GPU, to CPU RAM, then you can put it back into the GPU for encoding.

Are there APIs which can sidestep the "load to CPU RAM" part?

Or is it implied, that a game streaming codec has to be implemented with custom GPU drivers?

Re:I designed my own fast game streaming video codec by Const-me on Tuesday July 29, 2025 @11:35AM (#44724700)
> Are there APIs which can sidestep the "load to CPU RAM" part?

On windows that API is Desktop Duplication. The API delivers D3D11 textures, usually in BGRA8_UNORM format. When HDR is enabled you would need slightly different API method which can deliver HDR frames in RGBA16_FLOAT pixel format.

Re:I designed my own fast game streaming video codec by mmozeiko on Tuesday July 29, 2025 @02:54PM (#44726999)
There's also Windows.Graphics.Capture. It allows to get texture not only for whole desktop, but just individual windows.
Re:I designed my own fast game streaming video codec by Almondsetat on Tuesday July 29, 2025 @11:21AM (#44724502)
Some capture cards (Blackmagic comes to mind) have worked together with NVIDIA to expose DMA access. This way video frames are automatically transferred from the card to the GPU memory bypassing the RAM and CPU. I think all GPU manufacturers expose APIs to do this, but it's not that common in consumer products.
Re:I designed my own fast game streaming video codec by LtdJorge on Tuesday July 29, 2025 @01:36PM (#44726171)
On Linux you should look into GStreamer and dmabuf.