Method for adaptively streaming an audio/visual material

A method for adaptively streaming an audio/visual (AV) material includes: processing a plurality of current data packets stored in a data buffer to play media segments of the AV material at a current quality; during playback of a current one of the media segments, determining whether a new data packet for playing a candidate one of the media segments at an improved quality is able to be completely downloaded in time; when the determination is affirmative, downloading the new data packet and processing the new data packet to play the candidate one of the media segments of the AV material at the improved quality on the player interface when the new data packet is completely downloaded and stored in the data buffer.

FIELD

The disclosure relates to a method for adaptively streaming an audio/visual material.

BACKGROUND

Nowadays, the technology of streaming media files for playing an audio/visual material (e.g., a video, an audio media, etc.) on an electronic device has become common. In general, the media files demanded by a user are requested by the electronic device and subsequently received from a data server via a network such as the Internet. Typically, the audio/visual material may be available from the data server in a number of different qualities. A user may designate one of the qualities, or authorize a player application to dynamically determine a suitable quality during the playing of the audio/visual material. This technology may be referred to as adaptive bitrate streaming.

A number of ways may be employed for implementing adaptive bitrate streaming. For example, the HyperText Transfer Protocol (HTTP) may be used in transmitting data over a computer network. The player application may continuously detect a network bandwidth and a capacity of a central processing unit (CPU) of the electronic device. When the user operates the electronic device to control the player application to start playing the audio/visual material, the CPU transmits a request to a source of the streaming media files, requesting data packets constituting media file segments having a lowest quality. Afterward, the electronic device starts downloading the data packets that constitute the media file segments, stores the data packets in a data buffer of a memory device of the electronic device, and starts playing the media file segments sequentially (that is, using an interface to “play” the media file segments for the user).

During the playing of the media file segments, the CPU compares the network bandwidth with a bitrate of the media file segments, and determines whether a higher quality may be achieved.

It is noted that, when all of the media file segments constituted by the data packets stored in the data buffer has been played, and new data packets constituting a new media file segment have not been completely downloaded yet, the playing may be forcibly paused, entering a buffering state to wait for the new data packets to be downloaded in full. Such an event may be referred to as stalling.

SUMMARY

One object of the disclosure is to provide a method that enables improvement of streaming of an audio/visual (AV) material when feasible, without causing stalling.

According to one embodiment of the disclosure, the method is implemented by an electronic device that includes a processor, a memory device having a data buffer, and a display. The data buffer stores plurality of current data packets that constitute a plurality of successive media segments of the AV material, respectively. The method includes:

generating, by the processor, a player interface on the display;

processing, by the processor, the current data packets stored in the data buffer to play the media segments of the AV material at a current quality on the player interface one by one;

during playback of a current one of the media segments, determining, by the processor for a candidate one of the media segments after the current one, whether a new data packet for playing the candidate one of the media segments at an improved quality higher than the current quality is able to be completely downloaded before the candidate one of the media segments is expected to be played, based on a current network bandwidth of a network between the electronic device and a server that provides the new data packet, and an amount of the current data packets currently stored in the data buffer;

when the determination is affirmative, downloading the new data packet; and

processing, by the processor, the new data packet when the new data packet is completely downloaded and stored in the data buffer to play the candidate one of the media segments of the AV material at the improved quality on the player interface at the time when the candidate one of the media segments is expected to be played.

Another object of the disclosure is to provide an electronic device that is capable of performing the above-mentioned method.

According to one embodiment of the disclosure, the electronic device includes a processor, a memory device having a data buffer, and a display. The data buffer stores a plurality of current data packets that constitute a plurality of successive media segments of an audio/visual (AV) material, respectively. The processor is programmed to perform operations including:

generating a player interface on the display;

processing the current data packets stored in the data buffer to play the media segments of the AV material at a current quality on the player interface one by one;

