Dynamic advertisement stream replacement
Mechanisms are provided for replacing default advertisement streams in a media stream with replacement advertisement streams. User profile information is obtained for a particular user and/or device. A default advertisement stream is identified and replaced with advertisement streams selected using the user profile information. Timestamp information and sequence number information is maintained to allow uninterrupted delivery of the modified media stream while customizing media streams for particular users.
1 . A method comprising:
receiving, at a content relay device from a network device, a media stream comprising (a) a first group of video objects, (b) a second group of video objects following the first group of video objects, and (c) a third group of video objects following the second group of video objects, wherein each video object in the third group of video objects is associated with a respective video object identifier and comprises metadata comprising information indicative of a sequence;
receiving, at the content relay device, a supplemental group of video objects from an additional network device;
generating, at the content relay device, a relay stream by replacing the second group of video objects with the supplemental group of video objects;
based at least in part on determining that a number of video objects of the supplemental group of video objects is greater than a number of video objects of the second group of video objects, modifying for each video object in the third group of video objects, at the content relay device, the metadata comprising the information indicative of the sequence; and
relaying the relay stream to a user device.
2 . The method of claim 1 , wherein the third group of video objects comprises a first video object indicated as a start object by the respective video object identifier, and a second video object indicated as an end object by the respective video object identifier, and wherein the start object and the end object specify an inclusive range of video objects of the third group of video objects.
3 . The method of claim 1 , wherein modifying the metadata comprising the information indicative of the sequence further comprises modifying a bitrate of a replacement media stream associated with the supplemental group of video objects to match a bitrate of the media stream.
4 . The method of claim 1 , wherein replacing the second group of video objects with the supplemental group of video objects further comprises removing a plurality of data segments corresponding to the media stream and inserting a plurality of data segments corresponding to a replacement media stream associated with the supplemental group of video objects.
5 . The method of claim 1 , wherein the supplemental group of video objects is associated with a replacement media stream, and wherein the replacement media stream is selected by the content relay device based at least in part on location information associated with the user device.
6 . The method of claim 1 , wherein the respective video object identifier associated with each video object in the third group of video objects is a sequential integer.
7 . The method of claim 1 , wherein the first group of video objects and the third group of video objects are not replaced with the supplemental group of video objects.
8 . The method of claim 1 , wherein relaying the relay stream to the user device comprises providing seamless playback of the media stream and a replacement media stream associated with the supplemental group of video objects on the user device.
9 . The method of claim 2 , further comprising incrementing each respective video object identifier by offsetting the respective video object of each of the start object and the end object.
10 . The method of claim 5 , wherein selecting the replacement media stream is further based at least in part on a timestamp information match with the media stream.
11 . A system comprising:
a memory;
a control circuitry; and
an input/output (I/O) circuitry configured to:
receive, at a content relay device from a network device, a media stream comprising (a) a first group of video objects, (b) a second group of video objects following the first group of video objects, and (c) a third group of video objects following the second group of video objects, wherein each video object in the third group of video objects is associated with a respective video object identifier and comprises metadata comprising information indicative of a sequence, and wherein the media stream is stored in the memory;
receive, at the content relay device, a supplemental group of video objects from an additional network device;
generate, at the content relay device, a relay stream by replacing the second group of video objects with the supplemental group of video objects;
wherein the control circuitry is configured to:
based at least in part on determining that a number of video objects of the supplemental group of video objects is greater than a number of video objects of the second group of video objects, modify for each video object in the third group of video objects, at the content relay device, the metadata comprising the information indicative of the sequence; and
wherein the I/O circuitry is configured to:
relay the relay stream to a user device.
12 . The system of claim 11 , wherein the third group of video objects comprises a first video object indicated as a start object by the respective video object identifier, and a second video object indicated as an end object by the respective video object identifier, and wherein the start object and the end object specify an inclusive range of video objects of the third group of video objects.
13 . The system of claim 11 , wherein the control circuitry is configured to modify the metadata comprising the information indicative of the sequence by modifying a bitrate of a replacement media stream associated with the supplemental group of video objects to match a bitrate of the media stream.
14 . The system of claim 11 , wherein the I/O circuitry is configured to replace the second group of video objects with the supplemental group of video objects by removing a plurality of data segments corresponding to the media stream and inserting a plurality of data segments corresponding to a replacement media stream associated with the supplemental group of video objects.
15 . The system of claim 11 , wherein the supplemental group of video objects is associated with a replacement media stream, and wherein the replacement media stream is selected by the content relay device based at least in part on location information associated with the user device.
16 . The system of claim 11 , wherein the respective video object identifier associated with each video object in the third group of video objects is a sequential integer.
17 . The system of claim 11 , wherein the first group of video objects and the third group of video objects are not replaced with the supplemental group of video objects.
18 . The system of claim 11 , wherein the I/O circuitry is configured to relay the relay stream to the user device by providing seamless playback of the media stream and a replacement media stream associated with the supplemental group of video objects on the user device.
19 . The system of claim 12 , wherein the control circuitry is further configured to increment each respective video object identifier by offsetting the respective video object of each of the start object and the end object.
20 . The system of claim 15 , wherein the control circuitry is configured to select the replacement media stream based at least in part on a timestamp information match with the media stream.