PW Akshay

Generation

generate functionMon, 05 Dec 2022

Program to stream m3u8 url to youtube in python

def streamtoYoutube(stream_url, youtube_stream_key): stream_url = stream_url youtube_stream_key = youtube_stream_key ffmpeg_command = f"ffmpeg -use_wallclock_as_timestamps 1 -i {stream_url} -c copy -f flv rtmp://a.rtmp.youtube.com/live2/{youtube_stream_key}" return os.system(ffmpeg_command) streamtoYoutube("your_stream_url", "your_youtube_stream_key")

Questions about programming?Chat with your personal AI assistant