You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recent builds seem to have slightly higher CPU utilisation than before!
Whereas AetherEngineDemo & QuickTime use around 5% cpu while playing a movie, AetherPlayer now uses 10-12% playing the same movie.
This likely narrows it down to AetherPlayer, not the engine.
I understand AetherPlayer will always have more overhead than AetherEngineDemo but I think there's probably still a margin for improvement.
AetherPlayer is currently (still) the most energy efficient third-party media player on macOS :)
Perhaps consider a quick Claude audit and an Xcode processor trace to identify and suppress anything that is not mission critical while video is playing (when undisturbed by user interaction, menus, stats for nerds etc)!
This type of optimisation would also be useful when Sodalite makes it to iOS where battery life is precious.
The overhead was host-side, exactly as you suspected. AetherPlayer's player window was re-evaluating its entire SwiftUI view tree on every playback clock tick, roughly ten times a second, even while nothing on screen was changing. It happened because the view observed the high-frequency subtitle clock too far up the hierarchy, so the engine's render surface and all the input-handling views were being diffed on every tick. AetherEngineDemo never reads that clock in its main view body, which is why it sat around 5%.
The fix confines that 10 Hz read to a small subtitle overlay that does nothing when no subtitle cues are present. With subtitles off, undisturbed playback now establishes no per-tick work in the player container at all. With subtitles on, only the overlay updates, not the whole tree.
Because this is a SwiftUI efficiency issue rather than decode or render, the improvement should be most visible on Intel. Could you grab 0.9.11 from the releases page and check whether idle-playback CPU on your Mac mini comes down toward the AetherEngineDemo and QuickTime range? A before/after on the same movie (undisturbed, controls hidden, no Stats window) would be ideal.
Thanks for the report and the profiling suggestion.
Did a quick test today with AetherPlayer 0.11 and MacDemo 5.0.7
Mixed findings, but overall positive:
CPU usage is now comparable with MKV (native) and AVI (sw) files.
Subtitles (SRT) add an extra 1-2% when enabled.
MP4 files have a higher CPU usage in AetherPlayer by about 2-3% (even without subtitles).
Also some, but not all, mp4 files seem to be outright failing to play in both AetherPlayer and MacDemo but play normally in QuickTime. I’ll do more testing later and post some logs.
Thanks for the retest, that is exactly the result I was hoping for on the idle-CPU side: MKV and AVI now sitting in the same range, and 1-2% with SRT enabled is the expected cost of the overlay actually doing work.
The two MP4 findings are new, and I would like to chase them separately:
The files that refuse to play. Since they fail in both AetherPlayer and MacDemo but play in QuickTime, this is in the engine, not the app, so logs from either one are fine. Alongside the logs, could you attach a mediainfo dump (or ffprobe -show_format -show_streams <file>) for one or two of the failing files? The interesting bits are the exact video/audio/subtitle codecs and whether the file is faststart (mediainfo reports this as "IsStreamable"). If a failing file is small enough to share, or you can cut a short sample that still reproduces, even better.
The 2-3% higher CPU on MP4 without subtitles. Is that comparing the same content across containers, or different files? If you happen to have the same movie as both MKV and MP4, that pair would cleanly separate container routing from codec differences.
No rush, whenever you get around to the testing. Thanks again for the thorough profiling work on this one.
Chased finding 1 (the MP4s that refuse to play) and I think I have it, without the logs yet.
Both AetherPlayer and MacDemo drive the same native path: the file is remuxed to fMP4 and handed to AVPlayer over the loopback. I could not reproduce the failure on Apple Silicon. I ran a full matrix through the engine (H.264 High 10 / 4:2:2 / 4:4:4, HEVC Rext 4:2:2 10-bit, plus edit lists, negative CTS, moov-at-end) and every one reached readyToPlay and played, which rules out the HLS CODECS manifest gate and the usual container quirks and points at hardware decode capability.
The gap: AVPlayer accepts the HLS CODECS string for those high profiles, so the item reaches readyToPlay, but a Mac whose VideoToolbox has no decoder for the profile then renders nothing. Intel Macs have no HW decoder for H.264 High 4:2:2 / 4:4:4 / High-10 or HEVC Rext, and QuickTime plays them through its own software decoder. Unlike AV1, which is already gated on VTIsHardwareDecodeSupported, H.264 and HEVC had no per-format capability check and no software fallback, so those files dead-ended.
Fixed in AetherPlayer 0.11.1 (bundling AetherEngine 5.8.3): a per-format VTDecompressionSession probe at load. If VideoToolbox cannot hardware-decode the exact format, the source routes to the software decoder (libavcodec), which handles all of these. Apple Silicon keeps hardware-decoding them on the native path, so nothing changes there.
If it comes back High 4:2:2 / 4:4:4 / High-10 or HEVC Rext (a non-4:2:0 or a 10/12-bit pix_fmt), that is it. If it is plain 8-bit 4:2:0, something else is going on and the logs would still help.
Finding 2 (the 2-3% higher CPU on MP4) is untouched by this and still worth the same-movie MKV/MP4 pair when you have it, to separate container routing from codec.
The problem with my non-functioning mp4 is not AVPlayer capability. It's a regression between 0.8.1 & 0.9.0 (I tested all versions because those files were working previously).
More data points:
Original File: MP4 DV 8.1 + EAC3 Atmos + 36 text subtitle tracks
QuickTime plays file with no problem
AetherPlayer: MP4: not working, frozen at 00:00
AetherPlayer MKV: same movie (manually remuxed to MKV), WORKS
AetherPlayer 0.8.1 works, BUT 0.9.0 onwards is broken so it's a regression between those 2 versions.
AetherPlayer on iPhone: same MP4 also not working so it's not an Intel or SDR display problem
So the problem is very specific to mp4 + DV + Atmos + lots of text subtitles in AetherPlayer after 0.8.1
Thank you, that 0.8.1-to-0.9.0 bisection is the crucial clue, and it points at a specific change.
In that window the engine changed how it routes Dolby Vision and HDR. Before, a DV file was handed to AVPlayer as a bare media playlist. After, on an HDR-capable display it is handed a proper master playlist. That change is deliberate and needed for two reasons: the master is where Dolby Vision is signaled to the system (the SUPPLEMENTAL-CODECS attribute), and it is also the only place embedded subtitle tracks can be exposed as selectable renditions. A DV movie with 36 subtitle tracks specifically wants that master, so routing it back to a bare media playlist would drop both DV and every subtitle track.
On my synthetic DV 8.1 files the master is accepted and plays, so the master path itself is sound. Your real files produce a master that AVPlayer on your devices does not accept, and I need to see exactly what is in it and how it fails. This is the same class of issue as a recent HEVC one where a single wrong attribute in the master made AVPlayer reject the whole item.
One detail already fits and is worth stating: on your Intel mini with an SDR monitor the engine should route DV media-direct (no master), so the fact that the iPhone fails too is the important signal, because the iPhone is HDR-eligible and therefore does take the master. That places this in the master, not the display.
From one failing file, three things would pin it down:
The load log from AetherPlayer or MacDemo, specifically:
the [HLSVideoEngine] serving on http://127.0.0.1:.../master.m3u8 (...) line,
the master.m3u8 body: block right after it (the #EXT-X-STREAM-INF: line), and
the item status: does it reach item.status=readyToPlay and then sit at 0:00, or does it fail with an item.error / errorLog code? That AVFoundation/CoreMedia number (for example -11829, -12848, -11848, -1002) is the single most useful value.
The DV profile and level, the codec tag (dvh1 vs dvhe vs hvc1), and the frame rate are what shape the master's signaling.
If it is convenient, the same serving on ... line for the MKV that plays. That shows whether the MKV takes the master or the media path on your device, which tells me whether the difference is the container or the manifest.
No rush. With the master line and the error code side by side I can pin the exact attribute AVPlayer is rejecting.
Reproduced it here without the files, so there is something concrete to retest.
The lead was the remark that the same film plays fine as an MKV. That pointed at how the MP4 was authored rather than at the container itself, so I went looking for a public MP4 with the same shape and found one in Dolby's own reference content (DolbyLaboratories/dolby-vision-contents, SolLevante Profile 8.1). That file is authored hev1: the HEVC parameter sets (VPS/SPS/PPS) travel in-band with the packets, and the config record in the container is just its 23-byte header with no parameter-set arrays. It is exactly what MP4Box ...:xps_inband produces, which is the recipe most Dolby Vision MP4 authoring guides recommend.
Three separate defects fell out of that one file:
1. Frozen at 00:00. The engine has a pass that recovers those in-band parameter sets and rebuilds the config record. It scanned for them from whatever position an earlier index pass had left the file at, so on a feature-length file (263 s, keyframes every 2 s) it read 16 packets from the middle of a GOP, found nothing, and wrote an empty config record into the init segment. MP4Box calls the resulting segment an invalid ISO file. AVPlayer accepts the playlist, downloads media, fills its whole forward buffer, and never renders a frame. The error it raises is CoreMediaErrorDomain -19601, which is not one of the codes the master-to-media fallback watches for, so nothing recovered the session. That is the frozen-at-00:00 report.
2. The extra CPU on MP4. The hardware-capability probe builds a decoder description from the config record and asks VideoToolbox for a hardware session. With no parameter sets in the record there is no SPS to configure a decoder from, so the session create fails. That says nothing about hardware support, but the probe read it as "no hardware decoder" and sent every such file to the software decoder, on every machine including Apple Silicon. That is the second finding, the 2 to 3 percent.
Those two had to be fixed together: fixing the probe alone turns these files from "plays, on the software path" into "frozen".
3. While in there, the derived HEVC codec string was declaring its profile-compatibility flags without the bit reversal RFC 6381 requires, so 10-bit sources were advertising a variant that misdescribed their own bitstream.
All three are in AetherEngine 5.23.3 and shipped in AetherPlayer 0.13.1 (Sparkle will offer it as well). On the Dolby asset the difference is measurable end to end: before, software decode; with only the probe fixed, native and frozen; now native, config record rebuilt from 23 to 135 bytes, clock running.
Whether this is the same defect as the one on the Intel Mac mini is the open question, so a retest with the failing files would help. If one of them still does not play, the failure path now logs a line naming exactly what the scan saw:
[HLSVideoEngine] in-band parameter-set scan found none: packets=16 vps=false sps=false pps=false
That line plus the serving on ... line above it is enough to take it further, and it is a lot less to dig out than the full log request from before.
That ffprobe rules out the fix I shipped last time, and it does so cleanly.
codec_tag_string=hvc1 means the HEVC parameter sets sit in the container's config record, out of band. The defect I found and fixed in 0.13.1 is specific to hev1 files, where that record is empty and the parameter sets travel with the packets instead. Different file shape, so 0.13.1 could not have changed anything for this one. Those fixes were real, they were just not this.
Worth stating so nobody chases it again: the first line of that output, stream 41, missing mandatory atoms, broken header, is a genuine structural defect in the file, and I can now produce it exactly (a track whose sample table is missing its time-to-sample atom). I built a file with the same shape as yours around it: 44 streams, Dolby Vision Profile 8.1 tagged hvc1, E-AC-3, cover art, 41 text subtitle tracks, 260 seconds, planned into 52 segments. It plays clean on the current engine, with and without the broken track. So neither that track nor the sheer track count is what stops your file.
I also have to correct something I wrote earlier in this thread. I pointed at the master playlist as the likely cause on the Mac. Reading the routing code again: on macOS the engine only serves a master for an HDR source when the display reports itself eligible for HDR playback. On an SDR monitor it serves a plain media playlist, so on that machine the master cannot be what fails. On the iPhone, which is HDR eligible, it remains a candidate. That is either two different failures or one cause I have not found, and I cannot tell which from here.
Which brings me to the actual reason this has taken so long, and it is on my side. I have asked three times for a specific log line. A release build of AetherPlayer never wrote a log at all. The engine's diagnostics were installed only in debug builds, and only to stdout, which nothing reaching a normal install would capture. There was nothing there for anyone to find, and I kept asking anyway.
0.14.0 fixes that. Every build writes the engine's diagnostics to a file, and there are two one-click ways to hand it over:
macOS: Help > Reveal Diagnostics Log in Finder, or Help > Save Diagnostics Log… to drop a copy somewhere you can attach it from
iOS / iPadOS: the share button in the Home toolbar
The log opens with the app version, the OS, the hardware and whether the display is eligible for HDR playback, then carries the load decisions, the served playlist, the decoder route and any error code the player raised. Open the file that fails, let it sit at 00:00 for a few seconds, then export. That single file should settle both the Mac and the iPhone case.
One thing to try first: 0.14.0 is the first release since 0.13.1 and carries fifty-one engine releases, so simply opening the file again is worth a minute. If it plays now, that is also an answer.
Thanks for sticking with this one, and for the ffprobe in particular. Ruling out my own fix is worth more than another round of guesses.
Update on this: definite progress, file now plays with 0.14 but there's another issue.
Problem:
CPU usage is 20-25% during playback on the native route. Same broken file uses around 4% in QuickTime.
Same broken file manually remuxed to mkv runs at around 4% cpu in AetherPlayer.
Generally, AetherPlayer consistently has higher CPU usage playing mp4 compared to the same file in QuickTime AND same streams in mkv in AetherPlayer. CPU in AetherPlayer is around 6-7% compared to 3-4% in QuickTime and 3-4% in Aether with mkv.
Cannot compare with Engine Demo as it crashes on launch like the previous version of AetherPlayer.
The log doesn't show anything obvious. I suspect this is coming from the mp4 demuxer + the on-the-fly fixes for the broken files.
The demo bundle ships without the FFmpeg frameworks it links against. Those used to be linked statically, and the build script carried a note recording exactly that, ending with "if FFmpegBuild ever switches to dynamic frameworks, this is where they'd be copied to". It since did switch, because LGPL wants the libraries relinkable, and a comment cannot notice that happening. The binary today loads nine frameworks through @rpath and the bundle contained none of them, so that 6.5.6 demo could not launch on any machine, not just that one.
Fixed in 89518ef. The frameworks are now copied in and signed, and the note is replaced by a check that fails the build when any @rpath dependency is missing from the bundle. A comment describing what someone ought to do was the actual defect.
One thing that does not follow, though: AetherPlayer itself is built through Xcode, which embeds and signs those frameworks automatically, so this particular fault never applied to the app. If 0.13.1 also refused to launch, that is a different failure, and its crash report would be worth having on its own.
On the CPU number, I could not reproduce it
Rather than assert that, here is what I measured, so the negative result is checkable:
Container. Same streams as MP4 and as MKV, measuring demux and remux directly: 6240 frames in 0.04 s, roughly 6100x realtime, identical either way. A demuxer costing hundredths of a percent of a core cannot produce 20%.
Track count. A 44 track file (video, E-AC-3, cover art and 41 text tracks) against a 2 track cut of the same content, through the full engine. No difference.
A deliberately broken track, with its sample table stripped so it reproduces the missing mandatory atoms, broken header line. No difference.
Video bitrate. The same 17 minute source at 3.9 and at 20.3 Mbit/s: 4.3% against 5.7% of one core. Cost barely follows bitrate.
A profile of my own session. 99.9% of samples are the process waiting. There is no hot spot to find because there is no load to divide.
So the suspicion about the mp4 demuxer and the on-the-fly repairs is, at least on this hardware and on files shaped like that one, not where the time goes. Something on that Mac is doing work that mine is not, and I cannot see it from here.
The one measurement that would settle it
A sample of the process while it is burning those 20-25%. macOS ships the tool, and it needs no install and no sudo (I verified that against a sandboxed, hardened-runtime build, which is the case that usually blocks it):
Play the file, wait until CPU has settled at its steady 20-25%, then run that line. It writes a single text file. Its "Sort by top of stack" section names the functions actually consuming CPU, which replaces every guess above with a location. The same line with DemoPlayerMac in place of AetherPlayer works for the demo once it launches again.
Worth saying plainly: this player will not match QuickTime here, by design. QuickTime plays the MP4 directly, whereas the engine demuxes it, remuxes it into fMP4 segments and serves them to AVPlayer over a local socket, which is work QuickTime never does. But 20-25% for MP4 against 4% for the same streams in MKV, both going through that identical path, is not explained by design, and that is the gap the sample should close.
Thanks for the remux comparison especially. A control that isolates the container is what let me rule my own candidates out instead of shipping another guess against them.
I'll run that test when I get a chance. I'll also test with the updated DemoPlayerMac.
Worth replying to your efficiency point specifically: AetherPlayer, despite the extra work, already matches and often exceeds the efficiency of QuickTime Player in my extensive testing! You should be VERY proud.
AetherEngine is extremely efficient and I think this should be documented as a major advantage over other libs like VLC & MPV.
I'm only pushing slightly because I like your project and want to help in whatever little ways I can. I care about efficiency because I use battery operated devices.
You have done an incredible job with Aether and now I'm seeing it getting used in popular mainstream apps. You really have created the exoplayer of the Apple world, just like I said you would :) Congratulations.
The demo builds and launches again: AetherEngine-Demo-6.19.4.dmg. Downloaded the published artifact, checked it passes Gatekeeper as notarized, and launched it, rather than trusting the build log.
That restores the comparison that was unavailable. If the demo shows the same 20-25% on that file while a MKV remux of it stays low, the cost is in the engine and not in anything the player does around it, which narrows this considerably on its own. Both accept a sample the same way:
Two rounds were needed for that DMG, which is worth admitting: the first fix embedded the frameworks but could not sign them, because the copies keep the read-only mode they carry inside the package. The check I had added passed anyway, since it verified the frameworks were present rather than that anything could actually find them. Presence is not resolvability, and a check that treats them as the same thing succeeds precisely when the failure it exists for happens.
Thank you, that is generous. The correction is the useful part of it, though, so let me take it properly.
"This player will not match QuickTime here, by design" was a structural assumption, not a measurement, and my own profile from the same day does not support it: 99.9% of the samples in that session were the process waiting. The demux, the remux and the loopback socket are real work, but nowhere near enough to be a ceiling. Reporting parity or better is therefore not surprising in hindsight, and I should not have framed the comparison as settled before measuring it. Withdrawn.
On documenting the efficiency, that is worth doing and I would want to measure it before claiming it. "More efficient than VLC and mpv" only means something alongside the file, the route each player actually took, and how the CPU was sampled. Without that it is the sort of line that gets quoted back the first time someone's file lands on the software decoder and the number does not hold. So if it goes in the README it will be a comparison somebody else can rerun, not an adjective.
The battery angle is the more interesting half of it anyway, and it does not follow from CPU percentages. Time in the efficiency cores is what moves energy on those devices, and that is measurable per process rather than arguable.
No rush on the sample. The file plays, which was the part that mattered, and the CPU question will keep.
The new demo app no longer crashes and plays the mp4 with about 4% cpu usage vs 4.4% in QuickTime and 17-25% in AetherPlayer. So that narrows it down to AetherPlayer not the engine.
I'll get the sample later.
I think Apple's HLS pipeline is just super optimised, even more than QuickTime direct play.
I'll run that test when I get a chance. I'll also test with the updated DemoPlayerMac.
Worth replying to your efficiency point specifically: AetherPlayer, despite the extra work, already matches and often exceeds the efficiency of QuickTime Player in my extensive testing! You should be VERY proud.
AetherEngine is extremely efficient and I think this should be documented as a major advantage over other libs like VLC & MPV.
I'm only pushing slightly because I like your project and want to help in whatever little ways I can. I care about efficiency because I use battery operated devices.
You have done an incredible job with Aether and now I'm seeing it getting used in popular mainstream apps. You really have created the exoplayer of the Apple world, just like I said you would :) Congratulations.
I also have to thank you for helping the project in its early stage and making it what it is today!
Its so so crazy to already see it in projects like plezy or moonfin. 🤯
That demo comparison found it. Cause identified, reproduced and fixed in 676f663.
It is the cover art, decoded once a second
The player writes the macOS Now-Playing surface on a throttled tick, roughly once a second for the whole session. That write decoded the embedded cover image every single time. The artwork bytes never change while a file plays, so it was a full image decode per second for a constant result, and MediaPlayer re-encodes the bitmap on top of it.
Splitting the engine off is what made it findable, so the demo run was the decisive measurement rather than a formality. Once it pointed at the app, a profile of the app here showed PNG decoding as the largest running item, which named the mechanism.
Reproduced on identical A/V, the only difference being an embedded poster-sized cover, 25 second windows:
CPU
PNG share of running samples
cover, before
18.8% of a core
60.5%
no cover
5.8% of a core
0%
cover, after the fix
6.0% of a core
0%
A file with a cover now costs what the same file without one costs.
That accounts for each part of the report. The demo is cheap because it has no Now-Playing surface at all. QuickTime is cheap for the same reason. The MKV remux is cheap because ffmpeg does not carry the cover across in the form the engine surfaces as artwork, so there was nothing to decode, which is why this looked like a container problem and never was one. And an Intel machine pays more per decode than the one measured here, which fits 17-25% against 18.8%.
The fix keeps the decoded image and rebuilds it only when the bytes actually change, which is the same gate the in-app cover view already used. Cleared on stop, so a following file cannot inherit the previous cover.
Still worth having the sample
Not to find this one, but as a check that nothing else remains once a build with the fix is in hand. If the number lands near the MKV figure on that file, this was all of it.
The efficiency point from earlier holds up better now, too: the engine measured essentially idle throughout, and the cost was entirely in something the host did around it.
The fix is out in 0.15.0, together with the engine jump from 6.7.0 to 6.19.4. Worth re-measuring the mp4 with cover art on your machine when you get to it.
Thanks for measuring it again, that closes the loop on this one.
The mp4 versus mkv gap going away with it is the expected consequence rather than a bonus: the cover art was the only difference between the two files, so once it stopped being decoded every second, the mp4 costs what the remux always cost.
The stall is a different defect and lives in the engine, so I moved it to AetherEngine#358 with the analysis. Short version from your log: the segment plan for that file promises 571 segments, but the producer never muxes indices 4, 7, 12 and 14, and AVPlayer stops on the first of those holes exactly 18 s in. The wedge recovery then re-anchors to the same position and rebuilds the same hole five times over, which is why it never comes back. The file's header is damaged enough that its keyframe table disagrees with where the muxer can actually cut, by up to 2.6 s per boundary.
Two questions over there that would settle whether 0.15.0 caused it or only exposed it, including whether 0.14.0 plays the same file past that point.
Closing this one as fixed. The stall continues in #358.
0.15.2 is out with the actual root cause behind this thread's stall, AetherEngine 6.20.1. Details in AetherEngine#358: the segment plan reads the container's random-access points in decode order while the cut was matching them in presentation order, which is two frames apart on an ordinary file and three seconds apart on yours.
Activity
chore(release): bump to 0.9.11 (build 32) - idle-playback CPU fix (#2)
superuser404notfound commentedon Jul 7, 2026
Fixed in 0.9.11 (just released).
The overhead was host-side, exactly as you suspected. AetherPlayer's player window was re-evaluating its entire SwiftUI view tree on every playback clock tick, roughly ten times a second, even while nothing on screen was changing. It happened because the view observed the high-frequency subtitle clock too far up the hierarchy, so the engine's render surface and all the input-handling views were being diffed on every tick. AetherEngineDemo never reads that clock in its main view body, which is why it sat around 5%.
The fix confines that 10 Hz read to a small subtitle overlay that does nothing when no subtitle cues are present. With subtitles off, undisturbed playback now establishes no per-tick work in the player container at all. With subtitles on, only the overlay updates, not the whole tree.
Because this is a SwiftUI efficiency issue rather than decode or render, the improvement should be most visible on Intel. Could you grab 0.9.11 from the releases page and check whether idle-playback CPU on your Mac mini comes down toward the AetherEngineDemo and QuickTime range? A before/after on the same movie (undisturbed, controls hidden, no Stats window) would be ideal.
Thanks for the report and the profiling suggestion.
fix(perf): stop the player container re-evaluating on every clock tick
DrHurt commentedon Jul 15, 2026
Did a quick test today with AetherPlayer 0.11 and MacDemo 5.0.7
Mixed findings, but overall positive:
CPU usage is now comparable with MKV (native) and AVI (sw) files.
Subtitles (SRT) add an extra 1-2% when enabled.
MP4 files have a higher CPU usage in AetherPlayer by about 2-3% (even without subtitles).
Also some, but not all, mp4 files seem to be outright failing to play in both AetherPlayer and MacDemo but play normally in QuickTime. I’ll do more testing later and post some logs.
superuser404notfound commentedon Jul 16, 2026
Thanks for the retest, that is exactly the result I was hoping for on the idle-CPU side: MKV and AVI now sitting in the same range, and 1-2% with SRT enabled is the expected cost of the overlay actually doing work.
The two MP4 findings are new, and I would like to chase them separately:
The files that refuse to play. Since they fail in both AetherPlayer and MacDemo but play in QuickTime, this is in the engine, not the app, so logs from either one are fine. Alongside the logs, could you attach a
mediainfodump (orffprobe -show_format -show_streams <file>) for one or two of the failing files? The interesting bits are the exact video/audio/subtitle codecs and whether the file is faststart (mediainfo reports this as "IsStreamable"). If a failing file is small enough to share, or you can cut a short sample that still reproduces, even better.The 2-3% higher CPU on MP4 without subtitles. Is that comparing the same content across containers, or different files? If you happen to have the same movie as both MKV and MP4, that pair would cleanly separate container routing from codec differences.
No rush, whenever you get around to the testing. Thanks again for the thorough profiling work on this one.
chore(deps): bump AetherEngine to 5.8.2 (17262cd3b560122645a7ec49fb8c…
chore(release): 0.11.1
chore(deps): bump AetherEngine to 5.8.3 (b2256bebcd5b4ae118bd3ca2c3cc…
superuser404notfound commentedon Jul 18, 2026
Chased finding 1 (the MP4s that refuse to play) and I think I have it, without the logs yet.
Both AetherPlayer and MacDemo drive the same native path: the file is remuxed to fMP4 and handed to AVPlayer over the loopback. I could not reproduce the failure on Apple Silicon. I ran a full matrix through the engine (H.264 High 10 / 4:2:2 / 4:4:4, HEVC Rext 4:2:2 10-bit, plus edit lists, negative CTS, moov-at-end) and every one reached readyToPlay and played, which rules out the HLS CODECS manifest gate and the usual container quirks and points at hardware decode capability.
The gap: AVPlayer accepts the HLS CODECS string for those high profiles, so the item reaches readyToPlay, but a Mac whose VideoToolbox has no decoder for the profile then renders nothing. Intel Macs have no HW decoder for H.264 High 4:2:2 / 4:4:4 / High-10 or HEVC Rext, and QuickTime plays them through its own software decoder. Unlike AV1, which is already gated on VTIsHardwareDecodeSupported, H.264 and HEVC had no per-format capability check and no software fallback, so those files dead-ended.
Fixed in AetherPlayer 0.11.1 (bundling AetherEngine 5.8.3): a per-format VTDecompressionSession probe at load. If VideoToolbox cannot hardware-decode the exact format, the source routes to the software decoder (libavcodec), which handles all of these. Apple Silicon keeps hardware-decoding them on the native path, so nothing changes there.
The signed .dmg is on the release: https://github.com/superuser404notfound/AetherPlayer/releases/tag/v0.11.1 (existing installs also pick it up via Sparkle).
Two things when you get a chance:
Do the files that used to show nothing now play on the mini?
To confirm this is the cause rather than a lookalike, the ffprobe you offered on one failing file would nail it:
If it comes back High 4:2:2 / 4:4:4 / High-10 or HEVC Rext (a non-4:2:0 or a 10/12-bit pix_fmt), that is it. If it is plain 8-bit 4:2:0, something else is going on and the logs would still help.
Finding 2 (the 2-3% higher CPU on MP4) is untouched by this and still worth the same-movie MKV/MP4 pair when you have it, to separate container routing from codec.
DrHurt commentedon Jul 19, 2026
The problem with my non-functioning mp4 is not AVPlayer capability. It's a regression between 0.8.1 & 0.9.0 (I tested all versions because those files were working previously).
More data points:
Original File: MP4 DV 8.1 + EAC3 Atmos + 36 text subtitle tracks
So the problem is very specific to mp4 + DV + Atmos + lots of text subtitles in AetherPlayer after 0.8.1
I'll do more digging later & logs later.
DrHurt commentedon Jul 20, 2026
Further info:
Files that do not work identify as mp42/isom (and contain metadata like cover art and media info)
Files that DO work identify as mp41/mp42/isom
This is an engine-side regression that happened sometime between 0.8.1 and 0.9.0
superuser404notfound commentedon Jul 22, 2026
Thank you, that 0.8.1-to-0.9.0 bisection is the crucial clue, and it points at a specific change.
In that window the engine changed how it routes Dolby Vision and HDR. Before, a DV file was handed to AVPlayer as a bare media playlist. After, on an HDR-capable display it is handed a proper master playlist. That change is deliberate and needed for two reasons: the master is where Dolby Vision is signaled to the system (the
SUPPLEMENTAL-CODECSattribute), and it is also the only place embedded subtitle tracks can be exposed as selectable renditions. A DV movie with 36 subtitle tracks specifically wants that master, so routing it back to a bare media playlist would drop both DV and every subtitle track.On my synthetic DV 8.1 files the master is accepted and plays, so the master path itself is sound. Your real files produce a master that AVPlayer on your devices does not accept, and I need to see exactly what is in it and how it fails. This is the same class of issue as a recent HEVC one where a single wrong attribute in the master made AVPlayer reject the whole item.
One detail already fits and is worth stating: on your Intel mini with an SDR monitor the engine should route DV media-direct (no master), so the fact that the iPhone fails too is the important signal, because the iPhone is HDR-eligible and therefore does take the master. That places this in the master, not the display.
From one failing file, three things would pin it down:
The load log from AetherPlayer or MacDemo, specifically:
[HLSVideoEngine] serving on http://127.0.0.1:.../master.m3u8 (...)line,master.m3u8 body:block right after it (the#EXT-X-STREAM-INF:line), anditem.status=readyToPlayand then sit at 0:00, or does it fail with anitem.error/errorLogcode? That AVFoundation/CoreMedia number (for example -11829, -12848, -11848, -1002) is the single most useful value.ffprobe of the same file:
The DV profile and level, the codec tag (
dvh1vsdvhevshvc1), and the frame rate are what shape the master's signaling.If it is convenient, the same
serving on ...line for the MKV that plays. That shows whether the MKV takes the master or the media path on your device, which tells me whether the difference is the container or the manifest.No rush. With the master line and the error code side by side I can pin the exact attribute AVPlayer is rejecting.
superuser404notfound commentedon Jul 25, 2026
Reproduced it here without the files, so there is something concrete to retest.
The lead was the remark that the same film plays fine as an MKV. That pointed at how the MP4 was authored rather than at the container itself, so I went looking for a public MP4 with the same shape and found one in Dolby's own reference content (DolbyLaboratories/dolby-vision-contents, SolLevante Profile 8.1). That file is authored
hev1: the HEVC parameter sets (VPS/SPS/PPS) travel in-band with the packets, and the config record in the container is just its 23-byte header with no parameter-set arrays. It is exactly whatMP4Box ...:xps_inbandproduces, which is the recipe most Dolby Vision MP4 authoring guides recommend.Three separate defects fell out of that one file:
1. Frozen at 00:00. The engine has a pass that recovers those in-band parameter sets and rebuilds the config record. It scanned for them from whatever position an earlier index pass had left the file at, so on a feature-length file (263 s, keyframes every 2 s) it read 16 packets from the middle of a GOP, found nothing, and wrote an empty config record into the init segment. MP4Box calls the resulting segment an invalid ISO file. AVPlayer accepts the playlist, downloads media, fills its whole forward buffer, and never renders a frame. The error it raises is
CoreMediaErrorDomain -19601, which is not one of the codes the master-to-media fallback watches for, so nothing recovered the session. That is the frozen-at-00:00 report.2. The extra CPU on MP4. The hardware-capability probe builds a decoder description from the config record and asks VideoToolbox for a hardware session. With no parameter sets in the record there is no SPS to configure a decoder from, so the session create fails. That says nothing about hardware support, but the probe read it as "no hardware decoder" and sent every such file to the software decoder, on every machine including Apple Silicon. That is the second finding, the 2 to 3 percent.
Those two had to be fixed together: fixing the probe alone turns these files from "plays, on the software path" into "frozen".
3. While in there, the derived HEVC codec string was declaring its profile-compatibility flags without the bit reversal RFC 6381 requires, so 10-bit sources were advertising a variant that misdescribed their own bitstream.
All three are in AetherEngine 5.23.3 and shipped in AetherPlayer 0.13.1 (Sparkle will offer it as well). On the Dolby asset the difference is measurable end to end: before, software decode; with only the probe fixed, native and frozen; now native, config record rebuilt from 23 to 135 bytes, clock running.
Whether this is the same defect as the one on the Intel Mac mini is the open question, so a retest with the failing files would help. If one of them still does not play, the failure path now logs a line naming exactly what the scan saw:
That line plus the
serving on ...line above it is enough to take it further, and it is a lot less to dig out than the full log request from before.DrHurt commentedon Jul 26, 2026
I’ll give that a try when I’m back home! Sorry summer holidays with family now.
I can test my file on AetherPlayer on iPhone if you want. I have the file on my iPhone. Just need an up to date build on TestFlight.
4 remaining items
DrHurt commentedon Aug 3, 2026
The latest demo crashes immediately and fails to launch.
superuser404notfound commentedon Aug 4, 2026
That ffprobe rules out the fix I shipped last time, and it does so cleanly.
codec_tag_string=hvc1means the HEVC parameter sets sit in the container's config record, out of band. The defect I found and fixed in 0.13.1 is specific tohev1files, where that record is empty and the parameter sets travel with the packets instead. Different file shape, so 0.13.1 could not have changed anything for this one. Those fixes were real, they were just not this.Worth stating so nobody chases it again: the first line of that output,
stream 41, missing mandatory atoms, broken header, is a genuine structural defect in the file, and I can now produce it exactly (a track whose sample table is missing its time-to-sample atom). I built a file with the same shape as yours around it: 44 streams, Dolby Vision Profile 8.1 taggedhvc1, E-AC-3, cover art, 41 text subtitle tracks, 260 seconds, planned into 52 segments. It plays clean on the current engine, with and without the broken track. So neither that track nor the sheer track count is what stops your file.I also have to correct something I wrote earlier in this thread. I pointed at the master playlist as the likely cause on the Mac. Reading the routing code again: on macOS the engine only serves a master for an HDR source when the display reports itself eligible for HDR playback. On an SDR monitor it serves a plain media playlist, so on that machine the master cannot be what fails. On the iPhone, which is HDR eligible, it remains a candidate. That is either two different failures or one cause I have not found, and I cannot tell which from here.
Which brings me to the actual reason this has taken so long, and it is on my side. I have asked three times for a specific log line. A release build of AetherPlayer never wrote a log at all. The engine's diagnostics were installed only in debug builds, and only to stdout, which nothing reaching a normal install would capture. There was nothing there for anyone to find, and I kept asking anyway.
0.14.0 fixes that. Every build writes the engine's diagnostics to a file, and there are two one-click ways to hand it over:
The log opens with the app version, the OS, the hardware and whether the display is eligible for HDR playback, then carries the load decisions, the served playlist, the decoder route and any error code the player raised. Open the file that fails, let it sit at 00:00 for a few seconds, then export. That single file should settle both the Mac and the iPhone case.
One thing to try first: 0.14.0 is the first release since 0.13.1 and carries fifty-one engine releases, so simply opening the file again is worth a minute. If it plays now, that is also an answer.
Thanks for sticking with this one, and for the ffprobe in particular. Ruling out my own fix is worth more than another round of guesses.
DrHurt commentedon Aug 9, 2026
Update on this: definite progress, file now plays with 0.14 but there's another issue.
Problem:
CPU usage is 20-25% during playback on the native route. Same broken file uses around 4% in QuickTime.
Same broken file manually remuxed to mkv runs at around 4% cpu in AetherPlayer.
Generally, AetherPlayer consistently has higher CPU usage playing mp4 compared to the same file in QuickTime AND same streams in mkv in AetherPlayer. CPU in AetherPlayer is around 6-7% compared to 3-4% in QuickTime and 3-4% in Aether with mkv.
Cannot compare with Engine Demo as it crashes on launch like the previous version of AetherPlayer.
The log doesn't show anything obvious. I suspect this is coming from the mp4 demuxer + the on-the-fly fixes for the broken files.
Log:
superuser404notfound commentedon Aug 10, 2026
Two separate things in that update, and the first one is squarely my fault.
The demo crash is solved, and it was never the hardware
The crash report posted on 3 August has the whole answer in it, and I did not read it carefully enough at the time:
The demo bundle ships without the FFmpeg frameworks it links against. Those used to be linked statically, and the build script carried a note recording exactly that, ending with "if FFmpegBuild ever switches to dynamic frameworks, this is where they'd be copied to". It since did switch, because LGPL wants the libraries relinkable, and a comment cannot notice that happening. The binary today loads nine frameworks through
@rpathand the bundle contained none of them, so that 6.5.6 demo could not launch on any machine, not just that one.Fixed in
89518ef. The frameworks are now copied in and signed, and the note is replaced by a check that fails the build when any@rpathdependency is missing from the bundle. A comment describing what someone ought to do was the actual defect.One thing that does not follow, though: AetherPlayer itself is built through Xcode, which embeds and signs those frameworks automatically, so this particular fault never applied to the app. If 0.13.1 also refused to launch, that is a different failure, and its crash report would be worth having on its own.
On the CPU number, I could not reproduce it
Rather than assert that, here is what I measured, so the negative result is checkable:
missing mandatory atoms, broken headerline. No difference.So the suspicion about the mp4 demuxer and the on-the-fly repairs is, at least on this hardware and on files shaped like that one, not where the time goes. Something on that Mac is doing work that mine is not, and I cannot see it from here.
The one measurement that would settle it
A sample of the process while it is burning those 20-25%. macOS ships the tool, and it needs no install and no sudo (I verified that against a sandboxed, hardened-runtime build, which is the case that usually blocks it):
Play the file, wait until CPU has settled at its steady 20-25%, then run that line. It writes a single text file. Its "Sort by top of stack" section names the functions actually consuming CPU, which replaces every guess above with a location. The same line with
DemoPlayerMacin place ofAetherPlayerworks for the demo once it launches again.Worth saying plainly: this player will not match QuickTime here, by design. QuickTime plays the MP4 directly, whereas the engine demuxes it, remuxes it into fMP4 segments and serves them to AVPlayer over a local socket, which is work QuickTime never does. But 20-25% for MP4 against 4% for the same streams in MKV, both going through that identical path, is not explained by design, and that is the gap the sample should close.
Thanks for the remux comparison especially. A control that isolates the container is what let me rule my own candidates out instead of shipping another guess against them.
DrHurt commentedon Aug 10, 2026
I'll run that test when I get a chance. I'll also test with the updated DemoPlayerMac.
Worth replying to your efficiency point specifically: AetherPlayer, despite the extra work, already matches and often exceeds the efficiency of QuickTime Player in my extensive testing! You should be VERY proud.
AetherEngine is extremely efficient and I think this should be documented as a major advantage over other libs like VLC & MPV.
I'm only pushing slightly because I like your project and want to help in whatever little ways I can. I care about efficiency because I use battery operated devices.
You have done an incredible job with Aether and now I'm seeing it getting used in popular mainstream apps. You really have created the exoplayer of the Apple world, just like I said you would :) Congratulations.
superuser404notfound commentedon Aug 10, 2026
The demo builds and launches again: AetherEngine-Demo-6.19.4.dmg. Downloaded the published artifact, checked it passes Gatekeeper as notarized, and launched it, rather than trusting the build log.
That restores the comparison that was unavailable. If the demo shows the same 20-25% on that file while a MKV remux of it stays low, the cost is in the engine and not in anything the player does around it, which narrows this considerably on its own. Both accept a
samplethe same way:Two rounds were needed for that DMG, which is worth admitting: the first fix embedded the frameworks but could not sign them, because the copies keep the read-only mode they carry inside the package. The check I had added passed anyway, since it verified the frameworks were present rather than that anything could actually find them. Presence is not resolvability, and a check that treats them as the same thing succeeds precisely when the failure it exists for happens.
superuser404notfound commentedon Aug 10, 2026
Thank you, that is generous. The correction is the useful part of it, though, so let me take it properly.
"This player will not match QuickTime here, by design" was a structural assumption, not a measurement, and my own profile from the same day does not support it: 99.9% of the samples in that session were the process waiting. The demux, the remux and the loopback socket are real work, but nowhere near enough to be a ceiling. Reporting parity or better is therefore not surprising in hindsight, and I should not have framed the comparison as settled before measuring it. Withdrawn.
On documenting the efficiency, that is worth doing and I would want to measure it before claiming it. "More efficient than VLC and mpv" only means something alongside the file, the route each player actually took, and how the CPU was sampled. Without that it is the sort of line that gets quoted back the first time someone's file lands on the software decoder and the number does not hold. So if it goes in the README it will be a comparison somebody else can rerun, not an adjective.
The battery angle is the more interesting half of it anyway, and it does not follow from CPU percentages. Time in the efficiency cores is what moves energy on those devices, and that is measurable per process rather than arguable.
No rush on the sample. The file plays, which was the part that mattered, and the CPU question will keep.
DrHurt commentedon Aug 10, 2026
Quick test:
The new demo app no longer crashes and plays the mp4 with about 4% cpu usage vs 4.4% in QuickTime and 17-25% in AetherPlayer. So that narrows it down to AetherPlayer not the engine.
I'll get the sample later.
I think Apple's HLS pipeline is just super optimised, even more than QuickTime direct play.
superuser404notfound commentedon Aug 10, 2026
I also have to thank you for helping the project in its early stage and making it what it is today!
Its so so crazy to already see it in projects like plezy or moonfin. 🤯
superuser404notfound commentedon Aug 10, 2026
That demo comparison found it. Cause identified, reproduced and fixed in
676f663.It is the cover art, decoded once a second
The player writes the macOS Now-Playing surface on a throttled tick, roughly once a second for the whole session. That write decoded the embedded cover image every single time. The artwork bytes never change while a file plays, so it was a full image decode per second for a constant result, and MediaPlayer re-encodes the bitmap on top of it.
Splitting the engine off is what made it findable, so the demo run was the decisive measurement rather than a formality. Once it pointed at the app, a profile of the app here showed PNG decoding as the largest running item, which named the mechanism.
Reproduced on identical A/V, the only difference being an embedded poster-sized cover, 25 second windows:
A file with a cover now costs what the same file without one costs.
That accounts for each part of the report. The demo is cheap because it has no Now-Playing surface at all. QuickTime is cheap for the same reason. The MKV remux is cheap because
ffmpegdoes not carry the cover across in the form the engine surfaces as artwork, so there was nothing to decode, which is why this looked like a container problem and never was one. And an Intel machine pays more per decode than the one measured here, which fits 17-25% against 18.8%.The fix keeps the decoded image and rebuilds it only when the bytes actually change, which is the same gate the in-app cover view already used. Cleared on stop, so a following file cannot inherit the previous cover.
Still worth having the sample
Not to find this one, but as a check that nothing else remains once a build with the fix is in hand. If the number lands near the MKV figure on that file, this was all of it.
The efficiency point from earlier holds up better now, too: the engine measured essentially idle throughout, and the cost was entirely in something the host did around it.
superuser404notfound commentedon Aug 10, 2026
The fix is out in 0.15.0, together with the engine jump from 6.7.0 to 6.19.4. Worth re-measuring the mp4 with cover art on your machine when you get to it.
DrHurt commentedon Aug 10, 2026
This seems to have fixed it and as a bonus the long standing mp4 vs mkv difference seems to have also gone now.
Now both mp4 & mkv have the same CPU as QuickTime +/- 1% with Aether sometimes being more efficient in this rough metric.
Very well done!
Unfortunately, I'm now getting a stall with one of the broken files after 18s:
superuser404notfound commentedon Aug 10, 2026
Thanks for measuring it again, that closes the loop on this one.
The mp4 versus mkv gap going away with it is the expected consequence rather than a bonus: the cover art was the only difference between the two files, so once it stopped being decoded every second, the mp4 costs what the remux always cost.
The stall is a different defect and lives in the engine, so I moved it to AetherEngine#358 with the analysis. Short version from your log: the segment plan for that file promises 571 segments, but the producer never muxes indices 4, 7, 12 and 14, and AVPlayer stops on the first of those holes exactly 18 s in. The wedge recovery then re-anchors to the same position and rebuilds the same hole five times over, which is why it never comes back. The file's header is damaged enough that its keyframe table disagrees with where the muxer can actually cut, by up to 2.6 s per boundary.
Two questions over there that would settle whether 0.15.0 caused it or only exposed it, including whether 0.14.0 plays the same file past that point.
Closing this one as fixed. The stall continues in #358.
superuser404notfound commentedon Aug 11, 2026
0.15.2 is out with the actual root cause behind this thread's stall, AetherEngine 6.20.1. Details in AetherEngine#358: the segment plan reads the container's random-access points in decode order while the cut was matching them in presentation order, which is two frames apart on an ordinary file and three seconds apart on yours.