PW Akshay

Generation

generate functionMon, 05 Dec 2022

Program to stream m3u8 url to rtmp in python using RTMPDump .

import os import sys def StartRTMPStream(channel_name, channel_url): os.system( r"rtmpdump -r '{0}' -o {1}.mp4".format(channel_url, channel_name) ) def StartRTMPStreamWithProxy(channel_name, channel_url, proxy_url): os.system( r"rtmpdump -r '{0}' -o {1}.mp4 --swfVfy 'http://www.ustream.tv/flash/viewer.swf' --swfUrl 'http://www.ustream.tv/flash/viewer.swf' --conn S:'http://www.ustream.tv/flash/viewer.connection.token' --conn S:'{2}'".format(channel_url, channel_name, proxy_url) )

Questions about programming?Chat with your personal AI assistant