Repository navigation
feat(player): audio offset per playlist and in the player - #382
Open
TheDutchSmoke wants to merge 4 commits into
Open
TheDutchSmoke wants to merge 4 commits into
TheDutchSmoke wants to merge 4 commits into
Conversation
Adds a lip-sync correction in milliseconds (positive plays audio later): a per-playlist default in the Playback section, carried on PlayableMedia, and an in-player Audio Delay menu for the session that can be saved back as the playlist default. Shown only while the engine on screen can shift its audio while playing: KSPlayer's FFmpeg path (videoDelay, opposite sign), VLCKit (currentAudioPlaybackDelay) and AetherEngine (setAudioDelay through a new bridge method, on top of its engine-wide delay). AVPlayer and LumeEngine have no API and hide the menu.
TheDutchSmoke
force-pushed
the
feat/audio-offset
branch
from
November 7, 2026 11:05
f31cf5a to
5e4c760
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an audio offset (lip-sync correction) for providers whose streams carry the sound ahead of or behind the picture.
Playlist.audioOffsetMilliseconds. Positive plays audio later, the same sign as AetherEngine's engine-wide setting. Device-local like the stream format (the correction depends on the TV/receiver as much as on the provider), so no CloudKit / Lume Cloud schema change. The value rides onPlayableMedia.audioOffsetMilliseconds, so Multiview tiles and catch-up get it too.Engines
KSOptions.videoDelaywith the opposite sign (videoClockSyncshows the frame atclock - videoDelay)KSAVPlayerignores it, so the menu registers only when the layer's player isKSMEPlayercurrentAudioPlaybackDelay(µs), re-asserted after everyinstallMedia+play()and on.playing, like deinterlaceplayer.aether.audioDelayat load;LumeAetherSession.setAudioDelay(new bridge method, engine API since 7.x) while playingPlayerSessionyetAetherAudioDelayPresetbecame the sharedAudioOffsetPreset, which owns the presets (−500…+500 ms) and every per-engine conversion; the Aether settings UI keeps working unchanged.Type of change
feat— new featurePlatforms verified
LumeTests)VideoSampleTapfor the Hue frame source, so the tvOS target fails before this change too; no tvOS runtime either)Screenshots / recordings
None yet — happy to add once a maintainer confirms the placement of the menu (after Quality in the pill / trailing row).
Checklist
--strict, String Catalog normalization).LumeTestson the iOS simulator; see note below).PlayerAudioOffsetTests,AetherEngineSettingsTests).Notes for review
LumeTestson iPhone 17 / iOS 27: 3450 passed; 27 failures are the same onesmainshows on this machine (DTODecodingTests/ContentSyncTestswithout the generatedExampleData,SportsLabelsTestsunder a Dutch locale,SportsResolveCacheTests, theLumeCloudVectorExportTestsdrift, and two wall-clock tests that pass when re-run alone). The suites touched here (PlayerAudioOffsetTests,AetherEngineSettingsTests,PlayableMediaTests,PlaylistStreamFormatTests) plusLumeEngineShutdownWaitTestsandCloudSyncParentalEngineTestswere re-run in isolation: 150 passed, 0 failed.videoDelaybeing read per frame inKSOptions.videoClockSync(verified in the 2.3.x source); a large nudge towards "audio later" briefly drops frames while the picture catches up, the same way a lagging stream does.SyncedPlaylist, the Lume Cloud payload,PlayerEngineKind.