PW Akshay

Generation

generate functionMon, 05 Dec 2022

Program to live stream m3u8 to youtube in python by PyChunkedEncode.

def live_youtube_push(filename, title, description): """ :param filename: input file :param title: video title :param description: video description :return: None """ # Specify the path to the ffmpeg binary. ffmpeg_path = "ffmpeg" # Create a new PyChunkedEncode object. video_stream = PyChunkedEncode(ffmpeg_path) # Specify the stream URL. #url = "https://a.rtmp.youtube.com/live2/{}".format(youtube_key) url = "rtmp://a.rtmp.youtube.com/live2/{}".format(youtube_key) # Set the stream URL. video_stream.set_url(url) # Specify the stream resolution. #video_stream.set_resolution(640, 360) # Specify the stream framerate. video_stream.set_framerate(60) # Specify the stream bitrate.

Questions about programming?Chat with your personal AI assistant