Skip to content
This repository was archived by the owner on Aug 16, 2025. It is now read-only.

Range option corrupts MP3 downloads #282

@tkesici

Description

@tkesici

When using the range option to download partial MP3 content from YouTube videos, successfully downloaded audio files are corrupted and cannot be played by media players.

  • distube/ytdl-core version: 4.16.12
  • Node.js version: 24.5.0
  • Operating system: macOS Sequoia 15.5

To Reproduce

import ytdownloader from '@distube/ytdl-core'
import * as fs from "node:fs";

const options: ytdownloader.downloadOptions = {
    quality: 'highestaudio',
    range: {
        start: 10000,
        end: 20000
    }
};
ytdownloader('https://www.youtube.com/watch?v=...', options)
    .pipe(fs.createWriteStream('output.mp3'));

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions