c# - 从 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"
有谁知道可能是什么问题?
解决方案
推荐阅读
- java - 如何使用 kotlin 在内部存储中创建文件夹和文件
- c# - C#如何以函数式风格实现多态性?
- java - 是否有可能在具有 Completable 未来的 Java 中为 IO 密集型服务获得高吞吐量(4-5 TPS),或者 NodeJs 是更好的选择
- html - 自动调整高度
- 适合内容
- pine-script - 当价格与指数移动平均线相距特定百分比距离时,如何打开/关闭交易?(松树)
- r - dplyr 和 tibbletime。对象不属于“til_time”类。时间聚合的一般方法
- javascript - 如何在禁用的输入框中禁用用户选择
- python - 通过将 URL 从其他 *.py 文件传递给 Scrapy 从 url 中获取数据
- reactjs - React Router Dom Redirect 需要刷新页面才能工作
- python - 为什么我在逻辑回归和支持向量机中得到相同的输出