如何使用 c# 提高嵌入 vlc 播放器的质量?
How to enhanced quality of embed vlc player using c#?
我有一个 c# windows 表单应用程序,我想使用嵌入的 vlc 播放器播放视频,一切都很好。
但是,只有一个问题,即视频质量变暗,显示的图像浑浊不透明。
我尝试像这样更改一些 properties
:
VlcControl.Video.Adjustments.Contrast = 0;
VlcControl.Video.Adjustments.Brightness = 100;
VlcControl.Video.Adjustments.Gamma = 10;
VlcControl.Video.Adjustments.Saturation= 50;
但图像质量没有改变。我也改变 VlcControl.Video.AspectRatio
属性.
如何提高电影质量?
我 运行 遇到了这个问题,我确定 VLC 似乎忽略了这些设置,直到视频真正开始播放。我为我的 WinForm 应用程序想出的解决方法是启动视频流,然后重复重新应用设置一段时间。我确信有更好的方法可以做到这一点,但就目前而言,这可以在 100% 的时间内完成工作:
this.VlcControl.Play();
this.Show();
int counter = 0;
while (counter < 20)
{
Debug.WriteLine(this.VlcControl.State);
counter += 1;
Application.DoEvents();
Thread.Sleep(100);
this.VlcControl.Video.Adjustments.Enabled = true;
this.VlcControl.Video.Adjustments.Saturation = 1.35f;
}
我有一个 c# windows 表单应用程序,我想使用嵌入的 vlc 播放器播放视频,一切都很好。
但是,只有一个问题,即视频质量变暗,显示的图像浑浊不透明。
我尝试像这样更改一些 properties
:
VlcControl.Video.Adjustments.Contrast = 0;
VlcControl.Video.Adjustments.Brightness = 100;
VlcControl.Video.Adjustments.Gamma = 10;
VlcControl.Video.Adjustments.Saturation= 50;
但图像质量没有改变。我也改变 VlcControl.Video.AspectRatio
属性.
如何提高电影质量?
我 运行 遇到了这个问题,我确定 VLC 似乎忽略了这些设置,直到视频真正开始播放。我为我的 WinForm 应用程序想出的解决方法是启动视频流,然后重复重新应用设置一段时间。我确信有更好的方法可以做到这一点,但就目前而言,这可以在 100% 的时间内完成工作:
this.VlcControl.Play();
this.Show();
int counter = 0;
while (counter < 20)
{
Debug.WriteLine(this.VlcControl.State);
counter += 1;
Application.DoEvents();
Thread.Sleep(100);
this.VlcControl.Video.Adjustments.Enabled = true;
this.VlcControl.Video.Adjustments.Saturation = 1.35f;
}