Writing an mp4 video using python opencv

前端 未结 10 683
Happy的楠姐
Happy的楠姐 2021-01-31 07:44

I want to capture video from a webcam and save it to an mp4 file using opencv. I found example code on stackoverflow (below) that works great. The only hitch is that I\'m trying

10条回答
  •  盖世英雄少女心
    2021-01-31 08:35

    just change the codec to "DIVX". This codec works with all formats.

    fourcc = cv2.VideoWriter_fourcc(*'DIVX')
    

    i hope this works for you!

提交回复
热议问题