Created
February 10, 2019 23:03
-
-
Save guineawheek/65bcec0cfd8ec680e4a5bc7e55cbedc5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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