title: OpenCV does not save videos
body: <p>The below code is supposed to capture a video and save it.</p>
  
  <pre><code>import cv2
  import numpy as np
  from skimage.filters import gaussian
  
  capture = cv2.VideoCapture(0)
  fourcc = cv2.VideoWriter_fourcc(*'XVID')
  out = cv2.VideoWriter('My video.avi', fourcc, 10, (640,480))
  
  while capture.isOpened:
      ret, frame = capture.read()
  
      if ret==True:
          frame = gaussian(frame, sigma=5, multichannel=True)
  
          out.write(frame)
          cv2.imshow('My video', frame)
  
      if cv2.waitKey(1) == 27:
          break
  
  capture.release()
  out.release()
  cv2.destroyAllWindows()
  </code></pre>
  
  <p>However, I get the following error: </p>
  
  <p><code>error: OpenCV(3.4.3) D:\Build\OpenCV\opencv-3.4.3\modules\videoio\src\cap_ffmpeg.cpp:296: error: (-215:Assertion failed) image.depth() == CV_8U in function 'cv::`anonymous-namespace'::CvVideoWriter_FFMPEG_proxy::write'</code></p>
  
  <p>If I remove the gaussian blur, the code works. What is wrong?</p>