# On the Feasibility of Wireless Multimedia Sensor Networks over IEEE 802.15.5 Mesh Topologies
## 3 Technological Background
### H.264 Video Encoding  
As already stated, the transmission of video in low-power WSNs is challenging due to their inherent constraints. The transmission of large amounts of data poses additional problems such as contention for medium access, which increases jitter and further decreases throughput. It is clear that in order to cope with these restrictions video compression is needed. As an example, a typical QCIF sequence (176 \(\times\) 144 pixels) at 30 frames per second requires almost 6 Mbps to be transmitted uncompressed via streaming. However, the nominal transmission rate of IEEE 802.15.4-compliant devices, such as MICAz [7] or TelosB [24], is 250 kbps when operating in the 2.4 GHz ISM band.  
H.264 [25], also known as MPEG-4 Part 10 or MPEG-4 Advanced Video Coding (AVC), is one of the most popular standards for video encoding. It is about 1.5 to 2 times more efficient than MPEG-4 (Part 2) encoding, resulting in smaller compressed files. This is crucial for WMSNs, which are severely constrained by the transmission rate and energy consumption of nodes. The main benefit arising from the use of H.264 in WMSNs is the reduction in the number of data messages necessary for transmitting a video frame. This further helps reduce the network congestion and prolong the nodes lifetime. As a drawback, H.264 encoding requires more energy at the source node. However, according to [26], the use of H.264 results in a better lifetime in networks with at least five hops between the sensor nodes and the data sink and also in smaller networks with more complex video contents or more stringent video quality requirements. A more detailed study about energy spent in video encoding can be found in [27].  
Several encoding parameters used by H.264 (GOP size, Quantization Parameter and CRF mode), which will be referred to subsequently, are described next.  
The Group of Pictures (GOP) structure specifies the order in which different types of frames are arranged in inter-frame encoding techniques. H.264 uses three different types of frames:  
* I-frames (intra-coded frames). I-frames are encoded independently of all other frames. They are the largest frames and provide the best quality, but they are also the least efficient from a compression perspective.
* P-frames (predictive-coded frames). P-frames reference redundant information contained in previous frames (I or P frames). Therefore, they contain a lesser amount of information.
* B-frames (bidirectional predictive-coded frames). B-frames can reference both previous and future frames. From a compression perspective, they are the most efficient frames.  
Encoders usually require the GOP size as a parameter, which is the number of frames in a GOP structure. Since a GOP only contains an I-frame at the beginning of the structure, this parameter sets the separation between two I-frames.  
For each frame, the Quantization Parameter (QP) regulates how much spatial detail is saved or discarded. In this paper, rather than using a fixed QP for each frame, the Constant Rate Factor (CRF) mode is used instead. With this mode, the encoder tries to achieve a constant perceptual quality level for all frames by adjusting the QP according to the characteristics of each frame. That is, it uses higher compression rates for frames with high motion, as the loss of detail is harder to notice in moving objects. A CRF parameter, ranging from 0 to 51, is defined to control the desired quality of the video, where lower values result in better quality and higher values in more compressed video sequences.  
In this work, the value of the CRF has been set to 24 since this offers a balance between video quality and compression. In Table 2 different metrics are compared for CRF values of 10 and 24 using the same video sequence. It can be observed that a value of 24 decreases the bitrate of the compressed video and, consequently, the transmission time over a 6 \(\times\) 6 grid mesh network. The drop in quality of the video is very small, as can be observed by comparing Figure 1.