PW Akshay

Generation

generate functionMon, 05 Dec 2022

live stream m3u8 to rtmp in python

import subprocess m3u8_url = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxx' rtmp_url = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxx' cmd = 'ffmpeg -re -i "' + m3u8_url + '" -vcodec copy -acodec aac -strict -2 -f flv "' + rtmp_url +'"' p = subprocess.Popen(cmd, shell=True)

Questions about programming?Chat with your personal AI assistant