MultiUser Cooperative Mobile Video Streaming: Performance Analysis and Online Mechanism Design
Abstract
Adaptive bitrate streaming enables video users to adapt their playing bitrates to the realtime network conditions, hence achieving the desirable qualityofexperience (QoE). In a multiuser wireless scenario, however, existing singleuser based bitrate adaptation methods may fail to provide the desirable QoE, due to lack of consideration of multiuser interactions (such as the multiuser interferences and network congestion). In this work, we propose a novel user cooperation framework based on userprovided networking for multiuser mobile video streaming over wireless cellular networks. The framework enables nearby mobile video users to crowdsource their cellular links and resources for cooperative video streaming. We first analyze the social welfare performance bound of the proposed cooperative streaming system by introducing a virtual timeslotted system. Then, we design a low complexity Lyapunovbased online algorithm, which can be implemented in an online and distributed manner without the complete future and global network information. Numerical results show that the proposed online algorithm achieves an average of the theoretical maximum social welfare. We further conduct experiments with real data traces, to compare our proposed online algorithm with the existing online algorithms in the literature. Experiment results show that our algorithm outperforms the existing algorithms in terms of both the achievable bitrate (with an average gain of ) and social welfare (with an average gain of ).
1 Introduction
1.1 Background and Motivations
Global mobile data traffic is growing at an unprecedented rate, where mobile video streaming contributes most of the data growth. According to Cisco [1], mobile video streaming traffic has accounted for 60% of the global mobile data traffic in 2016, and the percentage is expected to increase to 78% by 2021. Adaptive BitRate (ABR) streaming [2] is a promising technology for video streaming over large distributed HTTP networks (e.g., Internet) and has been adopted by many popular online video streaming systems (e.g., HTTP dynamic streaming of Adobe [3], HTTP live streaming of Apple [4], and smooth streaming of Microsoft [5]). The key idea of ABR is to enable video players to adapt the playing bitrate (corresponding to the quality of video, e.g., resolution) to the realtime network conditions to ensure the desirable qualityofexperience (QoE).
While most of the existing works focused on the bitrate adaptation methods of a single user (e.g., [6, 7]), in this work we consider a more general scenario of multiuser video streaming over wireless cellular networks. In the multiuser wireless scenario, the QoE of each mobile user is affected not only by the stochastic changing of his own network condition (e.g., channel fading), but also by the potential resource competition and interference of other users [8, 17, 18, 19, 9, 13, 14, 15, 16, 10, 11, 12]. Without proper coordination or cooperation among users, such competition and interference may degrade the network performance greatly (e.g., leading to congestion), hence increase the video streaming cost and harm the user QoE. Thus, the existing singleuser based bitrate adaptation methods often fail to provide desirable QoE for video users in the multiuser scenario, due to lack of consideration of multiuser competition and interference.
To this end, in this work we will study the multiuser cooperative video streaming, where (nearby) mobile video users cooperate with each other in both bitrate adapting and video downloading. Namely, each user can download video data for other users using his own cellular link or download his video data through others’ links. In this sense, users aggregate their cellular links and resources for the cooperative video streaming. Figure 1 illustrates such a cooperative streaming model with three users {1, 2, 3}, where user 1 downloads for all three users and user 2 downloads for himself and user 3. Note that user 3 does not have the available cellular link.
There are several realworld scenarios where the multiuser cooperative streaming is useful and helpful. First, the most relevant scenario is UserProvided Networking (UPN) [20, 21], where mobile devices (e.g., 4G smartphones) with abundant cellular link capacities operate as mobile hotspots and provide Internet access to other devices. UPN has been widely studied and implemented today, and some IT and Telecom companies (such as OpenGarden [22], Karma [23], and AT&T [24]) have provided commercial UPN services. The cooperative streaming proposed in this work can enhance the capability of UPN on providing the video streaming service. Another more concrete scenario is Mobile Live Streaming (MLS) [25, 26], with which people can watch live activities of their friends or share their own activities to their friends on their smartphones. MLS becomes popular in recent years with the proliferation of smartphones and 4G cellular networks. Nowadays, many social network companies have provided MLS services, such as IngKee [27], Youtube Live [28], and Facebook Livestream [29]. The cooperative streaming proposed in this work can improve the live streaming quality in MLS.
The key motivation for considering such a cooperative streaming system is the heterogeneity of mobile devices.^{1}^{1}1According to [1], smartphones only account for 38% of the total mobile devices, and a large amount of nonsmartphone mobile devices (e.g., tablets and laptops) still lack stable and alwayson Internet connections, especially in the outdoor environment. Our proposed system can help these devices connect to the Internet via the links of nearby smartphones. Furthermore, even for the smartphone devices with the same or similar Internet capability, they may have different cost evaluations for energy consumption (depending on, for example, their battery status), resulting in certain “heterogeneity” among devices. Note that cooperative streaming can be easily implemented in a practical scenario (such as UPN and MLS) by installing some customized apps (e.g., OpenGarden [22]) on smartphones, and the related optimization and incentive issues have been studied in the recent literature (e.g., [20, 21]). However, the existing techniques in [20, 21] cannot be directly applied to the cooperative video streaming model, due to the asynchronous operations of video streaming and the unique QoE requirements of video applications. This motivates us to study the multiuser cooperative streaming in this work.
1.2 Solution and Contributions
In this work, we propose a general multiuser cooperative video streaming framework based on UPN [20, 21]. The key idea is to enable nearby mobile users to form a cooperative group (via WiFi or Bluetooth) and aggregate their cellular links and resources for the cooperative video downloading and bitrate adapting. We focus on studying the users’ streaming behaviours (i.e., download scheduling and bitrate adaptation) in the proposed cooperative framework. Namely, for each video user, when and from whom he is going to download each video segment, at which bitrate? Our goal is to understand the performance bound of the system and design an online scheduling method to approach such a bound.
First, we formally define the users’ operations in the cooperative streaming system, and formulate the corresponding social welfare optimization problem (Section 4). The optimal solution of this problem provides the theoretical performance bound of the proposed cooperative streaming system. A comprehensive analysis for such a performance bound is the foundation of the future study on privacy, security, and incentive mechanism design.^{2}^{2}2 In practice, there have been various existing approaches to address the privacy/security issue in the similar systems. For example, Opengarden [22] solves the privacy/security issue by using advanced data encryption technique through builtin softwares, while Karma [23] solves it by using hardwareenabled data encryption technique through dedicated devices. These existing technical ways can help us quickly build the privacy and security system.
Second, we analyze the social welfare performance bound of the proposed cooperative streaming system (Section 5). Directly solving such a performance is challenging, due to the asynchronous operations of users as well as the mixedinteger nature of the problem. To this end, we introduce a virtual timeslotted system with the synchronized operations, and formulate the new social welfare optimization problem as a linear programming (which can be solved efficiently with many standard methods). We show that with proper choices of time parameters, the optimal solution of the virtual timeslotted system can provide an effective upperbound and lowerbound for the optimal solution (performance bound) of the original system, which forms the feasible performance region of the proposed cooperative streaming system.
Finally, we design a Lyapunovbased online streaming algorithm for the practical implementation of the proposed cooperative streaming system (Section 6). The proposed algorithm converges to the theoretical performance bound asymptotically, with a controllable approximation error bound. Moreover, it relies only on the current state and historical streaming information (while not on any future network information), hence can be implemented in the online manner; and it requires only the local information exchange within each cooperative group (while not the global network information exchange), hence can be implemented in the distributed manner. We perform extensive experimental simulations with real data traces to evaluate its performance gap with the theoretical bound and to compare its performance with stateofart online algorithms in the existing literature.
For more clarity, we summarize the logical relationship among the above three parts as follows: (i) the social welfare optimization problem in Section 4 defines the theoretical performance bound of the proposed cooperative streaming system (but it is challenging to solve); (ii) the virtual timeslotted system in Section 5 helps characterize the region (i.e., upperbound and lowerbound) of the above theoretical performance bound; (iii) the online algorithm in Section 6 converges to the above theoretical performance bound asymptotically in the realistic scenario without complete future network information. More specifically, the key contributions of this work are summarized as follows.