during playback of a current one of the media segments, determining, for a candidate one of the media segments after the current one, whether a new data packet for playing the candidate one of the media segments at an improved quality higher than the current quality is able to be completely downloaded before the candidate one of the media segments is expected to be played, based on a current network bandwidth of a network between the electronic device and a server that provides the new data packet, and an amount of the current data packets currently stored in the data buffer;

when the determination is affirmative, downloading the new data packet; and

processing the new data packet when the new data packet is completely downloaded and stored in the data buffer to play the candidate one of the media segments of the AV material at the improved quality on the player interface at the time when the candidate one of the media segments is expected to be played.

Yet another object of the disclosure is to provide a non-transitory computer-readable medium storing instructions that, when executed by a processor, cause the processor to perform the above-mentioned method.

DETAILED DESCRIPTION

FIG. 1Ais a block diagram illustrating a system100for adaptively streaming an audio/visual (AV) material according to one embodiment of the disclosure, andFIG. 1Billustrates a pipeline of the system100. The system100includes a server102, a data storage104and an electronic device106.

The server102is embodied using a computer device, and is configured to communicate with the electronic device106via a network (e.g., the Internet).

The data storage104is coupled to the server102, and may be embodied using a hard disk array storing data accessible by the server102.

The electronic device106may be embodied using a personal computer, a laptop, a tablet, a personal digital assistant, a mobile device, a cellular phone, etc.

The electronic device106includes a processor110, a communication component112, a memory device114, a storage component116, a random access memory (RAM)118and a user interface120.

The processor110may be embodied using a central processing unit (CPU), and is capable of executing machine instructions to perform various operations.

The communication component112may be controlled by the processor110to establish a network connection with the server102via the network. The network connection may be wired or wireless (e.g., a cellular network such as long-term evolution (LTE), LTE advanced, etc.).

The memory device114may include a number of data buffers for storing data therein. In this embodiment, the memory device114is embodied using a physical memory (e.g., flash RAM), and has three data buffer blocks1142,1144and1146.

The storage component116may be embodied using a non-transitory storage medium such as a hard disk, a solid state disk, a flash storage (e.g., a universal flash storage (UFS)), etc. The storage component116may store a player application therein. The player application includes instructions that, when loaded into the RAM118and executed by the processor110, cause the processor110to perform various operations. For example, the processor110executing the instructions of the player application may perform functions of a media demultiplexer (demuxer)130, a number of decoders140and a renderer150.

The user interface120includes a display screen, an input mechanism and an electronic speaker. For example, the display screen and the input mechanism of the user interface120may be integrated as a touch screen allowing interaction with the user. In other examples, the input mechanism may include a keyboard, a mouse, a stylus pen/graphics tablet, etc.

The electronic device106may also include other components that are built-in the electronic device106and/or externally connected thereto via a wired or a wireless connection (e.g., Bluetooth®) to serve as the user interface120. For example, the electronic device106may further include a microphone, a camera, a touch panel, and/or a sound recorder, etc.

In this embodiment, the electronic device106is embodied using a mobile phone, and the network connection is established using a cellular network technology such as LTE/LTE advanced.

When the user intends to watch/listen to an audio/visual (AV) material (e.g., a video, an audio media, etc.) from an online source (e.g., the server102), he/she may operate the electronic device106to execute the player application. For example, the user may operate a web browser to access a link of a website containing a media file for playing the AV material, and request the media file to be downloaded to the electronic device106.

In response to the user operation, the processor110controls the communication component112to transmit a request for the media file to the server102in order to download and process the media file, a process referred to as “streaming”. In turn, the server102starts transmitting parts of the media file stored in the data storage104. The parts of the media file may be transmitted to the electronic device106over the network, in the form of data packets.

The data packets received by the communication component112are first stored in the data buffer1142. Under execution of the player application, the demuxer130performs a demultiplexing operation in order to extract individual elementary streams (e.g., audio, video, subtitles, etc.) from the data packets stored in the data buffer1142. The elementary streams are then stored in the data buffer1144.

