PW Akshay

Generation

generate functionMon, 05 Dec 2022

live stream m3u8 to youtubein python using rtmpy

import rtmpy # connect to the stream stream = rtmpy.Connection('rtmp://a.rtmp.youtube.com/live2/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', live=True) # send the stream stream.connect() stream.create_stream() stream.publish('live', 'live') stream.write(open('/path/to/file.mp3', 'rb').read())

Questions about programming?Chat with your personal AI assistant