Is it Important to match the codec with the camera quality and extension of file? [closed]

asked 2018-02-19 06:36:58 -0600

ShirishRanoji gravatar image

I have used following line of code to the video writer CvVideoWriter* writer = cvCreateVideoWriter("D:\Cam.avi",CV_FOURCC('M','J','P','G'),10,size,1); I dont know whether that codec supports .avi file nor I know my camera has capabibility of producing that quality

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by berak
close date 2018-02-20 04:17:27.464304

Comments

supra56 gravatar imagesupra56 ( 2018-02-19 08:47:45 -0600 )edit

first: please use cv::VideoWriter, not CvVideoWriter*

berak gravatar imageberak ( 2018-02-20 02:32:54 -0600 )edit

The syntax is correct no errors for the line.I tried with your line also and found no errors.

ShirishRanoji gravatar imageShirishRanoji ( 2018-02-20 04:14:55 -0600 )edit

the c-api got deprecated in 2010, and it will force you using vfw on win. don't use that !

berak gravatar imageberak ( 2018-02-20 04:16:50 -0600 )edit