MediaFilez
DocumentationMEDIAFILEZ

MediaFilez Worker

Run media execution without a Discord bot or frontend.

The open-source worker contains a reusable Media Core, an execution runtime, storage adapters, and an optional queue consumer. It does not contain a Discord client, an HTTP API server, or a website.

Choose an entry point

Entry pointUse it whenNeeds Redis?
Hosted HTTP APIYou want managed downloads from another applicationNo Redis on your side
WorkerRuntime.execute()You want jobs with limits, storage, retries, and cleanupNo
createMediaCore()You need lower-level download and processing functionsNo
pnpm start queue consumerYou operate an API/worker deploymentYes
Diagram

Rendering diagram…

View Mermaid source
flowchart TD
    accTitle: Worker architecture
    accDescr: Queue, CLI and Node callers enter the runtime; Media Core handles execution and the storage adapter commits output.
    Q[Queue consumer] --> R[WorkerRuntime]
    C[CLI job] --> R
    N[Your Node application] --> R
    R --> M[Media Core: download and validate]
    M --> P[Optional processing]
    P --> S[Storage adapter]
    S --> O[Structured result]
    A[AbortSignal and execution limits] -.-> R

Responsibilities

The worker selects an execution plan, tries configured fallbacks, downloads within byte and time limits, checks the file, and optionally converts or fits it. Output goes through a storage adapter after processing.

Instagram collections can return every resolved item. Other native extractor playlists are restricted to one item; use explicit batch jobs for multiple source links.

Self-hosting requires storage capacity, tool availability, and a retention policy. Use only sources and optional providers you are permitted to access. Guarded URL checks and deadlines are not a complete operating-system sandbox. Apply process/container isolation appropriate to the users who can submit jobs.

Start with runtime jobs, Media Core, or queue deployment. The repository uses AGPL-3.0-only; read its license before reusing it in your service.