Rate shaping plays an important role in transmitting compressed video on a network with dynamic bandwidth. In this paper, we present a scheme for rate shaping JPEG/MPEG-precompressed image/video with feature analysis in scale space. The proposed scheme draws its strengths from a technique for identifying perceptually important features based on geometry-driven di usion, an interpolation scheme allowing many intentionally dropped blocks to be recovered faithfully from neighboring transmitted blocks, and some careful observations about the close interactions between block dropping and feature analysis. Compared with a successful rate shaping scheme based on joint block dropping and uniform coe cient truncation, the new scheme not only produces images of signi cantly higher visual quality, but also better PSNR at low bit rates.