Systems and methods for adjusting buffer size
Methods and systems are provided for adjusting a size of a buffer based on a probability that a rewind request will be received during a currently playing segment of media. When the system determines that receiving a rewind request is likely, the system will increase the size of a buffer such that the rewind request can be accommodated using data from the buffer. When the system determines that receiving a rewind request is unlikely, the system will decrease the size of the buffer to free resources for other system components.
1 . A method comprising:
buffering a first segment of a media asset in a buffer having a size equal to a first buffer size;
receiving metadata associated with a second segment of the media asset,
wherein the metadata comprises an indication of an event associated with the second segment;
determining that a rewind request associated with the second segment is unlikely based on:
storing a media asset viewing history in a profile of a user;
determining, based on the media asset viewing history, an event preference of the user; and
determining, based on the event preference, that the event associated with the second segment does not match an event preference of the user;
based on the determining, decreasing the size of the buffer from the first buffer size to a second buffer size, wherein the second buffer size is smaller than the first buffer size;
receiving the second segment of the media asset; and
buffering the second segment of the media asset in the buffer having the second buffer size.
2 . The method of claim 1 , wherein the metadata associated with the second segment of the media asset comprises an indication of rewind requests, for the second segment of the media asset, from a plurality of users.
3 . The method of claim 1 , wherein determining that the rewind request associated with the second segment is unlikely comprises:
calculating a probability of receiving a rewind request while causing to be output the second segment; and
determining that the probability is less than a predetermined value.
4 . The method of claim 1 , further comprising increasing the size of the buffer from the second buffer size to the first buffer size in response to detecting an end of the second segment.
5 . The method of claim 1 , further comprising:
calculating an amount of memory required to store the second segment; and
setting the second buffer size based on the calculated amount of memory.
6 . The method of claim 1 , wherein the first buffer size is a maximum size of the buffer.
7 . The method of claim 1 , further comprising:
receiving a third segment of the media asset;
determining that a first likelihood of receiving a rewind request associated with the third segment exceeds a second likelihood of receiving the rewind request associated with the second segment;
in response to determining that the first likelihood exceeds the second likelihood, increasing the size of the buffer; and
buffering the third segment of the media asset in the buffer subsequent to increasing the size of the buffer.
8 . The method of claim 1 , further comprising:
causing to be displayed first segment of the media asset;
retrieving the second segment of the media asset from the buffer in response to detecting an end of the first segment; and
causing to be displayed the second segment of the media asset from the buffer.
9 . The method of claim 1 , wherein the second segment of the media asset is received from a server via a network connection.
10 . A system comprising control circuitry configured to:
buffer a first segment of a media asset in a buffer having a size equal to a first buffer size;
receive metadata associated with a second segment of the media asset, wherein the metadata comprises an indication of an event associated with the second segment;
determine that a rewind request associated with the second segment is unlikely based on:
storing a media asset viewing history in a profile of a user;
determining, based on the media asset viewing history, an event preference of the user; and
determining, based on the event preference, that the event associated with the second segment does not match an event preference of the user;
based on the determining, decrease the size of the buffer from the first buffer size to a second buffer size, wherein the second buffer size is smaller than the first buffer size;
receive the second segment of the media asset; and
buffer the second segment of the media asset in the buffer having the second buffer size.
11 . The system of claim 10 , wherein the metadata associated with the second segment of the media asset comprises an indication of rewind requests, for the second segment of the media asset, from a plurality of users.
12 . The system of claim 10 , wherein the control circuitry is further configured, when determining that the rewind request associated with the second segment is unlikely, to:
calculate a probability of receiving a rewind request while causing to be output the second segment; and
determine that the probability is less than a predetermined value.
13 . The system of claim 10 , wherein the control circuitry is further configured to increase the size of the buffer from the second buffer size to the first buffer size in response to detecting an end of the second segment.
14 . The system of claim 10 , wherein the control circuitry is further configured to:
calculate an amount of memory required to store the second segment; and
set the second buffer size based on the calculated amount of memory.
15 . The system of claim 10 , wherein the first buffer size is a maximum size of the buffer.
16 . The system of claim 10 , wherein the control circuitry is further configured to:
receive a third segment of the media asset;
determine that a first likelihood of receiving a rewind request associated with the third segment exceeds a second likelihood of receiving the rewind request associated with the second segment;
in response to determining that the first likelihood exceeds the second likelihood, increase the size of the buffer; and
buffer the third segment of the media asset in the buffer subsequent to increasing the size of the buffer.
17 . The system of claim 10 , wherein the control circuitry is further configured to:
cause to be displayed first segment of the media asset;
retrieve the second segment of the media asset from the buffer in response to detecting an end of the first segment; and
cause to be displayed the second segment of the media asset from the buffer.
18 . The system of claim 10 , further comprising network circuitry configured to receive the second segment of the media asset from a server.