PW Akshay

Generation

generate functionMon, 05 Dec 2022

Program to stream m3u8 urlto rtmp in python using PyM3u8 .

def stream_file(self, url, duration=0): """ Stream file from url to rtmp server :param url: url of file :param duration: duration in seconds of file to stream, 0 for entire file """ if 'm3u8' in url: self.stream_m3u8(url, duration) else: raise NotImplementedError('Only m3u8 streaming is supported at this time')

Questions about programming?Chat with your personal AI assistant