Skip to content

Stable YouTube scrub and first-picture sync - #20

Open
serezhka wants to merge 6 commits into
mainfrom
cursor/stable-playback
Open

serezhka wants to merge 6 commits into
mainfrom
cursor/stable-playback

Conversation

@serezhka

Copy link
Copy Markdown
Owner

Summary

  • Keep the phone timeline moving after YouTube scrub: reverse playing carries duration/position/rate under params, /playback-info reports a full buffer while the clock advances, and leading rate=0 does not freeze the picture until a real pause is clear.
  • Announce playing only after the first displayed frame (GStreamer and FFmpeg), so the sender no longer runs ahead of a black screen.
  • Speed up FFmpeg HLS start and seek: single AVC master variant, shorter probe window, IPv4 CDN DNS hook, held frame across reopen, and clock latched to the real ffplay timestamp. Phone-verified on Kali for GStreamer scrub and FFmpeg first-picture + scrub.

Test plan

  • Cast YouTube to the GStreamer receiver, scrub several times, confirm the phone timeline keeps moving with Kali
  • Cast YouTube to the FFmpeg receiver, confirm the first picture appears quickly and the phone clock does not run ahead of Kali
  • Scrub on FFmpeg and confirm the phone stays in playing state after the seek lands
  • Confirm short VOD ads still advance (EOS burst + end pin with empty buffer / rate=1)
  • Confirm screen mirroring still works

Made with Cursor

Sergio Fedorini and others added 6 commits September 24, 2026 15:51
YouTube masters with dozens of languages stalled both players before the first video frame. Signal loading while the first playlist is still fetching so the phone shows the connect gear.

Co-authored-by: Cursor <cursoragent@cursor.com>
Reverse playing events now put the clock under params, /playback-info
reports a full buffer while the timeline advances, and both players wait
for a real frame before announcing play. FFmpeg also latches its clock to
ffplay, holds the window across seek, and opens a single AVC variant so
the first picture is not several seconds late.

Co-authored-by: Cursor <cursoragent@cursor.com>
…again when the seek picture is up.

Scrub no longer waits on a timer, reverse events use the item uuid, and OPTIONS/ANNOUNCE keeps a speaker session open.
When the flag is off, discovery keeps screen mirroring and audio only. Also stop using the HLS demuxer that aborts the process if the pipeline is torn down off its own thread.
…lly uses.

The old mask included video bits this server does not implement, and the constant pk did not match the key returned by pair-setup.
…rops the picture.

YouTube playback is not stable yet, and a decodebin3 slot failure leaves a frozen frame while the clock keeps moving.

This branch has not been deployed

No deployments
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