title: How to output x265 compressed video with cv2.VideoWriter
body: <p>I'm doing some rendering on a 45-min 1.2GB video 80,0000 frames of size 1344x756 each and the video is in the mp4 format, I'm trying to output a video with x265 compression the problem is when I'm using cv2.VideoWriter the output size for 10 minutes of the video exceeds 2GB which is not what I'm intending to end up with so I tried the following on mac osx and ubuntu 18:</p>
  
  <pre><code>codec = cv2.VideoWriter_fourcc(*'HEVC')
  out = cv2.VideoWriter('output.mp4', 'HEVC', fps, (width, height))
  </code></pre>
  
  <p>All I'm getting is runtime warnings:</p>
  
  <pre><code>OpenCV: FFMPEG: tag 0x43564548/'HEVC' is not found (format 'mp4 / MP4 (MPEG-4 Part 14)')'
  </code></pre>
  
  <p>What I'm trying to achieve is not necessarily the highest quality output but should be a good quality and the lowest size possible.</p>