The Problem
If you switched from Chrome to Safari and want to keep forcing H.264 on YouTube, you can't use the h264ify Chrome extension anymore. Safari has its own extension system and h264ify isn't available there.
The good news: there's a free userscript that does the same thing, and Safari supports userscripts through a free App Store extension.
If you're not sure why H.264 matters on older Macs, see the YouTube stuttering fix article first.
Step 1 - Install a Userscript Manager
Safari doesn't run userscripts natively, but you can add support through a free extension called Userscripts.
Open the Mac App Store, search for Userscripts (by Justin Wasack) and install it. It's free and open source.
After installing, go to Safari -> Preferences -> Extensions, find Userscripts in the list and enable it.
Step 2 - Install the Script
Go to this page:
YouTube H.264 + FPS on Greasyfork
Click the green "Install this script" button. Safari will open the raw script file as plain text in a new tab, that's expected, don't close it.
Look at the Userscripts extension icon in your Safari toolbar (top right). It will show a small banner: "Userscript Detected: Click to install". Click the icon, then confirm the install.
That's it. The script is now active.
Step 3 - Verify It's Working
Open YouTube and play any video. Right-click the video player and choose Stats for nerds. In the codec line you should see something like:
avc1.640020 (298) / mp4a.40.2 (140)
The avc1 prefix confirms you're on H.264. If you still see vp09 or av01, try refreshing the page.
Why This Matters on Older Macs
Your 2015 MacBook has hardware H.264 decoding built into the Intel chip. YouTube's default codecs (VP9, AV1) have no hardware path on that machine, so the CPU handles every frame in software, causing high CPU usage, heat, and stuttering.
Switching to H.264 moves decoding off the CPU entirely. Fan noise drops, battery lasts longer, playback is smooth.
TL;DR
- Install Userscripts from the Mac App Store (free)
- Enable it in Safari -> Preferences -> Extensions
- Open the Greasyfork script page and click Install this script
- Click the Userscripts icon in Safari -> "Userscript Detected: Click to install"
- Reload YouTube and verify
avc1in Stats for nerds