Novel Model: To our best knowledge, this is the first work that proposes a general multiuser cooperative streaming framework for mobile video streaming. The framework enables mobile video users to crowdsource their radio connections and resources for cooperative video streaming, and can effectively improve the QoE of video users. Moreover, we provide both theoretical performance analysis and practical algorithm design for such a cooperative streaming system.

Performance Bound Analysis: We analyze the theoretical performance bound of the proposed cooperative streaming system, overcoming the challenging issue of asynchronous operations by using a virtual timeslotted system. Such a performance bound analysis is fundamental for the design, evaluation, and implementation of practical algorithms in such a cooperative streaming system.

Online Algorithm Design: We implement the cooperative streaming system in the practical scenario without future and global network information, and design a Lyapunovbased online streaming algorithm. The proposed algorithm converges to the theoretical performance bound asymptotically.

Experiment and Demo: We conduct extensive experiments with real data traces, which show that our proposed cooperative streaming system, together with the online streaming algorithm, outperforms the existing systems and algorithms in terms of both achieved bitrate (with an average gain of ) and social welfare (with an average gain of ). We also construct a real demo system to implement and evaluate the proposed system and algorithm.
The rest of the paper is organized as follows. In Section 2, we review the related work. In Section 3, we present the system model. In Section 4, we provide the problem formulation. In Section 5, we propose the virtual timeslotted system and the performance bound analysis. In Section 6, we propose the Lyapunovbased online streaming algorithm. We provide simulation results in Section 7 and conclude in Section 8.
2 Literature Review
Prior works on ABR video streaming mainly focused on the bitrate adaptation of a single user using either bufferbased method [6] or channel predictionbased method [7]. Recently, there is a growing interest in exploiting the multiuser cooperative video streaming. From the modeling perspective, the existing cooperative streaming models can be classified into four categories (see [8] for more details): Bandwidth Aggregation (BA) model [9], DevicetoDevice (D2D) model [10, 11, 12], Crowdsourced Mobile Streaming (CMS) model [13, 14], and Mobile PeertoPeer (MP2P) model [17, 18, 19].
1) BA Model [9]: The key idea is to aggregate the bandwidth of nearby users to help a particular mobile video user’s streaming. The BA model mainly focused on the simple onetomany cooperation between a single video user and multiple helpers [9]. We consider a more general manytomany cooperation framework with multiple video users and multiple helpers, where each user acts as both the video user and the helper.
2) D2D Model [10, 11, 12]: The key idea is to enable nearby video users to share their downloaded video segments with each other through D2D links. In [10], Golrezaei et al. studied the cachebased D2D cooperation, where mobile video users cache popular video contents and deliver to other users via D2D links in the future. Our model differs from that of [10] in the following aspects. First, we consider the realtime cooperation of nearby users, while they considered the future opportunistic cooperation. Second, we study the jointly video streaming of multiple users, while they studied the video streaming of different users separately. In [11, 12], researchers studied the realtime D2D based cooperation, where multiple nearby users watch the same video and share video contents cooperatively via D2D links. Our model is similar but more general than those in [11, 12], as we allow different users to watch different videos. This introduces an additional dimension (i.e., video index) when making the scheduling decision, hence involves additional challenges.
3) CMS Model [13, 14, 15, 16]: The key idea is to enable nearby mobile video users pool their network resources together to satisfy all users’ video streaming requirements jointly. Note that our proposed cooperative streaming model falls into this category. In [13], Pu et al. proposed a rate adaptation algorithm for optimizing the adaptive streaming across multiple mobile users (possibly watching different videos), but they didn’t consider the individual characteristics of different users. In [14, 15], Tang et al. focused on the incentive design in the multiuser CMS model and proposed a multidimensional auctionbased mechanism to incentivize video users to collaborate with each other under information asymmetry. However, they neither performed the performance bound analysis, nor designed the online algorithm. In [16], Gao et al. analyzed the performance bound for multiuser CMS models, but didn’t consider the online algorithm design. In this work, we will study both the theoretical performance bound and the practical online algorithm systematically.
4) MP2P Model [17, 18, 19]: The key idea is to enable video users act as virtual video servers and send the downloaded segments to other users via Internet. Thus, in the MP2P model, a video user can potentially help other users that are not physically closeby. The key difference between our model and the MP2P model is as follows. In the MP2P model, each video segment has multiple copies residing on both the video server and the user devices (peers), and video users can download a video segment from either the server or a user peer, via his own wireless cellular link. Hence, the key design purpose of MP2P model is to reduce the load of the video server. In our cooperative streaming model, however, each video segment has a unique copy residing on the video server, and users can download a video segment (from the video server) either via his own wireless cellular link or a neighbor’s cellular link. Hence, the key design purpose of our model is to reduce the uncertainty or improve the efficiency of user’s wireless cellular link.
3 System Model
3.1 Network Model
We consider a set of mobile video users in wireless cellular networks, who want to watch videos (on their smartphones) via 3G/4G cellular links. Mobile users are heterogeneous in terms of their cellular link capacities and video quality requirements. For example, a user requesting a high quality video may suffer from a low cellular link capacity, due to factors such as a severe channel fading and a high cellular network congestion. This may reduce the quality of the video and increase the video quality variation, both harming the user’s quality of experience (QoE). On the other hand, a user requesting a low quality video (or not playing a video at all) may experience a high cellular link capacity, and have extra capacity to help other users. Thus, it is desirable to enable users to connect with each other to download the streaming video contents cooperatively.
There are many realworld application scenarios for such a cooperative video streaming. Consider, for example, that a group of friends who want to watch a live soccer match together on their phones at a remote location (e.g., a camping or skiing site), or a family who wants to watch one or multiple movies on their phones in the train or in the car, or a group of students who want to watch different online lectures using WiFi at a busy hotspot (e.g., a classroom). In all these cases, some or all of the users may have poor or intermittent cellular connectivity, depending on the coverage of their service providers. Thus, aggregating the resources of nearby users for the cooperative video streaming may significantly improve the overall user satisfactions.
1) UserProvided Network (UPN): UPN enables nearby mobile users to form a cooperative group (via WiFi) and aggregate their radio connections and resources for cooperative data downloading. We consider a general multiuser cooperative streaming scheme based on UPN. Namely, in a cooperative group, each user can download video data for other users using his own cellular link (and resources) and download his video data through other users’ links (and resources). As mentioned previously, we assume that some welldesigned incentive mechanisms (e.g., auction [31, 33, 30, 32], contract [34, 35, 37, 36], or others trust mechanisms [38, 39]) have been adopted, such that users are willing to participate in the cooperative streaming system to help others.
Figure 1 illustrates such a cooperative streaming model with three users {1, 2, 3}, where user 1 downloads one segment for himself, one segment for user 2, and two segments for user 3, while user 2 downloads two segments for himself and one segment for user 3. Note that user 3 does not download any video content due to the temporary interruption of his cellular link.
2) Mobility Model: The cooperation gain of such a cooperative streaming highly depends on the number of cooperative users and the duration of cooperation, both closely related to the users’ mobility patterns. We adopt a hotspotbased mobility model [40], where the whole area is divided into a set of small hotspots and the nonhotspot area,^{3}^{3}3A hotspot is a small area where users are likely to stay for a substantial amount of time (e.g., a bus stop or a coffee shop), hence can maintain their WiFi connections for a reasonable amount of time. and each user moves across a sequence of hotspots during his travel in the following pattern: staying for a certain period of time in each hotspot that he passes, and taking some time for each transition (from one hotspot to another). Figure 2 illustrates such a mobility model, where user 1 stays at hotspot 1 for 30 minutes (11:0011:30), and then takes 1 hour to move to hotspot 2 and stays at hotspot 2 for 45 minutes (12:3013:15).
In such a hotspotbased mobility model, users in the same hotspot at the same time can connect with each other (hence form a cooperative group), while users in different hotspots or in the nonhotspot area cannot. Such a mobility model has been widelyused in the scenarios where users need to take certain time to interact with each other (e.g., mobile data forwarding in [41]).
Notations: We consider the operation in a period of continuous time , where is the initial time and is the ending time. Let denote the set of all hotspots, and denote the nonhotspot area. The key notations in this part are listed below.
: the location of user at time ;
: the cellular link capacity of user at time ;
: the indicator denoting whether users and are encountered (i.e., in the same hotspot) at time , i.e., if .
For convenience, we refer to the user location and cellular link capacity as the network information, which varies randomly over time. Note that the encounter indicator can be derived from the location information of users and .
3.2 Video Streaming Model
We consider a typical ABR streaming model [2], where a single source video file is partitioned into multiple segments and delivered to a video user using HTTP. The key features of ABR model are summarized below.
(i) Video Segmenting: To facilitate the video delivery over the Internet, a source video file is divided into a sequence of small HTTPbased file segments, each containing a short interval of playback time (e.g., 2–10 seconds) of the source video, which is possibly several hours in term of the total duration (e.g., a movie). A user downloads the video segment by segment.
(ii) MultiBitrate Encoding: Each segment is encoded at multiple bitrates, each corresponding to a specific video quality (such as resolution). A user can select different bitrates for different segments according to realtime network conditions.
(iii) Data Buffering: For smoothly playing, each downloaded segment is first stored in a buffer at the user’s device, and then fetched to the video player sequentially for playback. The maximum buffer size on user device is usually limited (e.g., 20–40 Seconds).
Notations: Key notations in this part are listed below.
: segment length (in seconds) of user ’s video;
(with ): the set of bitrates (in Mbps) available for user , which depends on both the severside protocols and the userside parameters such as device type.
: maximum buffer size (in seconds) of user .
4 Problem Formulation
In this section, we first characterize the users’ behaviours in the cooperative streaming model, and then formulate the associated optimization problem.
Specifically, with the ABR streaming, each source video is downloaded segment by segment. Namely, each user starts to download a new segment (with a specific bitrate) only when completing the existing segment downloading. Hence, users operate in an asynchronous manner, as they may complete segment downloading at different times. We refer to such an operation scheme as the segmented download operation.
4.1 Downloading Sequence
With the segmented operation, each user ’s downloading operation can be characterized by a sequence:
(1) 
with each element denoting the information of the th downloaded segment, including the segment owner , bitrate level , bitrate ,^{4}^{4}4Here the bitrate is redundant information, and mainly introduced for facilitating the later description. download start time , and end time . Namely, we can write as
To distinguish the information of different segments, we will also write the information of segment as whenever needed.
It is easy to see that our cooperative streaming model generalizes the model without crowdsourcing, in which case we can simply restrict each user downloading only his own segment, i.e., .
Next we provide the constraints for a feasible downloading sequence of user .
(i) Timing Constraint: As users download segment by segment, we have the following timing constraint:
A strict inequality implies that user waits for some time before starting to download the next segment , for example, when all users’ buffers are full.
(ii) Capacity Constraint: Each segment consists of Mbits of video data, and is downloaded by user within time interval . Hence, we have the following cellular link capacity constraint:
where is the real time cellular link capacity (in Mbps) of user at time .
(iii) Encounter Constraint: Each user can only download data for a nearby encountered user. Hence, a segment with , is feasible only if users and are encountered during , i.e.,
4.2 Receiving Sequence
Given the feasible downloading sequences of all users, i.e., , we can derive the segment receiving sequence of each user as follows:^{5}^{5}5We assume the WiFi transmission time is zero. One motivation for such an assumption is that the recent IEEE 802.11 standard family (e.g., 802.11n, ac, ad) has become increasingly powerful, and can support a data rate up to Gbit/s, which is much higher than those of the current cellular systems (such as 3G and 4G).
(2) 
We assume that a proper download scheduling has been adopted, such that there is no repeated segments within , and all segments in are sorted according to the playback order. We denote the th segment in the reordered by . Then, we can write the receiving sequence of user as:
(3) 
with each element denoting the information of the th segment played by user . Similarly, we will write the information of as whenever needed.
It is easy to see that for all . To facilitate the later analysis, we further assume that , , that is, user receives the segments in sequentially. Note that this can always be achieved by a proper schedule of downloading sequences with the full network information. For example, if , i.e., the +th segment is received before the th segment, we can simply change their downloading orders.
As mentioned previously, each received segment is stored in a buffer at the user’s device, and then is fetched to the video player sequentially for playback. Let denote the buffer level (in seconds) of user when receiving the th segment, i.e., at the time . Then, we have the following buffer update rule for user :
(4) 
where . Here is the time interval between receiving of and , during which a period of video is played back and removed from the buffer; is the segment length (playback time) of the newly received segment .
Since each user ’s buffer size is limited with (seconds), we have the following buffer constraint:
4.3 User Welfare
The welfare of a user mainly consists of two parts: a utility function capturing the user’s QoE for video service, and a cost function capturing the user’s energy consumption for both video downloading and playing.
1) QualityofExperience (QoE): Users often desire for a higher video quality without frequent quality changes and freezes during playback. Hence, a user’s QoE mainly depends on the video quality, quality fluctuation, and rebuffering. Note that bitrate is a good measurement of video quality, and in general there is a distinct and monotonic relationship between bitrate and quality. Hence, we will define the QoE on bitrate for notational convenience.
(i) Video Quality: A higher video quality (bitrate) brings a higher value for users. Let denote the value that user achieves from bitrate during one unit of playback time. Then, the total value that user achieves from all received segments (each with a playback time of ) is:
(5) 
Obviously, is an increasing function (as video quality monotonically increases with bitrate). In our simulations, we adopt the following value function: , where is a userspecific evaluation factor capturing user ’s desire for a high quality video service.
(ii) Quality Fluctuation: The change of quality (bitrate) during playback decreases the user QoE, especially when the quality is degraded. In this work, we assume that there is a value loss proportional to the bitrate decrease once the quality is degraded, while there is no value loss when the quality is upgraded. Let denote the value loss of user for one unit (in Mbps) of bitrate decrease. Then, the total value loss of user induced by quality degradation is^{6}^{6}6Our model can be directly extended to the case with upgrade loss, by simply changing into the absolute operation .
(6) 
where . Here indicates that a quality degradation occurs between and , with a bitrate decrease of .
(iii) Rebuffering: If a video buffer is exhausted before receiving a new segment, the video player has to freeze the playback and rebuffer the video for a certain time. Such a freeze during playback is called rebuffering. The rebuffering during playback greatly affects the user QoE. By the buffer update rule (4), a rebuffering occurs when
with a detailed rebuffering time . Let denote the value loss of user for one unit (second) of rebuffering time. Then, the total value loss of user induced by video rebuffering is
(7) 
Based on the above, we can define the utility of each user under a receiving sequence as follows:
(8) 
2) Energy Cost: Users incur some energy cost in video streaming. Such energy cost mainly includes the energy consumptions for downloading data via cellular links (and Internet) and exchanging data via WiFi links.
(i) Energy Consumption for Video Downloading (via Celluar and Internet): When downloading data via the cellular link (and Internet), users’ energy consumption depends on both the downloading time and the downloaded data volume [42]. Let denote the timerelated energy consumption factor of user (i.e., for each unit of downloading time), and denote the volumerelated energy consumption factor of user (i.e., for each unit of downloaded data). Then, the energy consumption of user for downloading video contents via cellular links and Internet is [42]:
(9) 
(ii) Energy Consumption for Video Exchanging (via WiFi): When downloading a segment for others, the user needs to transmit the data to the segment owner via local WiFi link, the energy consumption of which also depends on the transmitting time and the transmitted data volume [42]. Let and denote the timerelated and volumerelated energy consumption factors of user on the WiFi link, respectively. The energy consumption of user for video exchanging on WiFi link is [42]:
(10)  
where if (i.e., the segment is downloaded for others), and otherwise. Here we have assumed that the WiFi transmission time of a single segment is small and hence negligible.
Based on the above, we can derive the total energy consumption of each user under a downloading sequence and receiving sequence as follows:
(11) 
Note that our proposed system can work with other energy models (e.g., those in [43]). In fact, the energy consumption modeling and energy saving are not the key objective of the proposed system. Instead, our key objective is to improve the QoE of users.
3) Welfare: The welfare of each user , denoted by , is defined as the difference between the utility (capturing the QoE of users) and the cost (capturing the energy consumption), i.e.,
(12) 
The social welfare is the aggregate welfare of all users:
(13) 
where the receiving sequence of each user can be derived from the downloading sequences .
4.4 Problem Formulation
Our purpose is to find the proper download scheduling to maximize the social welfare achieved in the proposed cooperative streaming model.
First, in an ideal scenario with the complete network information, we can formulate the following offline social welfare maximization problem:
(14)  
s.t. 
To solve this offline optimization problem, we need to know the complete network information. The solution of (14), denoted by , provides the theoretical performance bound (in term of social welfare) of the proposed cooperative streaming system. Note that (14) is an MILP (mixed integer linear programming) and challenging to solve.^{7}^{7}7This is because in each user’s downloading sequence, we need to determine not only the order of segments, but also the download start time and end time for each segment. Even for the simplest case with a single user, it is still an NPhard problem to optimally determine the download start time and end time of each segment. Hence, we will derive a feasible upperbound and a feasible lowerbound of in Section 5.
Second, in a more general scenario without complete (future) network information, we need to design online scheduling algorithms, where the downloading operation of each user is performed in an online and distributed manner. We will study such an online scheduling algorithm design and the associated performance evaluation in Section 6.
5 Performance Bound Analysis
In this section, we study the theoretical social welfare performance bound of the proposed cooperative system (i.e., the solution of the offline social welfare maximization problem (14)), which serves as a benchmark for the online scheduling solutions in Section 6.
However, directly solving (14) is challenging due to the following reasons. First, users operate in an asynchronous manner. Namely, different users may start to download new segments at different times. Second, (14) involves both discrete variables (e.g., and ) and continuous variables (e.g., and ), hence is a complicated mixedintegral optimization problem. Third, (14) involves the integral operation (), which is even more challenging. Hence, we will focus on finding upperbound and lowerbound for the desired performance bound of the cooperative streaming system.
To achieve this, we propose a virtual timeslotted download operation scheme, under which the problem can be formulated as an linear programming, hence can be solved by many classic methods. We will show that the solution of (14) under the segmented operation scheme (i.e., the theoretical performance bound of the proposed cooperative streaming system) is bounded by the solutions under this virtual timeslotted system. It is important to note that this timeslotted operation scheme is only used for characterizing the theoretical performance bound, but not for the practical implementation.
5.1 TimeSlotted Download Operation
To model the timeslotted operation scheme, we divide the whole time period into multiple time slots, each with the same length. For convenience, we normalize the length of each slot to be one. Hence, there is a set of time slots, denoted by , with the th slot corresponding to time interval .
Under the timeslotted operation scheme, each video is downloaded slot by slot in a synchronized manner, rather than segment by segment under the segmented operation. Thus, in this case, we can focus on the segments that each user downloads in each time slot, instead of the segment downloading sequence. Moreover, to guarantee the synchronous operation, we require that each segment must be completely downloaded within one time slot. Namely, users cannot download a segment across multiple time slots.
For clarity, we illustrate the difference (in download scheduling) between the segmented operation and the timeslotted operation in Figure 3, where blue blocks denote user 1’s data and orange blocks denote user 2’s data. Under the segmented operation (left), users start to download data at different times, while under the timeslotted operation (right), users are synchronized, and download data at the beginning of each time slot.
1) Downloading Vector: With the timeslotted operation, the downloading operation of each user can be characterized by a downloading vector:
(15) 
where each element is a nonnegative integer, denoting the total number of segments with bitrate level that user downloads for user in time slot .
Given the downloading vector , we can derive the total data that user downloads in each time slot :
(16) 
where is the amount of data for user in slot . Then, we can define the link capacity constraint and encounter constraint for a feasible downloading vector :
where is the total cellular link capacity of user in time slot . Note that here we do not need to consider the timing constraint (C.1) as the operation is already slot by slot.
2) Receiving Vector: Given feasible downloading vectors of all users, i.e., , we can derive the total playback time that user receives in each time slot :
(17) 
where is the total playback time that user receives from user in slot .
Let denote the buffer level (in seconds) of user at the end of time slot . Then, we have the following buffer update rule for user :
(18) 
where . Here one time unit of video is played back during time slot , and is the playback time of the newly received segments in slot .
Similarly, we have the following buffer constraint:
3) User Welfare: Now we define the user welfare and social welfare under the timeslotted operation.
(i) Video Quality: Similar as (5), the value that user achieves from all received segments is:
(19) 
(ii) Quality Fluctuation: Without loss of generality, we assume that all the received segments of each user in each time slot are sorted in ascending order of bitrate.^{8}^{8}8If not, we can simply change the orders of related segments. Hence, quality degradation only occurs between two successive time slots, while never occurs within a time slot. Let and denote the highest bitrate and lowest bitrate that user receives in slot . Then, similar as (6), the value loss of user due to quality degradation is:
(20) 
(iii) Rebuffering: By the buffer update rule in (18), a rebuffering occurs in time slot when
with a rebuffering time . Then, similar as (7), the value loss of user induced by rebuffering is
(21) 
(iv) Energy Consumption for Video Downloading (via Cellular and Interent): Similar as (9), the energy consumption of user for downloading video is
(22) 
where is the actual downloading time in slot .
(v) Energy Consumption for Video Exchanging (via WiFi): Similar as (10), the energy consumption of user for exchanging video on local WiFi links is
(23) 
Based on the above, the welfare of each user is
(24) 
4) Problem Formulation under TimeSlotted Operation: Now we can define the social welfare maximization problem under the timeslotted download operation:
(25)  
s.t. 
Similar to (14), this is an offline optimization problem and requires the complete network information. Moreover, (25) is an integer programming, and can be solved by many classic methods. Hence, we skip the detailed derivations. For notation convenience, we denote the solution of (25) by .
5.2 Performance Bound
Now we characterize the theoretical performance bound of the proposed cooperative streaming system (under the segmented operation) by using the solution of (25) under the virtual timeslotted operation.
For convenience, we denote as the vector consisting of all users’ segment lengths, and denote and as the solutions of (14) and (25) under , respectively. We refer to a vector as an integer multiple of another vector , if each element in is an integer multiple of the corresponding element in . For example, is an integer multiple of .
Proposition 1.
If is an integer multiple of , then
This proposition can be proved by showing that in both schemes, any downloading operation under can be equivalently achieved under .
Proposition 2.
If (i.e., ), then
This proposition can be proved by showing that with infinitely small segment lengths , any downloading operation under the timeslotted operation scheme can be equivalently achieved under the segmented operation scheme, and vise versa.
Proposition 3.
If is a finite vector (i.e., each element is a finite number), then
This proposition can be proved by showing that with finite segment lengths , any downloading operation under the timeslotted operation scheme can be equivalently achieved under the segmented operation scheme, but not vise versa.
Based on the above, we have the following theorem.
Theorem 1.
Given a segment length , the theoretical performance upperbound is bounded by:
Intuitively, this theorem states that with any , the theoretical performance bound of our proposed cooperative streaming system is (a) lowerbounded by (i.e., the optimal performance of the virtual timeslotted system with the same segment length vector ), and (b) upperbounded by (i.e., the optimal performance of the virtual timeslotted system with infinitely small segment lengths ). Therefore, the performance of the virtual timeslotted system under different characterizes the theoretical performance region of our proposed cooperative streaming system.
6 Online Scheduling Algorithms
In the previous section, we have analyzed the theoretical performance bound of the cooperative streaming system, which is achievable in an ideal scenario with complete network information. In practice, however, network changes randomly over time, and hence it is difficult to obtain the future and global network information.
In this section, we study the practical scenario where the future and global network information is not available. We propose an online scheduling algorithm based on the Lyapunov optimization framework [44], which relies only on the current local network information and the scheduling history, while not on any future or global network information.
6.1 Online vs Offline
We first discuss the key difference between online scheduling and offline scheduling. In the offline scheduling, the segment downloading sequences of all users at all time are determined in advance, through, for example, the offline social welfare maximization problem (14), which requires the complete network information. In the online scheduling, however, each user makes the download scheduling decision (regarding the next segment to be downloaded) in real time, e.g., at the time when he completes a previous segment downloading.
In our proposed cooperative streaming system, such a real time downloading decision mainly includes two problems: whose segment to be downloaded, and at which bitrate level? The decision may depend on different criteria such as the real time user buffer levels (e.g., in [6]), the channel bandwidth or throughput predictions (e.g., in [7]), and other specific objective functions (e.g., Lyapunov driftpluspenalty described below).
6.2 LyapunovBased Online Scheduling
Lyapunov optimization [44] is a widely used technique for solving stochastic optimization problems with time average constraints. In our model, an implicit time average constraint is that the average segment arriving rate should be same as the video playback rate in term of segment.^{9}^{9}9For example, for a video with 2second segment, the playback rate in term of segment is 0.5 (segments per second). If the video playback rate is smaller, then the downloaded segments will be frequently dropped due to the limited buffer size; if the video playback rate is larger, then the rebuffering will frequently happen. Both cases are not desirable in this system. To this end, we introduce the Lyapunov optimization technique to optimize the downloading scheduling in an online manner.
Suppose that a user completes a segment downloading at time , and needs to make the downloading decision regarding the next segment to be downloaded. We denote such a decision by , where is the owner of the segment to be downloaded, and is the bitrate level of the segment to be downloaded. Obviously, a feasible decision of user at time satisfies the following user encounter constraint: .
For analytical convenience, we further denote as the buffer level of each user at time , and denote as the bitrate of user ’s last received segment. This information captures the current network state and historical scheduling information that can be observed.
1) Objective Function: Given a feasible decision of user , the data volume to be downloaded is (Mbit), and the estimated downloading time is .^{10}^{10}10Here we use the current channel capacity to approximate the capacity in a period of future time. Note that the actual downloading time may be different from due to the channel stochastics. The total energy consumption of user (for this particular downloading operation) and user (for playing the downloaded segment) is:
The utility of receiver on this particular segment is
The utility of other user due to this operation is
which only includes the potential rebuffering loss.
Therefore, the total welfare generated under is
(26) 
2) Lyapunov Drift: Following the Lyapunov framework, we define a modified Lyapunov function:
(27) 
The Lyapunov drift is the change of Lyapunov function (from one decisionmaking time to the next), i.e.,
(28)  
where is the estimated buffer level of user at time (i.e., the next decisionmaking time of user ). For the receiver , the estimated buffer level is:
For other user , the estimated buffer level is:
3) Online Scheduling Algorithm: By the Lyapunov optimization theorem, to stabilize the system while optimizing the objective, we can use such a scheduling policy that greedily minimizes driftpluspenalty:
(29) 
where the negative welfare is viewed as the penalty incurred at time , and is a control parameter. It is important to note that the buffer levels (appearing in ) serve as regulation factors, such that the user with a larger idle buffer can be more likely to be scheduled (hence reducing the possibility of rebuffering). This term is different from the rebuffering loss in (7), which is the actually realized loss when a rebuffering event actually happens.
Based on the above analysis, we now design an online algorithm that aims at minimizing the driftpluspenalty (29) in each decisionmaking time. We present the detailed algorithm in Algorithm 1. Note that a user may decide not to download any segment at a decisionmaking time, when, for example, all buffers are full and cannot afford one more segment. In this case, the user will wait for a certain time and then trigger decisionmaking event again. Hence, a decisionmaking time can be either the time that a user completes a segment downloading or the time that a user is triggered by the waiting timer.
Note that the online scheduling in Algorithm 1 works in a distributed manner, as each user makes the decision independently. To coordinate the downloading decisions of different users and to avoid the redundant downloading of the same segment, nearby users need to exchange the context information (e.g., buffer length, segment size, encode bitrate, and url). To illustrate this, we construct a real demo system on Raspberry PI. Please refer to our online technical report [49] for more details.
4) Performance Analysis: Now we analyze the performance of Algorithm 1. Let denote the th decisionmaking time (counting all users), and let denote the associated welfare achieved in the th download operation. Then, the social welfare generated by Algorithm 1 during the whole time can be computed by:
By the Lyapunov optimization theorem (Theorem 4.2 in [44]), we obtain the following gap for and , i.e., the theoretical performance upperbound.
Theorem 2.
where is expectation, and is a positive constant.
Theorem 2 shows that Algorithm 1 converges to the theoretical performance bound asymptotically, with a controllable approximation error bound .
However, this theorem does not directly help us calculate the actual gap between and in a particular experimental scenario, as is finite in practice. To this end, we propose another approach based on Theorem 1 for the practical calculation of the actual gap, i.e.,
Note that is the solution of the integer programming problem (25), and can be easily computed in a practical experiment after collecting the complete network information. In our experiments, the average gap between and is smaller than .
7 Experiments and Performance
7.1 Experiment Setting
1) Datasets: To evaluate the realistic performance of the proposed cooperative streaming system, we conduct experiments based on real data traces from two datasets: ISF [46] and NWF [47].^{11}^{11}11ISF is provided by a nonprofit organization “Ile Sans Fil” in Canada, and is open source (available at CRAWDAD [46]). NWF is obtained from a wireless service provider “NextWiFi” in China [47]. Both datasets record the user access sessions at a set of WiFi hotspots in different countries during a long period of time (3 years for ISF and 5 months for NWF), representing two different (hotspotbased) mobility scenarios: users encounter more frequently in NWF, while the duration of each encounter is larger in ISF.
To simulate the video watching behaviours of mobile users and the real cellular link throughputs for video streaming, we use the video viewing session logs obtained from BestTV [48], one of the largest OTT (Over The Top) video service providers in China. There are 5 different bitrate levels (for mobile users) in this dataset: Mbps, corresponding to the lowest to the highest video resolutions, respectively. Based on the segment length, bitrate, and downloading time, we can calculate the measured endtoend link throughput for each segment downloading. We use this measured throughput to approximate the cellular link capacity in our experiments. Moreover, the energy consumption factors are chosen according to the real measurement given in [45].
2) Existing Online Algorithms: To evaluate the performance of our proposed Lyapunovbased online algorithm, we also perform simulations using the following two typical existing online algorithms: Bufferbased algorithm [6] and Channel Predictionbased algorithm [7]. Specifically, bufferbased algorithm [6] introduces a linear mapping between buffer and bitrate, and selects the next segment bitrate based on the current buffer level: a higher buffer level is mapped to a higher bitrate. Channel predictionbased algorithm [7] proposes a channel prediction method, and selects the next segment bitrate based on the predicted channel capacity: the highest bitrate that can be supported by the predicted channel capacity.^{12}^{12}12Note that both algorithms in [6] and [7] were designed for the singleuser scenario, and considered only the bitrate adaptation. In the multiuser scenario, we need to consider both bitrate adaptation and segment owner selection (i.e., whose segment to be downloaded) as discussed in Section 6. To this end, we introduce the following segment owner selection policy for these two algorithms in the multiuser scenario: Each user will choose to download the next segment for another user , if and only if (i) , (ii) , and (iii) . Intuitively, user will choose to help the user with the lowest buffer level, if his own buffer level is higher than a ratio threshold and meanwhile is higher than the lowest buffer level by a threshold . In our experiments, we will try different values of and , and choose the best ones.
7.2 MultipleUser Case
Now we perform experiments for the multiuser scenario, where some users play videos (called video users), while others remain idle and can potentially help the encountered video users.^{13}^{13}13We also construct experiments for the singleuser scenario (i.e., noncooperative scenario) to illustrate the performance gap of our proposed Lyapunovbased online algorithm to the theoretical performance bound as well as to compare the bitrate adaptation performance of our proposed algorithm with the existing online algorithms. The detailed results are provided in our online technical report [49]. For simplicity, we assume that all video users play the highresolution videos (bitrate Mbps). The total video length is 500 seconds, the segment length is 2 seconds, and the maximum buffer length at the user’s device is 40 seconds. We use these multiuser experiments to illustrate both the cooperation gain of the proposed cooperative streaming system and the performance gain of the proposed algorithm.
In the following experiments, we consider a total of 50 users and randomly choose a subset of users as video users. We consider different network conditions, characterized by the range of the average link capacity. For example, a bad network condition corresponds to a range Mbps, under which each user will be randomly assigned by a real data trace with an average link capacity smaller than Mbps.
1) Average Bitrate: Figure 4 shows the average bitrates with different percentages of video users under different network conditions. For each video user percentage and network condition, we perform experiments with the three algorithms under ISF and NWF mobility traces, corresponding to different encountering scenarios (hence different cooperation probabilities). To fully characterize the cooperation gain, we also run the algorithms under two benchmark encountering scenarios: (i) a full cooperation scenario, where all users are always encountered with each other, and (ii) a noncooperative scenario, where none of users are encountered.
Sugfigures (a) to (c) show the average bitrates with , , and video users, respectively. As illustrated in (a), the solid bar denotes the average bitrate under the noncooperative scenario, and the hollow bar denotes the average bitrate under the full cooperation, in which the first (higher) line denotes the average bitrate under ISF (with a higher encountering probability) and the second (lower) line denotes the average bitrate under NWF (with a lower encountering probability). Subfigure (d) shows the average bitrate increase (i.e., the cooperation gain) using our proposed Lyapunovbased algorithm, comparing with the achieved bitrate under the noncooperative scenario. The dash, solid, and dashdot lines denote the results with , , and video users, respectively. The marks “circle”, “square”, and “triangle” denote full cooperation, ISF, and NWF, respectively.
From subfigure (a), we can see that when the percentage of (highresolution) video users is very high (e.g., %), the increase of bitrate is very small under a low link capacity range (e.g., lower than Mbps), as in this case all users are lack of capacity, hence nobody can help other users significantly. Under a high link capacity range (e.g., Mbps and Mbps), the increase of bitrate becomes significant, as some users may have redundant capacities, hence can help others. From subfigures (b) and (c), we can see that when the percentage of video users is low (e.g., or ), the bitrate increase is significant under all network conditions, mainly due to the contributions of the idle users.
Subfigure (d) summarizes the increase of bitrate under our proposed algorithm. We can see that with video users, the increase of bitrate continuously increases with the link capacity, as a larger capacity gives the video users more opportunities to obtain redundant capacity and help others. With video users, however, the increase of bitrate continuously decreases with the link capacity, as a very small capacity already leads to a considerably high bitrate (due to the contributions of a large population of idle users), hence the increase of bitrate is more significant under a small capacity (as the benchmark bitrate is smaller). With video users, the increase of bitrate first increases with the link capacity (due to a similar reason in the case), and then decreases with the link capacity (due to a similar reason in the case). The maximum bitrate increase ratio under the full cooperation scenario can be up to with video users, with video users, and with video users. Moreover, the bitrate increase under the real data traces is bounded by the above maximum ratio, and actually depends on the encountering probability. In our experiments, the bitrate increases under ISF and NWF can reach around and of the maximum bitrate increase, respectively.
2) Social Welfare: Figure 5 shows the average social welfares and welfare gains with different percentages of video users under different network conditions. The key informations and observations regarding the social welfare are similar as those regarding the average bitrate in Figure 4, hence we skip the detailed discussions and only present the results regarding the cooperation gain. Specifically, using our proposed algorithm, the maximum social welfare increase ratio (under the full cooperation scenario) can be up to with video users, with video users, and with video users. The social welfare increase under ISF and NWF can reach and of the maximum welfare increase, respectively.
3) Algorithm Comparison: From Figure 4 (a) to (c) and Figure 5 (a) to (c), we can also evaluate the performance difference between our proposed algorithm and the algorithms in [6] and [7] in the multiuser scenario. By comparing the difference between solid bars (for the noncooperative scenario) and the difference between hollow bars (for the multiuser cooperative scenario), we can find that the performance difference (between our algorithm and the algorithms in [6, 7]) become more significant in the cooperative scenario, especially when the video user percentage is small. Such a performance difference is mainly due to the nonoptimal segment owner selection in [6, 7]. In our algorithm, however, the segment owner selection and the bitrate adaptation are optimised jointly.
8 Conclusion
In this work, we proposed a multiuser cooperative video streaming framework for video streaming over wireless networks. We analyzed the theoretical performance bound of the proposed cooperative streaming system, and designed the online streaming algorithm for the practical implementation. We conducted extensive experiments with real data traces, and illustrated both the cooperation gain of the cooperative streaming system and the performance gain of the proposed online streaming algorithm. Adaptive bitrate streaming is a new technology trend of mobile video streaming, and the research on multiuser cooperative video streaming is becoming increasingly important. This paper developed a unified cooperative framework, for both theoretical analysis and practical implementation. There are several interesting future research directions in this area. An important one is to consider the users’ strategic behaviours and the associated incentive issues in the cooperative streaming.
9 Acknowledgments
This work is supported by the National Natural Science Foundation of China (Grant No. 61771162, 61472204, and 61521002) and the General Research Funds (Project Number CUHK 14219016) established under the University Grant Committee of the Hong Kong Special Administrative Region, China. This work is also supported by the Beijing Key Lab of Networked Multimedia (Z161100005016051). Jianwei Huang is the corresponding author.
References
 [1] Cisco VNI: Global Mobile Data Traffic Forecast Update, 20162021.
 [2] S. Akhshabi, Ali C. Begen, and C. Dovroli, “An Experimental Evaluation of RateAdaptation Algorithms in Adaptive Streaming over HTTP,” Proc. ACM MMSys, 2011.
 [3] Adobe Systems, “HTTP Dynamic Streaming,” url: http://www.adobe.com/products/hdsdynamicstreaming.html
 [4] R.P. Pantos, “HTTP Live Streaming draftpantoshttplivestreaming13,” Network Working Group, 2014, url: http://tools.ietf.org/html/draftpantoshttplivestreaming13
 [5] Microsoft, “Smooth Streaming,” url: http://www.iis.net/downloads/microsoft/smoothstreaming
 [6] T. Y. Huang, R. Johari, N. McKeown, M. Trunnell, and M. Watson, “A bufferbased approach to rate adaptation: Evidence from a large video streaming service,” Proc. ACM SIGCOMM, 2014.
 [7] Z. Li, X. Zhu, J. Gahm, R. Pan, H. Hu, A. C. Begen, D. Oran, “Probe and adapt: Rate adaptation for http video streaming at scale,” IEEE Journal on Selected Areas in Communications, 32(4):719733, 2014.
 [8] M. Tang, L. Gao, H. Pang, J. Huang, and L. Sun, “Optimizations and Economics of Crowdsourced Mobile Streaming,” IEEE Communications Magazine, 55(4):2127, 2017.
 [9] Y. Zhang, C. Li, L. Sun, “DECOMOD: collaborative DASH with download enhancing based on multiple mobile devices cooperation,” Proc. ACM MMSys, 2014.
 [10] N. Golrezaei, P. Mansourifard, A. F. Molisch, and A. G. Dimakis, “BaseStation Assisted DevicetoDevice Communications for HighThroughput Wireless Video Networks,” IEEE Transactions on Wireless Communications, 13(7):36653676, 2014.
 [11] L. Keller, A. Le, B. Cici, H. Seferoglu, C. Fragouli, and A. Markopoulou “MicroCast: Cooperative Video Streaming on Smartphones,” Proc. ACM MobiSys, 2012.
 [12] Y. Cao, X. Chen, T. Jiang, and J. Zhang, “SoCast: social ties based cooperative video multicast,” Proc. IEEE INFOCOM, 2014.
 [13] W. Pu, Z. Zou, and C. W. Chen, “Video adaptation proxy for wireless dynamic adaptive streaming over HTTP,” IEEE Workshop Packet Video, 2012.
 [14] M. Tang, S. Wang, L. Gao, J. Huang, and L. Sun, “MOMD: A MultiObject MultiDimensional Auction for Crowdsourced Mobile Video Streaming,” Proc. IEEE INFOCOM, 2017.
 [15] M. Tang, L. Gao, H. Pang, J. Huang, and L. Sun, “MultiDimensional Auction Mechanism for Mobile Crowdsourced Video Streaming,” Proc. IEEE WiOpt, 2016.
 [16] L. Gao, M. Tang, H. Pang, J. Huang, and L. Sun, “Performance Bound Analysis for Crowdsourced Mobile Video Streaming,” Proc. IEEE CISS, 2016.
 [17] X. Kang and Y. Wu, “Incentive Mechanism Design for Heterogeneous PeertoPeer Networks: A Stackelberg Game Approach,” IEEE Transactions on Mobile Computing, 14(5):10181030, 2015.
 [18] M. Klusch, P. Kapahnke, X. Cao, B. Rainer, C. Timmerer, and S. Mangold, “MyMedia: mobile semantic peertopeer video search and live streaming,” Proc. ACM MOBIQUITOUS, 2014.
 [19] B. Rainer, C. Timmerer, P. Kapahnke, and M. Klusch, “Realtime multimedia streaming in unstructured peertopeer networks,” Proc. IEEE CCNC, 2014.
 [20] G. Iosifidis, L. Gao, J. Huang, and L. Tassiulas, “Incentive Mechanisms for UserProvided Networks,” IEEE Communications Magazine, 52(9):2027, 2014.
 [21] G. Iosifidis, L. Gao, J. Huang, and L. Tassiulas, “Enabling CrowdSourced Mobile Internet Access,” Proc. IEEE INFOCOM, 2014.
 [22] Open Garden, url: http://opengarden.com/
 [23] Karma, url: https://yourkarma.com/
 [24] Tethering of AT&T, url: www.att.com/shop/wireless/tethering.html
 [25] K. Mori, S. Hatakeyama, H. Shigeno, “DCLA: Distributed Chunk Loss Avoidance Method for Cooperative Mobile Live Streaming,” Proc. IEEE AINA, 2015.
 [26] T. Wu, W. Dou, Q. Ni, S. Yu, and G. Chen, “Mobile Live Video Streaming Optimization via Crowdsourcing Brokerage,” IEEE Transactions on Multimedia, 19(10):22672281, 2017.
 [27] IngKee, url: www.ingkee.com
 [28] Youtube Live, url: www.youtube.com/live dashboard splash
 [29] Facebook Livestream, url: www.facebook.com/livestream
 [30] G. Iosifidis, L. Gao, J. Huang, and L. Tassiulas, “A Double Auction Mechanism for Mobile Data Offloading Markets,” IEEE/ACM Transactions on Networking, 23(5):16341647, 2014.
 [31] T. Luo, S. S. Kanhere, J. Huang, S. K. Das, and F. Wu, “Sustainable Incentives for Mobile Crowdsensing: Auctions, Lotteries, and Trust and Reputation Systems,” IEEE Communications Magazine, 55(3):6874, 2017.
 [32] L. Gao, Y. Xu, and X. Wang, “MAP: MultiAuctioneer Progressive Auction for Dynamic Spectrum Access,” IEEE Transactions on Mobile Computing, 10(8):11441161, 2011.
 [33] C. Jiang, L. Gao, L. Duan, and J. Huang, “DataCentric Mobile Crowdsensing,” IEEE Transactions on Mobile Computing, 2017.
 [34] Q. Ma, L. Gao, Y.F. Liu, and J. Huang, “Incentivizing WiFi Network Crowdsourcing: A Contract Theoretic Approach,” IEEE/ACM Transactions on Networking, 2018.
 [35] L. Gao, J. Huang, Y. Chen, and B. Shou, “An Integrated Contract and Auction Design for Secondary Spectrum Trading,” IEEE Journal on Selected Areas in Communications, 31(3):581592, 2013.
 [36] L. Duan, L. Gao, and J. Huang, “Cooperative Spectrum Sharing: A Contractbased Approach,” IEEE Transactions on Mobile Computing, 13(1):174187, 2014.
 [37] L. Gao, X. Wang, Y. Xu, and Q. Zhang, “Spectrum Trading in Cognitive Radio Networks: A ContractTheoretic Modeling Approach,” IEEE Journal on Selected Areas in Communications, 29(4):843855, 2011.
 [38] X. Zhang, Z. Yang, W. Sun, Y. Liu, S. Tang, K. Xing, and X. Mao, “Incentives for mobile crowd sensing: A survey,” IEEE Communications Surveys & Tutorials, 18(1):5467, 2016.
 [39] L. Gao, G. Iosifidis, J. Huang, L. Tassiulas, and D. Li, “Bargainingbased Mobile Data Offloading,” IEEE Journal on Selected Areas in Communications, 32(6):11141125, 2014.
 [40] T. Camp, J. Boleng, and V. Davies, “A survey of mobility models for ad hoc network research,” Wireless Communications and Mobile Computing, 2(5):483502, 2002.
 [41] P. Yuan and H.D. Ma, “Opportunistic Forwarding with Hotspot Entropy,” Proc. IEEE WoWMoM, 2013.
 [42] N. Balasubramanian, A. Balasubramanian, and A. Venkataramani, “Energy consumption in mobile phones: a measurement study and implications for network applications,” Proc. ACM SIGCOMM, 2009.
 [43] M. A. Hoque, M. Siekkinen, and J. K. Nurminen, “Energy efficient multimedia streaming to mobile devices¡ªa survey,” IEEE Communications Surveys & Tutorials, 16(1):579597, 2014.
 [44] M. J. Neely, Stochastic Network Optimization with Application to Communication and Queueing Systems, Morgan & Claypool, 2010.
 [45] G. P. Perrucci, F. H. Fitzek, and J. Widmer, “Survey on energy consumption entities on the smartphone platform, Proc. IEEE VTCSpring, 2011.
 [46] http://crawdad.cs.dartmouth.edu/ilesansfil/wifidog/
 [47] http://www.nextwifi.cn/wifind/
 [48] http://www.bestv.com.cn/
 [49] Technical Report at arXiv, url: https://arxiv.org/abs/xxxx.xxxx
