Saving a Video with OpenCV from webcam without showing video on monitor

asked 2020-09-16 10:31:25 -0500

Sydney gravatar image

I have a video reader and writer that is from this tutorial. I would like to be able to save the video without imshow() because when the camera is running there will not be a monitor attached to the computer. When I run the code with imshow commented out it does not save the video. The file that is "saves" to says "this file contains no playable streams. When I run the code with imshow() not commented out it works perfectly. Any suggestions on how to save a video input from a camera when there is not a monitor to use imshow with?

edit retag flag offensive close merge delete

Comments

Saving video is not depend on the imshow function.I think you have an other issue. Can you give us more information about your project ? let us see your code if it is possible. You can check somethings in your code : 1-Make sure writer has same dimention with the input frame. 2-What is your using video codec ?

Naser gravatar imageNaser ( 2020-09-17 10:03:17 -0500 )edit

Yeah, please post your code on GitHub here..

sjhalayka gravatar imagesjhalayka ( 2020-09-17 21:13:20 -0500 )edit