New learning algorithms and systems for retrieving similar videos are presented. Each query is a video itself. For each video, a set of exemplars is machine-learned by new algorithms. Two methods were tried. The first and main one is the time-bound affinity propagation. The second is the harmonic competition which approximates the first. In the similar-video retrieval, the number of exemplar frames is variable according to the length and contents of videos. Therefore, each exemplar possesses responsible frames. By considering this property, we give a novel similarity measure which contains the Levenshtein distance (L-distance) as its special case. This new measure, the M-distance, is applicable to both of global and local alignments for exemplars. Experimental results in view of precision-recall curves show creditable scores in the region of interest.