Lin Gao (S’08M’10SM’16) is an Associate Professor with the School of Electronic and Information Engineering, Harbin Institute of Technology, Shenzhen, China. He received the Ph.D. degree in Electronic Engineering from Shanghai Jiao Tong University in 2010. His main research interests are in the area of network economics and games, with applications in wireless communications and networking. He received the IEEE ComSoc AsiaPacific Outstanding Young Researcher Award in 2016. 
Ming Tang (S’16) is currently pursuing a Ph.D. degree at the Department of Information Engineering, The Chinese University of Hong Kong (CUHK). Her research interests include wireless communications and network economics, with particular emphasis on userprovided networks, mobile video streaming, and fog computing. 
Haitian Pang (S’16) received his BE degree in Department of Automation in 2014 from Tsinghua University, Beijing, China. He is currently a PhD candidate in Computer Science in Tsinghua University. His research areas include network game modeling, cellularWiFi networking, video streaming system design, and mobile networking optimizations. 
Jianwei Huang (F’16) is a Professor in the Department of Information Engineering at The Chinese University of Hong Kong. He is the coauthor of 9 Best Paper Awards, including IEEE Marconi Prize Paper Award in Wireless Communications 2011. He has coauthored six books, including the textbook on “Wireless Network Pricing”. He has served as the Chair of IEEE TCCN and MMTC. He is an IEEE ComSoc Distinguished Lecturer and a Thomson Reuters Highly Cited Researcher. 
Lifeng Sun was born in 1972. He received the Ph.D. degree in System Engineer from the National University of Defense Technology, Changsha, in 2000. Currently, he is a professor at Tsinghua University. His research interests include video streaming, video coding, video analysis and multimedia cloud computing. He is a member of IEEE and ACM. He received Best Paper Award in IEEE Transactions on Circuits and Systems for Video Technology in 2010, Best Paper Award at ACM Multimedia 2012, and Best Student Paper Award at MMM 2015 and IEEE BigMM 2017. 
A.1 Implementation on Demo System
To illustrate the implementation of the proposed cooperative streaming system, we construct a demo system on Raspberry PI Model B+ (with the WheezyRaspbian operating system).^{14}^{14}14For more details about Respberry PI, please refer to: http://www.raspberrypi.org. In the demo system, Raspberry PIs act as the mobile devices in the practical system, which are equipped with monitors (for video playing), LTE USB modems (for LTE connections), and WLAN adapters (for WiFi connections).^{15}^{15}15Note that we implement the demo system on Raspberry PI to simulate its implementation and operation on real smartphones. The key reasons for such a simulation are following. First, Raspberry PI is more userfriendly in programming on almost all functionalities, while some functionalities of smartphones (both Android and IOS) are not easily programmable. Second, such a simulation on Raspberry PI is able to capture the key features of a real system on smartphones (when it is developed). The devices can dynamically join and leave the cooperative group, and there is no need for centralized control. After joining the cooperative group, the mobile devices download video segments via LTE and forward video segments as well as control messages to other devices (if needed) through WiFi.
1) Architecture: Figure 6 shows the demo system architecture with 4 mobile devices (Raspberry PI devices), where mobile devices are connected with each other via WiFi and connected to the video server on the Internet via LTE. The demo system consists of the following (software) modules built in each mobile device. The “Controller” module is the “heart” of the system and responsible for storing key information (such as system information and downloaded video data) and offering necessary control signal for other components. The “Scheduler” module is another key component in the system and responsible for implementing our proposed online Lyapunov algorithm and making the scheduling decision. It mainly consists of two components “Download” and “Receive”: (i) when the device acts as a downloader helping others, the “Download” is active and in charge of the information announcement and scheduling determination; and (ii) when the device acts as a receiver, the “Receive” is active and in charge of information submission. The “Video Downloader” module downloads video segments from video servers on the Internet through LTE links. The “Video Transfer” module is responsible for transmitting and receiving the downloaded video data among devices through WiFi links. The “Message Dispatcher” module is responsible for transmitting and receiving the control messages (such as buffer length, segment size, and url) among devices through WiFi links. Finally, the “Video Buffer” module stores the segments that are for the user’s own video consumption, and the “User Interface” module fetches video segments from buffer and displays to users.
2) Operation: The demo system operates in the following way. When a device is ready for downloading, its “Message Dispatcher” module starts to collect the necessary information of nearby users and pass the information to the “Scheduler” module. Then, the “Scheduler” module makes the scheduling decision (i.e., for whom it is going to download the next segment) and passes the scheduling result, together with the necessary information (e.g., the segment id, encode bitrate, and url), to the “Controller” module. Finally, the “Controller” module dispatches the “Video Downloader” module to download the video segment and the “Video Transfer” module to send the downloaded segment to the target device.
3) Signal Flow: The detailed signal flow is shown as follows. When a device is ready to download a new segment (e.g., when completing a segment download), it initiates and broadcasts a “READY” message via WiFi. Then, all nearby devices who receive the message and need helps will respond with the “ACK” message, together with the necessary context message (e.g., buffer length, segment size, encode bitrate, url, etc.), via WiFi. Such an information exchange is performed by the “Message Dispatcher” module. Next, when receiving the “ACK” messages from all nearby users, the device makes the scheduling decision by using the Lyapunov optimization framework in the “Scheduler” module, and then downloads the related video segment via LTE through the “Video Downloader” module. Finally, the device passes the downloaded video data to the target device through the “Video Transfer” module.
We notice that there may be many useless READY messages (without ACK replies), especially in the scenario where users are more likely to be in the idle mode than being in need of help (e.g., when users want to download video occasionally and do not have any download requests most of the time). This may generate a lot of additional unnecessary overhead. To reduce the unnecessary overhead caused by the unnecessary READY messages, we further introduce a “sleeping mode” for downloaders. The idea is to put downloaders to “sleep” (as far as collaboration is concerned^{16}^{16}16Note that the downloader can still work on his own other tasks at the same time.) when there is no further downloading request. This can be achieved by two functions called “Sleep” and “Awake” in the Controller module of downloaders. The main task of “Sleep” is to turn a downloader into the sleeping mode when the downloader fails to receive an ACK message in a prespecified time frame (e.g., 10 seconds) after initiating a READY message. A downloader in the sleeping mode will no longer generate new READY message, until it is awaken. The main task of “Awake” is to awake a sleeping downloader when the downloader overhears an ACK message (possibly to other downloaders). Of course, each requester needs to initiate a virtual ACK message at the very beginning to awake all potential downloaders. Obviously, with the above “Sleep” and “Awake” functions, our current approach can effectively reduce the unnecessary READY messages in the scenario mentioned above.
4) Real Experiments: To illustrate the real performance of our proposed cooperative streaming, we further perform experiments over a demo system with 3 Raspberry PI devices, denoted by {1, 2, 3}. The video server is set up on a lab computer, the video bitrates set is {0.5, 1.0, 2.2, 5.0}Mbps, and the segment length equals 10s.
We perform experiments in the scenario where devices have different cellular link capacities. The goal is to illustrate how high capacity devices can help low capacity devices to improve the overall video streaming stability and performance of all devices. In these experiments, each device has an average cellular link capacity of 3.5Mbps (when connecting to the Internet). Device 3 is always connected to the Internet, while device 1 is disconnected from the Internet during the 25th to the 75th seconds and device 2 is disconnected from the Internet during the 50th to the 100th seconds.
Figure 7 illustrates the video scheduling results for all devices {1, 2, 3} in a particular experiment round. Here xaxis corresponds to the video streaming time horizon (of 100 second). In each subfigure, the green curve denotes the realtime cellular link capacity of the corresponding device, the yellow dash curve denotes the realtime buffer level of the corresponding device, the blue stems with “circle” denote the segments downloaded by the device itself, and the red stems with “triangle” denote the segments downloaded by other devices through cooperation. From Figure 7, we can see that although devices 1 and 2 are disconnected from the Internet half of the time, they are still able to download and play the video smoothly with the help of device 3. By averaging the results over multiple experiment rounds, we find that our proposed cooperative streaming scheme can improve the average social welfare by up to 50.9% on average, comparing with the traditional noncooperative streaming scheme.
A.2 SingleUser Simulation Results
Now we construct experiments for the singleuser scenario (i.e., noncooperative scenario), where the user plays a highresolution video (bitrate Mbps). Similar as in the multiuser experiments, the total video length is 500 seconds, the segment length is 2 seconds, and the maximum buffer length at the user’s device is 40 seconds. We use these singleuser experiments to illustrate the performance gap of our proposed Lyapunovbased online algorithm to the theoretical performance bound. We also use these experiments to compare the bitrate adaptation performance of our proposed algorithm with the existing online algorithms.
Figure 8 shows the average bitrate and social welfare under different average link capacities (extracted from the measured link throughput traces). Red curve/black bar denotes the theoretical upperbound (benchmark), Blue curve/bar denotes the proposed Lyapunovbased online algorithm, Green curve/bar denotes the channel predictionbased algorithm in [7], and Pink curve/bar denotes the bufferbased algorithm in [6]. Each point in subfigures (a) and (b) denotes the average bitrate and social welfare generated in one experiment (corresponding to a particular choice of data trace), respectively. Subfigures (c) and (d) shows the average bitrate and average social welfare in 1000 experiments under different average link capacity ranges. For example, in the first bar group, we calculate the average bitrate and average social welfare achieved in all experiments with an average link capacity below 0.7Mbps.
We can see from (a) and (c) that our proposed algorithm (Blue) achieves an average bitrate higher than other two algorithms (with an average bitrate increase of ), and is very close to the offline benchmark (Red). We can further see from (b) and (d) that our proposed algorithm achieves an average social welfare higher than other two algorithms (with an average gain of ), and is very close to the theoretical upperbound (with an average gap less than ). Moreover, the social welfare gain decreases with the maximum link capacity. This is because with a larger link capacity, all algorithms approach to the upperbound, hence their differences become less significant.
The above experiments demonstrate that the bitrate adaptation mechanism in our algorithm is better than those in [6] and [7]. By Theorem 2, our algorithm asymptotically converges to the theoretical performance upperbound (with a controllable gap), while the other two algorithms represent some reasonable heuristics without a theoretical performance guarantee.