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 HLS, DASH, RTMP out1 = HLS( name="video_out", formats=[Formats.h264(), Formats.mpegts()], # see Formats map="video_out", hls_list_size=3, # keep 3 hls files hls_time=4, # 4 seconds hls_flags="split_by_time", # or split_by_time, append_list or omit ) out2 = DASH( name="video_out", formats=[Formats.h264(), Formats.vp9()], # see Formats map="video_out", dash_segment_duration=3, # 3 seconds ) out3 = RTMP( name="video_out", format=Formats.h264(), # see Formats map="video_out", rtmp_live

Questions about programming?Chat with your personal AI assistant