Under execution of the player application, the decoders140are configured to perform decoding operations to decode the elementary streams, respectively. As a result, a number of decoded frames, each including a timestamp indicating a time instance within a duration of the media file, are generated and stored in the data buffer1146.

Afterward, under execution of the player application, the renderer150retrieves the decoded frames from the data buffer1146, and renders (i.e., plays) the decoded frames sequentially based on the respective timestamps. The user is therefore able to watch/listen to segments of the AV material corresponding to the parts of the media file that have been downloaded, processed and rendered.

In this embodiment, playback of the AV material may be done by the processor110generating a player interface200on the display screen, as shown inFIG. 2. Specifically, the processor110may process the data packets stored in the data buffers1142,1144and1146to play the media segments of the AV material at a current quality on the player interface200one by one.

The player interface200includes a media playing section for displaying the decoded frames, and a manual control section. The manual control section may include a progress bar210, a control set220and an icon set230.

The progress bar210includes a current playback location icon214, and a buffered section216illustrating a portion of the media file that has been downloaded and processed. That is to say, even if the network connection between the electronic device106and the server102is now disabled, the user is still able to watch/listen to the content of the AV material up to the end of the buffered section216.

The control set220may include control options for allowing the user to play/pause the AV material, to adjust a volume, to switch between a normal mode and a full screen mode, and to select a desired quality from a number of qualities that are available in the server102for the AV material. In some embodiments, if the user does not specify a desired quality, the processor110may request parts of the media file in a default quality based on a type of the network connection. For example, when it is detected that the network connection is established using a wired connection or Wi-Fi, the default quality may be set to a higher level of the available qualities (e.g., 720p, 1080p, etc.). On the other hand, when it is detected that the network connection is established using a cellular network connection (e.g., 3G telecommunication network, LTE, LTE advanced, etc.), the default quality may be set to a lower level of the available qualities (e.g., 360p, 480p, etc.).

It is noted that at a higher quality, more details of the AV material can be included and provide a better experience to the user, in the expense of an enlarged file size of the media file. On the other hand, media files with a lower quality are smaller in size and faster to download, but may be less than satisfactory to the user. For example, a low quality video may look somewhat blurred to the user.FIG. 3illustrates a number of exemplary qualities, with respective bitrates (bits per second).

In some embodiments, when the network connection is established using a cellular network connection, it may not be feasible to continuously implement the streaming of a media file at a relatively high quality due to a number of reasons. For example, a network capacity (e.g., a network bandwidth) of the cellular network connection may be unstable, and may not be consistently sufficient for downloading of the high quality parts of the media file, which are inherently larger in size, without causing stalling of the playback of the AV material. Additionally, the large amount of downloaded data may incur additional service charges to the user without an unlimited data plan from a networking service provider. Thus, a lower quality is typically recommended as a default quality in such a condition.

However, there may be instances where the user demands to view/listen to a certain media segment of the AV material (e.g., an important play in a ballgame) at an improved quality. In such cases, during the playback of the AV material, the user may transmit a request to the electronic device106via the user interface120requesting for a temporary quality improvement.

In some embodiments, the request may be in the form of a predetermined gesture inputted via the user interface (e.g., a number of touch signals on the touch screen resulted from a user gesture), a physical gesture captured by a camera communicating with the processor110, an interaction with a button displayed on the Mayer interface200(e.g., a user confirmation icon included in the icon set230), an interaction with one or more physical buttons on one of the electronic device110and a remote device communicating with the electronic device110, and a voice command captured by a sound recorder communicating with the processor110.

In response to the request from the user, the processor110is programmed to perform a method for adaptively streaming the AV material.FIG. 4is a flow chart illustrating steps of the method, according to one embodiment of the disclosure.

In step402, the user interface120receives the request, and the processor110performs an initialization. Specifically, for initialization, the processor110sets a flag (IsC) as false (e.g., a binary number 0) indicating that the method is not to be terminated, and sets a flag (Fti) as false (e.g., a binary number 0) indicating that a request for forced improvement is not received. It is noted that, during any stage of the method, when it is determined that a request for forced improvement is received from the user interface120, the flag (Fti) is set to true.

