live555工程中testprogs作为一个简单的rtsp客户端,默认采用udp进行音视频数据的传输,

如果需要使用tcp进行数据的传输,可以进行如下代码的修改:

testRTSPClient.cpp文件#define REQUEST_STREAMING_OVER_TCP True即可



源代码

// By default, we request that the server stream its data using RTP/UDP.

// If, instead, you want to request that the server stream via RTP-over-TCP, 

//change the following to True:


#define REQUEST_STREAMING_OVER_TCP True


VLC默认播放TCP音视频流设置如下:

去复用器>RTP/RTSP>