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)

import ffmpeg_streaming import ffmpeg stream = ffmpeg_streaming.Stream(url="http://st-kv-vod.akamaized.net/b542d8a4f38a4e6e8ff0a9c9d83aa7b4/4a2f48d3/stv2/index.m3u8") file_name = "big_buck_bunny_720p_10mb.mp4" with open(file_name, 'wb') as f: for data in stream.iter_content(): f.write(data) input = ffmpeg.input(file_name) input = ffmpeg.output(file_name) input.run()

Questions about programming?Chat with your personal AI assistant