In step404, the processor110determines whether the flag (IsC) is true. Specifically, a number of incidents may cause the flag (IsC) to become true, such as an occurrence of a network timeout longer than a pre-calculated timeout threshold. When it determined, at any point during the process of the method, that the flag (IsC) is true, the method is terminated. Otherwise, the flow proceeds to step406.

In step406, the processor110attempts to perform an update on the status of the data buffers1142to1146at the instant of the request from the user, in order to determine whether the temporary quality improvement may be implemented without causing stalling or additional buffering.

Specifically, the data stored in the data buffer1142were received in the form of a plurality of current data packets. After processing, the data stored in the data buffer1146is in the form of decoded media frames that constitute a plurality of successive media segments of the AV material. Each of the media segments can be rendered to “play” for a predetermined time duration (e.g., 3 seconds).

In one example as illustrated inFIG. 5, the current data packets constituting ten media segments are stored in sequence in the data buffer1146based on the time stamps, and a pipeline of the media segments starts at the media segment (N) that starts at a specific time instance of the AV material (e.g., at 00:30). A last one of the media segments (N+9) in the pipeline starts at (00:57) and has a duration of three seconds, and the ten media segments cooperatively constitute a playing duration of 30 seconds, during which the renderer150is able to continuously play the AV material without downloading additional data packets. In some embodiments, the processor110continuously calculates the playing duration of the media segments as a whole based on the amount of the current data packets currently stored in the data buffer1146, and controls the player interface200to display the playing duration thus calculated.

It is noted that, during the playing of the AV material, depending on a current bandwidth of the network connection and/or a capacity of the memory device114, the number of media segments (received in the form of data packets) that are stored in the data buffer1146and that are available for playing may continuously change.

FIG. 6illustrates the different sizes of the media segments, represented by the various titrates. It is noted that the method is typically implemented during the rendering of one of the media segments. For example, when the current playback time of the AV material is 00:31, it may be implied that the current media segment (S10) has been played for one second. That is to say, the current media segment (S10) has an offset of one second. Moreover, the last one of the media segments may be only partially downloaded. For example, the media segment (S19) may include only one second's worth of the AV material. Therefore, without additional data packet, the renderer150may play the AV material until 00:58.

That is to say, in step406, during playing of a current one of the media segments, the processor110determines, for a candidate one of the media segments after the current one, whether at least one new data packet for playing the candidate one of the media segments at an improved quality higher (i.e., better, clearer, more detailed, etc.) than the current quality is able to be completely downloaded before the candidate one of the media segments is expected to be played.

FIG. 7is a flow chart illustrating sub-steps associated with step406.

In sub-step702, the processor110designates a candidate one of the media segments. In this embodiment, the processor110identifies the current one of the media segments that is being played (S10), and selects a next one of the media segments immediately succeeding the current one of the media segments as the candidate one. Taking the example ofFIG. 6, the media segment (S11) is designated as the candidate one.

In sub-step704, the processor110calculates the playing duration, and compares the playing duration with a threshold duration (e.g., 10 or 15 seconds). When it is determined that the threshold duration is longer than the playing duration, the flow proceeds to sub-step716, in which the processor110may determine that a temporary quality improvement is not feasible, and sets the flag (IsC) to the true value, thereby terminating the method. Otherwise, the flow proceeds to sub-step706.

In sub-step706, the processor110obtains, for the candidate one of the media segments, a degree of improvement that indicates a difference between a level of the current quality and a level of an improved quality. In general, there are seven levels of available qualities (i.e., 144p, 240p, 360p, 480p, 720p, 1080p and 1440p) for a streaming video. For example, when the current quality is 360p (level 3) and the improved quality is desired to be 720p (level 5), the degree of improvement is equal to 2.

