Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audio streams download speed issue #206

Closed
JoshukLite opened this issue Mar 26, 2018 · 3 comments
Closed

Audio streams download speed issue #206

JoshukLite opened this issue Mar 26, 2018 · 3 comments

Comments

@JoshukLite
Copy link

All audio streams of the video has slow download speed. On the average it starts after 25% already downloaded, then every 8th cycle of the read operation (in BaseStream.download method) takes up to 2.5 seconds (waiting for data, sleep?)

pafy/pafy/backend_shared.py

Lines 625 to 635 in e6348cf

while self._active:
chunk = response.read(chunksize)
outfh.write(chunk)
elapsed = time.time() - t0
bytesdone += len(chunk)
if elapsed:
rate = ((float(bytesdone) - float(offset)) / 1024.0) / elapsed
eta = (total - bytesdone) / (rate * 1024)
else: # Avoid ZeroDivisionError
rate = 0
eta = 0

Same result on all audio streams. No problems with video streams.
Here is a snippet of the method working time in milliseconds:
capture

@vn-ki
Copy link
Member

vn-ki commented Mar 26, 2018

This will be fixed by #203. I will make the requested changes this weekend and get it merged.

@JoshukLite
Copy link
Author

great! thanks

@ritiek
Copy link
Member

ritiek commented Nov 23, 2019

Closed by #203.

@ritiek ritiek closed this as completed Nov 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants