In this repository, I share a python class that you can use to show and save camera streaming or video frames in a simple way.
webcam(src=0, width=640, height=480, fps=30.0, vid_name = 'output.avi')
1- Make an object of teh class. for example: camera = webcam()
2- camera.show_webcam()
2-camera.save_video()