我想解决的整体问题是我想知道videoA是否是videoB的一个子集。因此,如果videoA是2秒剪辑而videoB是40秒,那么那些40秒内会发生这两秒。要做到这一点,我正在使用VideoCapture读取视频文件,并将我视频的每一帧保存在字典中。但在阅读视频时,我看到了这一点:
Videos/viper_SpineyBitterGoatOhMyDog.mp4
Videos/tsm_theoddone_CoyThirstyAlmondDoggo.mp4
Videos/wingsofdeath_HelplessOilyYogurtGOWSkull.mp4
Videos/rinnieriot_AbstruseEnjoyableOkapiCopyThis.mp4
Videos/imls_UnusualHelplessDogFloof.mp4
Videos/4.mp4
Videos/solorenektononly_LaconicFamousEggplantTwitchRaid.mp4
Videos/gripex90_CheerfulNeighborlyJayTheThing.mp4
Videos/tarzaned_GrossFlirtyMooseFutureMan.mp4
Videos/imaqtpie_LightPleasantPhoneSquadGoals.mp4
Killed: 9
from moviepy.editor import *
import imageio
import json
from moviepy.video.io.VideoFileClip import VideoFileClip
import random
import cv2
import os
import threading
from skimage.measure import compare_ssim
import argparse
import imutils
start = datetime.datetime.now()
videoPaths = self.getListOfDownloadedVideos()
videosByFrame = {}
for path in videoPaths:
print path
images = []
vidcap = cv2.VideoCapture(path)
success = True
while success:
#print "Before READ"
success,image = vidcap.read()
#print "After READ"
images.append(image)
videosByFrame[path] = images
cv2.destroyAllWindows()
vidcap.release()
vidcap.read()中有什么东西会导致它杀死我的python脚本吗?