以SDP格式提供对RTP流的描述 [英] Provide description in SDP format for RTP stream

查看:173
本文介绍了以SDP格式提供对RTP流的描述的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用LibVLC库2.1.12将RTP流呈现到我的Android设备上.

I'm using LibVLC library 2.1.12 to render an RTP stream to my Android device.

我正在使用以下SDP描述来请求将RTP/AV数据包传递到给定的IP地址和端口(192.168.0.33,端口:65446)

I'm using the following SDP description to request RTP/AV packets to be delivered to the given IP address and port (192.168.0.33, port: 65446)

v=0
o=- 1537446049254 1537446050285 IN IP4 192.168.0.33
s=-
c=IN IP4 192.168.0.33
t=0 0
a=recvonly
m=video 65446 RTP/AVP 97
a=rtpmap:97 H264/90000
a=fmtp:97 profile-level-id=42e01e;packetization-mode=1

在我的服务器(android)上,我可以看到传入的RTP数据包.

On my server (android), I can see the incoming RTP packets.

以下代码:

private void preparePlayer(ParcelFileDescriptor pfd, VideoStream stream) {
    Media media = new Media(videoView.getVlc(), Uri.parse("rtp://@:" + stream.getLocalPort()));
    media.addOption(":network-caching=5000");
    media.addOption(":clock-jitter=0");
    media.addOption(":clock-synchro=0");
    media.addOption(":codec=all");
    media.addOption(":sout-rtp-description=" + stream.getReceiver().getSessionDescription());
}

当我尝试向流提供LibVLC时,我在日志中收到以下信息:

When I try to provde LibVLC with the stream, I receive the following information in my logs:

core input: `rtp://@:65446' successfully opened
rtp demux: unspecified payload format (type 97)
rtp demux: A valid SDP is needed to parse this RTP stream.
core demux: SDP required
core demux: A description in SDP format is required to receive the RTP 
stream. Note that rtp:// URIs cannot work with dynamic RTP payload 
format (97).
rtp demux: added RTP source (58a1ef57)
rtp demux: unknown payload (97)

  1. 如何将SDP格式的描述提供给LibVLC(在Android上)?
  2. 还有另一种方法可以将原始流数据包提供给LibVLC VideoView吗?

推荐答案

-sout-rtp-sdp =< string>

更多信息,请访问 https://wiki.videolan.org/VLC_command-line_help/

我正在使用LibVLC库2.1.12

I'm using LibVLC library 2.1.12

您使用哪个包装器?我强烈建议您升级到libvlc 3 +

Which wrapper are you using? I strongly advise you to upgrade to libvlc 3+

这篇关于以SDP格式提供对RTP流的描述的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