Can someone tell me what api is this project using for fetching the audio stream urls and decoding the youtube urls in to usable urls #3083

Closed
opened 2025-03-12 12:13:22 +00:00 by justbetterApps · 6 comments
justbetterApps commented 2025-03-12 12:13:22 +00:00 (Migrated from github.com)

I am new to desktop or web development, please help me out with the query

I am new to desktop or web development, please help me out with the query
Owner

We are directly downloading the audio stream from youtube's undocumented API.
We are using youtubei.js to do that, the code can be found here:
https://github.com/th-ch/youtube-music/blob/master/src/plugins/downloader/main/index.ts

We are directly downloading the audio stream from youtube's undocumented API. We are using [`youtubei.js`](https://www.npmjs.com/package/youtubei.js?activeTab=readme) to do that, the code can be found here: https://github.com/th-ch/youtube-music/blob/master/src/plugins/downloader/main/index.ts
justbetterApps commented 2025-03-12 13:19:13 +00:00 (Migrated from github.com)

We are directly downloading the audio stream from youtube's undocumented API. We are using youtubei.js to do that, the code can be found here: https://github.com/th-ch/youtube-music/blob/master/src/plugins/downloader/main/index.ts

Thanks for you reply, actually i am using youtubei API for my music app on android platform on the flutter framework, but right now what i am stuck on is to find an efficient and faster way to decipher the youtube audio stream urls, i have the way to get the stream urls, but they are all ciphered, and the direct libraries to get the deciphered url in flutter are very slow and take about 3-4 seconds to fetch which is not ideal at all, so can you please suggest some way to integrate it with the android app, Thank you in advance

> We are directly downloading the audio stream from youtube's undocumented API. We are using [`youtubei.js`](https://www.npmjs.com/package/youtubei.js?activeTab=readme) to do that, the code can be found here: https://github.com/th-ch/youtube-music/blob/master/src/plugins/downloader/main/index.ts Thanks for you reply, actually i am using youtubei API for my music app on android platform on the flutter framework, but right now what i am stuck on is to find an efficient and faster way to decipher the youtube audio stream urls, i have the way to get the stream urls, but they are all ciphered, and the direct libraries to get the deciphered url in flutter are very slow and take about 3-4 seconds to fetch which is not ideal at all, so can you please suggest some way to integrate it with the android app, Thank you in advance
Owner

if you only care about android, and don't want a cross-platform solution, you can use https://gitlab.com/toastbits/ytm-kt

if you only care about android, and don't want a cross-platform solution, you can use https://gitlab.com/toastbits/ytm-kt
justbetterApps commented 2025-03-12 14:42:05 +00:00 (Migrated from github.com)

Thanks again for responding, i am building android app on flutter using dart, however the dart packages on pub.dev are not helping and the only only one that provides the streaming url has a huge latency which i can't use, so basically i am looking for a solution for this flutter application. My main query is to get the direct decipher url of the songs, because i already get the cipher urls from the youtubei/v1 api

Thanks again for responding, i am building android app on flutter using dart, however the dart packages on pub.dev are not helping and the only only one that provides the streaming url has a huge latency which i can't use, so basically i am looking for a solution for this flutter application. My main query is to get the direct decipher url of the songs, because i already get the cipher urls from the youtubei/v1 api
Owner

I wish you good luck on your endeavors.

I wish you good luck on your endeavors.
JellyBrick commented 2025-03-27 07:37:06 +00:00 (Migrated from github.com)

We are directly downloading the audio stream from youtube's undocumented API. We are using youtubei.js to do that, the code can be found here: https://github.com/th-ch/youtube-music/blob/master/src/plugins/downloader/main/index.ts

Thanks for you reply, actually i am using youtubei API for my music app on android platform on the flutter framework, but right now what i am stuck on is to find an efficient and faster way to decipher the youtube audio stream urls, i have the way to get the stream urls, but they are all ciphered, and the direct libraries to get the deciphered url in flutter are very slow and take about 3-4 seconds to fetch which is not ideal at all, so can you please suggest some way to integrate it with the android app, Thank you in advance

see youtubei.js.

> > We are directly downloading the audio stream from youtube's undocumented API. We are using [`youtubei.js`](https://www.npmjs.com/package/youtubei.js?activeTab=readme) to do that, the code can be found here: https://github.com/th-ch/youtube-music/blob/master/src/plugins/downloader/main/index.ts > > Thanks for you reply, actually i am using youtubei API for my music app on android platform on the flutter framework, but right now what i am stuck on is to find an efficient and faster way to decipher the youtube audio stream urls, i have the way to get the stream urls, but they are all ciphered, and the direct libraries to get the deciphered url in flutter are very slow and take about 3-4 seconds to fetch which is not ideal at all, so can you please suggest some way to integrate it with the android app, Thank you in advance see youtubei.js.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: YTMD/youtube-music#3083
No description provided.