vid_writer = cv2.VideoWriter("result.mp4", cv2.VideoWriter_fourcc(*"mp4v"), fps, (int(1920), int(1080)))
导出视频仅1K,原因是我在目标识别过程中把图片宽高改成960x540,所以导出时也要保持一致!
改成:
vid_writer = cv2.VideoWriter("result.mp4", cv2.VideoWriter_fourcc(*"mp4v"), fps, (int(960), int(540)))