Specifically, the improved quality may be a default quality that is available, or may be set by the user. For example, the user may manually set a target quality as the improved quality, and the processor10may then calculate the degree of improvement as a difference between the target quality and the current quality.

In other examples, the degree of improvement is obtained based on the request received via the user interface120. For example, when the user inputs the request twice successively, the degree of improvement is set as 2.

As shown inFIG. 8A, ten media segments to be played at respective current qualities, selected from the seven levels of the available qualities (i.e., level 1 to level 7), are shown. Assume that the user inputs the request once during the playing of the first one of the media segments. Since the current quality of the first one of the media segments is level 2, the processer110increments the current quality by one to obtain the level 3, and sets the target quality for all media segments to 3. The degree of improvement for all media segments may then be calculated. It is noted that for the media segments) at the level of the current quality equal to or higher (better) than 3, the degree of improvement is set to 0.

In another example as shown inFIG. 8B, after the user inputs the request once during the playing of the first one of the media segments, the processer110sets the degree of improvement for all media segments to 1.

In another example as shown inFIG. 8C, after the user inputs the request twice during the playing of the first one of the media segments, the processer110identifies a lowest quality (i.e., level 2) among the stored media segments, increments the lowest quality by 2, and sets the target quality for all media segments to 4. The degree of improvement for all media segments may then be calculated. It is noted that for the media segment(s) at the level of the current quality equal to or better than 4, the degree of improvement is set to 0. In this embodiment, the degree of improvement is determined using the process as illustrated inFIG. 8C, and since none of the current qualities of the media segments exceed level 4, the target quality for all media segments is set at 4.

After obtaining the degree of improvement for the candidate one of the media segments, in sub-step708, the processor110determines whether the degree of improvement is zero for the candidate one of the media segments. When it is determined that the degree of improvement is zero, the flow proceeds to sub-step714, in which the processor110selects a next one of the media segments immediately succeeding the media segment that is considered in sub-step706as the candidate one (e.g., (S12)), and repeats sub-steps704to708.

Otherwise, i.e., when it is determined that the degree of improvement is non-zero (i.e., greater than zero), the flow proceeds to sub-step710, in which the processor110determines whether at least one new data packet for playing the candidate one of the media segments at the target quality is able to be completely downloaded before the candidate one of the media segments is expected to be played. This may be done based on a current network bandwidth of the network between the electronic device106and the server102that provides the at least one new data packet, and a number of the current data packets currently stored in the data buffers1142to1146.

Specifically, the processor110first estimates a downloadable amount of data before the candidate one of the media segments is to be played. In the example as shown inFIG. 6, when the media segment (S11), starting at 00:33, is the candidate one of the media segments, and the current playback time is at 00:31, the processor110estimates the amount of data that can be downloaded within the next two seconds.

Next, the processor110calculates a size of the at least one new data packet that constitutes the candidate one of the media segments at the target quality, and compares the downloadable amount of data and the size of the at least one new data packet.

The following Table 1 shows a number of parameters associated with the estimations.

Based on the above Table 1, with two seconds of time for download, the downloadable amount of data may be estimated as 3750000 bits. This is done by defining a fraction (e.g., 75%) of a theoretical amount of downloadable data (2*2500000=5000000 bits) as the estimation, as specified in the ExoPlayer published by Google Inc.

The bitrate of the at least one new data packet constituting the media segment of the target quality may be found inFIG. 3, where the bitrate for level 4 of the quality is 1172416. As a result, the size of the at least one new data packet should be (1172416*3)=3517258. That is to say, based on the current network bandwidth, it is estimated that the at least one new data packet for improving the quality of the media segment (S11) may be completely downloaded and processed by the time instance when the media segment (S11) is expected to be played, which is 00:33.

When the determination in sub-step710is affirmative, the flow proceeds to step408. Otherwise, the flow proceeds to sub-step714.

In some embodiments, the processor110may further determine whether a request for forced improvement, indicating that the user intends to view the next one of the media segments at the target quality regardless of potential stalling, is received. When the request for forced improvement is received, the flow proceeds to step408regardless of the determination made in sub-step710.

