19 ms·
Apple contributes to OBS to support screen capture using ScreenCaptureKit
- yellow_lead 5y agoIt's a bit strange to open a pull request from "Developer-Ecosystem-Engineering" instead of an individual account. I wonder if every interaction from this account has to be approved by a board or something.
- mr90210 5y agoIt's a valid point, however shall we at least celebrate a bit the fact that a Big Tech is actually contributing in the project?
- masklinn 5y agoTBF I don’t know how much “we want $popular project to take advantage of our platform” is to be celebrated. It’s better than bitching about bad support without doing anything. But at the most fundamental of levels it’s really the company working for their customers, through a third party’s project.
- sokoloff 5y agoIs a company working for its customers to have a good experience with an open source package something we should discourage instead? I’m perfectly happy to celebrate win-win outcomes.
- masklinn 5y ago> Is a company working for its customers to have a good experience with an open source package something we should discourage instead? You are aware that there are more than two options?
- sokoloff 5y agoOf course. Apple has many options and their choice to contribute to OBS allows me many options as to how to react; I choose applause.
- q3k 5y agoI don’t know, this feels to me like applauding a car driver who uses their turn signals correctly. “Hooray, you did the thing you’re supposed to do. Good job you”.
- Someone 5y agoWhy would Apple be supposed to do this? Without any other argument on the table, taking that statement to its logical conclusion, it would imply Apple is supposed to help make every single project run well on their hardware. Even when restricting that to “open source projects that (cl)aim to run on latest MacOS”, I think that’s not something a vendor is “supposed to do”. So, if Apple only “is supposed to” support some projects, what objective criteria should it use to pick them? I think it’s completely fine if Apple wouldn’t support any open source. I also think it’s completely fine if developers would choose not to write software for their OS because of that.
- nisegami 5y agoI think situations where literally all parties involved are better off than they were before should be celebrated, even if the intentions behind it aren't just philanthropic.
- yreg 5y agoIs that rare? I would have thought many FAAG employees contribute to open source projects relevant to them as part of their work. After all that seems like the easiest way to influence the projects.
- jhugo 5y agoAnd contributing changes back to an active project is much less effort than maintaining a fork in perpetuity.
- londons_explore 5y agoFacebook.. Yes... Amazon... Yes Apple... Not so much. Netflix.. A little Google... Yes...
- pjmlp 5y agoAmazon...it depends
- viktorcode 5y agoThere's a good post on HN about what it cos Apple to make OS X a certified UNIX. Due to the secrecy of the project they had to use non-corporate accounts for committing bug fixes. The amount of changes was pretty big, but nobody excepts the authors can say it came from Apple. Of course they will commit to open source projects if it suits their needs (if they use those projects). But people have different opinion on what Apple's needs are.
- couchridr 5y agoYou probably mean https://news.ycombinator.com/item?id=29984016 https://news.ycombinator.com/item?id=29984016
- swiftcoder 5y agoThere's a pretty big distinction between FAANG employees contributing on their own time to things tangentially related too their job, and FAANG employees contributing on behalf of the company (i.e. being paid to do so as an official part of their day job). Judging by the Engineering account being used to submit this patch, this is likely to be an example of the latter.
- helsinkiandrew 5y agoFrom experience in a big company (not Apple) likely direct manager then senior manager then legal department. The justification and hoop jumping would take much more effort than the coding. Well done to who ever it was.
- saagarjha 5y agoContributing to a new open source project requires Senior Vice President approval at Apple.
- yellow_lead 5y agoJesus
- dagmx 5y agoNot accurate. There's multiple levels of contribution approval depending on the frequency, size and extent of the contributions.
- saagarjha 5y agoI am aware of several projects that Apple has existing relationships with that have streamlined processes, but to my understanding the “ask a SVP” remains the standard policy for getting permission to contribute to an open source project.
- dagmx 5y agoIt is not. You only need the SVP permission if you are doing larger contributions and frequently. Smaller contributions or one offs don't go up the chain as far, and can just require manager+legal approval
- onion2k 5y agoDon't Apple have a policy that their developers aren't supposed to contribute to Open Source without explicit permission (https://news.ycombinator.com/item?id=22935263 https://news.ycombinator.com/item?id=22935263)? I imagine this is the result of that policy - if Apple wants to contribute to something as a business there isn't really anyone who would be able to use their individual account to do it without lots of people questioning why that person can when others can't.
- dogma1138 5y agoMost companies have this policy it’s actually quite important to protect both the company and the project, it wouldn’t surprise me if big projects even mandate it on their side too. It usually comes in two flavors - individual contribution as you doing something on your own time and equipment and official contributions when the company itself contributes to a project. This looks to be the latter rather than the former so it would make sense it would come from an Apple account.
- nicoburns 5y ago> It usually comes in two flavors - individual contribution as you doing something on your own time and equipment and official contributions when the company itself contributes to a project. My understanding is that Apple's policy is highly unusual in that "individual contribution as you doing something on your own time and equipment" are pretty much not allowed at all.
- threeseed 5y ago> My understanding is that Apple's policy is highly unusual in that "individual contribution as you doing something on your own time and equipment" are pretty much not allowed at all. I am not sure exactly but I suspect this is employee-specific and may be only for those working on sensitive projects. I worked at Apple years ago and it was never in my contract or mentioned to me. And there are plenty of more recent developers e.g. Holden Karau who were contributing to open source projects in their spare time whilst working at Apple.
- iSnow 5y agoCould be related to the decision to remove individual names from the product about boxes back when Jobs came back to better control leaking of internal information and cut down on poaching. I would think that Apple does not want anyone to know who is working on the screen capture APIs as this PR would probably come from one member of that group "When Steve came back, one of his company-wide edicts was that the names of individuals must be removed from about boxes." https://bitsplitting.org/2014/01/24/cant-take-that-away/ https://bitsplitting.org/2014/01/24/cant-take-that-away/
- 908B64B197 5y ago> when Jobs came back to better control leaking of internal information and cut down on poaching He also went further than that by illegally colluding with competitors to lower wages for employees. [0] [1]. What a great man. [0] https://www.businessinsider.com/emails-eric-schmidt-sergey-brin-hiring-apple-2014-3 https://www.businessinsider.com/emails-eric-schmidt-sergey-b... [1] https://9to5google.com/2012/01/27/court-filings-show-steve-jobs-told-google-to-stop-poaching-apple-engineers/ https://9to5google.com/2012/01/27/court-filings-show-steve-j...
- DangerousPie 5y agoWell, given the amount of publicity this PR is getting it probably makes sense to not just let a random software engineer post whatever they feel like.
- SloopJon 5y agoFor those of you who have contributed to a Github (or similar) project in your capacity as an employee, do you use a work account separate from your own?
- olliej 5y agoIt’s very team dependent - look at llvm and webkit for instance. It could also be that someone would rather not be out in public, which is also understandable.
- viraptor 5y agoHP tried to do something similar when working with openstack. It was done for very bureaucratic reasons / company visibility. (Author was preserved, commit was by something like the-project-name@hp.com) A slightly misguided idea by people who don't normally work with big open source. It was reverted since it messed with project statistics.
- jcelerier 5y ago- #if __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_10_15 + #if __MAC_OS_X_VERSION_MAX_ALLOWED >= 101500 // __MAC_10_15 ah, yes, clean code
- jamessb 5y agoThe message for the PR (under the Conversation tab) justifies this as: > plugins/mac-capture/mac-display-capture.m:621 - The __MAC_10_15 define may not exist on devices running < 10.15, resulting in this section not being appropriately avoided during compilation. Swapping to 101500 should work for all versions of macOS.
- masklinn 5y agoA conditional define might be a good alternative tho?
- jcelerier 5y agoyes, it's the whole macos compatibility / availability layer which is terrible. In contrast a good system like Qt looks like #if QT_VERSION > QT_VERSION_CHECK(5, 15, 0) ... #endif and works also for Qt 5.1 or Qt 4 or 3 (i think that's when this macro was introduced, pretty much at the same time than os x 10.1 ?)
- jakear 5y agoThat’s just adding another layer of abstraction over exactly what the Mac case does. I prefer code that is so simple it doesn’t need to be abstract, as every abstraction layer is a potential bug layer. Not even just “potential” in QT’s case, a quick search turned up https://forum.qt.io/topic/31071/moc-and-qt_version_check-bug https://forum.qt.io/topic/31071/moc-and-qt_version_check-bug and https://forum.qt.io/topic/37882/qt-4-8-qt_version_check-and-moc-workaround https://forum.qt.io/topic/37882/qt-4-8-qt_version_check-and-... as cases where folks have been bit by some tooling in a Qt4 environment not understanding the macro properly.
- 5y ago
- artonge 5y agoApparently not the first time from the activity of the user: https://github.com/Developer-Ecosystem-Engineering?tab=overview&from=2021-08-01&to=2021-08-31 https://github.com/Developer-Ecosystem-Engineering?tab=overv... https://github.com/obsproject/obs-browser/pull/310 https://github.com/obsproject/obs-browser/pull/310 Strangely, a lot of contributions to numpy.
- ink404 5y agoNot too strange if Apple wants a competitive development environment.
- viktorcode 5y agoMaybe I'll be laughed at, but right now I consider the most competitive Apple's development environment the Swift Playgrounds on iPad. I just so wish to see this sleek and fast app replacing old cranky Xcode on macOS by adding missing features.
- caaqil 5y agoThe pull request page might be more readable: https://github.com/obsproject/obs-studio/pull/5875 https://github.com/obsproject/obs-studio/pull/5875
- perryizgr8 5y agoI wonder if this will provide a way to hide the yellow dot that appears in the corner (to indicate mic access). It is a great idea in most cases, but quite annoying to see on screen recordings.
- pilif 5y agoThis commit in the PR https://github.com/obsproject/obs-studio/pull/5875/commits/860a20696d280402b2c3cb1ed96e4256f9dd223f https://github.com/obsproject/obs-studio/pull/5875/commits/8... provides an excellent example of why commit messages matter. This is more than 1000 lines diff to the build system (and thus potentially very dangerous because of possible supply chain attacks) which has the commit message of "CI: Update build scripts and Github actions workflow" Never say what you ware doing (it's obvious this commit is updating build scripts). Say why you are doing it, especially when your commit feels unrelated or at most very tangentially related to the objective of your PR.
- disintegrator 5y agoI'm all for well presented PRs/commits but I'm not sure how a good commit message mitigates the risk of a supply chain attack in this case.
- pilif 5y agoIt might help the reviewer to not flat-out reject the PR because it gives them a fame of mind as to what the intention of the change is.
- rkangel 5y ago> Never say what you ware doing (it's obvious this commit is updating build scripts) DEFINITELY say what you are doing. And then say why. This blog post is a good description of the most prevalent convention in how to write good and useful messages (e.g. this is what the Linux Kernel does and given the history of git there's some flow down): https://cbea.ms/git-commit/ https://cbea.ms/git-commit/ The key thing that means you should start with what is having a short one-line summary of what you're doing so you can look at a simple log and see which commit you're interested in.
- pferde 5y agoAlso, if your commit message has parts that say "also, this", "also, that", don't be lazy and break those alsos into separate commits!
- vault 5y agoI hope those changes were planned and agreed upon beforehand. I'd hate to review 274 changed files out of the blue
- deleted 5y ago[deleted]
- twelg 5y ago
- twelgblerg 5y ago
- the_duke 5y agoWhy exactly did you create two new accounts to post the very same message? ( https://news.ycombinator.com/item?id=30113137 https://news.ycombinator.com/item?id=30113137 )
- whazor 5y agoNow I hope they improve the situation of virtual cameras. Now you need to code sign all kinds of applications in order for them to recognize your applications, which often breaks those applications.
- evanb 5y agoI really want to use the virtual camera in FaceTime. But it's near-impossible to get it to work.
- Telemakhos 5y agoI've still got an old iMac running High Sierra just so that can use virtual cameras. It used to work beautifully.
- clock99 5y ago
- hendry 5y agoMakes me wonder how efficient Xorg vs Wayland capture is on Arch btw
- avipars 5y agoNice to see them contribute to open source!
- clone1018 5y agoFor anyone trying to find the actual changes made, vs the build system that was modified, you can find them with this compare: https://github.com/PatTheMav/obs-studio/compare/universal-build...Developer-Ecosystem-Engineering:macos_screencapturekit_support https://github.com/PatTheMav/obs-studio/compare/universal-bu... The branch on GitHub should change its reference until the build system is merged into the main branch.
- shantnutiwari 5y agoMaybe OBS will work on my Mac now. I struggled to get it working, everything recording as I wanted. Thought it was just "crappy open source" stuff, so gave up. Some time later, I tried OBS on Windows, and it just worked, first time, no fiddling required. And I realised the problem was on the Mac side, not Obs. I know, its just one anecdote.
- sprkwd 5y agoGetting the audio to work on MacOS OBS is always a pain.
- j_koreth 5y agoPersonally I had luck with using Blackhole
- TillE 5y agoIt shouldn't require a third-party driver! It's basic functionality which should be provided by the OS in a userspace API. Blackhole does its job, except your volume buttons stop working when you're on a multi-output device. Quite a pain.
- xd1936 5y agoHow long ago was this? They've been making some big stability improvements over the last year or two.
- Johnyma22 5y agoAdding to the anecdote, OBS works great on Ubuntu.
- symfoniq 5y agoBetween one and two years ago, my team had serious issues getting OBS working reliably on T2-equipped Macs. We switched to an expensive commercial product and all our problems went away. I couldn't duplicate the OBS issues on older Macs that didn't have the T2 chip.
- acomjean 5y agoScreenCaptureKit seems to Apple only, so this only helps Mac users. While nice it seems to be a trend where Apple seems to contribute to open source projects now to improve its own performance only on their own devices (blender comes to mind). Maybe Im being a bit cynical. Still a positive I guess.
- outsidetheparty 5y agoWhile I see what you're saying, to be honest it seems pretty reasonable to me for Apple to contribute work that helps Apple. Many OSS contributions are "scratching your own itch", no?
- ninkendo 5y agoI mean, it's not a bad engineering philosophy for things as low-level as this to be provided by the OS as a framework. Capturing screen output at a high refresh rate without introducing lag may be better implemented with lower-level access to certain system components, in a way that may require certain privileges in order to make it work. You can provide a nice higher-level API (like ScreenCaptureKit) to access such "privileged" capabilities from normal apps, so that arbitrary open-source software (like OBS) can hook into it. It seems like Apple already made ScreenCaptureKit for their platforms, and wanted to help OBS by hooking it up to ScreenCaptureKit to take advantage of that work. The alternative, which is to do all the private/privileged stuff directly in OBS, means that Apple would have to give the general ability for arbitrary software to do what ScreenCaptureKit is doing, which may be a security issue (spyware that snoops on what's being displayed on screen comes to mind.) Making something like ScreenCaptureKit as the supported interface to do this kind of thing, can ensure the app triggers the proper permissions dialog/etc so that screen recording doesn't happen without user knowledge.
- maxwell86 5y ago> Maybe Im being a bit cynical. If Apple, Intel, AMD, NVIDIA, Arm, Qualcomm, etc. would all contribute to open source to make everything work on all their devices with good perf, then that would be very good for all users. Expecting AMD to make open source contributions to improve software on Apple's hardware or Arm GPUs is "naive", not cynical. It would be like expecting Tesla to go to VW and help them improve their combustion engines for free.
- ripe 5y agoFor others like me who had no idea what "OBS" in the title refers to: It's open-source software for video recording and live streaming. https://obsproject.com/ https://obsproject.com/
- ru552 5y agoIt's actually some of the best software I've used for streaming. Also, the feature to record a browser tab is a life saver when I'm double booked and don't want to miss content from a meeting.
- mcast 5y agoJust an FYI you may want to double check the laws in your state and company rules on personally recording meetings.
- jagger27 5y agoI want to know if they’re using Rosetta on their M1 test machine or running it natively. Hopefully this patch leads to a proper darwin/arm64 release so I don’t have to use this weird fork[0] with a private GitHub Action to get a native build. The Rosetta version is considerably slower. 0: https://github.com/carlosonunez/obs-installer-for-apple-silicon#download-experimental-official-build-v120-and-above https://github.com/carlosonunez/obs-installer-for-apple-sili...
- lelandfe 5y ago> I want to know if they’re using Rosetta on their M1 test machine or running it natively Natively. There's an open PR[0], #5155, to get OBS native on Apple Silicon. That's also what your weird fork uses. Apple's PR is on top of that work: you'll see that there are 10 or so initial commits. Thus #5155 will need to be merged first, before Apple's. #5155 is a huge PR and has been open for 5 months. Its release will also necessitate OBS get an M1 testing solution figured out. Here's a quote[2] from an OBS team member two days ago: > [This PR is] top of our priority list once we release 27.2. We're keenly aware of how badly people want a native Apple Silicon build, and I can assure you that we will definitely be publishing official test builds of OBS with M1 support as soon as we are able. I would nevertheless expect for all of this to take quite a while. [0] https://github.com/obsproject/obs-studio/pull/5155 https://github.com/obsproject/obs-studio/pull/5155 [1] https://github.com/obsproject/obs-studio/pull/5155#issuecomment-1022340082 https://github.com/obsproject/obs-studio/pull/5155#issuecomm...
- jagger27 5y agoThanks!
- veenified 5y agoIf anyone watches "Meet Kevin" youtube channel, you would know the bad publicity Apple gets with him attempting to stream on his relatively new Mac Pro system. Any effort to improve that capability would be in Apple's best interest. Streaming is not going away.
- underdeserver 5y agohttps://www.youtube.com/channel/UCUvvj5lwue7PspotMDjk5UA https://www.youtube.com/channel/UCUvvj5lwue7PspotMDjk5UA Seems like a money YouTuber, I've never watched him myself.
- veenified 5y agoI found one of the timestamped video clips where he hits one of the streaming issues on his Mac... https://youtu.be/V5SYAHQhEx8?t=260 https://youtu.be/V5SYAHQhEx8?t=260 EDIT: ...and another one... https://youtu.be/HBXUy5fZNYU?t=890 https://youtu.be/HBXUy5fZNYU?t=890
- deleted 5y ago[deleted]
- Oddskar 5y agoI find this PR an interesting opportunity to discuss different types of documentation. I've internalized that there's a difference between the PR description, commit messages, and code comments. For me there's different intended audiences for all three, and their contents should thus be shaped accordingly. This PR basically combines all three into one and uses that as the commit message, and I'm not sure of what to make of it. Is this good practice? Personally I find the contents of the "#### Summary of Changes" list to be super-neat and helpful. But should these not be more helpful as comments inside the code? On the other hand, it does explain what the code is doing at this snapshot in time: which makes it more precise than comments in the code -- since future changes might eventually make those comments incorrect. What's your take?
- edgyquant 5y agoPersonally I like for the dev to do little commits that document each change to a file and then when the branch is merged in you do a squash merge and each commit msg becomes a bullet point.
- andreareina 5y agoI realize this is specific to having an interface that makes it easy, but I find it valuable to step through each commit in a larger merge review. I'm not a fan of how e.g. bitbucket doesn't make it easy to browse the commit contents .
- franga2000 5y ago> On the other hand, it does explain what the code is doing at this snapshot in time: which makes it more precise than comments in the code -- since future changes might eventually make those comments incorrect. If changes are made to the code, the comments should be updated accordingly. Getting from code to a PR text is a non-obvious and difficult process and when parts of the code are updated, the trail is easily lost.
- Oddskar 5y agoI share the same opinion. While perhaps more brittle, it’s also immediately apparent
- oldiphone 5y ago< The __MAC_10_15 define may not exist on devices running < 10.15, resulting in this section not being appropriately avoided during compilation. Swapping to 101500 should work for all versions of macOS. So they are mindful of people with old Macs. This is good!
- programmarchy 5y agoIn the PR description, if you expand the sections "Baldur’s Gate 3 Demo", "Shadow of the Tomb Raider", etc. it shows the performance improvement of capturing the respective games. Looks like a very significant improvement.
- syspec 5y agoBefore / after side by side comparison video: https://user-images.githubusercontent.com/65677710/151421432-ca5c615b-4fa4-420c-a298-53255fc63d67.mp4 https://user-images.githubusercontent.com/65677710/151421432... -- (This and 2 other videos are linked in PR conversation tab: https://github.com/obsproject/obs-studio/pull/5875 https://github.com/obsproject/obs-studio/pull/5875)
- DoctorOW 5y agoThe weird thing to me is that it's not just lower CPU/GPU for OBS, but lower GPU for the game. Maybe just a coincidence, since the CPU fluctuates so much between the two.
- PudgePacket 5y agoHeavily speculating but it's not unreasonable that the recording process impacts the game fps. Eg if you had 2 processes trying to max out your CPU it'd be less efficient than doing them one after the other because they're fighting for resources, doing context switching (losing cache etc).
- jscipione 5y agoDoes this mean I’ll finally be able to capture audio in OBS on macOS without third party tools like sound flower and blackhole?
- dodgepong 5y agoThis is just for display/window capture, not audio capture.
- deweywsu 5y ago
- ffe2t2tt2t 5y agoApple should be ashamed. Microsoft does so much for open source (VS code, typescript, .NET, Blazor and dozens other projects) and even Goolge does quite a lot. And only $Apple$ is an ego-driven company that only cares how to squeeze as much money as possible from customers.
- viktorcode 5y agoApple may have to be ashamed, but bringing up Microsoft as a good OSS citizen? https://medium.com/@keivan/the-day-appget-died-e9a5c96c8b22 https://medium.com/@keivan/the-day-appget-died-e9a5c96c8b22
- azinman2 5y agoI love how this comment is here on a PR from Apple for an open source project… WebKit, LLVM, Swift… these are pretty fundamental open source projects, in addition to a bunch of other stuff. You can’t please everyone all the time, and society is too addicted to outrage these days.
- GeekyBear 5y agoDoesn't Microsoft compile Edge with Apple's open sourced Clang compiler?
- 3836293648 5y agoLLVM was a thing before Apple and Apple are far from the only ones working on it
- GeekyBear 5y agoClang isn't LLVM and Clang was created from the start by paid Apple employees and open sourced by Apple. >One of the first uses of LLVM was an OpenGL code compiler for OS X The LLVM project originally intended to use GCC's front end. Apple chose to develop Clang, a new compiler front end that supports C, Objective-C and C++. https://en.wikipedia.org/wiki/Clang#Background https://en.wikipedia.org/wiki/Clang#Background Here's video of Apple's Chris Lattner giving a tech talk on the Google campus introducing Clang and LLVM 2.0 in 2007: https://www.youtube.com/watch?v=VeRaLPupGks https://www.youtube.com/watch?v=VeRaLPupGks
- robbrown451 5y agoShould this allow OBS to not capture the actual OBS window itself? I'd think it would be nice to eliminate that from what is captured, for those poor people who only have a single monitor. :)
- stoicjumbotron 5y agoHow does one go about reviewing such a PR? If the PR consists of smaller commits then it would probably be easier. But if a large commit is made, then what would be the flow to review it?
- NetOpWibby 5y agoI am pleased to see Deus Ex: Mankind Divided in their testing.
- nabakin 5y agoHow do we know this is Apple?