IP摄像机RTSP缺少MP3头

时间:2015-02-04 02:09:07

标签: c++ opencv rtsp

我只想在没有声音的情况下显示IP摄像机视频,但是这台摄像机播放带声音的视频,我在控制台中显示[mp3 @ 0x107808800] Header missing。如何在没有声音的情况下播放?我正在使用vstarcam-30s。这是我的代码:

int main (int argc, char *argv[]) 
{ 
     VideoCapture vcap; 
     Mat image; 

     string videoStreamAddress =
          "rtsp://[IPADDRESS]/profile2/media.smp";

      if (!vcap.open(videoStreamAddress)) { 
           cout << "Error opening video stream or file" << endl; 
           return -1; 
      } 

 for(;;) { 
      if(!vcap.read(image)) { 
           cout << "No frame" << endl; 
           waitKey(); 
         } 
          imshow("Output Window", image); 
          if(waitKey(1) >= 0) break; 
      } 
     return 0;
}

0 个答案:

没有答案
相关问题