In step408, the processor110controls the communication component112to transmit a request for the new packet(s) to the server102, so as to start the “improvement” of the candidate one of the media segments.

FIG. 9is a flow chart illustrating the process of step408.

In sub-step902, the processor110determines whether the request for forced improvement is received (i.e., the value of the flag (Fti)). When the determination is affirmative, the flow proceeds to sub-step904. Otherwise, the flow proceeds to sub-step906.

In sub-step904, the processor110discards any data packet stored in the data buffer1146that constitutes the candidate one of the media segments. This is done to free up the space of the data buffer1146given that the user does not intend to view/listen to the candidate one of the media segments at the current quality anyway, regardless of possible occurrence of stalling.

In sub-step906, the processor110controls the communication component112to start downloading the at least one new data packet.

In sub-step908, the processor110determines whether a terminate event (e.g., the user closes the player interface200) has occurred. When the determination is affirmative, the flow proceeds to sub-step922, in which an exception handling process is executed. Otherwise, the flow proceeds to sub-step910.

In sub-step910, the processor110determines whether a network timeout, during which the network between the electronic device106and the server102becomes inaccessible, has occurred and is longer than a pre-calculated timeout threshold. Using the parameters of Table 1, and considering the time required for download of the at least one new data packet and the hardware performance capacity of the electronic device106, the timeout threshold may be set at lower than 2 seconds.

When a network timeout is longer than the pre-calculated timeout threshold, the flow proceeds to sub-step912. Otherwise, the flow proceeds to sub-step916.

In sub-step912, the processor110determines whether the request for forced improvement is received. When the determination is affirmative, the flow goes back to sub-step906.

Otherwise, the flow proceeds to sub-step914, in which the processor110discards a downloaded part of the at least one new data packet, and processes a corresponding one of the current data packets stored in the data buffer1146to play the candidate one of the media segments of the AV material at the current quality on the player interface200. In this manner, while the improvement is unable to be achieved, the playing of the AV material may continue without having to pause.

In sub-step916, the processor110determines whether the at least one new data packet is completely downloaded. When the determination is affirmative, the flow proceeds to sub-step918. Otherwise, the flow proceeds to sub-step922.

In sub-step918, the processor110discards the data packet(s) stored in the data buffer1146constituting the candidate one of the media segments with the current quality. In sub-step920, the processor110replaces the discarded data packet(s) with the at least one new data packet (e.g., using a pointer to insert the at least one new data packet), and processes the at least one new data packet, so as to control the renderer150to play the candidate one of the media segments at the target quality at the time when the candidate one of the media segments is expected to be played.

With the improvement for the media segment (S11) completed, the flow of the method may go back to step404(seeFIG. 4) to determine the value the flag (IsC). When it is determined that the flag (IsC) is false, the flow proceeds to step406for a next one of the media segments (i.e., the media segment (S12)).

For example, as shown inFIG. 10, assuming that the downloading of the new data packet(s) for playing the media segment (S11) at the target quality is completed 1.5 seconds after the start of the method (i.e., 00:31), the processor110may now determine whether a number of new packets constituting the media segment (S12) with the target quality can be completely downloaded and processed before the playing of the media segment (S12) is expected to start (i.e., 00:36). As a result, the associated parameters are updated as shown in the following Table 2.

Based on the above parameters, the processor110may determine in sub-step710that the new packet(s) constituting the media segment (S12) with the target quality (level 4) can be completely downloaded and processed within 3.5 seconds, and the flow proceeds to sub-step712to start downloading the new data packets for the media segment (S12) with the target quality.

The method may then be repeated sequentially for other media segments stored in the data buffer1146.

At the playback time of 42ndsecond (the start of the media segment (S14)), as shown inFIG. 12, when the current bandwidth has dropped to 1200000 bps, the parameters are updated as shown in the following Table 3.

