保存视频的功能(OpenCV python)

问题描述 投票:0回答:1

没有人知道在openCV中保存视频的任何功能。

最好是可以使用它的功能。

我已经尝试实现,但无法实现

python python-3.x opencv opencv3.0 opencv3.1
1个回答
0
投票

OpenCV具有您可以使用的VideoWriter API。请参见下面的示例代码:

##define the video writer
out = cv2.VideoWriter(<filename_with_extention>,<compression_format>, <frames_per_second>, (frame_width,frame_height)) 

## write a frame in the loop
out.write(<your_frame>)

## Relese the video writer 
out.release()
© www.soinside.com 2019 - 2024. All rights reserved.