PW Akshay

Generation

generate functionSun, 04 Dec 2022

stream m3u8 url to rtmp in python (with pyRTMP)

def stream(url) rtmpUrl = 'rtmp://ip:port/app/stream' cmd = 'ffmpeg -re -i "{0}" -acodec libmp3lame -ar 44100 -b:a 128k -pix_fmt yuv420p -profile:v baseline -s 1280x720 -bufsize 6000k -vb 400k -maxrate 1500k -deinterlace -vcodec libx264 -preset veryfast -g 30 -r 30 -f flv "{1}"'.format(url,rtmpUrl) os.system(cmd) stream('m3u8 url here')

Questions about programming?Chat with your personal AI assistant