It is noted that due to the decrease of the current bandwidth, the processor110determines that the new packet(s) for improving the quality the media segment (S15) cannot be completely downloaded in time. In turn, the processor110determines that, for the next one of the media segment (S16), the 6-second time may be sufficient for fully downloading the new packet(s) for improving the quality of the media segment (S16). As a result, the improvement for the media segment (S16) is implemented.

As shown inFIG. 11, at the playback time of 00:50:5 second (2.5 seconds after the media segment (S16) starts), without the downloading of additional data packets, it may be determined by the processor110that the playing duration (7.5 seconds) is now less than the threshold duration (10 seconds). In such a case, the processor110sets the flag (IsC) as true, and the method is terminated. The processor110then continues playing subsequent media segments with the data packets currently stored in the data buffer1142, and starts controlling the communication component112to download the data packets constituting the media segments beyond the media segment (S19).

According to one embodiment of the disclosure, during the playback of the AV material, the processor110is programmed to automatically perform an evaluation process for determining whether the at least one new data packet for playing the candidate one of the media segments at the improved quality is able to be completely downloaded during playback of the current one of the media segments, and to generate an icon in the icon set230of the player interface200indicating whether quality improvement is available, based on a result of the evaluation process. For example, the icon may be a green light when quality improvement is available.

When the user is notified visually that quality improvement is available, he/she may interact with the icon to transmit a user confirmation to the electronic device106, and in response, the processor110may be programmed to download the at least one new data packet.

According to one embodiment of the disclosure, the processor110may further calculate the playing duration of the media segments based on the amount of the current data packets currently stored in the data buffer1146, and further calculate an improvement duration based on the current network bandwidth. The improvement duration is a duration in which at least one of the media segments of the AV material is able to be played at the desired quality. Then, the icon generated on the player interface200may include the playing duration and a ratio of the improvement duration and the playing duration. For example, when the processor110calculates that four of the ten media segments may be improved to reach the desired quality, the processor110may control the player interface200to display the playing duration (0:30) and the ratio (40%), as shown inFIG. 2.

According to one embodiment of the disclosure, the above calculations may be presented on the player interface200in an even more intuitive manner. Specifically, as shown inFIG. 13, the media segment(s) deemed to have quality improvement available is highlighted as a corresponding part of the progress bar. It is noted that different colors may be used when various degrees of improvement are available.

According to one embodiment of the disclosure, when the user selects the pause function during the playback of the AV material, the processor110temporarily pauses the playback of the media segments. At this stage, other functions related to quality improvement of the media segments may be implemented.

In one example, while the playback of the AV material is paused, the user may input the request for quality improvement via the user interface120. In response, the processor110may proceed to perform the quality improvement in a manner similar to that illustrated inFIG. 9.

Specifically, the processor110may start downloading replacement data packet(s) for playing the current one of the media segments (e.g., S10) at the improved/target quality. After the replacement data packet(s) for the current one of the media segments is completely downloaded, the processor110may start downloading the replacement data packet(s) for playing a next one of the media segments (e.g., S11) at the improved/target quality when it is determined that the playback of the AV material is still paused.

When the playback is resumed (by the user selecting the play function via the user interface120), and it is determined that the replacement data packet(s) for playing the current one of the media segments is not yet completely downloaded, the processor110may discard the downloaded part of the replacement data packet(s) and resume the playback of the current one of the media segments at the current quality. Alternatively, the processor110may delay the playback until the replacement data packet(s) is completely downloaded, as if the request is one for a forced improvement.

In another example, in response to the selection of the pause function, the processor110may immediately start downloading the replacement data packet(s) for playing the current one of the media segments (e.g., S10) at the improved/target quality. This action may be a selectable feature that may be enabled or disabled by the user.

When the playback is resumed, and it is determined that the replacement data packet(s) for playing the current one of the media segments is not yet completely downloaded, the processor110may similarly discard the downloaded part of the replacement data packet(s), or delay the playback of the current one of the media segments until the replacement data packet(s) is completely downloaded.