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, Format hls_stream = HLS( [ Representation(Bitrate('1000k'), Width(1920), Height(1080)), Representation(Bitrate('500k'), Width(1280), Height(720)), Representation(Bitrate('400k'), Width(1024), Height(576)), Representation(Bitrate('300k'), Width(640), Height(480)) ], [ Format(Formats.mpegts, Representation(Bitrate('0k'), Width(640), Height(480))), Format(Formats.mp4, Representation(Bitrate('0k'), Width(640), Height(480))), ], base_url='http://localhost:8000/hls/' ) dash_stream = DASH( [ Representation(Bitrate('1000k'), Width(1920), Height(1080)), Representation(Bitrate('500k'), Width(

Questions about programming?Chat with your personal AI assistant