PW Akshay

Generation

generate functionTue, 17 Jan 2023

create a python program to stream video from m3u8 url to youtube using python-ffmpeg-video-streaming module (do not create function)(do not use subprocess)

from ffmpeg_streaming import Formats, Bitrate, Representation, Size from ffmpeg_streaming import HLSStream, HLSStreamWriter, HLSStreamWriterError src = 'http://hls.nokia.com/nokia/Nokia_LTE_Dummy_H264_2M/Nokia_LTE_Dummy_H264_2M.m3u8' hls = HLSStreamWriter(src, stream_name='stream') hls.streams.append(HLSStream('out.m3u8', bitrate=Bitrate(1280, 'k'), representation=Representation(size=Size(1280, 720)), format=Formats.h264())) hls.start()

Questions about programming?Chat with your personal AI assistant