feat(remote-hls): telemetry, audio tracks and delivered video format on the bypass - #664
Merged
Merged
Conversation
…obe vocabulary Pure mapping for the nativeRemoteHLS bypass, which runs no libav probe: the delivered video's dimensions, colour description (CoreMedia names to libav's) and avcC / hvcC profile, depth and pixel format as a VideoStreamFormat, and each audio track as a TrackInfo (codec, channels, rate, AAC profile, E-AC-3 JOC from the dec3 record). Synthetic audio ids from 400000. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mf4MXgM9bqugHoe5TW4BYf
…e-HLS bypass The bypass has no demuxer, so both bitrate fields come from the access log's session transfer total through TransferRateMeter (same 10 s window and active-seconds average as the demuxer meter). The producer A/V gap and the #169 tail-park synthesis stay with the loopback route. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mf4MXgM9bqugHoe5TW4BYf
… format on the bypass loadRemoteHLS now starts the telemetry sampler, and the host reads the item's audio tracks (bypass only, via SessionLoadContract.readsBackAudioTracks) and the delivered video's description next to the #168 format read. The engine publishes them as audioTracks / activeAudioTrackIndex and sourceVideoWidth / sourceVideoHeight / sourceVideoCodecName / sourceVideoStreamFormat, so a stats panel shows the transcode actually playing instead of the library's file. selectAudioTrack refuses .remoteBypass (AVPlayer owns the selection there). aetherctl play prints the settled source and audio state plus inst/avg bitrate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mf4MXgM9bqugHoe5TW4BYf
…the transfer Metering the bitrate fields from AVPlayer's transfer total made them read buffer fill at link speed: 22.6 Mbps instant and 15.8 average for a 3.7 Mbps Jellyfin transcode on an iPhone right after a start. The fields name the stream's rate, so on the bypass they are now the playing variant's declared BANDWIDTH and AVERAGE-BANDWIDTH from the access log. The transfer stays in the network fields. TransferRateMeter goes with it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mf4MXgM9bqugHoe5TW4BYf
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.
On the
nativeRemoteHLSbypass (routeremoteBypass) the engine published almost nothing a host could show: noliveTelemetry, an emptyaudioTracks, and no delivered video format. Hosts then fell back to their own metadata for the original file. Sodalite's Stats for Nerds showed "3840x2160, Main 10, 17 Mbps" for a 1280x720 H.264 Jellyfin transcode.Everything is read from AVPlayer's own item, with no second connection to the origin:
TrackInfoper audio track AVPlayer built, with codec, channels, sample rate, profile and Atmos taken from the format description, and ids starting at 400000.selectAudioTrackis informational on this route and logs the call instead of acting on it.sourceVideoWidth/HeightandsourceVideoStreamFormat(colour, profile, bit depth) now describe the stream AVPlayer plays. The doc contracts say that under a transcode this is the delivered stream, not the library file.No new public API.
docs/api.mdis updated.Tests:
swift testpasses (XCTest 646 plus swift-testing 3584), and there are 21 new tests. aetherctlplay --native-hlson Apple's bipbop fMP4 master shows all three.🤖 Generated with Claude Code
https://claude.ai/code/session_01Mf4MXgM9bqugHoe5TW4BYf