Skip to content
This repository was archived by the owner on Dec 3, 2023. It is now read-only.
This repository was archived by the owner on Dec 3, 2023. It is now read-only.

Setting the format has different output than directly calling the binary #332

Description

@mayeaux
let arguments = [];
      arguments.push('--ffmpeg-location=' + ffmpegPath);

      arguments.push('-f=bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4');

      arguments.push('--merge-output-format=mp4')

      console.log(arguments)

      const video1 = youtubedl(youtubeLink,
        // Optional arguments passed to youtube-dl.
        arguments,
        // Additional options can be given for calling `child_process.execFile()`.
        { cwd: __dirname });

Doesn't work, it just downloads format 18 on YouTube (it should download 135)

youtube-dl --ffmpeg-location '/usr' -f 'bestvideo[height<730][ext=mp4]+bestaudio[ext=m4a]/best[height<730]/best[ext=mp4][height<730]' --merge-output-format mp4 https://www.youtube.com/watch?v=AJGPNX9M1bY

This is the exact corollary on the CLI, it works fine

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions