fix: point X channel at the real pscp.tv RTMPS ingest (+ saner connect window) - #14
Merged
Conversation
The hardcoded X prefix (`rtmp://global-live.twitter.com:443/app`) is
the X dev-portal placeholder — nothing ever streamed there. The
actual X Live Producer ingest is on pscp.tv (Periscope's legacy CDN
that X still uses for live):
rtmps://va.pscp.tv:443/x
Updated the prefill and hint copy so users with Producer access don't
have to discover the right URL by trial and error. Producer assigns a
region (va / eu / sg / au …); the hint now tells the user to edit
the URL if their region isn't `va`.
Two follow-on fixes for the connect path that this exposed:
- Bump `connectTimeoutMs` 8 → 20s. Worst-case path is libx264
software fallback at 1080p30 (VideoToolbox probe failed) plus the
first MediaRecorder chunk at +1s plus the RTMPS handshake. 8s
SIGKILL'd ffmpeg before it could finish.
- Preserve the stderr classifier message in the lifecycle toast. The
old code overwrote "Connection refused" / "Stream key invalid"
with "Stream dropped — reconnecting (attempt 1). ffmpeg exited
code=137" — where the 137 is our own SIGKILL, telling the user
nothing useful. Now: keep the classifier line and just append
"(reconnect attempt N)". When the only cause is our SIGKILL (no
classifier match), say "Stream stalled — check your RTMP URL +
stream key" instead of leaking the exit code.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Blacksmith Account SuspendedThis Blacksmith account requires additional verification. Jobs targeting Blacksmith runners will not be picked up and will remain queued until they timeout. Please contact Blacksmith Support for assistance. |
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
rtmp://global-live.twitter.com:443/app) is the X dev-portal placeholder — nothing ever accepted a stream there. The actual X Live Producer ingest is on pscp.tv (Periscope's CDN, still used for X Live):rtmps://va.pscp.tv:443/x.va.connectTimeoutMs8s → 20s. The 8s default SIGKILL'd ffmpeg during the libx264-software-fallback + MediaRecorder-first-chunk + RTMPS-handshake worst case, which is exactly what the bug report showed (exit code=137looping).reconnecting/failed. Old code overwrote "Connection refused" / "Stream key invalid" with the useless "ffmpeg exited code=137" (our own SIGKILL). Now: keep the classifier text; only synthesize a fallback when there's no classifier match.Test plan
bun run checkclean (539 pass)rtmps://va.pscp.tv:443/x(still flagged restricted because Producer access is verified-only)🤖 Generated with Claude Code