chrippa/livestreamer

Why Livestreamer API download is so slow?

snorlaxdev opened this issue · 1 comments

So, I'm using livestreamer api for my python script. But the download is very slow compared to CLI.
When I'm using CLI directly (without api) I got 4MBps download instead of api that only 40KBps.
Any suggestion?
Sorry for my bad english, still learning.

btw, this is my script.

streams = livestreamer.streams('hlsvariant://{0}'.format(url))
stream = streams['best']
stream_fd = stream.open()
try:
  with open(filename, 'wb') as file:
    for data in stream_fd:
      file.write(data)
finally:
  stream_fd.close()