Closed benkaiser closed 9 years ago
Yeah a highestaudio
and highestvideo
options could be added.
In the mean time you can use the filter
option to filter out formats that include video, something like
ytdl(url, { filter: function(format) { return format.resolution === null; } })
Here's how Groove Basin does it: https://github.com/andrewrk/groovebasin/blob/master/lib/import_url_filters.js#L29
BTW your project looks very similar to Groove Basin.
@fent thanks, seems to work fine for now. Is there always an audio only stream? And what happens if there isn't? is there a fallback?
@andrewrk yeah it does. I guess I just wanted to tackle the UI differently to how groove basin does, and it's been fun learning along the way making my own music player.
I guess I just wanted to tackle the UI differently to how groove basin does, and it's been fun learning along the way making my own music player.
Totally :-)
Your UI looks good.
I don't know if there's always an audio stream.
And I think this is still a good idea, if there isn't an audio stream, it should fallback to video right?
I guess I'll see if I run into issues overtime. Feel free to test out my music player ;)
I am currently writing a music player written in nodejs that can pull down tracks from youtube. I use ytdl-core to fetch the highest quality video, however in a lot of cases the highest audio quality doesn't need the highest video resolution and as such a lot of data is wasted downloading the higher resolution video.
Could a
highestaudio
quality option be implemented like in another youtube downloading library pafy?