Closed benkaiser closed 1 month ago
When running a search for highestaudio
const ytdl = require("@distube/ytdl-core"); ytdl.getBasicInfo("https://www.youtube.com/watch?v=1ec4gu5uJ6U").then(info => { console.log(info.formats); console.log(ytdl.chooseFormat(info.formats, { quality: 'highestaudio' })); });
It fails returning:
Error: No such format found: highestaudio
But if you inspect the list of formats, there are many audio formats.
The issue seems to stem from none of the formats being marked with .hasAudio, because the formats themselves have no audioBitrate property on them.
My issue was using .getBasicInfo instead of .getInfo. Closing.
.getBasicInfo
.getInfo
Describe the bug
When running a search for highestaudio
It fails returning:
But if you inspect the list of formats, there are many audio formats.
The issue seems to stem from none of the formats being marked with .hasAudio, because the formats themselves have no audioBitrate property on them.
Environment