ytdl-js / react-native-ytdl

A YouTube downloader for React Native
121 stars 46 forks source link

Video playing slow in android and iOS and downloading speed also too slow #92

Open Moonubanna opened 3 years ago

Moonubanna commented 3 years ago

I am using this library last 1 year it's working fine for convert video but last few days video link playing too slow and downloading speed also too slow

check bellow converted link: https:\/\/r1---sn-g5pauxapo-qxae.googlevideo.com\/videoplayback?expire=1634733669&ei=BbpvYdKaK9CYg8UPyY-x0Ak&ip=180.94.33.59&id=o-AFwGDtV4Wrv6Apk9jtvQKL44fbR2w4PJxkttcNT7jYX0&itag=18&source=youtube&requiressl=yes&mh=4t&mm=31%2C29&mn=sn-g5pauxapo-qxae%2Csn-qxaelnes&ms=au%2Crdu&mv=m&mvi=1&pl=24&initcwndbps=703750&vprv=1&mime=video%2Fmp4&ns=PqkF0sItq1-Wtu2DPbpRXDoG&gir=yes&clen=248938533&ratebypass=yes&dur=10338.034&lmt=1631008010360161&mt=1634711095&fvip=5&fexp=24001373%2C24007246&c=WEB&txp=6210222&n=foNV3mJeL6KtMmxl42M&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cns%2Cgir%2Cclen%2Cratebypass%2Cdur%2Clmt&sig=AOq0QJ8wRgIhAIgyQ0c3frPFhfcX7OaTyh-7FsK566Q5I7SZKN5KOoF9AiEAk3MRAp3AQH77gzMqtlOw8aw7B_8lnBt1Rb2qEAbYBN4%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIhALVyvxl42UxnhUN2il-PjaprM_00QKc2p2LPOR11iqxaAiBFopF9aWgOoiSjlfE4pmHFyFukx6DiwaRev6BWlYlfBg%3D%3D

Please see this

Thanks in advance

kapilbhosale commented 3 years ago

As the library depends on youtube-dl there is issue to parent library. The alternate library which is more actively maintained i.e. yt-dlp https://github.com/yt-dlp/yt-dlp works fine on Laptops.

We need a react-native version of the yt-dlp

tnluan commented 2 years ago

Hi @AbelTesfaye,

The ytdl-core has fixed this issue. Could you apply to your react-native version?

Thank you so much.

Seelvex commented 2 years ago

The ytdl-core fix involves the use of nodejs module "vm" to execute sandboxed scripts for the deciphers needed. That package doesn't work on RN, can that kind of code be executed somewhere else? (WebView is the first thing that come to mind, but implementing view logic in this react-native-ytdl module seems a bit tricky).

Hope to hear from @AbelTesfaye soon

a26364177 commented 2 years ago

Just use like this sciprt to emulates extract n token function ? https://github.com/LuanRT/YouTube.js/blob/main/lib/NToken.js

node-ytdl-core/pull/1022#issuecomment