title: Python OpenCV cap.read() unpacks compressed frames?
body: <p>Hello Stack community,</p>
  
  <p>I'm reading frames from an IP-camera stream and storing them in a list to later on create a video file.
  I'm using the python OpenCV library and it works well but ..
  The frames that are sent from the IP camera should have a h264 compression but when i check the size of the frames they are 25 MB for a 4K stream. I run out of memory quickly. 
  This is <strong>not</strong> the code, but similar to it:</p>
  
  <pre><code>import cv2
  
  cap = cv2.VideoCapture(0)
  list = []
  
  while(cap.isOpened()):
      ret, frame = cap.read()
      if ret==True:
          frame = cv2.flip(frame,0)
          list.append(frame)
  
  cap.release()
  
  out = cv2.VideoWriter('output.avi', -1, 20.0, (640,480))
  for frm in list:
      out.write(frm)
  out.release()
  
  cv2.destroyAllWindows()
  </code></pre>
  
  <p>It seems like <code>ret, frame = cap.read()</code> unpacks the frame ?
  This generates extra processing each loop and is uneccessary for my intentions with the script, is there a way to retrieve frames without unpacking them ?</p>
  
  <p>Sorry in advance for my probable ignorance.</p>