第一人称简易的人物控制器,控制移动,视角旋转
Dì yīrénchēng jiǎnyì de rénwù kòngzhì qì, kòngzhì yídòng, shìjiǎo xuánzhuǎn
22/5000
The first-person simple character controller controls the movement and rotation of the angle of view
如下所示:
1、计算总帧数
import os
import cv2
video_cap = cv2.VideoCapture('ffmpeg_test.avi')
frame_count = 0
all_frames = []
while(True):
ret, frame = video_cap.read()
if ret is False:
break
all_frames.append(frame)
frame_count = frame_count + 1
# The value below are both the number of frames
pri