Spatiotemporal modeling and matching of video shots