Ask Your Question

tester's profile - activity

2020-11-10 20:02:04 -0600 edited question Can't save video

Can't save video Hi, I want to object detect and save the video, but I can't. If there is no this line x, y, width, he

2020-11-10 20:01:30 -0600 asked a question Can't save video

Can't save video Hi, I want to object detect and save the video, but I can't. If there is no this line x, y, width, he

2020-08-18 19:01:00 -0600 received badge  Enthusiast
2020-08-14 03:23:28 -0600 commented answer cv.findContours is connecting unconnected regions

Is there any way to fill in the empty space?

2020-08-14 00:18:19 -0600 commented answer cv.findContours is connecting unconnected regions

can i get this code in python?

2020-07-24 04:04:51 -0600 commented answer How to save video using thread

Thank you very much for letting me know about the thread. But the result is still same, Only files are created and nothi

2020-07-24 04:04:40 -0600 commented answer How to save video using thread

Thank you very much for letting me know about the thread. But the result is still same, Only files are created and nothi

2020-07-24 00:58:33 -0600 edited question How to save video using thread

How do I save a video in thread I am making a program that takes a video for 10 seconds when an object is detected. If

2020-07-24 00:57:53 -0600 edited question How to save video using thread

How do I save a video in thread I am making a program that takes a video for 10 seconds when an object is detected. If

2020-07-24 00:57:51 -0600 edited question How to save video using thread

How do I save a video in thread I am making a program that takes a video for 10 seconds when an object is detected. If

2020-07-24 00:38:50 -0600 edited question How to save video using thread

How do I save a video in thread I am making a program that takes a video for 10 seconds when an object is detected. If

2020-07-24 00:37:41 -0600 edited question How to save video using thread

How do I save a video in thread I am making a program that takes a video when an object is detected. If 'out' is create

2020-07-24 00:35:42 -0600 received badge  Organizer (source)
2020-07-24 00:33:57 -0600 received badge  Editor (source)
2020-07-24 00:33:57 -0600 edited question How to save video using thread

How do I save a video in thread I am making a program that takes a video when an object is detected. If 'out' is create

2020-07-24 00:30:43 -0600 asked a question How to save video using thread

How do I save a video in thread I am making a program that takes a video when an object is detected. If 'out' is create

2020-07-23 19:58:06 -0600 received badge  Supporter (source)
2020-07-23 03:57:35 -0600 received badge  Student (source)
2020-07-23 03:47:15 -0600 marked best answer How do I save a video multiple times in python

I am trying to save the video many times If I use first writer then it save video only one time in this code And use this code then it doesn't save the video

import cv2
import time

cap = cv2.VideoCapture("rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov")

width = int(cap.get(3))
height = int(cap.get(4))
fcc = cv2.VideoWriter_fourcc(*'XVID')
writer = cv2.VideoWriter('test.avi', fcc, 60.0, (width, height))
recording = False

while(1):
    ret, frame = cap.read()
    hms = time.strftime('%H:%M:%S', time.localtime())

    cv2.putText(frame, str(hms), (0, 15), cv2.FONT_HERSHEY_SIMPLEX,0.5,(0,255,255))

    cv2.imshow('frame', frame)

    k = cv2.waitKey(30) & 0xff
    if k == ord('r'):
        path = 'test_' + str(hms) + '.avi'
        writer = cv2.VideoWriter(path, fcc, 60.0, (width, height))            

    if recording:
        writer.write(frame)

    if k == ord('e'):
        print('record end')
        writer.release()

cap.release()
cv2.destroyAllWindows()
2020-07-23 03:47:15 -0600 received badge  Scholar (source)
2020-07-23 03:46:20 -0600 commented answer How do I save a video multiple times in python

I solved the problem with this code. Thanks!

2020-07-23 03:44:35 -0600 commented answer How do I save a video multiple times in python

It was my stupid mistake. Since I was only concerned about the file not being created, I didn't see it easy. Thanks

2020-07-23 02:56:43 -0600 asked a question How do I save a video multiple times in python

How do I save a video multiple times in python I am trying to save the video many times If I use first writer then it sa

2020-07-23 02:56:09 -0600 asked a question How do I save a video multiple times in python

How do I save a video multiple times in python I am trying to save the video many times If I use first writer then it sa