Merged
Conversation
convert voice module to typescript
Refactor HLS Module: TypeScript Migration and Functional Playlist Parser
improve: port playback processing modules to TypeScript
improve: port DES and Blowfish decrypters to TypeScript
i forgot to re-change it back to fmp4-buffered, this should reduce/fix the lag.
improve: migrate filters to TypeScript and enhance implementations
videoDetails still returned even without sts.
this also fixes audiomack seek crashing the mp4box
- move jsdom to initialize() to reduce import overhead - reduce Heap Used on import: 55MB -> 10MB - reduce RSS on import: 140MB -> 94MB - add 10-minute idle cleanup for JSDOM resources
if you want to run this with ts-node instead of tsx, this fixes some crashes with paths. tho, tsx is still recommended for better performance and stability.
Refactor master and worker startup paths to reduce eager memory use and improve scaling behavior. Changes included: - Removed OpenSSL legacy provider from the default Node start script. - Reduced eager allocations in the cluster primary startup path. - Added staged memory tracing points to track RSS and heap growth during boot. - Preserved requested player manager flow while keeping lazy boundaries for heavy modules. - Kept nullable manager handling safe in API and shutdown paths. - Improved source worker process management to start with one worker and scale up by load. - Added load threshold and cooldown controls for source worker scale up. - Added dynamic micro worker scaling in source worker thread pool. - Extended source worker typing with scaleUpThreshold and scaleCooldownMs options. - Maintained type safety and validated with npm run -s type-check. Result: - Lower baseline memory pressure in orchestration mode. - More proportional source concurrency expansion under real demand.
feat: add short URL and multi-page video support
Make subscribeLyrics return immediately and load lyrics in background with safe error handling. Make unsubscribeLyrics async and resolve immediately for consistent command latency. Route heavy non-guild commands to request-scoped parallel queues instead of the global queue. Clean up empty worker queue entries to avoid queue map growth.
Generate and track transpiled JavaScript output in dist/. Add build and start:dist scripts in package.json. Load runtime config files from the project root path.
Add internal fallback when YouTube clients fail. Use only validated direct searchable sources. Block mirror-only, TTS, and invalid fallback sources. Update default fallbackSources and remove Eternalbox.
- Added TapeTransformer with Catmull-Rom interpolation for artifact-free resampling. - Integrated tape ramps for pause, resume, and stop events in Player.ts. - Implemented 300ms pipeline drain delay to ensure silence in Discord buffer. - Added active polling for ramp completion to synchronize state transitions. - Updated config.default.js with tape/volume fading options and documentation. - Ensured Biome lint compliance across all modified files.
- Extract HLS editorial videos for tracks, albums, playlists, and artists in Apple Music. - Refactor TapeTransformer to extend Transform and implement Catmull-Rom resampling. - Fix TypeScript compiler errors in player and stream processor. - Implement active ramp monitoring and 300ms drain delay for clean pauses.
here some cool stuff i found out: PassThrough was always beign created even with HLSHandler, causing a big memory leak. Preferred playback is now DASH over HLS, since dash provides audio only tracks with a good quality/bitrate.
well, here some cool stuff that i found out and fixed too: fixed a potoken race condition, now it should prevent multiple requests with potokens. improved the stall detector to be more accurate during recovery and actually respect the downloadedMs. improved the handling for stream protection status 2, now it should not spam a lot of requests. i would consider this is actually stable to use atm, but not 100% sure about it.
Member
Author
|
Updating the documents is going to be a nightmare. |
This is designed specially for monochrome source, since its the default one for playback. Preffered format for now is AACLC over FLAC, since i still need to fix some stuff related to the FLAC playaback. HLS works fine with monochrome, but i think the dash version provides better quality and audio normalization, while also fixing the stutters and reducing the memory usage by a lot.
read/peek/getContiguous no longer leak pooled buffers write() truncates oversized chunks instead of over-reading remove useless bufferPool.release() in MPEGTSDemuxer
- Prevent premature audio halt in transformers at low rates. - Fix buffer overflow logic to advance read position. - Increase FlowController flush duration to 10 seconds. - Improve end-of-track detection leniency during slow ramps. - Add safety timeout for long fade-out ramps. - Rebuild distribution files.
- Implement initial latency check during setup to score and prioritize fast instances. - Add 5-second timeout to API requests to prevent worker hanging on dead servers. - Sync health scores between API and streaming pools. - Increase selection randomization to prevent instance overloading.
eternalboxJump and icyMetadata listeners now properly cleanup on stream close/error.
fix DASH stuck loops Cap AACDecoderStream pendingChunks at 200, drop oldest when full to prevent unbounded growth Clear pendingChunks on destroy to release held buffers and callbacks Optimize _tightBuffer to skip Buffer.from() when buffer is already tight Clean up audioStream data listener on close/end to prevent leak during reconnects DASHHandler: increase prefetch from 1 to 4 and cap segment pace at 5s to prevent stuck recovery loops
Prevents repeated URL refresh attempts while track is paused
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Changes
Write here about the changes you've made
Why
Write here why you think this should be merged
Checkmarks
Additional information
If you have any additional information, write it here