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 def main(): input_stream = "http://hls.iptv.ge/stream/content/b054634c-8cbe-47ce-98f0-eba51e7c9f82/playlist.m3u8" output_file_path = "out.mp4" output_stream = "rtmp://a.rtmp.youtube.com/live2/[youtube_code]" formats = Formats( format_id='mp4', format_note='mp4', format='mp4', extensions='mp4', ffmpeg_codec='libx264', ffmpeg_full_codec='libx264', audio_codec='aac', ) bitrate = Bitrate( bitrate=65536, width=1280, height=720, video_codec='h264', fps=30, ) representation =

Questions about programming?Chat with your personal AI assistant