Skip to content

docs(agents): add Cursor Cloud setup notes for rtp2httpd dev env#601

Merged
stackia merged 8 commits into
mainfrom
cursor/setup-dev-environment-0a98
Jul 1, 2026
Merged

docs(agents): add Cursor Cloud setup notes for rtp2httpd dev env#601
stackia merged 8 commits into
mainfrom
cursor/setup-dev-environment-0a98

Conversation

@stackia

@stackia stackia commented Jun 30, 2026

Copy link
Copy Markdown
Owner

Summary

Sets up the rtp2httpd development environment for Cursor Cloud agents and adds a reusable web-player dev lab (tools/devlab/) covering the IPTV scenarios needed to develop the player. Durable notes live in AGENTS.md.

Repo changes:

  • tools/devlab/devlab.py + README.md: mock IPTV upstreams.
  • AGENTS.md (## Cursor Cloud specific instructions): Node + dev-lab notes.

Startup update script (deps only): pnpm install --frozen-lockfile then uv sync --group dev.

Dev lab scenarios

Scenario Delivery Proxy Codecs
HLS-TS live HTTP .m3u8 + .ts /http h264-mp2, hevc-aac
HLS-fMP4 live HTTP .m3u8 + init.mp4/.m4s /http h264-aac, hevc-aac
HLS catchup HTTP HLS VOD (m3u8+.ts, playseek) /http per channel
mpegts catchup RTSP TS (playseek) /rtsp h264-mp2, hevc-aac
mpegts live (组播) RTP multicast /rtp (-r lo) h264-mp2, hevc-ac3, hevc-eac3
external .ts file RTP multicast (looped, copy) /rtp (-r lo) as-is (--ts-file)
  • HLS live covers both segment specs (HLS-TS, HLS-fMP4 via #EXT-X-MAP+.m4s).
  • HLS catchup is a real HLS VOD: each playseek window returns an index.m3u8 (#EXT-X-PLAYLIST-TYPE:VOD) listing fixed-duration .ts slices, encoded lazily on demand with each slice's absolute wall-clock time burned in (so multi-hour windows stay time-correct without pre-encoding). mpegts/RTSP catchup streams continuous TS per window.
  • HEVC video + AC-3/E-AC-3 audio relay correctly (ffprobe) but don't decode in this VM's Chromium MSE (browser limitation).

Verification

  • pnpm run lint, pnpm run type-check, ./scripts/run-e2e.sh (495 passed), build — all pass.
  • ffprobe through the daemon confirms codecs for every channel; the daemon rewrites HLS .ts/.m4s/EXT-X-MAP URIs and HLS-VOD-catchup slice URLs onto its /http proxy.
  • Player: HLS-TS live, HLS-fMP4 live, HLS-VOD catchup (timeshift), multicast live, and external .ts file all play (H.264 channels).

rtp2httpd_devlab_hls_vod_catchup.mp4

HLS VOD catchup slice (SEEK 08-30-18 UTC) via daemon
HLS VOD catchup playing in player

Open in Web Open in Cursor 

Co-authored-by: Stackie Jia <jsq2627@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

Azure Static Web Apps: Your stage site is ready! Visit it here: https://thankful-water-0a297bf00-601.eastasia.1.azurestaticapps.net

…ream

Co-authored-by: Stackie Jia <jsq2627@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

Azure Static Web Apps: Your stage site is ready! Visit it here: https://thankful-water-0a297bf00-601.eastasia.1.azurestaticapps.net

Co-authored-by: Stackie Jia <jsq2627@gmail.com>
Comment thread tools/devlab/devlab.py Fixed
Comment thread tools/devlab/devlab.py
self._send(404, "text/plain", b"not found")
return
ctype = "application/vnd.apple.mpegurl" if path.endswith(".m3u8") else "video/mp2t"
with open(path, "rb") as fh:
Comment thread tools/devlab/devlab.py Fixed
@github-actions

Copy link
Copy Markdown
Contributor

Azure Static Web Apps: Your stage site is ready! Visit it here: https://thankful-water-0a297bf00-601.eastasia.1.azurestaticapps.net

…hevc+ac3/eac3

Co-authored-by: Stackie Jia <jsq2627@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

Azure Static Web Apps: Your stage site is ready! Visit it here: https://thankful-water-0a297bf00-601.eastasia.1.azurestaticapps.net

Co-authored-by: Stackie Jia <jsq2627@gmail.com>
Comment thread tools/devlab/devlab.py
self.wfile.write(body)

def _serve_file(self, path: str) -> None:
if not os.path.isfile(path):
@github-actions

Copy link
Copy Markdown
Contributor

Azure Static Web Apps: Your stage site is ready! Visit it here: https://thankful-water-0a297bf00-601.eastasia.1.azurestaticapps.net

Co-authored-by: Stackie Jia <jsq2627@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

Azure Static Web Apps: Your stage site is ready! Visit it here: https://thankful-water-0a297bf00-601.eastasia.1.azurestaticapps.net

…s slices)

Co-authored-by: Stackie Jia <jsq2627@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

Azure Static Web Apps: Your stage site is ready! Visit it here: https://thankful-water-0a297bf00-601.eastasia.1.azurestaticapps.net

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Azure Static Web Apps: Your stage site is ready! Visit it here: https://thankful-water-0a297bf00-601.eastasia.1.azurestaticapps.net

@stackia stackia marked this pull request as ready for review July 1, 2026 01:57
@stackia stackia merged commit d620334 into main Jul 1, 2026
9 of 10 checks passed
@stackia stackia deleted the cursor/setup-dev-environment-0a98 branch July 1, 2026 01:57

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 210be31449

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tools/devlab/devlab.py
self.max_segs = max_segs

def playlist(self, base: str, profile: str, begin: int, end: int) -> str:
nseg = min(self.max_segs, max(1, math.ceil((end - begin) / self.seg_dur)))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid truncating longer HLS catchup windows

For HLS catchup requests longer than 90 minutes, this caps the playlist at 900 six-second segments and still emits #EXT-X-ENDLIST, so a two-hour-or-longer seek stops before the requested end even though the dev lab and player support multi-hour catchup windows. Increase the cap to cover the maximum requested window or derive it from the requested range instead of silently truncating.

Useful? React with 👍 / 👎.

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.

3 participants