title: How to process VLC UDP stream over OpenCV
body: <p>I was able to receive/view UDP h264 packets through VLC command line (i.e. VLC --network-caching 0 --demux h264 udp://...)</p>
  
  <p>I am planning on processing those frames through OpenCV algorithms. However, I can't seem to find a way to send the VLC frames over to my Python OpenCV script.</p>
  
  <p>Is it possible to pipe VLC stream output to be processed through Numpy in a separate script?</p>
  
  <p>I have previously tried directly streaming to OpenCV by using its VideoCapture function, but for some reason, the video stalls and stops at a distorted black image. For now, it seems like incorporating VLC is the only solution (even though I am not totally sure why VLC works over other methods).</p>
  
  <p>Thank you.</p>
  
  <p>EDIT:</p>
  
  <p>The following is a snippet of the error message on the terminal. It seems like there are problems with the first few frames, but I don't know why the stream works on VLC. From the client, I first sent a default key frame data, and then sent video feed h264 data.</p>
  
  <pre><code>[h264 @ 0x7f9c50020200] top block unavailable for requested intra mode -1
  [h264 @ 0x7f9c50020200] error while decoding MB 7 0, bytestream 7208
  [h264 @ 0x7f9c50020200] top block unavailable for requested intra mode -1
  [h264 @ 0x7f9c50020200] error while decoding MB 8 9, bytestream 7381
  </code></pre>