In this paper, a novel shot boundary detection algorithm is proposed that operates completely in the compressed domain using macroblock type information. While the proposed algorithm can save a lot of computation cost, extensive experiments support that the proposed algorithm also achieves superior performances. Such technique will provide a range of useful applications for on-line video content analysis, processing, and management. Experimental results show that the proposed shot boundary detection algorithm achieve a high recall, precision and F measure.