stream m3u8 url to rtmp in python using Streamlink
import subprocess import os import argparse def stream(url, path): subprocess.call(["streamlink", url, "best", "-o", path]) if __name__ == '__main__': parser = argparse.ArgumentParser(description='CLI') parser.add_argument('-i', '--input', help='Input URL', required=True) parser.add_argument('-o', '--output', help='Output File', required=True) args = vars(parser.parse_args()) stream(args['input'], args['output'])