Shot detection is the most fundamental operation and very important step in content-based video retrieval. After discuss how to retrieval every frame from video data, the sliding window algorithm is adopted to detect both abrupt and gradual shot. At last, a shot detection system is realized based on DirectShow. The experiment results show the abrupt detection is excellent and the gradual shot such as sliding, fade in and fade out, wipe, etc. , can also be detected. As DirectShow is introduced to deal with video, system is universal and has good interface. It can meet requires of content-based multimedia retrieval system.