4 ms·
something that always amazes me about OBS is how it is seamlessly cross-platform... and yet I assume the low-level ability to capture display output must be hig
by 2bitencryption 5y ago
something that always amazes me about OBS is how it is seamlessly cross-platform... and yet I assume the low-level ability to capture display output must be highly platform-dependent?
Does OBS need to maintain totally distinct logic for capturing display output from different OSs? Or is there already an abstraction layer for this, maybe at the driver level? Or, third possibility - does it depend on a separate project/library for that?
(I'm ready for the replies saying "read the source and find out" but I'm hoping for someone smarter than I to make sense of it for me :D)
- xconverge 5y agoLooks to be managed here https://github.com/obsproject/obs-studio/tree/master/plugins https://github.com/obsproject/obs-studio/tree/master/plugins Pretty clean source tree to reference :) Seems to be unique per OS and not dependent on third party projects.
- dodgepong 5y agoIndeed, all capture functionality is split out into plugins and they are platform-specific. Platform builds are handled by CMake to only include relevant plugins: https://github.com/obsproject/obs-studio/blob/master/plugins/CMakeLists.txt https://github.com/obsproject/obs-studio/blob/master/plugins...
- qbasic_forever 5y agoIt looks like they have their own library for low level stuff (https://github.com/obsproject/obs-studio/tree/master/libobs https://github.com/obsproject/obs-studio/tree/master/libobs), but for the most part rely on ffmpeg's library for all the platform-specific video, audio, etc. stuff (https://www.ffmpeg.org/about.html https://www.ffmpeg.org/about.html). If you browse the CMakeLists.txt files in the repo you can get a rough idea the kinds of libraries they depend on and use.
- dodgepong 5y agoOBS uses FFmpeg for media source playback, some audio encoders, and specific video output contexts. Usually FFmpeg isn't used for video encoding, though -- that's handled by either a direct hardware encoder implementation or by a native x264 encoder (i.e. not FFmpeg's x264 implementation). OBS supports FFmpeg output in Advanced mode, but it's by no means the default.
- HMH 5y agoI have been following the development of screen capturing under Wayland a little and what I can tell you is that at least for Wayland OBS directly interfaces with pipewire (which is very much platform specific and low level), see: https://github.com/obsproject/obs-studio/pull/4287/files https://github.com/obsproject/obs-studio/pull/4287/files
- ta988 5y agoI had to install it to a colleague macos computer and it was a pain to setup the computer audio recording. Had to install a third-party closed source plugin, configure it...
- darkteflon 5y agoYou can use [BlackHole](https://github.com/ExistentialAudio/BlackHole https://github.com/ExistentialAudio/BlackHole) for that, which is open-source, GPL-3. I do, it works, it’s great.
- ta988 5y agoThanks a lot!
- stoicjumbotron 5y agoHighly OT, but why did you use "smarter than I" instead of "smarter than me"? What is the difference between these two?