logoalt Hacker News

Show HN: I reverse engineered Apple's video wallpapers

100 pointsby kageroumadoyesterday at 11:54 PM27 commentsview on HN

Ever since Apple introduced their video wallpapers I wanted to be able to put custom videos there. I decided to reverse engineer and see what I can do.

I built Phosphene to sell it, but the existing competitors were polished enough that the time it would have taken to catch up wasn't going to pay off. So I'm open-sourcing it.

WallpaperExtensionKit.framework is what powers macOS wallpapers. It controls what’s shows in the Settings app. It took a lot of trial and error to replicate the behavior, but the result is that your custom wallpapers appear alongside everything else. I wanted to have an “add” button there too, but I couldn’t find a way to do so, so there’s a companion app that will put your video where it needs to be.

Unlike Apple's Aerials, the video keeps playing on the desktop (not just the lock screen). The renderer drives AVSampleBufferDisplayLayer directly with PTS-offset gapless looping, and pauses or downshifts based on thermal state, battery level, brightness, and window occlusion.

It’s free and works well.


Comments

postalcodertoday at 2:48 AM

Wow, thank you for this. I've been working on a screensaver suite but LegacyScreenSaver is so janky. I was hoping someone would figure out apple's private wallpaper framework and you did!

encore2097today at 12:49 AM

Very neat. I was confused at first, I was like you can download the video screensavers.. why scrape the frames. Then I saw your comment and read I can use my own videos for desktop and lock screen. Great work! Dont bury the lede! A title with the hook of what and how would be super helpful!

musicaletoday at 3:08 AM

Apple's best video wallpaper is "Macintosh". I am interested in how it works.

buildbottoday at 1:54 AM

As much (fairly well deserved) hate as Tahoe gets, the video wallpapers and transparency are such a fun Windows Vista vibe I get nostalgia. Time to set this up with the Vista waterfall wallpaper and reallllyyy feel like it’s 2007!

wanoirtoday at 1:07 AM

So cool! This reminds me I wanted to try setting a custom video background with some footage i had. Didn’t even realize it wasn’t natively supported till i saw this!

show 1 reply
kageroumadotoday at 2:12 AM

The app now has a landing page with a download link and you can also see my other projects: the largest one is Refrax browser, but I also have many other small utility apps!

https://kagerou.glass/phosphene/

https://kagerou.glass

manuisintoday at 2:28 AM

Woah, thank you! Just checking these will keep on working on the lock screen and as screen savers too?

show 1 reply
mgaunardtoday at 1:36 AM

Are there specific video wallpaper sets I can download that leverage these features?

show 2 replies
ChrisMarshallNYtoday at 1:01 AM

Very cool!

However, it may definitely get broken by Apple, as you note.

show 1 reply
w-lltoday at 2:12 AM

remember when windows had html wallpapers. brb gonaa agent something that i hope doenst supply chain my entire life

markdowntoday at 2:08 AM

These damned wallpapers gave me my worst experience with Apple. MacOS would delete them and redownload automatically over and over again, using almost a terrabyte of data per week.

And I wasn't even using video wallpapers at the time.

Just discovered I had no internet 3 days into the month as my ISP had cut me off. Had to dig deep and spend hours I'll never get back trying to find out where all the data was going.

Here's a thread I just found now that shows others having similar issues: https://www.reddit.com/r/MacOS/comments/1ii38g8/macbook_wall...

show 1 reply
kageroumadoyesterday at 11:54 PM

Ever since Apple introduced their video wallpapers I wanted to be able to put custom videos there. I decided to reverse engineer and see what I can do.

I built Phosphene to sell it, but the existing competitors were polished enough that the time it would have taken to catch up wasn't going to pay off. So I'm open-sourcing it.

WallpaperExtensionKit.framework is what powers macOS wallpapers. It controls what’s shows in the Settings app. It took a lot of trial and error to replicate the behavior, but the result is that your custom wallpapers appear alongside everything else. I wanted to have an “add” button there too, but I couldn’t find a way to do so, so there’s a companion app that will put your video where it needs to be.

Unlike Apple's Aerials, the video keeps playing on the desktop (not just the lock screen). The renderer drives AVSampleBufferDisplayLayer directly with PTS-offset gapless looping, and pauses or downshifts based on thermal state, battery level, brightness, and window occlusion.

It’s free and works well.

show 2 replies
nashashmitoday at 2:21 AM

[delayed]