需求
VLC2.2.4对接定制的流媒体服务器,流媒体服务器提供RTSP服务
知识准备
通过命令行打开,进入VLC可执行程序目录:vlc.exe --extraintf=http:logger --verbose=2 --file-logging --logfile=vlc-log.txt
输入URL,可以看到RTSP的交互过程,当前目录下生成日志文件vlc-log.txt
1)VLC连接十秒之后断开
打开调试信息,如下:
core debug: no meta reader modules matched
core debug: `rtsp://192.168.58.173:554/channel=1/trackID=video' successfully opened
live555 error: no data received in 10s, aborting 提示接收数据失败
core debug: EOF reached
core debug: finished input
core debug: removing module "avcodec"
avcodec debug: ffmpeg codec (H264 - MPEG-4 AVC (part 10)) stopped
原因
DESCRIBE指令里面,除了视频的SDP,还提供了音频的SDP,实际上目前流媒体只是支持了视频,通过屏蔽音频解决问题
x << "v=0\r\n";
x << "o=- 1109162014219182 0 IN IP4 0.0.0.