PW Akshay

Generation

generate functionMon, 05 Dec 2022

Program to stream m3u8 url to youtube in python

#!/usr/bin/env python import subprocess import sys import re import os import time import datetime import uuid def publish_youtube(title): print "[>] Starting Streaming to Youtube ..." proc = subprocess.Popen("ffmpeg -i %s -c:v libx264 -preset veryfast -maxrate 3000k -bufsize 6000k -pix_fmt yuv420p -g 50 -c:a aac -b:a 160k -ac 2 -ar 44100 -f flv rtmp://a.rtmp.youtube.com/live2/%s" % (title, key), stdout=sys.stdout,stderr=sys.stderr, shell=True) time.sleep(4) def start_streaming(url, title): print "[>] Starting Streaming ..." proc = subprocess.Popen("ffmpeg -re -i %s -c copy -f flv %s" % (url, title), stdout=sys.stdout, stderr=sys.st

Questions about programming?Chat with your personal AI assistant