title: opencv fails to capture video from ip axis camera in C++ but works in Python
body: <p>I can't open the video camera in C++ using Qt but I'm able to in Python for an axis camera.  It's able to display the video in Python</p>
  
  <p>I was able to open a webcam and have it display video using VidoCapture cap(0);  I've tried using the same url from the database in Python and it worked in python.  Then I hard code the same rtsp url in C++ but it failed to even open the ip camera for video capture.  I've tried replacing rtsp to http but still didn't work.  I've tried putting ipAddress:port# but that didn't work either.  Also, I've tried playing a .mp4 video file, but that didn't work either using VideoCapture cap("/____/_____/_____.mp4");  Furthermore, I have tried putting my rtsp address in the browser and in VLC player and it streamed fine for both of those but not in the C++ program.</p>
  
  <p>Python:</p>
  
  <pre><code>    url = None        
      url = channel.url
      print('channel.url: ' + url)
      vs = cv2.VideoCapture(url)
  
      print("camera " + str(url) + " is opened : " + str(vs.isOpened()))
  </code></pre>
  
  <p>Output: 
  camera rtsp://username:password@xxx.xxx.x.xx/axis-media/media.amp is opened : True</p>
  
  <p>C++</p>
  
  <pre><code>    VideoCapture cap("rtsp://username:password@xxx.xxx.x.xx/axis-media/media.amp");
  
      if(!cap.isOpened())  // check if we succeeded
          qDebug() &lt;&lt; "Failed to video capture";
      else
          qDebug() &lt;&lt; "able to open camera";
  </code></pre>
  
  <p>Output:
  Failed to video capture</p>
  
  <p>I'm trying to to get to output "able to open camera" in c++. Then have it display the video of the ip camera.  I believe I have the rest of the code for that because I got it to display with the web camera.</p>