PW Akshay

Generation

generate functionSun, 04 Dec 2022

import ffmpeg URL = input("Enter here: /n") stream = ffmpeg.input(URL) stream = ffmpeg.output(stream, 'rtmp://a.rtmp.youtube.com/live2/xxxx-xxxx-xxxx-xxxx-xxxx', format='flv', vcodec="copy", acodec="aac", ac="2", ar="44100", ab="128k", strict="-2", flags="+global_header", bufsize="3000k") ffmpeg.run(stream) ## enhance the above code.

def getStream(youtubeUrl): URL = input("Enter here: /n") stream = ffmpeg.input(URL) stream = ffmpeg.output(stream, 'rtmp://a.rtmp.youtube.com/live2/xxxx-xxxx-xxxx-xxxx-xxxx', format='flv', vcodec="copy", acodec="aac", ac="2", ar="44100", ab="128k", strict="-2", flags="+global_header", bufsize="3000k") ffmpeg.run(stream)

Questions about programming?Chat with your personal AI assistant