我正在使用LibVLC库2.1.12将RTP流呈现到我的Android设备上。
我正在使用以下SDP描述来请求将RTP / AV数据包传递到给定的IP地址和端口(192.168.0.33,端口: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数据包。
以下代码:
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时,我在日志中收到以下信息:
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)
答案 0 :(得分:3)
--sout-rtp-sdp=<string>
更多信息,https://wiki.videolan.org/VLC_command-line_help/
我正在使用LibVLC库2.1.12
您使用哪个包装器?我强烈建议您升级到libvlc 3 +