4 ms·
technical question -- I'm really impressed how OBS is able to abstract the "screen recording" functionality across different OSs (it works the same in Linux, Wi
by 2bitencryption 6y ago
technical question -- I'm really impressed how OBS is able to abstract the "screen recording" functionality across different OSs (it works the same in Linux, Windows and OSX, with no difference in behavior that I've noticed).
How does screen recording work? Is it easy for OBS to just capture the video output buffer and start encoding it, regardless of the OS? Or do different OSs have very different strategies for this? What about hardware-level cursors? (I think that's a thing?)
- genpfault 6y ago> Or do different OSs have very different strategies for this? Yup. Check out their capture "source" plugins: https://github.com/obsproject/obs-studio/tree/master/plugins/linux-capture https://github.com/obsproject/obs-studio/tree/master/plugins... https://github.com/obsproject/obs-studio/tree/master/plugins/mac-capture https://github.com/obsproject/obs-studio/tree/master/plugins... https://github.com/obsproject/obs-studio/tree/master/plugins/win-capture https://github.com/obsproject/obs-studio/tree/master/plugins...
- formerly_proven 6y ago> What about hardware-level cursors? (I think that's a thing?) Software that wants to capture the desktop has to emulate the hardware cursor by getting the current cursor position and bitmap and blit it into its copy of the framebuffer. That's because the hardware cursor doesn't exist in the framebuffer, it's overlaid by the GPU during readout. For the same reason screen-effects like "nightlight" don't affect the cursor in Windows, because the effect is applied as a shader, which can't touch the cursor. They could fix this by updating the cursor bitmap, but they don't.