Skip to content

Per-performer recording quality for live recordings - #32

Merged
raccommode merged 14 commits into
raccommode:mainfrom
MajorLOL:main
Oct 20, 2026
Merged

raccommode merged 14 commits into
raccommode:mainfrom
MajorLOL:main

Conversation

@MajorLOL

@MajorLOL MajorLOL commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds a "Recording quality" setting per performer source (per performer and per plugin) in Manage profile. The default is Automatic (highest), which keeps the current behaviour.

What changed

UI (src/)

  • Each profile URL with a live plugin gets a "Recording quality" selector: Automatic (highest), or up to 2160p, 1440p, 1080p, 720p, 480p, 360p or 240p.

Server (server/)

  • New sources.recording_max_height column (0 = automatic), added automatically to existing databases.
  • PATCH /api/sources/:id accepts recordingMaxHeight (0–4320).
  • The downloader passes the source's value to the plugin as recordingMaxHeight for that download only; the plugin's own settings are not changed. Automatic keeps the plugin setting, so the existing Chaturbate "Maximum recording height" still applies.
  • Included in backup export and import.

Plugins (plugins/)

  • New shared plugins/hls-quality.ts: parses HLS variants (RESOLUTION, NAME or playlist name) and orders them for a maximum height. The best variant at or below it comes first, then the closest larger one, so a missing quality never fails a recording.
  • Stripchat, CAM4 and BongaCams select their live variant with it.
  • yt-dlp-based live plugins (Chaturbate, Twitch and the live-cam factory used by CamSoda, MyFreeCams, LiveJasmin, XCams and Cams) pass the height with a fallback and --format-sort res:N.

Testing

  • npm run check: 494 tests pass, TypeScript and build OK.
  • New tests: plugins/hls-quality.test.ts, server/recording-quality.test.ts (storage, migration, config override and an end-to-end download through the queue), and quality cases for the Stripchat, CAM4, BongaCams, Chaturbate and yt-dlp recordings.
  • Tested manually in the running app: the setting is saved per source, shown in Manage profile and included in the backup export.

- New sources.recording_max_height column (0 = automatic, highest available),
  added automatically to existing databases.
- PATCH /api/sources/:id accepts recordingMaxHeight (0-4320).
- The downloader passes the source's value to the plugin as
  recordingMaxHeight for that download only; the plugin's own settings are
  not changed. Automatic (0) keeps the plugin setting.
- Recording quality is included in backup export and import.
- Tests: server/recording-quality.test.ts (storage, migration, override and an
  end-to-end download check) and updated server/backup.test.ts.
- Each profile URL with a live plugin (Stripchat, CAM4, BongaCams, Chaturbate,
  Twitch, CamSoda, etc.) gets a "Recording quality" selector in Manage profile.
- Choices: Automatic (highest), or up to 2160p, 1440p, 1080p, 720p, 480p,
  360p or 240p. The setting is saved per performer and per site.
- The selector spans the full width of the source controls, so it also fits
  on small screens.
- New shared plugins/hls-quality.ts parses HLS variants (RESOLUTION, NAME or
  playlist name) and orders them for a maximum height: the best at or below
  it first, then the closest larger one, so a missing quality never fails.
- Stripchat, CAM4 and BongaCams pick their live variant with it; automatic
  keeps the current behaviour (highest first).
- yt-dlp based live plugins (Chaturbate, Twitch and the live-cam factory used
  by CamSoda, MyFreeCams, LiveJasmin, XCams and Cams) pass the height to
  yt-dlp with a fallback and --format-sort res:N.
- Tests for variant parsing and ordering, and for the selected variant in
  Stripchat, CAM4, BongaCams, Chaturbate and yt-dlp recordings.
- New shared plugins/hls-quality.ts parses HLS variants (RESOLUTION, NAME or
  playlist name) and orders them for a maximum height: the best at or below
  it first, then the closest larger one, so a missing quality never fails.
- Stripchat, CAM4 and BongaCams pick their live variant with it; automatic
  keeps the current behaviour (highest first).
- yt-dlp based live plugins (Chaturbate, Twitch and the live-cam factory used
  by CamSoda, MyFreeCams, LiveJasmin, XCams and Cams) pass the height to
  yt-dlp with a fallback and --format-sort res:N.
- Tests for variant parsing and ordering, and for the selected variant in
  Stripchat, CAM4, BongaCams, Chaturbate and yt-dlp recordings.
- New shared plugins/hls-quality.ts parses HLS variants (RESOLUTION, NAME or
  playlist name) and orders them for a maximum height: the best at or below
  it first, then the closest larger one, so a missing quality never fails.
- Stripchat, CAM4 and BongaCams pick their live variant with it; automatic
  keeps the current behaviour (highest first).
- yt-dlp based live plugins (Chaturbate, Twitch and the live-cam factory used
  by CamSoda, MyFreeCams, LiveJasmin, XCams and Cams) pass the height to
  yt-dlp with a fallback and --format-sort res:N.
- Tests for variant parsing and ordering, and for the selected variant in
  Stripchat, CAM4, BongaCams, Chaturbate and yt-dlp recordings.
