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 import io import os import subprocess as sp def generate_stream(): INRES = '1280x720' # input resolution OUTRES = '1280x720' # output resolution FPS = '30' # target FPS # URL = 'https://www.youtube.com/watch?v=bJLG97xE7Oc' # input video URL # URL = 'http://techslides.com/demos/sample-videos/small.mp4' #URL = 'http://localhost:8080/?action=stream' URL = 'https://www.youtube.com/watch?v=lWjQ2Df0w_E' # URL = 'https://archive.org/download/BigBuckBunny_124/Content/big_buck_bunny_720p_surround.mp4' # FFMPEG_BIN = "ffmpeg" # on Linux ans Mac OS FFMPEG_BIN = "C:/ffmpeg/bin/ffmpeg.exe" # on Windows

Questions about programming?Chat with your personal AI assistant