VLC 播放RTSP流媒體失敗排查過程

背景

            VLC2.2.4對接定製的流媒體服務器,流媒體服務器提供RTSP服務


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.0\r\n";
  x << "s=Media Server V1.0.1\r\n";
  x << "i=Media Server Session Description : standard\r\n";
  x << "e=NONE\r\n";
  x << "c=IN IP4 0.0.0.0\r\n";
  x << "t=0 0\r\n";
  x << "a=control:*\r\n";
  x << "b=AS:4106\r\n";
  x << "a=range:npt=now-\r\n";
  x << "m=video 0 RTP/AVP 96\r\n";
  x << "i=Video Media\r\n";
  x << "a=rtpmap:96 H264/90000\r\n";
  x << "a=fmtp:96 profile-level-id=4D0014;packetization-mode=0;sprop-parameter-sets=Z2QAH6wsaoFAFum4CAgIEAA=,aO48sAA=\r\n";
  x << "a=control:trackID=video\r\n";
//   x << "b=AS:4096\r\n";
//   x << "m=audio 0 RTP/AVP 8\r\n";
//   x << "i=Audio Media\r\n";
//   x << "a=rtpmap:8 PCMA/8000\r\n";
//   x << "a=control:trackID=audio\r\n";
//   x << "b=AS:10\r\n";
  x << "a=Media_header:MEDIAINFO=494D4B48020100000400000111710110401F000000FA000000000000000000000000000000000000;\r\n";
  x << "a=appversion:1.0\r\n";

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章