- New shared plugins/hls-quality.ts parses HLS variants (RESOLUTION, NAME or
  playlist name) and orders them for a maximum height: the best at or below
  it first, then the closest larger one, so a missing quality never fails.
- Stripchat, CAM4 and BongaCams pick their live variant with it; automatic
  keeps the current behaviour (highest first).
- yt-dlp based live plugins (Chaturbate, Twitch and the live-cam factory used
  by CamSoda, MyFreeCams, LiveJasmin, XCams and Cams) pass the height to
  yt-dlp with a fallback and --format-sort res:N.
- Tests for variant parsing and ordering, and for the selected variant in
  Stripchat, CAM4, BongaCams, Chaturbate and yt-dlp recordings.
- New shared plugins/hls-quality.ts parses HLS variants (RESOLUTION, NAME or
  playlist name) and orders them for a maximum height: the best at or below
  it first, then the closest larger one, so a missing quality never fails.
- Stripchat, CAM4 and BongaCams pick their live variant with it; automatic
  keeps the current behaviour (highest first).
- yt-dlp based live plugins (Chaturbate, Twitch and the live-cam factory used
  by CamSoda, MyFreeCams, LiveJasmin, XCams and Cams) pass the height to
  yt-dlp with a fallback and --format-sort res:N.
- Tests for variant parsing and ordering, and for the selected variant in
  Stripchat, CAM4, BongaCams, Chaturbate and yt-dlp recordings.
- New shared plugins/hls-quality.ts parses HLS variants (RESOLUTION, NAME or
  playlist name) and orders them for a maximum height: the best at or below
  it first, then the closest larger one, so a missing quality never fails.
- Stripchat, CAM4 and BongaCams pick their live variant with it; automatic
  keeps the current behaviour (highest first).
- yt-dlp based live plugins (Chaturbate, Twitch and the live-cam factory used
  by CamSoda, MyFreeCams, LiveJasmin, XCams and Cams) pass the height to
  yt-dlp with a fallback and --format-sort res:N.
- Tests for variant parsing and ordering, and for the selected variant in
  Stripchat, CAM4, BongaCams, Chaturbate and yt-dlp recordings.
… cancels and lost recordings

- Stripchat favorites: when the direct API is refused (HTTP 403/418), read the
  followed list inside a real Stripchat page with the saved session
  (easyx-browser-fetch --stripchat-favorites). Local favorites are kept on failure.
- Stop and save no longer blocks the room: a performer who stays online is
  recorded again as a new video. Cancel still blocks until offline; a hard
  refresh of the source now lifts it.
- A cancel the recording process ignores is forced (SIGKILL) after 10 s; a stop
  that hangs gets a second SIGINT after 45 s.
- Shutdown saves running live recordings first (EASYX_SHUTDOWN_GRACE_SECONDS,
  default 60; compose stop_grace_period 90s). Recordings cut off by a crash or a
  killed container are joined from their parts on the next start; unreadable
  data is kept in media/.recording-recovery.
- Tests: server/live-restart.test.ts and Stripchat favorites fallback tests.
… cancels and lost recordings

- Stripchat favorites: when the direct API is refused (HTTP 403/418), read the
  followed list inside a real Stripchat page with the saved session
  (easyx-browser-fetch --stripchat-favorites). Local favorites are kept on failure.
- Stop and save no longer blocks the room: a performer who stays online is
  recorded again as a new video. Cancel still blocks until offline; a hard
  refresh of the source now lifts it.
- A cancel the recording process ignores is forced (SIGKILL) after 10 s; a stop
  that hangs gets a second SIGINT after 45 s.
- Shutdown saves running live recordings first (EASYX_SHUTDOWN_GRACE_SECONDS,
  default 60; compose stop_grace_period 90s). Recordings cut off by a crash or a
  killed container are joined from their parts on the next start; unreadable
  data is kept in media/.recording-recovery.
- Tests: server/live-restart.test.ts and Stripchat favorites fallback tests.
… cancels and lost recordings

- Stripchat favorites: when the direct API is refused (HTTP 403/418), read the
  followed list inside a real Stripchat page with the saved session
  (easyx-browser-fetch --stripchat-favorites). Local favorites are kept on failure.
- Stop and save no longer blocks the room: a performer who stays online is
  recorded again as a new video. Cancel still blocks until offline; a hard
  refresh of the source now lifts it.
- A cancel the recording process ignores is forced (SIGKILL) after 10 s; a stop
  that hangs gets a second SIGINT after 45 s.
- Shutdown saves running live recordings first (EASYX_SHUTDOWN_GRACE_SECONDS,
  default 60; compose stop_grace_period 90s). Recordings cut off by a crash or a
  killed container are joined from their parts on the next start; unreadable
  data is kept in media/.recording-recovery.
- Tests: server/live-restart.test.ts and Stripchat favorites fallback tests.
… cancels and lost recordings

- Stripchat favorites: when the direct API is refused (HTTP 403/418), read the
  followed list inside a real Stripchat page with the saved session
  (easyx-browser-fetch --stripchat-favorites). Local favorites are kept on failure.
