Skip to content

Instantly share code, notes, and snippets.

@guineawheek
Created February 10, 2019 23:03
Show Gist options
  • Save guineawheek/65bcec0cfd8ec680e4a5bc7e55cbedc5 to your computer and use it in GitHub Desktop.
Save guineawheek/65bcec0cfd8ec680e4a5bc7e55cbedc5 to your computer and use it in GitHub Desktop.
import sys
import subprocess
stream, name, poll_first, poll_rest = sys.argv[1:]
first = True
poll = poll_first
count = 0
print(stream, name.format(count), poll_first, poll_rest)
#input()
while True:
subprocess.run(["streamlink", stream, "best", "--hls-live-edge", "99999",
"--hls-segment-threads", "6", "--retry-streams", poll, "-o", name.format(count)])
if first:
poll = poll_rest
first = False
count += 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment