System and method for flexible video construction
First Claim
Patent Images
1. A method of video construction by a machine comprising at least a hardware processor, the method comprising:
- (a) accepting (I) an ordered list of video input files intended for being chained together, and (II) a single output video file name;
(b) checking that all of said video input files match each other by having same encoding, same format, and same codec;
(c) creating an output file using a chosen container which matches, by its encoding and format and codec, a container of said video input files;
(d) sequentially opening each of said video input files;
(e) reading each packet from each video input file, without packet decoding, wherein each video input file comprises video packets;
(f) if the packet is a video packet, then writing the packet as-is to a video stream of the output file;
(g) if the packet is an audio packet, then writing the packet as-is to an audio stream of the output file;
(h) tracking the DTS timestamp value and the PTS timestamp value of each audio packet and each video packet, to keep all streams synchronized after completion of processing of each video input file;
(i) ensuring continued synchronization of multiple joined video input files by adjusting both the audio and the video to have the exact same duration, by performing one of;
(A) selecting the later timestamp from all the video input streams for resynchronization, by performing either;
(I) adding a quiet audio delay, or (II) postponing the starting video frame for the next video input file;
(B) calculating an optimal time period based on lengths of the video input files and their sampling rates and codec types;
wherein the optimal time period results in a number of complete audio and video frames that start together and end together exactly within said optimal period; and
adjusting each video input file so that its length conforms to an exact multiple of the optimal time period as above; and
removing additional frames from the video input files either manually or automatically;
wherein step (i) is performed by determining a common synchronization period T for (I) encoded video that is saved at F frames per second, and (II) encoded audio that is sampled at S samples per second, wherein each audio frame has L samples,wherein the common synchronization period is calculated by using the following equations,
T=V=1/F=A×
L/S by determining the minimum integer values of parameter A and parameter V such that the following condition holds true;
V×
S=A×
F×
L;
wherein the method is performed by said machine which comprises at least said hardware processor.
1 Assignment
0 Petitions
Accused Products
Abstract
System and method for flexible video construction, particularly of a personalized video clip which provides instructions to a viewer with regard to health and wellness. An ordered list of video input files is chained together, to create a single output video file using a chosen container. Timestamp values are tracked, to ensure synchronization of multiple joined clips, optionally using adjustments of the audio channel or the video channel. A video construction server utilizes information from multiple sources, to construct the video clip.
-
Citations
17 Claims
-
1. A method of video construction by a machine comprising at least a hardware processor, the method comprising:
-
(a) accepting (I) an ordered list of video input files intended for being chained together, and (II) a single output video file name; (b) checking that all of said video input files match each other by having same encoding, same format, and same codec; (c) creating an output file using a chosen container which matches, by its encoding and format and codec, a container of said video input files; (d) sequentially opening each of said video input files; (e) reading each packet from each video input file, without packet decoding, wherein each video input file comprises video packets; (f) if the packet is a video packet, then writing the packet as-is to a video stream of the output file; (g) if the packet is an audio packet, then writing the packet as-is to an audio stream of the output file; (h) tracking the DTS timestamp value and the PTS timestamp value of each audio packet and each video packet, to keep all streams synchronized after completion of processing of each video input file; (i) ensuring continued synchronization of multiple joined video input files by adjusting both the audio and the video to have the exact same duration, by performing one of; (A) selecting the later timestamp from all the video input streams for resynchronization, by performing either;
(I) adding a quiet audio delay, or (II) postponing the starting video frame for the next video input file;(B) calculating an optimal time period based on lengths of the video input files and their sampling rates and codec types;
wherein the optimal time period results in a number of complete audio and video frames that start together and end together exactly within said optimal period; and
adjusting each video input file so that its length conforms to an exact multiple of the optimal time period as above; and
removing additional frames from the video input files either manually or automatically;wherein step (i) is performed by determining a common synchronization period T for (I) encoded video that is saved at F frames per second, and (II) encoded audio that is sampled at S samples per second, wherein each audio frame has L samples, wherein the common synchronization period is calculated by using the following equations,
T=V=1/F=A×
L/Sby determining the minimum integer values of parameter A and parameter V such that the following condition holds true;
V×
S=A×
F×
L;
wherein the method is performed by said machine which comprises at least said hardware processor. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)
-
-
17. A non-transitory storage medium having stored thereon instructions that, when executed by a hardware processor, cause the hardware processor to perform a method comprising:
-
(a) accepting (I) an ordered list of video input files intended for being chained together, and (II) a single output video file name; (b) checking that all of said video input files match each other by having same encoding, same format, and same codec; (c) creating an output file using a chosen container which matches, by its encoding and format and codec, a container of said video input files; (d) sequentially opening each of said video input files; (e) reading each packet from each video input file, without packet decoding, wherein each video input file comprises video packets; (f) if the packet is a video packet, then writing the packet as-is to a video stream of the output file; (g) if the packet is an audio packet, then writing the packet as-is to an audio stream of the output file; (h) tracking the DTS timestamp value and the PTS timestamp value of each audio packet and each video packet, to keep all streams synchronized after completion of processing of each video input file; (i) ensuring continued synchronization of multiple joined video input files by adjusting both the audio and the video to have the exact same duration, by performing one of; (A) selecting the later timestamp from all the video input streams for resynchronization, by performing either;
(I) adding a quiet audio delay, or (II) postponing the starting video frame for the next video input file in sequence;(B) calculating an optimal time period based on lengths of the video input files and their sampling rates and codec types;
wherein the optimal time period corresponds to a number of complete audio and video frames that start together and end together exactly within said optimal period; and
adjusting each video input file so that its length conforms to an exact multiple of the optimal time period as above; and
removing additional frames from the video input files either manually or automatically;wherein step (i) is performed by determining a common synchronization period T for (I) encoded video that is saved at F frames per second, and (II) encoded audio that is sampled at S samples per second, wherein each audio frame has L samples, wherein the common synchronization period is calculated by using the following equations,
T=V×
1/F=A×
L/Sby determining the minimum integer values of parameter A and parameter V such that the following condition holds true;
V×
S=A×
F×
L.
-
Specification