This paper investigates a video compression algorithm for wireless video sensor networks (WVSNs). The main features of the algorithm are to use the edges of objects in the frames and arithmetic coding to find and compress motion regions. Based on the algorithm, we propose a scheme that balances energy consumption among nodes in a cluster on a WVSN. In the proposed scheme, we try to share the compression tasks for nodes along the path from a source node to a cluster head while considering their residual energy. To improve the quality of decoded video, we use a lapped biorthogonal transform (LBT), an extended version of the discrete cosine transform (DCT), for intra-frames. Besides, we apply the run length encoding (RLE) before arithmetic coding so that the proposed algorithm increases compression efficiency. Our results show that the proposed scheme not only balances energy consumption of network by coordinating of the processing tasks but also increases the quality of decoded video.