0

how to stream multiple files with multiple stream keys

Me Oct 08, 2022, 12:20 PM hi Right now, this is the code that I am trying to edit. What this does is that I input a name (example.mp4) and it take the contents from a notepad with my stream keys and streams the .mp4 file I input. I want it so that I have .mp4 files with the names as stream keys and the program streams it with the relevant stream key in the notepad. Is that possible? import subprocess print("Enter the name of the file you want to stream. Include the file extension.\nExample: lofi.mp4 or image.png or pogchamp.gif") filename = input("\nFilename: ") with open('stream_keys.txt','r')as keys: for key in keys: subprocess.Popen(f'ffmpeg -stream_loop -1 -re -i {filename} -stream_loop -1 -i music.mp3 -c:v libx264 -preset veryfast -b:v 3000k -maxrate 3000k -bufsize 6000k -pix_fmt yuv420p -g 50 -c:a aac -b:a 160k -ac 2 -ar 44100 -f flv "rtmp://live.twitch.tv/app/{key}"', shell=True)

8th Oct 2022, 6:12 AM
Danish Iryandy
0 Respuestas