Photo by Waldemar Brandt on Unsplash
import cv2cap = cv2.VideoCapture(0)
fourcc = cv2.VideoWriter_fourcc(*'XVID')
w = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH))
h = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))
out = cv2.VideoWriter('output.mp4', fourcc, 20.0, (w,h))

ret, frame =
if ret:
out.write(cv2.cvtColor(frame, cv2.COLOR_BGR2RGB))
if cv2.waitKey(1) & 0xFF == ord('q'):

Photo by Lili Popper on Unsplash

Step 1 of 2: Add an <input> element to index.html

// index.html...
<input type="file" id="file-input">

Step 2 of 2: Add a change handler for the <input> element in index.js

// index.js...
document.getElementById('file-input').addEventListener('change', function() {
Image by Free-Photos from Pixabay
  • f: to fit the model to the screen. If you find your view far away from your model, f (fit to screen) is your friend.
  • Ctrl+7: Isometric view
  • Ctrl+8: Normal to surface
  • Mouse Wheel Click+Drag (or middle mouse click+drag): Rotate
  • Mouse Wheel Scroll Up: Zoom out. The location of the cursor determines the focal point of the zoom
  • Mouse Wheel Scroll Down: Zoom in
  • Ctrl+Mouse Wheel Click: Pan
  • Right Mouse Click+Drag (on component in assembly): Rotate component, obeying existing constraints

Joel Masters

Creator of Help others achieve their goals. Get paid.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store