OBS Studio Gets a New Renderer

Posted by aizk 12 hours ago

Counter246Comment52OpenOriginal

Comments

Comment by MBCook 4 hours 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.

Comment by delusional 3 hours 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.

Comment by JSR_FDED 9 hours ago

The submitted title buries the lede. It should be:

“OBS Studio Gets A New Renderer: How OBS Adopted Metal”

Comment by RobotToaster 8 hours ago

Also Mac only, since non Mac users won't have a clue what metal means in this context.

Comment by smcnally 5 hours 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.”

Comment by MBCook 4 hours 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.

Comment by mariusmg 2 hours ago

>James Webb calls anything heavier than helium “metal.”

And i call it great music.

Comment by monster_truck 3 hours 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

Comment by robert_foss 1 hour 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.

Comment by jdboyd 47 minutes ago

Metal does pre date Vulkan, and some people consider it easier to use.

Comment by Venn1 9 hours 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.

Comment by ayi 3 hours 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.

Comment by andrekandre 8 hours 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.

Comment by Rohansi 8 hours 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.

Comment by jasonwatkinspdx 4 hours 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.

Comment by monster_truck 3 hours ago

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)

Comment by pjmlp 3 minutes ago

Yes it does, see NeXTSTEP, even the drivers were written in Objective-C.

Comment by pmalynin 7 hours ago

Comment by adamnemecek 7 hours ago

There is a Metal Obj-C API, Metal implementation is C++.

Comment by almostgotcaught 5 hours 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).

Comment by adamnemecek 1 hour 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.

The term is Objective-C++.

Comment by leecommamichael 4 hours 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.

Comment by zdw 8 hours 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.

Comment by stephen_g 2 hours 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...

Comment by caseyf7 3 hours ago

Apple should dedicate some resources to making this successful. Metal could use more wins outside of Apple itself.

Comment by vegabook 3 hours ago

see Blender

Comment by __mharrison__ 10 hours ago

Sadly, it breaks my scene with a PIP camera with a mask...

Comment by ChrisMarshallNY 7 hours ago

Well, to be fair, they say it's an "experimental" version, so they would probably appreciate a bug report.

Comment by keyle 9 hours ago

An obvious regression, you hope they'll get it fixed soon.

Comment by snvzz 10 hours ago

That is actually sad. It is such basic scene.

I hope the next version actually works in some facility.

Comment by dwoldrich 10 hours ago

Was considering building a streaming rig around a Mac Mini. I wonder if with these performance enhancements, that will work for me?

Comment by keyle 10 hours 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.

Comment by stephen_g 2 hours 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

Comment by zeeeeeebo 2 hours ago

now all macOS streamers need is games!

Comment by jdboyd 40 minutes 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.

Comment by 29athrowaway 10 hours ago

If you are

- 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/

Comment by aizk 9 hours ago

Looks neat but seems like a complete hassle to get up and running and maintain, unless if your goal is to learn how screen recorders work.

Comment by gooberman 57 minutes ago

What? The link says that you can install it from flathub (https://flathub.org/en/apps/com.dec05eba.gpu_screen_recorder) so you just have to click install and then record. Since its in flathub its also available in many distros "app store"

Comment by purple-dragon 9 hours ago

The linked post is about a new Metal-based renderer for OBS Studio on MacOS. The software you linked is for Linux.

Comment by zamadatix 9 hours 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.

Comment by GSimon 8 hours 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

Comment by lelandfe 7 hours ago

> get desktop audio for screen recording with QuickTime

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.

Comment by ramses0 8 hours ago

It shows up in the notification area bar (top) as an ambiguous circle with a square in it.

Comment by spike021 8 hours 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.

Comment by koakuma-chan 9 hours 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.

Comment by ycombinete 3 hours 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.

Comment by mcny 7 hours 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.

Comment by jasonlotito 9 hours 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.

Comment by minimaxir 9 hours ago

QuickTime cannot record system audio output without shenanigans.

Comment by jasonlotito 9 hours ago

Yep, if you want to do something more than screen recording, just screen recording won't work. Nor will the OP's comment.

Comment by stavros 9 hours ago

This is great, thanks!

Comment by maxlin 6 hours ago

Hope they'll fix the obvious bugs like CPU use going to 60% doing nothing after restore from hibernation next