MATLAB: Automatically selecting video and extracting frames

image processingvideo processing

i just have .avi video files from 12 am to 6 pm (day) with 5 min intervals, how can i select automatically videos of 12am, 4pm and 6pm, and extracting frames from each video?I know how to extract frame but can not automatically do for my problem. all video sorted with time sequence.
Related Question