Server-side streaming content stitching
Disclosed herein are various embodiments for server-side scene change content stitching. An example embodiment operates by providing first content for display on a display device. A point in a timeline of the first content when second content is to be displayed is identified. A scene change in the first content closest to the point in the timeline is identified. A first frame having a distance X prior to the scene change is identified, and the first content for display. The second content is provided for display on the display device beginning at the scene change. At a conclusion of the second content, the display is paused, and seeking and decoding the first content to the scene change by decoding the first content to the identified first frame plus the distance X is performed. The decoded first content, from the scene change, is provided to the display device for display.
1 . A computer-implemented method, comprising:
providing, by at least one computer processor, first content for display on a display device;
identifying a point in a timeline of the first content when second content is to be displayed in lieu of the first content;
identifying a scene change in the first content closest to the point in the timeline wherein the scene change is different from the point in the timeline;
identifying a first frame having a distance X prior to the scene change;
providing the first content for display on the display device to the identified first frame plus the distance X;
providing the second content for display on the display device beginning at the scene change;
at a conclusion of the second content, pausing display on the display device;
in response to pausing the display, seeking and decoding the first content to the scene change by decoding the first content to the identified first frame plus the distance X, wherein the decoding of the first content commences from the scene change, and wherein the seeking and decoding of the first content occurs in a background process; and
providing the decoded first content, from the scene change, to the display device for display.
2 . The computer-implemented method of claim 1 , wherein the identified first frame is an I-frame or an IDR-frame.
3 . The computer-implemented method of claim 1 , wherein the seeking and decoding the first content to the scene change comprises:
seeking the first content to the identified first frame; and
decoding the first content to the identified first frame plus X.
4 . The computer-implemented method of claim 1 , further comprising:
determining the scene change based on metadata corresponding to the first content.
5 . The computer-implemented method of claim 1 , wherein the pausing the display further comprises buffering the decoded first content.
6 . The computer-implemented method of claim 1 , further comprising:
identifying a second point in the timeline of the first content when third content is to be displayed in lieu of the first content;
identifying a second scene change in the first content closest to the second point;
identifying a second frame having a distance Y after the second scene change; and
providing the first content for display on the display device to the identified second frame minus the distance Y.
7 . The computer-implemented method of claim 6 , further comprising:
providing the third content for display on the display device beginning at the second scene change;
at a conclusion of the third content, pausing display on the display device;
decoding the first content to the second scene change; and
providing the decoded first content from the second scene change to the display device for display.
8 . The computer-implemented method of claim 7 , wherein the providing the decoded first content from the second scene change further comprises:
playing the decoded first content on the display device to the identified second frame minus the distance Y, wherein the identified second frame is after the second scene change.
9 . A system, comprising:
a memory; and
at least one processor coupled to the memory and configured to perform operations comprising:
providing first content for display on a display device;
identifying a point in a timeline of the first content when second content is to be displayed in lieu of the first content;
identifying a scene change in the first content closest to the point in the timeline wherein the identified scene change is different from the point in the timeline;
identifying a first frame having a distance X prior to the scene change;
providing the first content for display on the display device to the identified first frame plus the distance X;
providing the second content for display on the display device beginning at the scene change;
at a conclusion of the second content, pausing display on the display device;
in response to pausing the display, seeking and decoding the first content to the scene change by decoding the first content to the identified first frame plus the distance X, wherein the decoding of the first content commences from the scene change, and wherein the seeking and decoding of the first content occurs in a background process; and
providing the decoded first content, from the scene change, to the display device for display.
10 . The system of claim 9 , wherein the identified first frame is an I-frame or an IDR-frame.
11 . The system of claim 9 , wherein the seeking and decoding the first content to the scene change comprises:
seeking the first content to the identified first frame; and
decoding the first content to the identified first frame plus X.
12 . The system of claim 9 , the operations further comprising:
determining the scene change based on metadata corresponding to the first content.
13 . The system of claim 9 , wherein the pausing the display further comprises buffering the decoded first content.
14 . The system of claim 9 , wherein the operations further comprise:
identifying a second point in the timeline of the first content when third content is to be displayed in lieu of the first content;
identifying a second scene change in the first content closest to the second point;
identifying a second frame having a distance Y after the second scene change; and
providing the first content for display on the display device to the identified second frame minus the distance Y.
15 . The system of claim 14 , wherein the operations further comprise:
providing the third content for display on the display device beginning at the second scene change;
at a conclusion of the third content, pausing display on the display device;
decoding the first content to the second scene change; and
providing the decoded first content from the second scene change to the display device for display.
16 . The system of claim 15 , wherein the providing the decoded first content from the second scene change further comprises:
playing the decoded first content on the display device to the identified second frame minus the distance Y, wherein the identified second frame is after the second scene change.
17 . A non-transitory computer-readable medium having instructions stored thereon that, when executed by at least one computing device, cause the at least one computing device to perform operations comprising:
providing, by at least one computer processor, first content for display on a display device;
identifying a point in a timeline of the first content when second content is to be displayed in lieu of the first content;
identifying a scene change in the first content closest to the point in the timeline wherein the identified scene change is different from the point in the timeline;
identifying a first frame having a distance X prior to the scene change;
providing the first content for display on the display device to the identified first frame plus the distance X;
providing the second content for display on the display device beginning at the scene change;
at a conclusion of the second content, pausing display on the display device;
in response to pausing the display, seeking and decoding the first content to the scene change by decoding the first content to the identified first frame plus the distance X, wherein the decoding of the first content commences from the scene change, and wherein the seeking and decoding of the first content occurs in a background process; and
providing the decoded first content, from the scene change, to the display device for display.
18 . The non-transitory computer-readable medium of claim 17 , wherein the identified first frame is an I-frame or an IDR-frame.
19 . The non-transitory computer-readable medium of claim 17 , wherein the operations further comprise:
identifying a second point in the timeline of the first content when third content is to be displayed in lieu of the first content; and
identifying a second scene change in the first content closest to the second point;
identifying a second frame having a distance Y after the second scene change; and
providing the first content for display on the display device to the identified second frame minus the distance Y.
20 . The non-transitory computer-readable medium of claim 19 , wherein the operations further comprise:
providing the third content for display on the display device beginning at the second scene change; and
at a conclusion of the third content, pausing display on the display device;
decoding the first content to the second scene change; and
providing the decoded first content from the second scene change to the display device for display.