Skip to content

YouTube HLS: ads/EOS/scrub + FFmpeg player parity - #19

Merged
serezhka merged 16 commits into
mainfrom
cursor/new-features
Sep 24, 2026
Merged

serezhka merged 16 commits into
mainfrom
cursor/new-features

Conversation

@serezhka

@serezhka serezhka commented Sep 22, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • YouTube commercial HLS path on the server: FCUP prefetch, AVC-only masters, VOD EOS reverse-event burst, scrub latch, duration freeze while waiting for the next item, volume → players.
  • GStreamer HLS pipeline with ENDLIST / position-at-end EOS (phone-verified ad1→ad2→main).
  • FFmpeg HLS wired for the same /play + pause/seek/volume/playback-info surface; offline Kali replay ad1→ad2→main verified.
  • Shared HlsEndListDuration helper; absolute http(s) Content-Location pass-through for direct VOD / offline replay.
  • Removes the VLC player module entirely. Continuation: cursor/vlc-playback.
  • Removes the AirPlay client module (smoke CLI, HAP mirror scripts, harness ControlClient loopback). Continuation: cursor/airplay-cli.

Test plan

  • ./gradlew :lib:test :server:test :player:ffmpeg:test --tests FfmpegHlsPipelineTest
  • ./gradlew :player:harness:loopbackIntegrationTest (media callback only; no ControlClient)
  • Kali offline HLS replay with player.implementation=gstreamer|ffmpeg — ad1 ~6s, ad2 ~12s, main segments
  • Phone YouTube hybrid cast (GStreamer): ad1→ad2→main, scrub, live sliding window if available
  • Spot-check Music / mirror audio on FFmpeg (libav → ffplay PCM)
  • Confirm CI has no client / vlc modules

Sergio Fedorini and others added 14 commits September 16, 2026 11:15
Keep pairing bit 27 off, restore LO bits lost in the UxPlay mask cut, and implement RTSP/HTTP volume plus /scrub and Start-Position for GStreamer HLS.

Co-authored-by: Cursor <cursoragent@cursor.com>
Apple Music / mirroring audio need volume elements on ALAC and AAC paths.

Co-authored-by: Cursor <cursoragent@cursor.com>
…ist cache.

GStreamer crashed mixing H.264 and VP9; aggressive FCUP refresh on every media GET starved the reverse channel.

Co-authored-by: Cursor <cursoragent@cursor.com>
Stabilize pause/resume/seek and playback-info for AirPlay video, keep the server player-agnostic, and list volume control and YouTube HLS in the README features.

Co-authored-by: Cursor <cursoragent@cursor.com>
Fix scrub/pause sync, ad→content master/media refresh, decryptor reset on
new video streams, and Windows tray/display issues. Extract HLS into
GstHlsPipeline with a pause/resume/seek smoke test, and document lib/server/player layering.

Co-Authored-By: Cursor <cursoragent@cursor.com>
Signal stopped on EOS when actionAtItemEnd is pause, prefer ENDLIST mediadata duration over consumer clocks, and keep server comments free of player implementation details.

Co-authored-by: Cursor <cursoragent@cursor.com>
…topped.

Keep the reverse channel open with loading+master/media poll after ads, re-FCUP cached mediadata for sliding windows, report live duration as unknown, and ignore absurd seek targets.

Co-authored-by: Cursor <cursoragent@cursor.com>
System ffplay no longer accepts raw AAC-ELD/ALAC on FFmpeg 8; decode with bundled libav and play interleaved S16 over Pulse. Also replace the HLS ffplay child with a JavaCV pipeline and exclusive fullscreen.

Co-authored-by: Cursor <cursoragent@cursor.com>
Disconnect FFmpeg from HLS while leaving the pipeline as dead code, keep the low-latency ffplay PCM sink for Music/mirroring audio, stop mirror video when HLS /play starts, and restore the original 0x5A7FFFF7,0x1E advertisement so we can bisect the phone black-screen regression.

Co-authored-by: Cursor <cursoragent@cursor.com>
Signal loading (not paused) after VOD EOS, periodically re-FCUP mediadata, and ignore rate probes while waiting so YouTube can playlistRemove and advance to the next item.

Co-authored-by: Cursor <cursoragent@cursor.com>
Defer play until video mediadata, trust player clock before wall-clock EOS, and ignore rate=0 after scrub until rate=1 so the phone UI does not bounce into pause.

Co-authored-by: Cursor <cursoragent@cursor.com>
Wire ffplay and cvlc pipelines back into the players, pass through absolute HTTP Content-Location, and drop -fflags nobuffer which made short VOD ads exit in ~200ms.

Co-authored-by: Cursor <cursoragent@cursor.com>
…sts.

Deduplicate EXTINF summing across players, trim development comments, and cover VLC seek-bake / duration the same way as FFmpeg.

Co-authored-by: Cursor <cursoragent@cursor.com>
Drop the player/vlc module, CI matrix entry, harness wiring, and docs so VLC work can continue on cursor/vlc-playback separately.

Co-authored-by: Cursor <cursoragent@cursor.com>
@serezhka serezhka changed the title YouTube HLS: ads/EOS/scrub + FFmpeg/VLC player parity YouTube HLS: ads/EOS/scrub + FFmpeg player parity Sep 23, 2026
Sergio Fedorini and others added 2 commits September 23, 2026 09:39
Drop client/, harness ControlClient loopback, and Gradle wiring so HAP/CLI work continues on cursor/airplay-cli.

Co-authored-by: Cursor <cursoragent@cursor.com>
FairPlay and stream types stay in protocol for a future sender. Discovery, mDNS features, and process logs leave that module. Players report VOD end through Playback.setObserver instead of a static callback.

Co-authored-by: Cursor <cursoragent@cursor.com>
@serezhka
serezhka merged commit 9bb8392 into main Sep 24, 2026
2 checks passed
@serezhka
serezhka deleted the cursor/new-features branch September 24, 2026 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant