PW Akshay

Generation

generate functionMon, 05 Dec 2022

Program to stream m3u8 url to youtube in python using Avcon .

import subprocess def main(): m3u8_url = "http://localhost:8080/master.m3u8" stream_title = "mylive" stream_privacy = "public" rtmp_server = "rtmp://a.rtmp.youtube.com/live2" rtmp_key = "12345-abcde-678910-fghij" subprocess.call([ 'ffmpeg', '-i', m3u8_url, '-acodec', 'copy', '-vcodec', 'copy', '-f', 'flv', rtmp_server + '/' + rtmp_key ]) if __name__ == "__main__": main()

Questions about programming?Chat with your personal AI assistant