首页 > 解决方案 > 从 UWP 应用使用 VLC-WinRT 流式传输 RTP

问题描述

我正在尝试通过 RTP 协议将音频文件从 UWP 应用程序流式传输到 RTP 客户端。我正在使用 VLC-WinRT。我尝试了下面的代码,但是在我运行它之后没有发送任何数据包(使用 Wireshark 检查)。

Instance instance = new Instance(new List<string>
{
    "--sout=#rtp{dst=239.0.0.1,port=5004}",
    "--no-sout-all",
    "--sout-keep",
});

StorageFile file = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///NewFolder1/" + "uLaw 8kHz.wav"));

Media media = new Media(instance, file.Path, FromType.FromPath);

var mediaPlayer = new MediaPlayer(media);
mediaPlayer.play();

日志在下面

main input debug:     `file:///C:/Users/.../bin/x86/Debug/AppX/NewFolder1/uLaw%208kHz.wav'     successfully opened
main input debug: Buffering 0%
main input debug: Buffering 16%
main generic debug: creating audio output
main input debug: Buffering 33%
main audio output debug: looking for audio output module matching "any":     4 candidates
main audio output debug: no audio output modules matched
main audio output error: no suitable audio output module
main input debug: Buffering 50%
main input debug: Buffering 66%
main input debug: Buffering 83%
main input debug: Buffering 100%
main input debug: Stream buffering done (350 ms in 1 ms)
main decoder error: failed to create audio output
main generic debug: creating audio output
main audio output debug: looking for audio output module matching "any":     4 candidates
main audio output debug: no audio output modules matched
main audio output error: no suitable audio output module
main decoder error: failed to create audio output
main generic debug: creating audio outputmain input debug: EOF reached
main input debug: waiting decoder fifos to empty    
main decoder debug: killing decoder fourcc `s16l'
main decoder debug: removing module "araw"
main demux debug: removing module "wav"
main stream debug: removing module "record"
main stream debug: removing module "cache_read"
main stream debug: removing module "access_winrt"        

有谁知道可能是什么问题?

标签: c#uwplibvlc

解决方案


推荐阅读