Writing an mp4 video using python opencv

前端 未结 10 682
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:37

    fourcc = cv2.VideoWriter_fourcc(*'mp4v')

    'mp4v' returns no errors unlike 'MP4V' which is defined inside fourcc

    for the error "OpenCV: FFMPEG: tag 0x5634504d/'MP4V' is not supported with codec id 13 and format 'mp4 / MP4 (MPEG-4 Part 14)' OpenCV: FFMPEG: fallback to use tag 0x00000020/' ???'"

提交回复
热议问题