JuanBindez/pytubefix

Stream taking too long to repond

Closed this issue · 8 comments

I'm on latest python version 3.11.2 and latest pytubefix 1.6.0. The issue is that yt.streams takes around 20-30 seconds to respond. My internet connection is also good. The same issue was in pytube original library. Please fix it.

I'm on latest python version 3.11.2 and latest pytubefix 1.6.0. The issue is that yt.streams takes around 20-30 seconds to respond. My internet connection is also good. The same issue was in pytube original library. Please fix it.

Hi, give us more details

show me the code you used

i just use a simple code. import time from pytubefix import YouTube t0 = time.time() yt = YouTube('https://youtu.be/wRFVlapABI0?si=Xj8ddlF6rE9Ef16-') print(yt.streams) t1= time.time() print('exexution time: {}'.format(t1-t0))
…
On Sun, 15 Oct 2023, 5:56 pm Juan Bindez, @.> wrote: show me the code you used — Reply to this email directly, view it on GitHub <#8 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/A6XQ7ZBLBLV224I4GFS45WLX7PMRRANCNFSM6AAAAAA6A5N53Y . You are receiving this because you authored the thread.Message ID: @.>

here and apparently it's normal ->

sive="False" type="audio">, <Stream: itag="140" mime_type="audio/mp4" abr="128kbps" acodec="mp4a.40.2" progressive="False" type="audio">, <Stream: itag="249" mime_type="audio/webm" abr="50kbps" acodec="opus" progressive="False" type="audio">, <Stream: itag="250" mime_type="audio/webm" abr="70kbps" acodec="opus" progressive="False" type="audio">, <Stream: itag="251" mime_type="audio/webm" abr="160kbps" acodec="opus" progressive="False" type="audio">, <Stream: itag="599" mime_type="audio/mp4" abr="None" acodec="mp4a.40.5" progressive="False" type="audio">, <Stream: itag="600" mime_type="audio/webm" abr="None" acodec="opus" progressive="False" type="audio">]
exexution time: 3.106990098953247

try to trace a route to google dns to see if there is any loss along the way

i just use a simple code. import time from pytubefix import YouTube t0 = time.time() yt = YouTube('https://youtu.be/wRFVlapABI0?si=Xj8ddlF6rE9Ef16-') print(yt.streams) t1= time.time() print('exexution time: {}'.format(t1-t0))
…
On Sun, 15 Oct 2023, 5:56 pm Juan Bindez, @.> wrote: show me the code you used — Reply to this email directly, view it on GitHub <#8 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/A6XQ7ZBLBLV224I4GFS45WLX7PMRRANCNFSM6AAAAAA6A5N53Y . You are receiving this because you authored the thread.Message ID: _@**.**_>

here and apparently it's normal ->

sive="False" type="audio">, <Stream: itag="140" mime_type="audio/mp4" abr="128kbps" acodec="mp4a.40.2" progressive="False" type="audio">, <Stream: itag="249" mime_type="audio/webm" abr="50kbps" acodec="opus" progressive="False" type="audio">, <Stream: itag="250" mime_type="audio/webm" abr="70kbps" acodec="opus" progressive="False" type="audio">, <Stream: itag="251" mime_type="audio/webm" abr="160kbps" acodec="opus" progressive="False" type="audio">, <Stream: itag="599" mime_type="audio/mp4" abr="None" acodec="mp4a.40.5" progressive="False" type="audio">, <Stream: itag="600" mime_type="audio/webm" abr="None" acodec="opus" progressive="False" type="audio">] exexution time: 3.106990098953247

video">, <Stream: itag="160" mime_type="video/mp4" res="144p" fps="30fps" vcodec="avc1.4d400c" progressive="False" type="video">, <Stream: itag="278" mime_type="video/webm" res="144p" fps="30fps" vcodec="vp9" progressive="False" type="video">, <Stream: itag="597" mime_type="video/mp4" res="None" fps="15fps" vcodec="avc1.4d400b" progressive="False" type="video">, <Stream: itag="598" mime_type="video/webm" res="None" fps="15fps" vcodec="vp9" progressive="False" type="video">, <Stream: itag="139" mime_type="audio/mp4" abr="48kbps" acodec="mp4a.40.5" progressive="False" type="audio">, <Stream: itag="140" mime_type="audio/mp4" abr="128kbps" acodec="mp4a.40.2" progressive="False" type="audio">, <Stream: itag="249" mime_type="audio/webm" abr="50kbps" acodec="opus" progressive="False" type="audio">, <Stream: itag="250" mime_type="audio/webm" abr="70kbps" acodec="opus" progressive="False" type="audio">, <Stream: itag="251" mime_type="audio/webm" abr="160kbps" acodec="opus" progressive="False" type="audio">, <Stream: itag="599" mime_type="audio/mp4" abr="None" acodec="mp4a.40.5" progressive="False" type="audio">, <Stream: itag="600" mime_type="audio/webm" abr="None" acodec="opus" progressive="False" type="audio">]
exexution time: 2.73478102684021

i do not understand your response. Kindly make it simpler for me as I'm not a professional. Also suggest solutions for or changes in codes or respective settrings. Thanks
…
On Sun, 15 Oct 2023, 6:28 pm Juan Bindez, @.> wrote: try to trace a route to google dns to see if there is any loss along the way — Reply to this email directly, view it on GitHub <#8 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/A6XQ7ZCL5A5VDEMK7D2Y2ITX7PQIFANCNFSM6AAAAAA6A5N53Y . You are receiving this because you authored the thread.Message ID: @.>

To simplify for you, no problem was identified in the library