我尝试在Windows10上使用LibVLCSharp播放实时RTP流。
我使用LibVLCSharp和LibVLCSharp.WPF NuGet库。
以下是我正在执行的代码:
LibVLC libVLC = new LibVLC();
MediaPlayer mediaPlayer = new MediaPlayer(libVLC);
Media m = new Media(_libVLC, "rtp://@:7777/", FromType.FromLocation);
mediaPlayer.Play(m);我收到以下消息:
main demux meta debug: no meta reader modules matched
main input debug: `rtp://@:7777/' successfully opened
rtp demux error: unspecified payload format (type 96)
rtp demux: A valid SDP is needed to parse this RTP stream.
main demux error: SDP required
main demux error: A description in SDP format is required to receive the RTP stream. Note that rtp:// URIs cannot work with dynamic RTP payload format (96).
rtp demux debug: added RTP source (bfccda8c)
rtp demux debug: unknown payload (96)我遗漏了什么?
如果需要,我可以提供更多信息。谢谢
发布于 2020-09-22 13:12:42
似乎你需要在某个地方写一个SDP文件来描述你的流,然后播放这个sdp文件:https://forum.videolan.org/viewtopic.php?t=149657
StreamMediaInput也许可以代替将文件写到某个地方,但我没有测试。
https://stackoverflow.com/questions/64000064
复制相似问题