Specify custom ingest and stream key
This commit is contained in:
parent
f6c6ba96bc
commit
14b57410fd
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user