PW Akshay


generate functionSun, 04 Dec 2022

stream with m3u8 to rtmp in python (no ffmpeg)

def m3u8_to_rtmp(m3u8, rtmp): ts_list = parse_m3u8_ts(m3u8) if ts_list is None: print('Failed to parse m3u8 file') return False # get stream from ts file ts_stream = open_ts_stream(ts_list[0]) # create rtmp stream rtmp_stream = create_rtmp_stream(rtmp) # continue stream ts to rtmp stream_ts_to_rtmp(ts_stream, rtmp_stream)

Questions about programming?Chat with your personal AI assistant