PW Akshay

Generation

generate functionMon, 05 Dec 2022

live stream m3u8 to rtmp in python (no function)

import subprocess import time while True: p = subprocess.Popen(["ffmpeg", "-re", "-i", "http://example.com/my.m3u8", "-acodec", "copy", "-vcodec", "copy", "-f", "flv", "rtmp://example.com/live/mystream"]) print("live stream started") p.wait() print("live stream stopped") time.sleep(2)

Questions about programming?Chat with your personal AI assistant