- Stop and save no longer blocks the room: a performer who stays online is
  recorded again as a new video. Cancel still blocks until offline; a hard
  refresh of the source now lifts it.
- A cancel the recording process ignores is forced (SIGKILL) after 10 s; a stop
  that hangs gets a second SIGINT after 45 s.
- Shutdown saves running live recordings first (EASYX_SHUTDOWN_GRACE_SECONDS,
  default 60; compose stop_grace_period 90s). Recordings cut off by a crash or a
  killed container are joined from their parts on the next start; unreadable
  data is kept in media/.recording-recovery.
- Tests: server/live-restart.test.ts and Stripchat favorites fallback tests.
… cancels and lost recordings

- Stripchat favorites: when the direct API is refused (HTTP 403/418), read the
  followed list inside a real Stripchat page with the saved session
  (easyx-browser-fetch --stripchat-favorites). Local favorites are kept on failure.
- Stop and save no longer blocks the room: a performer who stays online is
  recorded again as a new video. Cancel still blocks until offline; a hard
  refresh of the source now lifts it.
- A cancel the recording process ignores is forced (SIGKILL) after 10 s; a stop
  that hangs gets a second SIGINT after 45 s.
- Shutdown saves running live recordings first (EASYX_SHUTDOWN_GRACE_SECONDS,
  default 60; compose stop_grace_period 90s). Recordings cut off by a crash or a
  killed container are joined from their parts on the next start; unreadable
  data is kept in media/.recording-recovery.
- Tests: server/live-restart.test.ts and Stripchat favorites fallback tests.
… cancels and lost recordings

- Stripchat favorites: when the direct API is refused (HTTP 403/418), read the
  followed list inside a real Stripchat page with the saved session
  (easyx-browser-fetch --stripchat-favorites). Local favorites are kept on failure.
- Stop and save no longer blocks the room: a performer who stays online is
  recorded again as a new video. Cancel still blocks until offline; a hard
  refresh of the source now lifts it.
- A cancel the recording process ignores is forced (SIGKILL) after 10 s; a stop
  that hangs gets a second SIGINT after 45 s.
- Shutdown saves running live recordings first (EASYX_SHUTDOWN_GRACE_SECONDS,
  default 60; compose stop_grace_period 90s). Recordings cut off by a crash or a
  killed container are joined from their parts on the next start; unreadable
  data is kept in media/.recording-recovery.
- Tests: server/live-restart.test.ts and Stripchat favorites fallback tests.
@MajorLOL

Copy link
Copy Markdown
Contributor Author

Thanks for the detailed report. I've prepared fixes for all four points in my fork (MajorLOL/OpenEasyX) and will open a pull request:

  1. Stripchat favorites import – Stripchat now often refuses direct API requests from servers (HTTP 403/418). When that happens, the followed list is read inside a real Stripchat page in the bundled Chromium, using the saved account session. If that also fails, local favorites are kept and both reasons are shown. I couldn't test this against the live site, so feedback is welcome: if favorites still don't import, please share the "Stripchat favorite synchronization skipped" reason from the logs.

  2. No new recording after stop/cancel – "Stop and save" no longer blocks the room: if the performer is still online, a new recording starts as a new video on the next check. A cancel still blocks the room until it is seen offline, but a hard refresh of the source now lifts that immediately (it didn't before).

  3. Endless cancellation – a cancel that the recording process ignores is now forced after 10 seconds. A stop that hangs gets a second stop signal after 45 seconds.

  4. Recordings lost on restart – on shutdown, running live recordings are now saved first (up to EASYX_SHUTDOWN_GRACE_SECONDS, default 60). If the container is killed anyway, the recorded parts are joined into a video in the library on the next start; unreadable data is kept in media/.recording-recovery. Add stop_grace_period: 90s to your compose service, otherwise Docker only allows 10 seconds. Recordings made via yt-dlp (e.g. Chaturbate) can only be saved on a clean shutdown; Stripchat/CAM4/BongaCams recordings can also be recovered after a hard kill.

@raccommode
raccommode merged commit 0a3e58a into raccommode:main Oct 20, 2026
5 checks passed
@raccommode

Copy link
Copy Markdown
Owner

Thanks for the thorough work! I reviewed the full diff and merged it:

  • Per-performer recording quality — shared plugins/hls-quality.ts helper, the sources.recording_max_height column with migration, the PATCH /api/sources/:id update, backup export/import, and the "Recording quality" selector in Manage profile. Automatic keeps each plugin's own setting, and a chosen maximum falls back to the closest larger variant so a recording never fails just because a quality is missing.
  • Issue Several issues #33 fixes — browser-session fallback for the Stripchat favorites list, "Stop and save" no longer blocking the room, cancel/stop escalation so nothing hangs forever, and live recordings now being saved on shutdown / recovered from their parts after a hard restart (with stop_grace_period in compose).

I ran the full suite on the branch before merging: 504 tests pass, TypeScript and the production build are clean. Thank you again for the detailed report and the well-structured commits!

@raccommode raccommode mentioned this pull request Oct 20, 2026
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.

2 participants