From 917867029d3fcfb297579a7473f716fb3c317bb3 Mon Sep 17 00:00:00 2001 From: TGSAN Date: Mon, 30 Sep 2019 19:04:42 +0800 Subject: [PATCH] Update 20190930.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 提升追帧速率 --- MirrorCaster/MainForm.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MirrorCaster/MainForm.cs b/MirrorCaster/MainForm.cs index 97be717..ac820c7 100644 --- a/MirrorCaster/MainForm.cs +++ b/MirrorCaster/MainForm.cs @@ -76,7 +76,7 @@ bool is_casting DeviceInfoData deviceInfoData = new DeviceInfoData(); // device info form adb DeviceInfoData instart_deviceInfoData = new DeviceInfoData(); // device info at start cast - double castMbitRate = 15; // 16M适中 + double castMbitRate = 30; // 16M适中 public static NamedPipeClientStream client; @@ -93,7 +93,7 @@ private void StartCastButton_Click(object sender, EventArgs e) string inputText = string.Empty; try { - inputText = Interaction.InputBox("请输入投屏码率(Mbps):\r\n\r\n<10:适合互联网传输\r\n<30:适合一般手机通过USB传输\r\n<100:适合编码能力强的手机通过家庭局域网(百兆)内传输\r\n<=200:适合编码能力超强的手机通过USB传输\r\n\r\n建议值:15", "准备投屏", $"{castMbitRate}", -1, -1); + inputText = Interaction.InputBox("请输入投屏码率(Mbps):\r\n\r\n<10:适合互联网传输\r\n<30:适合一般手机通过USB传输\r\n<100:适合编码能力强的手机通过家庭局域网(百兆)内传输\r\n<=200:适合编码能力超强的手机通过USB传输\r\n\r\n建议值:30", "准备投屏", $"{castMbitRate}", -1, -1); castMbitRate = double.Parse(inputText); if (castMbitRate <= 0 || castMbitRate > 200) { @@ -232,7 +232,7 @@ private string ADBResult(string args) private void StdIn() { stdin_process.StartInfo.FileName = System.AppDomain.CurrentDomain.BaseDirectory + @"lib\mpv\mpv.exe"; - stdin_process.StartInfo.Arguments = $"--hwdec=auto --opengl-glfinish=yes --opengl-swapinterval=0 --d3d11-sync-interval=0 --fps={deviceInfoData.device_refreshRate} --no-audio --framedrop=decoder --no-correct-pts --speed=1.01 --profile=low-latency --no-border --no-config --input-default-bindings=no --osd-level=0 -no-osc --wid={screenBox.Handle.ToInt64().ToString()} -"; + stdin_process.StartInfo.Arguments = $"--hwdec=auto --opengl-glfinish=yes --opengl-swapinterval=0 --d3d11-sync-interval=0 --fps={deviceInfoData.device_refreshRate} --no-audio --framedrop=decoder --no-correct-pts --speed=2 --profile=low-latency --no-border --no-config --input-default-bindings=no --osd-level=0 -no-osc --wid={screenBox.Handle.ToInt64().ToString()} -"; stdin_process.StartInfo.UseShellExecute = false; stdin_process.StartInfo.RedirectStandardOutput = true; stdin_process.StartInfo.RedirectStandardInput = true;