Aus_Karlos
Aus_Karlos
DIAdiscord.js - Imagine an app
Created by dzlandis on 2/2/2025 in #djs-questions
Help ensuring best makecache and sweeper options
When your using ReadStream from the external source are you handling closing the stream? Sometimes piping a stream to something like ffmpeg doesn't always get handled correctly. I have transcoding server using native ffmpeg which is spawn from a pool of workers (Job with source path -> WorkerPool -> fmpeg (fluent-ffmpeg wrapper) -> 4x threads spawn). When my worker gets a job it reads the file into a stream and ffmpeg does its thing. I've noticed that in some circumstances the stream wont close after ffmpqg has done its thing and I need o make sure i call destroy() on the stream. Its usually Linux that has the memory leak, Windows seems to close the stream properly.
24 replies