title: Got a nil frame using opencv invoked by gocv
body: <p>I am using <strong>opencv</strong> called from <strong>gocv</strong> to read a video via url which is a http request, and the http response body returns the video whose type is byte array. There is no problems in video file. I could get the video's fps and the totol frames number, but when I try to read the <strong>first frame</strong> or <strong>second frame</strong>, in return, I get a unexpected <strong>nil</strong>。</p>
  
  <p>but when I read the video from a given local file path, I can read the sencond frame as expected.</p>
  
  <p>I am using c++ function to call this interface，however, the c++ function returns <strong>nil</strong> too. So could I just say that the videocaputure is not supported via a url? </p>
  
  <pre class="lang-golang prettyprint-override"><code>url := "http://localhost:8080/video"
  
  vc, err := gocv.OpenVideoCapture(url)
  
  if nil != err {
      log.Fatal("open video capture failed: ", err)
  }
  defer vc.Close()
  
  if !vc.IsOpened() {
      log.Fatal("vc is not open")
  }
  frames := 2
  vc.Set(gocv.VideoCapturePosFrames, float64(frames))
  frame := gocv.NewMat()
  defer frame.Close()
  
  // when I read video by srcPath, the vc.Read can read the frame
  // when I read video by url, the vc.Read can't read the frame, and the error is the frame is nil
  vc.Read(&amp;frame)
  
  if frame.Empty() {
      log.Fatal("frame is empty")
  }
  </code></pre>
  
  <p>I expect the output is：read the frame success</p>
  
  <p>The output is frame is nil, I can't get the frame</p>
  
  <pre><code>[mov,mp4,m4a,3gp,3g2,mj2 @ 0x19fd880] stream 1, offset 0xf50: partial file
  ...
  ...
  [mov,mp4,m4a,3gp,3g2,mj2 @ 0x26ee880] stream 1, offset 0xf50: partial file
  [mov,mp4,m4a,3gp,3g2,mj2 @ 0x26ee880] stream 1, offset 0xf50: partial file
  [mov,mp4,m4a,3gp,3g2,mj2 @ 0x26ee880] stream 1, offset 0xf50: partial file
  [mov,mp4,m4a,3gp,3g2,mj2 @ 0x26ee880] stream 1, offset 0xf50: partial file
  [mov,mp4,m4a,3gp,3g2,mj2 @ 0x26ee880] stream 1, offset 0xf50: partial file
  [mov,mp4,m4a,3gp,3g2,mj2 @ 0x26ee880] stream 1, offset 0xf50: partial file
  [mov,mp4,m4a,3gp,3g2,mj2 @ 0x26ee880] stream 1, offset 0xf50: partial file
  2019/07/22 17:06:47 testMyVideo.go:37: frame is empty
  exit status 1
  
  
  </code></pre>