Show HN: I reverse engineered Apple's video wallpapers

github.com

115 points by kageroumado 3 hours ago

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.

postalcoder 1 hour ago

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!

  • mikestaas 21 minutes ago

    OMG, LegacyScreenSaver is such a memory hog!

encore2097 3 hours ago

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!

musicale 41 minutes ago

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

  • futhey 18 minutes ago

    Same! I distinctly remember seeing portions of this wallpaper that led me to believe it's procedurally generated and not simply a collection of video files, and had to rewatch it to confirm. There are several points where the date and time match the system date and time down to the second.

buildbot 1 hour ago

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!

  • riddlemethat 1 hour ago

    I’m imagining dozens of people worldwide sharing your nostalgia for Vista.

    • zaps 1 hour ago

      “Good old Vista. People give it a bad press but I’m never upgrading, why would I? It just feels like a good pair of jeans.”

    • Gigachad 52 minutes ago

      It's called frutiger aero now. Lot of people very bored with modern safe design nostalgic for when tech and UI was weird and bold.

  • _kb 45 minutes ago

    What do you mean Windows Vista "nostalgia"? That makes me feel a little long in the horn.

    • ebbi 38 minutes ago

      guy_holding_shoulder.jpg

    • geerlingguy 7 minutes ago

      There are likely a number of folks on this forum now who were born after Vista was released.

  • wpm 24 minutes ago

    The moving wallpapers are near the first few times but I can't turn it off. I had to dig deep into WallpaperKit (I mean really? It's a friggin wallpaper) to find the static last frame of the wooshy moving BS.

wanoir 2 hours ago

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!

  • kageroumado 1 hour ago

    Thank you! I’m glad you like it

mgaunard 2 hours ago

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

  • kageroumado 1 hour ago

    You can use any website that lets you download video wallpapers, or you can make one yourself. Any video can be played

  • buildbot 1 hour ago

    I vote the Vista wallpapers personally; feels just right.

manuisin 1 hour ago

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

  • kageroumado 1 hour ago

    The video will keep playing on the lock screen, but screen savers are a different thing. You can have the same video as your wallpaper and screen saver though.

ChrisMarshallNY 2 hours ago

Very cool!

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

  • kageroumado 2 hours ago

    I don’t think they’ll touch this part anytime soon. It’s been unchanged for a few years now, they certainly have other priorities.

    • ChrisMarshallNY 2 hours ago

      Good on ya.

      I won't use it, myself, because I can't deal with wallpaper moving behind my work (I also can't listen to music, while I work. Maybe it's a "generational" thing). Also, I use a 49-inch ultrawide, so it might be vomit-inducing.

      I remember some other utility that played wallpaper videos, but it wasn't anywhere near as nicely done.

      • dylan604 1 hour ago

        Which generation is that? I'm a Gen Xer. I can't work without music, but specific music without lyrics for my brain to try to follow.

w-ll 1 hour ago

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

markdown 1 hour ago

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

  • kageroumado 1 hour ago

    This app injects itself directly into Apple’s actual pipeline, so your videos won’t get removed or changed. It’s not just an automated replacer of Apple’s own videos.

nashashmi 1 hour ago

Title should be prefixed with show hn:

  • dang 1 hour ago

    I had the same thought and just did that, and your comment was the next thing I saw :)

  • daemonologist 1 hour ago

    I wonder about this when I see someone post their own work without the Show HN prefix - is it always supposed to be a Show? (Enforcement/community objection to the lack thereof doesn't seem to be very strenuous, if so. Or, maybe it gets fixed after a little while and I haven't noticed.)