All the VM surrogates are provisioned from Amazon EC2
web services and tracked by the gateway. We create our
own AMI (ami-b6f220df) based on Linux kernel 2.6.35.14,
the default image Amazon provides [27]. Due to the intensive
computation involved, we propose to implement all the
video processing related tasks using ANSI C, to guarantee
the performance. In particular, we install FFmpeg together
with libavcodec as the groundsill library [29] to develop the
transcoding, segmentation and reshaping modules on the VM
surrogates.We have also installed a Tomcat web server (version
6.5) to serve as a Servlet container and a file server on each
surrogate. Both FFmpeg and Tomcat are open source projects.
Once a VM surrogate receives a video subscription request
from the user, it downloads the video from the source URL, and
processes the video stream by transcoding and segmentation,
based on the collected device configurations by the portal.
For example, in our experiments, the downloaded stream is
transcoded into a high-quality stream and a low-quality stream in real time with H264/AAC codecs. The high-quality stream
has a “480 272” resolution with 24 frames per second,
while the low-quality one has a “240 136” resolution with
10 frames per second. A mobile user dynamically requests
segments of these two different video streams, according to his
current network connection speed. The transcoded stream is
further exported to an MPEG-2 transporting stream (.ts), which
is segmented for burst transmission to the user. The burst sizes
depend on both the network bandwidth and video bit rate. We
evaluate the impact of different burst sizes on the streaming
quality and energy consumption in details in Section V. Fig. 5
shows the streaming architecture in our customized VM image.
Here, the modules on social message exchanges are omitted,
which will be presented in Fig. 6.