vlc.dotnet保存流
亲爱的, 我正在检查vlc.dotnet lib(我是音频/视频流的新手),
static void Main(string[] args)
{
var currentDirectory = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
// Default installation path of VideoLAN.LibVLC.Windows
var libDirectory =
new DirectoryInfo(Path.Combine(currentDirectory, "libvlc", IntPtr.Size == 4 ? "win-x86" : "win-x64"));
var destination = Path.Combine(currentDirectory, "record.ts");
using (var mediaPlayer = new Vlc.DotNet.Core.VlcMediaPlayer(libDirectory))
{
var mediaOptions = new[]
{
":sout=#file{dst=" + destination + "}",
":sout-keep"
};
mediaPlayer.SetMedia(new Uri("http://hls1.addictradio.net/addictrock_aac_hls/playlist.m3u8"),
mediaOptions);
mediaPlayer.Play();
Console.WriteLine($"Recording in {destination}");
Console.WriteLine("Press any key to exit");
Console.ReadKey();
}
}
我找不到有关可能的介质值的文档。我想了解是否可以在下载时更改采样率,甚至可以更改文件格式(可能是PCM)。 有可以提供帮助的链接吗? 谢谢
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
vlc.dotnet已死,使用 libvlcsharp 而不是。
至于选项文档,请在此处找到该文档:
Vlc.DotNet is dead, use LibVLCSharp instead.
As for the options documentation, please find the documentation here : https://docs.videolan.me/vlc-user/3.0/en/advanced/index.html