From 14b57410fd0a299b12d05cdd72472a4dea768f18 Mon Sep 17 00:00:00 2001 From: RopeBunnyVJ Date: Wed, 5 Feb 2025 18:07:39 -0800 Subject: [PATCH] Specify custom ingest and stream key --- Assets/RT3script.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Assets/RT3script.cs b/Assets/RT3script.cs index 140bf42..2dd91f0 100644 --- a/Assets/RT3script.cs +++ b/Assets/RT3script.cs @@ -9,7 +9,9 @@ using System.IO; public class RT3script : MonoBehaviour { public RenderTexture colorImage, depthImage; - public string outputRTMP = "rtmp://localhost/live/HoloPipeline"; + // public string outputRTMP = "rtmp://localhost/live/HoloPipeline"; + public string ingestRTMP = "rtmp://ingest.vrcdn.live/live"; + public string streamKey = ""; public string mp4name = "my_movie_depth_ffmpeg.mp4"; public Texture2D outputImage; @@ -113,7 +115,7 @@ public class RT3script : MonoBehaviour { // Setup FFmpeg process with arguments for RTMP streaming string ffmpegArgs = $"-y -f rawvideo -vcodec rawvideo -pix_fmt rgb24 -s {outputImage.width}x{outputImage.height} " + - $"-r {targetFrameRate} -i pipe:0 -c:v libx264 -preset ultrafast -tune zerolatency -pix_fmt yuv420p -f flv {outputRTMP}"; + $"-r {targetFrameRate} -i pipe:0 -c:v libx264 -preset ultrafast -tune zerolatency -pix_fmt yuv420p -f flv {ingestRTMP + "/" + streamKey}"; ffmpegProcess = new Process(); ffmpegProcess.StartInfo.FileName = "F:\\ffmpeg-7.1-full_build\\bin\\ffmpeg.exe"; @@ -123,6 +125,6 @@ public class RT3script : MonoBehaviour ffmpegProcess.StartInfo.CreateNoWindow = true; ffmpegProcess.Start(); - UnityEngine.Debug.Log("FFmpeg process started with arguments: " + ffmpegArgs); + // UnityEngine.Debug.Log("FFmpeg process started with arguments: " + ffmpegArgs); } }