我已经创建了添加到windows窗体上的vlcControl。我想知道如何去除我的vlc视频上的黑条(图像消耗黑色空间)。示例如下:

我试过vlc --aspect-ratio 16:9 -L -f /directory/to/file/filename这条线路。这条线改变了纵横比,但没有像预期的那样工作。我尝试了以下几行代码:
第1行:
vlcCustomer.Play(new Uri("rtsp://192.168.1.10/2/media/video1"), ":network-caching=50 :aspect-ratio=16:9 -L -f /directory/to/file/filename");第2行:
vlcCustomer.Play(new Uri("rtsp://192.168.1.10/2/media/video1"), ":network-caching=50 vlc --aspect-ratio 16:9 -L -f /directory/to/file/filename");发布于 2019-03-19 17:02:40
不需要使用命令行界面参数,libvlc有一个改变纵横比的接口,它在Vlc.DotNet中可用。示例:https://github.com/ZeBobo5/Vlc.DotNet/blob/f0d3e2aca37500ccd2710c8b9b286ccc485f1636/src/Samples/Samples.WinForms.Advanced/Sample.cs#L167
发布于 2019-03-21 05:50:42
问题是你的控件将具有相同的大小,无论你给它的纵横比是什么,并且它将需要用黑条填充。为了摆脱它,你需要调整你的控件的大小,并根据你可以从媒体信息中获得的纵横比将它居中。
发布于 2020-02-12 20:31:23
根据您的屏幕修改此代码,并在代码后面粘贴:
VideoWidth = "1280";
VideoHeight = "750";
VlcControl2.Video.AspectRatio = VideoWidth + ":" + VideoHeight;https://stackoverflow.com/questions/55216448
复制相似问题