Optimize stripchat.py performance with caching & improved request handling#268
Optimize stripchat.py performance with caching & improved request handling#268medi0x1 wants to merge 16 commits intolossless1024:masterfrom
Conversation
|
NameError: name '_mouflon_cache_filename' is not defined |
|
Run the program nd copy everything from |
Clean up code added during merge
Fixed the merge conflict bug. Please review nd let me knw if any changes needed |
|
Tested, working well |
|
File "C:\Users\OneDrive\Desktop\SC\StreaMonitor\Downloader.py", line 43, in how to solve this ?? |
Corrects the SC player script URL by removing a duplicated version prefix. mmpVersion already contains v, resulting in vv2.x.x/main.js → 404. Updated to v2.x.x/main.js so main.js loads properly.
You can fix the issue by removing the extra v since mmpVersion already contains it: - mmp_base = f"{mmp_origin}/v{mmp_version}"
+ mmp_base = f"{mmp_origin}/{mmp_version}"This corrects vv2.x.x → v2.x.x and resolves the 404. |
|
Error while trying to add a model from SCVR 2025-12-15 23:54:36,854 - INFO - manager_cli: Failed to add: StripChat.init() takes 2 positional arguments but 3 were given Same error from both cli and web frontend. Fixed by removing the roomid artifact in the stripchat_vr.py file and using the same as in your version of stripchat.py def init(self, username): instead of def init(self, username, room_id=None): |
|
INFO - manager_cli: Failed to add: Doppio.js not found |
same mistake |
It works correctly. Thanks |
Updates Stripchat JS chunk detection to match the new hashed chunk naming. Replaces the hard-coded Doppio lookup with a hash-based pattern so getInitialData() can locate the correct chunk and initialize properly again.
|
Traceback (most recent call last): Still getting this bug bc 3 arguments in stripchat_vr.py. Fixed by removing the roomid artifact in the stripchat_vr.py file and using the same as in your version of stripchat.py def init(self, username): instead of def init(self, username, room_id=None): |
|
Also notice downloads work but i only get 1920x1080 30fps no matter what i set in the parameters.py. (its at 99999) I only use it for VR so i need 5760x2880 50FPS (what most good quality videos have) |
Dude your shit is fucked just download the last repo from here it works perfectly...stop spamming in here...just redownload new folder the last RP from this branch not main. Main doesnt work i think. This is a important issue for many VR users: @medi0x1 I only use it for VR like many, so i need 5760x2880 50FPS (what most good quality videos have) also for VR: Still getting this bug bc 3 arguments in stripchat_vr.py. Fixed by removing the roomid artifact in the stripchat_vr.py file and using the same as in your version of stripchat.py def init(self, username): instead of def init(self, username, room_id=None): I can beta test for VR np. |
|
Just to keep scope tight: this PR only touches stripchat.py. If VR stuff is breaking, that’s a separate issue. |
|
For the record, I do not experience the resolution or fps issue with VR on my end after making the necessary changes to fix stripchat based medi0x1's build and the additional fix I provided for stripchat vr file. Seems indeed unrelated. |
Interesting, sorry i thought sc and scvr was intertwined. |
Fixes a regression in SC HLS playlist handling. Ensures playlist parameters are correctly applied to variant URLs, restoring proper segment resolution and ffmpeg startup behavior.
Used medi0x1 version lossless1024/StreaMonitor#268
Adds support for Mouflon v2 (psch=v2) HLS playlists on SC. Implements URI-based segment decoding, including reversed encrypted segments and EXT-X-MAP init handling, while preserving existing Mouflon v1 FILE-based logic.
|
I’ve updated the PR please pull latest and test if it works on your side. |
works for me again |
|
Aweseome work man, StripChat itself works perfectly again! But to get StripChat-VR working it still needs a small fix inside stripchat_vr.py like already mentioned earlier in this post by someone else. From: To: |
|
Appreciate the confirmation. This PR is limited to stripchat.py; VR is a separate topic. |
|
@medi0x1 looks like they changed something again. Only the promo trailer gets downloaded again 😞 |
Added updated decryption keys to fix promotional video download issue. Changes: - Added two new decryption keys - Kept existing key for backward compatibility
|
Pushed the fix. Please pull latest nd test if it works on your side. |
Yes it is working again. Thanks :) |
|
Thanks, this works |
|
@medi0x1 looks like they just changed something again :/ Traceback (most recent call last): If I remove every SC model the Downloader runs again and if I try to add a SC model I get "Failed to add features" error |
SC decided to rename their api fields nd broke everything lol changed `features` → `featureSettings` so it actually works now tested: doesn't crash anymore
|
updated, test if it works on ur side. |
Works perfectly again :) Thanks |
img.doppiocdn.com is dead for the player assets, they quietly moved everything to mmp.doppiocdn.com. Same version, different subdomain. - hardcoded origin was pointing to the old img. subdomain → 404 on main.js - updated MMPExternalSourceOrigin to mmp.doppiocdn.com one line fix, took longer to debug than to patch lol
|
Hardcoding |





Summary
This PR optimizes stripchat.py implementation to improve performance & reduce resource usage. The changes focus on reducing redundant computations, improving network efficiency, nd adding better fallback mechanisms.
Changes
Performance Improvements
Added LRU caching for frequently computed operations:
Pre-compiled regex patterns at class level instead of compiling on every use
Optimized string operations:
Improved network handling:
Better memory usage:
Robustness Improvements
Multiple fallback patterns for finding doppio.js file:
require()pattern and new chunk-based patternAutomatic proxy support from environment variables (HTTP_PROXY, HTTPS_PROXY)
Improved error handling with proper exception catching
Code Quality
Performance Impact
Testing shows significant improvements:
Compatibility
Testing
Related
This builds on the improvements from PR #263 and PR #264 by combining their approaches with additional optimizations.