Skip to content

Commit

Permalink
pass some vlc settings
Browse files Browse the repository at this point in the history
  • Loading branch information
gmjosack committed Nov 10, 2023
1 parent cf3c84c commit 40a7cdb
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions MossCast/StreamerGroupBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -238,12 +238,16 @@ public List<string> getStreamQuality(string streamer)
public void genStream(string streamer, string quality, string windowTitle)
{

var (width, height, xPos, yPos) = GetWindowLocation();
string vlcOptions = @"--config %AppData%\MossCast\vlcrc --no-qt-video-autoresize --no-qt-privacy-ask --video-x " + xPos + " --video-y " + yPos + " --width " + width + " --height " + height;
string cmdOptions = @"-a "" " + vlcOptions + @" -"" --title " + windowTitle + " --hls-live-edge 1 twitch.tv/" + streamer + " " + quality;

var proc = new Process
{
StartInfo = new ProcessStartInfo
{
FileName = "streamlink",
Arguments = @"-a "" --config %AppData%\MossCast\vlcrc --no-qt-privacy-ask -"" " + " --title " + windowTitle + " --hls-live-edge 1 twitch.tv/" + streamer + quality,
Arguments = cmdOptions,
UseShellExecute = false,
RedirectStandardOutput = true,
CreateNoWindow = true
Expand Down Expand Up @@ -320,8 +324,7 @@ private void btnLaunch_Click(object sender, EventArgs e)
return;
}

string strQuality = " " + cbQuality.SelectedItem ?? "best" + " ";
genStream(streamer: streamerInfo.name, quality: strQuality, windowTitle: windowTitle);
genStream(streamer: streamerInfo.name, quality: (string)cbQuality.SelectedItem ?? "best", windowTitle: windowTitle);
}


Expand Down

0 comments on commit 40a7cdb

Please sign in to comment.