From c7746071fcc53cc07c6f91bde7c6b8700a498940 Mon Sep 17 00:00:00 2001 From: Micha Albert Date: Tue, 10 Sep 2024 16:39:28 -0400 Subject: [PATCH] mostly working but goofy color stuff broken --- active-stream-proxy/main.py | 2 +- live-stream/run.sh | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/active-stream-proxy/main.py b/active-stream-proxy/main.py index c24f4b9..0ba867b 100644 --- a/active-stream-proxy/main.py +++ b/active-stream-proxy/main.py @@ -2,7 +2,7 @@ import subprocess import time import requests -time.sleep(10) +time.sleep(8) active_stream = requests.get("http://backend:8000/api/v1/active_stream").text.replace('"', '') print(active_stream) diff --git a/live-stream/run.sh b/live-stream/run.sh index a7f9df5..51acfd9 100755 --- a/live-stream/run.sh +++ b/live-stream/run.sh @@ -3,12 +3,6 @@ sleep 1 LIBGL_ALWAYS_SOFTWARE=true gst-launch-1.0 -e wpesrc location="http://web-frontend:4173/" \ - ! queue \ ! videoconvert ! videoscale ! videorate \ - ! "video/x-raw, format=BGRA, width=1920, height=1080, framerate=30/1" \ - ! videoconvert \ - ! x264enc speed-preset=1 \ - ! filesink location=/dev/stdout | ffmpeg -re -y -i - -listen 1 -i rtmp://0.0.0.0:1936/active-input -c:v copy -c:a libmp3lame -map 0:v:0 -map 1:a:0 -g 90 -framerate 30 -movflags faststart -bufsize 14000k -f flv rtmp://x.rtmp.youtube.com/live2/$YT_STREAM_KEY - - - + ! "video/x-raw, format=NV12, width=1920, height=1080, framerate=30/1" \ + ! filesink location=/dev/stdout | ffmpeg -re -y -f rawvideo -pixel_format nv12 -video_size 1920x1080 -framerate 30 -i - -listen 1 -i rtmp://0.0.0.0:1936/active-input -filter_complex "[0:v][0:v]overlay=-50:0[bg]; [bg][0:v]overlay=-50-W,format=nv12[out]" -map "[out]" -c:v libx264 -x264-params keyint=60 -preset ultrafast -b:v 6800k -c:a copy -map 1:a:0 -movflags faststart -f flv -pix_fmt nv12 rtmp://x.rtmp.youtube.com/live2/$YT_STREAM_KEY