使用 VLC 播放 RTP [英] Playing RTP using VLC

查看:172
本文介绍了使用 VLC 播放 RTP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前有一个 Android 应用程序,它正在从相机捕获视频并通过 RTP 进行流式传输.我不使用 RTSP.

I currently have an Android application that is capturing video from the camera and streaming it over RTP. I do not use RTSP.

我创建了一个 SDP 文件来描述 RTP 源.我可以在 Quicktime 7 中打开 SDP 文件并且可以看到流,尝试在 VLC 中打开 SDP 文件不起作用.我收到以下错误:

I have created a SDP file that describes the RTP feed. I can open the SDP file in Quicktime 7 and can see the stream, attempting to open the SDP file in VLC does not work. I get the following error:

live555 demux 错误:10 秒内没有收到数据,正在中止

live555 demux error: no data received in 10s, aborting

我正在使用 Wireshark 监控 RTP 数据包,并且可以看到网络上的数据包(参见下面的示例):

I am monitoring the RTP packets using Wireshark and can see the packets on the network (see example below):

281956  2545.589171000  10.0.1.25   10.0.1.150  UDP 1442    Source port: 54405  Destination port: 51372

Quicktime 7 绑定到 SDP 中的目标端口并播放流似乎没有问题,但我在尝试使用 VLC 时看到以下 ICMP 数据包:

Quicktime 7 does not seem to have a problem binding to the destination port in the SDP and playing the stream but I see the following ICMP packet when attempting to use VLC:

286674  2925.162140000  10.0.1.150  10.0.1.25   ICMP    70  Destination unreachable (Port unreachable)

我的 SDP 文件包含:

My SDP file contains:

v=0
o=- 1360349812962 1360349812962 IN IP4 10.0.1.25
s=Unnamed
i=N/A
c=IN IP4 10.0.1.150
t=0 0
a=recvonly
m=video 51372 RTP/AVP 96
b=RR:0
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=42c01e;sprop-parameter sets=Z0LAHukBQHsg,aM4G4g==;

我需要做什么才能让流在 VLC 中播放?我试过在启动 VLC 时使用参数--rtp-client-port=51326",但似乎没有什么区别.

What do I need to do to get the stream to play in VLC? I've tried using the argument '--rtp-client-port=51326' when starting VLC but it does not seem to make a difference.

更新 1

看来 VLC(至少是我使用它的方式)不使用您在 SDP 中指定的客户端端口,它总是分配它自己的端口,它期望 RTP 数据包在其上传递.我改变了我的方法,允许我从 VLC 捕获端口并使用该端口作为目的地启动我的 RTP 馈送,并且它工作正常.这不是一个理想的解决方案.

It appears that VLC (at least the way I'm using it) does not use the client port you specify in the SDP, it always assigns it own port that it expects the RTP packets to be delivered on. I changed my approach to allow me to capture the port from VLC and start my RTP feed using that port as the destination and it worked. This is not an ideal solution.

有谁知道如何让VLC使用SDP文件中的目的端口?

Does any one know how to get VLC to use the destination port in the SDP file?

推荐答案

VLC 将下面参数中提到的端口 (51372) 作为目标端口.

VLC takes the port mentioned in the below parameter (51372) as destination port.

m=视频 51372 RTP/AVP 96

m=video 51372 RTP/AVP 96

我已经尝试过音频捕获.

I have tried it with Audio capture.

您应该只需要使用此 SDP 配置播放没有任何参数的 sdp 文件.

You should just need to play that sdp file without any parameter with this SDP configuration.

这篇关于使用 VLC 播放 RTP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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