The submitted title buries the lede. It should be:
“OBS Studio Gets A New Renderer: How OBS Adopted Metal”
RobotToaster 117 days ago [-]
Also Mac only, since non Mac users won't have a clue what metal means in this context.
smcnally 117 days ago [-]
“Mac-only” was disappointing to read, but OBS’ render performance has been fine on macos and linux even with older hardware. James Webb calls anything heavier than helium “metal.”
mariusmg 117 days ago [-]
>James Webb calls anything heavier than helium “metal.”
And i call it great music.
MBCook 117 days ago [-]
Well Metal is the limitation there.
But they’ve clearly learned a lot that will help in the future with other modern APIs like DX12 or Vulcan.
monster_truck 117 days ago [-]
It actually wasn't, though.
That's besides the point though, the OS has been trash for realtime encoding for over a decade now. At the very least you have to write a script to repeatedly renice the process back to the top when it tries to protect you from the excessive thermal load lmao
MBCook 117 days ago [-]
Great article. The description of how they handle shaders is just bonkers to me.
Is that really what you’d have to go through to have a working system with plugin shaders from 3rd parties on multiple backends? Or is mostly the result of time and trying to keep backwards compatibility with existing plugins?
Telling external devs “Write a copy in every shader language” would certainly be easier for the core team but that’s obviously undesirable.
delusional 117 days ago [-]
Transpiling shaders is what most game engines have done for a decade now. Everybody thinks it's stupid in that field as well, but there is no viable alternative.
hnuser123456 117 days ago [-]
MS/NV are trying to start a program to pre-compile shaders for common hardware configurations and games/engines, and simply download them to clients.
I think you mean MS/AMD since this is for hardware with AMD parts in it.
hnuser123456 117 days ago [-]
Fair point.
ZiiS 117 days ago [-]
I think it was the most game engines once they adopted Direct 3D 8; so over two decades now.
robert_foss 117 days ago [-]
This quite clearly shows the cost of Apple preferring to build a software ecosystem moat, than using the Vulkan API which every other OS supports.
Vulkan support was introduced in OBS Studio 25.0 in March 2020, 5.5 years ago.
pjmlp 116 days ago [-]
Vulkan is not supported on game consoles, with the exception of Switch, and even there you should use NVN instead.
It is not officially supported on Windows, it works because the GPU vendors use the Installable Client Driver API, to bring their own driver stack. This was initially created for OpenGL, and nowadays sits on top of the DirectX runtime.
On the embedded space, the OSes that support graphical output many are stil focused on OpenGL ES.
jdboyd 117 days ago [-]
Metal does pre date Vulkan, and some people consider it easier to use.
badsectoracula 117 days ago [-]
While Metal might be easier to use, i'm pretty sure it is still easier to have to worry about Vulkan alone than Vulkan+Metal. And Metal predating Vulkan is really only of concern to code that existed before Vulkan was made available (which wasn't that much).
array_key_first 117 days ago [-]
OpenGL is easier to use than both, but we left it in the dust as it doesn't match the semantics of modern hardware.
Metal DOES... but only apple hardware.
JimmaDaRustla 117 days ago [-]
Well, ya, it's a proprietary walled garden solution.
brnt 117 days ago [-]
Mantle predates either, and Vulkan is based on Mantle.
nuudlman 115 days ago [-]
Vulkan capture support on Windows was introduced in v25 (on linux you need to use a plugin). There is no Vulkan renderer support—which the post clearly stated...
rieter 108 days ago [-]
OBS has no Vulkan renderer. Only OpenGL, DirectX 11 (on Windows), and now Metal.
stephen_g 117 days ago [-]
As if nobody else ever did that (like Microsoft with DirectX, and almost every single games console)?
robert_foss 117 days ago [-]
Sure, it's happened before but it is not in Apples customers interests, just Apples corporate moat building interests.
Venn1 117 days ago [-]
I’m more excited about the upcoming support for VST3, but this is still welcome news. It is far easier than getting hardware encoding working with Rockchip SoCs on Linux.
ayi 117 days ago [-]
I'm no expert on topic. So, I maybe understood only 5% of what I read but I wish we had more posts like that. Announcements without any technical details sounds like marketing pieces.
aizk 116 days ago [-]
Same. I'm a python/typescript guy, so many details flew over my head, but I knew HN would like it.
andrekandre 117 days ago [-]
> Metal takes Direct3D's object-oriented approach one step further by combining it with the more "verbal" API design common in Objective-C and Swift in an attempt to provide a more intuitive and easier API for app developers to use (and not just game developers) and to further motivate those to integrate more 3D and general GPU functionality into their apps.
slightly off-topic perhaps, but i find it amazing that an os-level 3d graphics api can be built in such a dynamic language as objective-c; i think it really goes to show how much optimization put in `objc_msgSend()`... it does a lot of heavy lifting in the whole os.
Rohansi 117 days ago [-]
Modern graphics APIs minimize the number of graphics API calls vs. OpenGL and similar. Vulkan/Metal/DirectX 12 will have you pass command buffers with many commands in them instead of separate API calls for everything.
jasonwatkinspdx 117 days ago [-]
It's been possible for quite some time.
In the early 2000's there was a book on using Direct3D from C# that was pretty influential as far as changing people's assumption that you couldn't do high performance graphics in a GC'd language. In the end a lot of the ideas overlap with what c/c++ gamedevs do, like structuring everything around fixed sized tables allocated at load time and then minimal dynamic memory usage within the frame loop. The same concepts can apply at the graphics API level. Minimize any dynamic language overhead by dispatching work in batches that reference preallocated buffers. That gets the language runtime largely out of the way.
adamnemecek 117 days ago [-]
There is a Metal Obj-C API, Metal implementation is C++.
almostgotcaught 117 days ago [-]
No it's not - the compiler for MSL is of course C++ because it's LLVM but the runtime is absolutely written in objc (there weren't even C++ bindings until recently).
adamnemecek 117 days ago [-]
No, I mean what is inside the Objective-C objects. Essentially everything on macOS has an Objective-C API but is implemented using C++. Have you ever noticed the ".cxx_destruct" method on like all objects?
What you are talking about are C++ wrappers around Metal Objective-C API. Yes, it is weird as they are going C++ -> Objective-C -> C++. Why not go directly? Because Apple does not ship C++ systems frameworks.
No, it doesn't. You won't find it used much if at all at these levels of the OS. Once you get past cocoa and friends it's restricted subsets of C++ (IOKit for example)
pjmlp 117 days ago [-]
Yes it does, see NeXTSTEP, even the drivers were written in Objective-C.
leecommamichael 117 days ago [-]
I hope Modern GPU APIs are just a stepping stone to something simpler. OpenGL is loved and hated; and I have grown to love it after using the new stuff.
zdw 117 days ago [-]
I wonder how this improves performance on older Intel macs with a Metal-compatible GPUs, or if it's really a M-series only improvement.
stephen_g 117 days ago [-]
It says in passing As the Metal backend is only supported on Apple Silicon devices, GPU and CPU share the same memory in the part talking about the differences between the Direct3D and Metal render pipelines.
Not sure why though, because Metal 3 is still supported on a bunch of Intel Macs...
daviddever23box 117 days ago [-]
It may be an error on the part of the writer.
zdw 117 days ago [-]
Maybe the M-series unified memory architecture is required?
dwoldrich 117 days ago [-]
Was considering building a streaming rig around a Mac Mini. I wonder if with these performance enhancements, that will work for me?
keyle 117 days ago [-]
Highly depends on what you're streaming. If you stream arcade 2D games of the past, or software development, it should be perfectly fine.
AAA titles with newer graphics, well, you can always send a capture the PC with the nvidia card's screen through a capture card.
Back in my days of streaming, macOS was no option, cca. 2017. Today I'd do it with any M processor mac without a second thought.
KronisLV 117 days ago [-]
I actually used an M1 MacBook Air for encoding/compositing by sending the video/audio sources over from my main PC with DistroAV (LAN).
Worked reasonably well (you can send camera/VTuber output and captured video from game and any overlays separately, or just use the setup in a similar way to a capture card and run ONLY the game on the gaming PC and everything else on the Mac), but added some complexity to it all.
A beefy Nvidia GPU would make that setup not necessary, unless you want to directly play games on the Mac.
stephen_g 117 days ago [-]
Streaming video from camera? In general the newer Mac Minis in general were fine already just because the M-series chips are very fast, but hopefully this should make it much more efficient
dwoldrich 116 days ago [-]
That's great to hear, but perhaps I will ask too much even of the M-series chips.
Occasionally, I will show 3 things at once: an MP4 that the Mac Mini plays from its storage transitioning into captured hdmi signal from a canon camera as picture-in-picture with the main body of the stream containing captured hdmi output from my development laptop.
I'm not sure what my capture solution will be, but it seems there are a wide variety of USB-C capture adapters that I could use that are compatible with OBS on Mac and are even bus powered.
Other comments seem to indicate there are bugs in that specific picture-in-picture setup, but I'm sure those will get ironed out.
__mharrison__ 117 days ago [-]
Sadly, it breaks my scene with a PIP camera with a mask...
ChrisMarshallNY 117 days ago [-]
Well, to be fair, they say it's an "experimental" version, so they would probably appreciate a bug report.
Warchamp7 116 days ago [-]
Please submit a GitHub issue with some details on your setup!
keyle 117 days ago [-]
An obvious regression, you hope they'll get it fixed soon.
snvzz 117 days ago [-]
That is actually sad. It is such basic scene.
I hope the next version actually works in some facility.
caseyf7 117 days ago [-]
Apple should dedicate some resources to making this successful. Metal could use more wins outside of Apple itself.
vegabook 117 days ago [-]
see Blender
maxlin 117 days ago [-]
Hope they'll fix the obvious bugs like CPU use going to 60% doing nothing after restore from hibernation next
daviddever23box 117 days ago [-]
It's never "doing nothing" - you just need more visibility into your running tasks.
Turning off nearly everything iCloud- or Spotlight-related is a pretty good start; disable network access and you may find even more pearls of wisdom.
zeeeeeebo 117 days ago [-]
now all macOS streamers need is games!
jdboyd 117 days ago [-]
Not all streamers are game streamers, and not all obs users are streamers. I installed on all of my workstations for its screen capture and virtual camera features.
29athrowaway 117 days ago [-]
If you are
- recording your screen but not streaming
- you are not customizing what goes into your screen
OBS is great, it was my go to recording tool. But my videos were choppy until I started using GPU screen recorder.
beanjuiceII 117 days ago [-]
i already have snaps why do i need this flat thing?
gooberman 116 days ago [-]
You dont need it, it's just one way to install it. You can just download the appimage and use that as well. The point was to say that @aizk comment was ridiculous
aizk 116 days ago [-]
Not gonna lie - I read this line
> If you are running another distro then you can run sudo ./install.sh, but you need to manually install the dependencies, as described below.
And then I just skimmed the rest, because I assumed it would be about manual dependency installation which I am not interested in.
Odd that the easiest installation method listed on line 3 was not the first line in the installation text, that's not a great DX.
Also - I'm on MacOS, and the OBS blog updated I shared was for MacOS.
purple-dragon 117 days ago [-]
The linked post is about a new Metal-based renderer for OBS Studio on MacOS. The software you linked is for Linux.
zamadatix 117 days ago [-]
I think the point extends well beyond the specific app/OS example though, even though the article talks to macOS exclusively. For macOS and Windows there are built in tools which offer direct recording functionality. To trigger on macOS Command+Shift+5 (or launch it via QuickTime as jasonlotito noted), on Windows Win+Shift+S. Both of these utilize the same OS APIs OBS Studio uses to get the screen content, but they skip the step of needing a renderer at all.
GSimon 117 days ago [-]
You need to install a 3rd party software Blackhole to even get desktop audio for screen recording with QuickTime. After about an hour of troubleshooting settings I gave up and used OBS, esp since I was in a public space at the time and the Blackhole config disabled my headphones and for a moment you could hear a loud YouTube tutorial playing through my Mac speakers. Also the shortcut to stop screen recording on QuickTime sucks, it’s like CMD+CTRL+ESC and you need to have it memorized because there’s no “Stop Recording” button option
lelandfe 117 days ago [-]
> get desktop audio for screen recording with QuickTime
> the shortcut to stop screen recording on QuickTime sucks, it’s like CMD+CTRL+ESC
I just stop it from the menu bar, then on the resultant video press Cmd-T (trim) to lop off that footage.
ramses0 117 days ago [-]
It shows up in the notification area bar (top) as an ambiguous circle with a square in it.
spike021 117 days ago [-]
I've had a lot of issues using the QuickTime screen recorder, especially when it comes to recording from an iOS simulator for app/game development and needing to produce preview videos.
jasonlotito 117 days ago [-]
Why not just use quicktime?
Edit: I think you might have skipped reading the post. It's about OBS on MacOS. Where quicktime exists. Your suggestion seems geared toward Linux.
minimaxir 117 days ago [-]
QuickTime cannot record system audio output without shenanigans.
jasonlotito 117 days ago [-]
Yep, if you want to do something more than screen recording, just screen recording won't work. Nor will the OP's comment.
mcny 117 days ago [-]
Does anyone know if AMD 8845HS with 780M graphics (running fedora) can into this? Ideally very low system resources used, I only have 16GB RAM, also ideally very little storage space used, one or two frames per second is enough, ideally should compress even more if nothing has changed in the screen for a while, also ideally should create a new file every eight hours or so.
gooberman 117 days ago [-]
It should work yes. Fedora by default disables hardware accelerated video encoding but if you use flatpak versions of software (in this case the flatpak version of gpu screen recorder) then it should work. Even 12 year old gpus work.
Lower framerate doesn't really decrease video size because of how videos work, but you can set bitrate quality for the recorded video to reduce the video quality a bit to decrease the size.
koakuma-chan 117 days ago [-]
NVIDIA has a "lower overhead" screen recorder, no? It's alt + f9 or something. AFAIK It's supposed to be optimized, because they own the stack and all. It's probably only on Windows though.
ycombinete 117 days ago [-]
If all you need is screen recording, as per your parent, and you're on windows the default screenshot tool (Win + Shift + S) does screen recording.
stavros 117 days ago [-]
This is great, thanks!
Rendered at 05:23:47 GMT+0000 (UTC) with Wasmer Edge.
“OBS Studio Gets A New Renderer: How OBS Adopted Metal”
And i call it great music.
But they’ve clearly learned a lot that will help in the future with other modern APIs like DX12 or Vulcan.
That's besides the point though, the OS has been trash for realtime encoding for over a decade now. At the very least you have to write a script to repeatedly renice the process back to the top when it tries to protect you from the excessive thermal load lmao
Is that really what you’d have to go through to have a working system with plugin shaders from 3rd parties on multiple backends? Or is mostly the result of time and trying to keep backwards compatibility with existing plugins?
Telling external devs “Write a copy in every shader language” would certainly be easier for the core team but that’s obviously undesirable.
https://devblogs.microsoft.com/directx/introducing-advanced-...
Vulkan support was introduced in OBS Studio 25.0 in March 2020, 5.5 years ago.
It is not officially supported on Windows, it works because the GPU vendors use the Installable Client Driver API, to bring their own driver stack. This was initially created for OpenGL, and nowadays sits on top of the DirectX runtime.
On the embedded space, the OSes that support graphical output many are stil focused on OpenGL ES.
Metal DOES... but only apple hardware.
In the early 2000's there was a book on using Direct3D from C# that was pretty influential as far as changing people's assumption that you couldn't do high performance graphics in a GC'd language. In the end a lot of the ideas overlap with what c/c++ gamedevs do, like structuring everything around fixed sized tables allocated at load time and then minimal dynamic memory usage within the frame loop. The same concepts can apply at the graphics API level. Minimize any dynamic language overhead by dispatching work in batches that reference preallocated buffers. That gets the language runtime largely out of the way.
What you are talking about are C++ wrappers around Metal Objective-C API. Yes, it is weird as they are going C++ -> Objective-C -> C++. Why not go directly? Because Apple does not ship C++ systems frameworks.
The term is Objective-C++.
Not sure why though, because Metal 3 is still supported on a bunch of Intel Macs...
AAA titles with newer graphics, well, you can always send a capture the PC with the nvidia card's screen through a capture card.
Back in my days of streaming, macOS was no option, cca. 2017. Today I'd do it with any M processor mac without a second thought.
Worked reasonably well (you can send camera/VTuber output and captured video from game and any overlays separately, or just use the setup in a similar way to a capture card and run ONLY the game on the gaming PC and everything else on the Mac), but added some complexity to it all.
A beefy Nvidia GPU would make that setup not necessary, unless you want to directly play games on the Mac.
Occasionally, I will show 3 things at once: an MP4 that the Mac Mini plays from its storage transitioning into captured hdmi signal from a canon camera as picture-in-picture with the main body of the stream containing captured hdmi output from my development laptop.
I'm not sure what my capture solution will be, but it seems there are a wide variety of USB-C capture adapters that I could use that are compatible with OBS on Mac and are even bus powered.
Other comments seem to indicate there are bugs in that specific picture-in-picture setup, but I'm sure those will get ironed out.
I hope the next version actually works in some facility.
Turning off nearly everything iCloud- or Spotlight-related is a pretty good start; disable network access and you may find even more pearls of wisdom.
- recording your screen but not streaming
- you are not customizing what goes into your screen
Then use something else. GPU screen recorder has a lower overhead and produces much smoother recordings: https://git.dec05eba.com/gpu-screen-recorder/about/
OBS is great, it was my go to recording tool. But my videos were choppy until I started using GPU screen recorder.
> If you are running another distro then you can run sudo ./install.sh, but you need to manually install the dependencies, as described below.
And then I just skimmed the rest, because I assumed it would be about manual dependency installation which I am not interested in.
Odd that the easiest installation method listed on line 3 was not the first line in the installation text, that's not a great DX.
Also - I'm on MacOS, and the OBS blog updated I shared was for MacOS.
A famously missing macOS feature. Loopback is yonder: https://rogueamoeba.com/loopback/
> the shortcut to stop screen recording on QuickTime sucks, it’s like CMD+CTRL+ESC
I just stop it from the menu bar, then on the resultant video press Cmd-T (trim) to lop off that footage.
Edit: I think you might have skipped reading the post. It's about OBS on MacOS. Where quicktime exists. Your suggestion seems geared toward Linux.
Lower framerate doesn't really decrease video size because of how videos work, but you can set bitrate quality for the recorded video to reduce the video quality a bit to decrease the size.