  In this paper, a media distribution model, Active Control in an Intelligent
and Distributed Environment (ACIDE), and solutions are proposed for video and
audio livestreaming in mobile wireless networks. A base station and a cluster
formed by a number of users are the essential components. Inside a cluster,
users can establish peer to peer communications. The users that are members of
a cluster are considered peers. This paper addresses the problem of minimizing
the bandwidth allocated to a cluster of n peers such that a continuous media
play of all the peers is guaranteed. The basic idea is to send the livestream
media in packages. A media package is divided into n blocks. The distribution
of blocks to the peers of a cluster follows a two-phase, multi-step approach.
In phase 1 each peer receives one block with the optimal size from the base
station. In phase 2, peers exchange their media blocks simultaneously in a few
steps. Then the media package can be reconstructed and a live media can be
played continuously. Allocated bandwidth, the amount of bandwidth the base
station has to allocate to this cluster in order to play live streaming media
without interruptions, is a function of many parameters such as the block
sizes, download and upload bandwidth values of peers. This problem is
formulated as an optimization problem. A solution is proposed to find the
optimal block sizes such that the allocated bandwidth is minimized. Both
theoretical model and simulations show that when the number of peers is large,
the optimal allocated bandwidth approaches the lower bound that is the
bandwidth required for multicasting. In other words, the allocated bandwidth
may be reduced n times.
