title: Why does the Lagarith Lossless Video Codec (LAGS) not work on Python?
body: <p>I am trying to save 2 videos from my laptop camera with the same size and pixel values of the frames, using <b>OpenCV</b> with Python.
  I'm changing the RGB values of some pixels in frames in the second video.
  I want to save the videos <b>without</b> any difference between them, except the pixels that i change, but when i use <b>cv2.VideoWriter</b> there is a fourcc codec that compresses the videos and i am failing my project, because i want to 
  retrieve the changed information in the pixels later. The videos go different size and different pixels values.
  For example with the following code i recorded a one second video and save it twice (the second video is with changed pixels).</p>
  
  <pre><code>import cv2
  from numpy import *
  # Create a VideoCapture object
  cap = cv2.VideoCapture(0)
  
  # Check if camera opened successfully
  if (cap.isOpened() == False): 
    print("Unable to read camera feed")
  
  # Get the default resolution.
  frame_width = int(cap.get(3))
  frame_height = int(cap.get(4))
  
  out = cv2.VideoWriter('outpy.avi',cv2.VideoWriter_fourcc(*"XVID"), 25, (frame_width,frame_height))
  out2 = cv2.VideoWriter('outpy2.avi',cv2.VideoWriter_fourcc(*"XVID"), 25, (frame_width,frame_height))
  while(True):
    ret, frame = cap.read()
    if ret == True: 
  
      # changing the BGR values 
      out.write(frame)
      frame[1,1,0] = 255
      frame[1,1,1] = 255
      frame[1,1,2] = 255
      out2.write(frame)
  
      # Display the resulting frame    
      cv2.imshow('frame',frame)
  
      # Press Q on keyboard to stop recording
      if cv2.waitKey(1) &amp; 0xFF == ord('q'):
        break
  
    # Break the loop
    else:
      break 
  
  # When everything done, release the video capture and video write objects
  cap.release()
  out.release()
  out2.release()
  # Closes all the frames
  cv2.destroyAllWindows() 
  </code></pre>
  
  <p>The size of the first video is <i>314 120 bytes</i> and the second one is <i>314 452 bytes</i>, also the values of the frame pixels in the videos are different.
  So i tried to use " Lagarith Lossless Video Codec " to avoid the compression like: <code>out=cv2.VideoWriter('outpy.avi',cv2.VideoWriter_fourcc(*"LAGS"), 25, (frame_width,frame_height))</code>, but i receive an error:<b> Could not find encoder for codec id 146: Encoder not found.</b>
  After this I tried to download the LAGS codec from : <a href="https://lags.leetcode.net/codec.html" rel="nofollow noreferrer">https://lags.leetcode.net/codec.html</a> with the first link, i installed the codec and i got the same error. I dont know where the problem is.
  If i'm not wrong, my problem is because of the compression with the fourcc codec. Is the LAGS codec a solution and if it's not, please suggest a method to solve it.</p>