I have a script that record the webcam in the background using python, but I want to save the clip to a specific directory, I was wondering if there's any way that I could do that

```
import cv2

cam = cv2.VideoCapture(0) # Começa a gravar
out = cv2.VideoWriter('Teste.avi', -1, 20.0, (640, 480))

if cam.isOpened(): # Camera on ou não
    op, frame = cam.read()
else:
    op = False

while op:

    if cv2.waitKey(1) == ord('x'): # Para o programa
        break

cam.release()

```