live stream m3u8 to rtmp in python (no function)
import subprocess import time try: while True: process = subprocess.Popen("ffmpeg -i 'http://xxx/xxx.m3u8' -c copy -f flv 'rtmp://xxx/xxx/xxx'", shell=True, stdout=subprocess.PIPE) time.sleep(5) except KeyboardInterrupt: print("\nCtrl-C pressed. Shutting down.")