PW Akshay

Generation

generate functionMon, 05 Dec 2022

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

import subprocess import os import sys import requests def stream(link, title, description, tags, category_id, privacy_status, thumbnail_path, access_token): cmd = 'avconv -i "{}" -c:v copy -c:a aac -strict experimental -f flv rtmp://a.rtmp.youtube.com/live2/{}'.format(link, access_token) cmd_ = cmd.split() subprocess.Popen(cmd_) print("Streaming started.") print("\n") print('You can watch the streaming at https://www.youtube.com/watch?v={}'.format(access_token))

Questions about programming?Chat with your personal AI assistant