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)