Skip to content
This repository has been 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

Open
mayeaux opened this issue Sep 20, 2020 · 0 comments
Open

Comments

@mayeaux
Copy link

mayeaux commented Sep 20, 2020

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant