System and method for data stream synchronization
By calculating the timestamp difference between media streams and automatically synchronizing media streams, it solves the problem of time-consuming and inaccurate manual marking caused by out-of-synchronization of media streams, and achieves efficient and accurate media stream marking.
Patent Information
- Application Number
- CN202080094361.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-11-20
- Filing Date
- 2020-11-19
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2040-11-19
AI Technical Summary
In existing media systems, media streams are easily out of sync due to limitations of broadcast equipment or network architecture, which makes manual labeling time-consuming and inaccurate, making it difficult to automatically label events in media streams.
By calculating the timestamp difference between the main stream and the secondary stream, the time offset is determined, and based on this, multiple media streams are synchronized, events are automatically marked, the processor and database are used to process the switching timestamps in the media stream, and the time offset is calculated to Achieve stream synchronization.
Human errors are reduced, marking accuracy and efficiency are improved, computing resource requirements are reduced, and automatic synchronization of multimedia streams is achieved.
Smart Images

Figure CN115244939B_ABST
Abstract
Description
Field of the Invention
[0001] The present invention relates to media systems. More particularly, the present invention relates to systems and methods for synchronizing data streams in a media system. Background of the Invention
[0003] Many entertainment systems can provide real-time content to users around the world, such as media systems that provide content (eg, sporting events or concerts) over the Internet or via satellite broadcasts.
[0004] Media content is often provided and / or broadcast to different locations in multiple streams (such as video or audio streams), and may sometimes be out of sync due to technical limitations of broadcast equipment or decoders and / or due to network architecture. For example, a user watching a basketball game in Spain (e.g., via online streaming over the Internet) may receive a video stream that is out of sync with another viewer watching the same game in France.
[0005] Some entertainment providers who want to provide additional information about broadcast content (e.g., displaying subtitles of real-time events) often use manual tagging for predefined events in the media stream. For example, certain actions in a video stream of a concert can be manually tagged or labeled (e.g., song titles or guitar solos by specific band members) so that the audience sees the labels displayed in real time for each new scene or action.
[0006] During such manual marking, the start time and end time of each event may be manually identified (e.g., individually for each stream). In a typical process, each media stream is individually and manually marked by identifying the different events in the stream. Due to human error, such manual marking may be time consuming and not always accurate. Therefore, it is desirable to have a way to automatically mark events in various media streams.
[0007] Overview
[0008] Therefore, according to some embodiments of the present invention, a method for synchronizing multiple media streams is provided, comprising: identifying timestamps for multiple cuts in a master stream; identifying a corresponding timestamp for each of a plurality of corresponding cuts in at least one secondary stream; determining a first set of time differences between the identified timestamps for each pair of consecutive cuts in the master stream; determining at least a second set of time differences between the identified corresponding timestamps for each pair of corresponding consecutive cuts in at least one secondary stream; calculating at least one time offset between the master stream and at least one secondary stream for each pair of consecutive cuts in the master stream; and synchronizing the master stream and the secondary stream based on the at least one time offset.
[0009] In some embodiments of the present invention, at least one scene in the mainstream may correspond to at least one scene in at least one secondary stream. The correspondence may be determined based on a first set of determined time differences and at least a second set of time differences. The calculation of at least one time offset between the mainstream and at least one secondary stream may include: for each of at least one scene in the mainstream, calculating a time offset between a start time and / or an end time of at least one scene in the mainstream and a start time and / or an end time of at least one corresponding scene in at least one secondary stream. At least one scene in the mainstream corresponding to at least one switch may be marked, and based on the calculated at least one time offset and the marking of the mainstream, at least one scene in at least one secondary stream may be marked. At least one switch may be a switch immediately before the start of at least one scene or immediately after the end of at least one scene. In some embodiments, the marking of at least one scene in at least one secondary stream may be based on at least one time offset calculated to be closest to the corresponding timestamp of the mainstream. In some embodiments, the mainstream may be automatically selected from a plurality of media streams. In some embodiments, a histogram may be calculated for time offsets to find at least one time offset closest to the corresponding timestamp of the mainstream. In some embodiments, each media stream may include a plurality of media chunks, and a switch may be determined for each such media chunk. In some embodiments, a minimum absolute error (MAE) may be calculated for at least one of the primary and secondary streams, wherein at least one time offset closest to a corresponding timestamp of the primary stream may be determined based on the closest MAE.
[0010] Therefore, according to some embodiments of the present invention, a system for media stream synchronization is provided, the system comprising a processor and a database coupled to the processor and comprising a mainstream and at least one secondary stream of the media stream, wherein the processor can be configured to: identify a timestamp for each of a plurality of switches in the mainstream, identify a corresponding timestamp for each of a plurality of corresponding switches in at least one secondary stream, determine a first set of time differences between the identified timestamps for each pair of consecutive switches in the mainstream; determine at least a second set of time differences between the identified corresponding timestamps for each pair of consecutive switches in at least one secondary stream, calculate at least one time offset between the mainstream and at least one secondary stream for each pair of consecutive switches in the mainstream, and synchronize the mainstream and the secondary stream based on the at least one time offset.
[0011] In some embodiments, the processor may be configured to mark at least one scene in the mainstream corresponding to at least one switch, and to mark at least one scene in at least one secondary stream based on at least one calculated time offset. In some embodiments, the marking of at least one scene in at least one secondary stream may be based on at least one time offset calculated to be closest to the corresponding timestamp of the mainstream. In some embodiments, each media stream may include multiple media blocks, and wherein a switch is determined for each such media block. In some embodiments, the processor may be configured to automatically select the mainstream from the multiple media streams. In some embodiments, the processor may be configured to calculate a histogram of time offsets to find at least one time offset of the corresponding timestamp closest to the mainstream. In some embodiments, the processor may be configured to calculate a minimum absolute error (MAE) for at least one of the mainstream and the secondary stream, wherein at least one time offset of the corresponding timestamp closest to the mainstream may be determined based on the closest MAE.
[0012] Therefore, according to some embodiments of the present invention, a method for synchronizing multiple media streams with a received main media stream is provided, wherein the received main stream includes timestamps for multiple switches in the main stream, the method comprising identifying a corresponding timestamp for each of a plurality of corresponding switches in at least one secondary stream; determining a first set of time differences between the identified timestamps for each pair of consecutive switches in the main stream; determining at least a second set of time differences between the identified corresponding timestamps for each pair of consecutive switches in at least one secondary stream; calculating at least one time offset between the main stream and at least one secondary stream for each determined time difference between each pair of consecutive switches in the main stream; and synchronizing the main stream and the secondary stream based on the at least one time offset.
[0013] In some embodiments, at least one scene in the mainstream corresponding to at least one switch can be marked, and at least one scene in at least one secondary stream can be marked based on at least one calculated time offset and the marking of the mainstream. In some embodiments, the marking of at least one scene in at least one secondary stream can be based on at least one calculated time offset that is closest to the corresponding timestamp of the mainstream. In some embodiments, a histogram can be calculated for the time offsets to find at least one time offset that is closest to the corresponding timestamp of the mainstream. In some embodiments, each media stream can include multiple media blocks, and the switch is determined for each such media block. In some embodiments, a minimum absolute error (MAE) can be calculated for at least one of the mainstream and the secondary stream, wherein at least one time offset that is closest to the corresponding timestamp of the mainstream can be determined based on the closest MAE. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The subject matter relating to the invention is particularly pointed out and distinctly claimed in the concluding portion of the specification. The invention, however, as to its organization and method of operation, as well as to its objects, features, and advantages, will be further understood by reference to the accompanying drawings. Figure 1 When read together, it is best understood by reference to the following detailed description, wherein:
[0016] Figure 1 A block diagram of an exemplary computing device according to some embodiments of the present invention is shown;
[0017] Figure 2 A block diagram of a data synchronization system according to some embodiments of the present invention is shown;
[0018] Figure 3 schematically illustrates marking of unsynchronized media streams according to some embodiments of the present invention; and
[0019] Figure 4A-4B A flow chart of a method for synchronizing multiple media streams according to some embodiments of the present invention is shown.
[0020] It will be understood that, for simplicity and clarity of illustration, the elements shown in the figures are not necessarily drawn to scale. For example, for clarity, the size of some elements may be exaggerated relative to other elements. In addition, where deemed appropriate, reference numerals may be repeated in multiple figures to indicate corresponding or similar elements.
[0021] Detailed Description
[0022] In the following detailed description, many specific details are set forth in order to provide a thorough understanding of the present invention. However, it will be appreciated by those skilled in the art that the present invention can be put into practice without these specific details. In other examples, known methods, procedures, and components, modules, units, and / or circuits are not described in detail to avoid blurring the present invention. Some features or elements described about an embodiment may be combined with features or elements described about other embodiments. For the sake of clarity, the same or similar features or elements may not be discussed repeatedly.
[0023] Although embodiments of the invention are not limited in this regard, discussions using terms such as, for example, "processing," "computing," "calculating," "determining," "establishing," "analyzing," "examining," and the like may refer to operations and / or processes of a computer, computing platform, computing system, or other electronic computing device that manipulates and / or transforms data represented as physical (e.g., electronic) quantities within a computer's registers and / or memory to other data similarly represented as physical quantities within a computer's registers and / or memory or other information non-transitory storage medium that may store instructions for performing the operations and / or processes. Although embodiments of the invention are not limited in this regard, the terms "plurality" and "a plurality" as used herein may include, for example, "multiple" or "two or more." The terms "plurality" or "a plurality" may be used throughout the specification to describe two or more components, devices, elements, units, parameters, and the like. The term "set" when used herein may include one or more items. Unless explicitly stated, the method embodiments described herein are not limited to a particular order or sequence. In addition, some of the described method embodiments or their elements may occur or be executed simultaneously, at the same time point, or in parallel.
[0024] refer to Figure 1 , which is a schematic block diagram of an example computing device 100 according to some embodiments of the present invention. The computing device 100 may include a controller or processor 105 (e.g., a central processing unit processor (CPU), a chip, or any suitable computing or computational device), an operating system 115, a memory 120, an executable code 125, a storage device 130, an input device 135 (e.g., a keyboard or a touch screen) and an output device 140 (e.g., a display), and a communication unit 145 (e.g., a cellular transmitter or modem, a Wi-Fi communication unit, etc.) for communicating with remote devices via a communication network (e.g., the Internet). The controller 105 can be configured to execute program code to perform the operations described herein. The embodiments of the present invention described herein may include one or more computing devices 100, for example, to act as Figure 2 2. For example, system 200 may be or may include computing device 100 or components thereof.
[0025] The operating system 115 may be or may include any code segment (e.g., a code segment similar to the executable code 125 described herein) that is designed and / or configured to perform tasks involving coordinating, scheduling, arbitrating, supervising, controlling, or otherwise managing the operation of the computing device 100 (e.g., scheduling the execution of software programs or enabling software programs or other modules or units to communicate).
[0026] The memory 120 may be or may include, for example, a random access memory (RAM), a read-only memory (ROM), a dynamic RAM (DRAM), a synchronous DRAM (SD-RAM), a double data rate (DDR) memory chip, a flash memory, a volatile memory, a non-volatile memory, a cache memory, a buffer, a short-term memory unit, a long-term memory unit, or other suitable memory unit or storage device unit. The memory 120 may be or may include a plurality of possibly different memory units. The memory 120 may be a non-transitory readable medium of a computer or a processor, or a non-transitory storage medium of a computer, such as a RAM.
[0027] Executable code 125 may be any executable code, such as an application, program, process, task, or script. Executable code 125 may be executed by controller 105 under the control of operating system 115. As further described herein, for example, executable code 125 may be a software application that performs synchronization of multiple media streams, identification of timestamps, determination of time differences, calculation of time offsets, etc. Although for clarity, Figure 1 A single executable code 125 is shown in FIG. 1 , but embodiments of the present invention may include multiple executable code segments similar to the executable code 125 , which may be stored in the memory 120 and cause the controller 105 to perform the methods described herein.
[0028] Storage device 130 may be or include, for example, a hard drive, a universal serial bus (USB) device, or other suitable removable and / or fixed storage device unit. Data such as timestamps or tags may be stored in storage device 130 and may be loaded from storage device 130 into memory 120 where it may be processed by controller 105. In some embodiments, Figure 1 Some of the components shown in the embodiment may be omitted. For example, the memory 120 may be a non-volatile memory having the storage capacity of the storage device 130. Therefore, although shown as a separate component, the storage device 130 may be embedded or included in the memory 120.
[0029] Input device 135 can be or can include keyboard, touch screen or touch pad, one or more sensors or any other or additional suitable input device. Any suitable number of input devices 135 can be operably connected to computing device 100. Output device 140 can include one or more displays or monitors and / or any other suitable output device. Any suitable number of output devices 140 can be operably connected to computing device 100. As shown in blocks 135 and 140, any applicable input / output (I / O) device can be connected to computing device 100. For example, a wired or wireless network interface card (NIC), a universal serial bus (USB) device or an external hard drive can be included in input device 135 and / or output device 140.
[0030] Embodiments of the present invention may include an article such as a non-transitory readable medium of a computer or processor or a non-transitory storage medium of a computer or processor, for example, a memory, a disk drive, or a USB flash memory for encoding, including or storing instructions (e.g., computer executable instructions) that, when executed by a processor or controller, perform the methods disclosed herein. For example, an article may include a storage medium such as memory 120, a computer executable instruction such as executable code 125, and a controller such as controller 105. Such a non-transitory computer-readable medium may be, for example, a memory, a disk drive, or a USB flash memory for encoding, including or storing instructions (e.g., computer executable instructions) that, when executed by a processor or controller, perform the methods disclosed herein. The storage medium may include, but is not limited to, any type of disk including a semiconductor device, such as a read-only memory (ROM) and / or a random access memory (RAM) including a programmable storage device, a flash memory, an electrically erasable programmable read-only memory (EEPROM), or any type of medium suitable for storing electronic instructions. For example, in some embodiments of the present invention, the memory 120 may be a non-transitory machine-readable medium.
[0031] Embodiments of the present invention may include components such as, but not limited to, multiple central processing units (CPUs) or any other suitable general-purpose or specialized processors or controllers (e.g., Figure 1 105), a plurality of input units, a plurality of output units, a plurality of memory units, and a plurality of storage units. Embodiments of the present invention may additionally include other suitable hardware components and / or software components. Some embodiments of the present invention may include or may be, for example, a personal computer, a desktop computer, a laptop computer, a workstation, a server computer, a network device, or any other suitable computing device. For example, embodiments of the present invention may include one or more facility computing devices (e.g., Figure 1computing device 100) and one or more remote server computers that actively communicate with one or more facility computing devices and actively communicate with one or more portable or mobile devices such as smart phones, tablet computers, etc.
[0032] Reference now Figure 2 , which shows a block diagram of a data synchronization system 200 according to some embodiments of the present invention. Figure 2 In the diagram, the direction of the arrows can indicate the direction of information flow.
[0033] The data synchronization system 200 may include at least one processor 201 (such as Figure 1 The controller 105 shown in FIG. 10A ) and at least one database 202 coupled to the processor 201 (eg, located at Figure 1 The at least one processor 201 may receive data, such as a media stream 20, from an external source 210 via a server 203, and the received data may be stored by the processor 201 on at least one database 202. For example, the server 203 may be connected to an entertainment system 210 (e.g., for the Internet or television broadcast) so that the server 203 may forward the video stream 20 to the processor 201 for analysis of markers of events in the media stream 20 (e.g., to determine timestamps in the video stream), modification and / or synchronization (e.g., identification markers for scenes with different timing). It should be noted that the media stream used hereinafter may refer to any data including one or more of the following: images, text, audio, video and / or the like, so as to be synchronized by the data synchronization system 200. For example, for audio, the at least one processor 201 may apply cut detection when silence and / or loud sound are identified, and for text, the at least one processor 201 may apply cut detection based on the timing between channels.
[0034] In some embodiments, the media streams 20 may include the same media content; however, due to technical limitations of the broadcasting equipment of, for example, the external source 210, the same media content in different media streams may not be synchronized. For example, some technical limitations may include different broadcasting equipment in different areas resulting in different timing of broadcasts, such as older equipment in some areas cannot handle the same broadcast speed. Therefore, in order to mark real-time events in each media stream 20 based on events marked on a single main data stream, it is expected that each of the media streams 20 is synchronized with the main data stream, as will be further described below. The mainstream can be a single media stream with which other media streams can be synchronized. Some known methods such as "shot transition detection" and / or "switch detection" can be used to identify multiple timestamps in each media stream 20 based on transitions or switches in the media stream 20, so that each identified timestamp can indicate a different content item (e.g., a different scene). For example, the processor 201 can apply "switch detection" to identify scene changes (or switches) in the video stream 20. A scene change (or switch) may be detected as a dark frame between different scenes, wherein the processor 201 may identify such a dark frame as a scene change. In some embodiments, at least one scene corresponding to at least one switch may be marked in each media stream 20, such as Figure 3 Further described in .
[0035] Multiple or "twin" streams (e.g., the same video feed originating from the same camera showing the same frame of an event) can have the same content and / or different content in the audio and / or advertisements in the video. For example, multiple or "twin" streams may have gaps in the timing of the broadcast. If the streams are synchronized, the gaps can be overcome or corrected. In order to perform media (e.g., video) stream synchronization, the time gaps between streams (e.g., the time difference between the same scene on different streams) can be calculated based on scene changes (or switches). Once the mainstream is selected, the data synchronization system 200 can determine the scene changes (or switches) in each stream and calculate the time gap between each stream and the mainstream for each such change in order to subsequently synchronize all media streams 20.
[0036] Reference now Figure 3 , which schematically illustrates marking of unsynchronized media streams 20 according to some embodiments. It should be noted that for the purpose of illustration, Figure 3 Only three media streams 20 are shown in FIG. 1 , and the data synchronization system 200 can similarly process any number of multiple media streams.
[0037] In some embodiments, a single media stream 20 may be automatically selected as the main stream 300, and thus, the remaining media streams 20 may be indicated as secondary streams (or dependent streams) 301, 302. For example, a media stream 20 may be randomly selected and / or the earliest stream may be selected as the main stream 300, and the other media streams 20 may be indicated as at least one secondary stream 301, 302 accordingly.
[0038] The processor 201 can apply "switch detection" techniques (e.g., in near real time) to identify multiple transitions and / or switches (or scene changes) 30a-30d, 30a'-30d', and 30a"-30d" in each media stream 300, 301, and 302, respectively. Because the media streams 20 are not synchronized, the processor 201 can identify switches 30a'-30d' and 30a"-30d" between different scenes in the secondary streams 302 and 303, respectively, at slightly different times compared to the switches 30a-30d of the corresponding scenes in the mainstream 300; and / or identify actions 303a'-303b' and 303a"-303b" in the secondary streams 301 and 302, respectively, at slightly different times (e.g., a one-second change (e.g., change D1=1 second)) compared to the actions 303a-303b in the mainstream 300. The media stream 20 may arrive in a format of several blocks (e.g., approximately 3-5 seconds or 10 seconds per block), where the data synchronization system 200 analyzes each of the blocks (e.g., of each media stream 20) to identify switches (e.g., switches at the beginning of a commercial, for a headshot, etc.).
[0039] For example, in a video stream of a music video clip, a cut detection technique may be applied to detect a cut or scene change (e.g., detecting a change from an outdoor footage to a focus on an indoor instrument). In another example, in a live broadcast of a basketball game, a cut detection technique may be applied to detect cuts 30a-30b, 30a'-30b', and 30a"-30b" before and after a layup 303a, 303a', and 303a", respectively, and may be applied to detect cuts 30c-30d, 30c'-30d', and 30c"-30d" before and after a free throw 303b, 303b', and 303b", respectively (with different types of displayed actions, such as different events in a particular sports or music video, such as actions selected from a predefined list of action types), which actions may be transmitted in the main stream 300 and the secondary streams 301, 302 at different timings. In some embodiments, the switches 30a-30d, 30a'-30d', and 30a"-30d" in the stream can be identified without knowing the specific type of action (e.g., layup 303a, 303a', and 303a"), so that timing synchronization can be performed based solely on the switches 30a-30d, 30a'-30d', and 30a"-30d".
[0040] In some embodiments of the present invention, the processor 201 may identify timestamps 304 and 305 for each of a plurality of switches 30c, 30c', and 30c" in the streams 300, 301, and 302, respectively, based on the switches detected in the media stream 20. The processor 201 may mark at least one action and / or scene 303a and / or 303b corresponding to at least one switch 30a, 30b, 30c, and / or 30d in the main stream 300. For example, a number of image processing techniques may be applied to mark the scenes 303a and 303b in the video stream 300, for example, the scene 303b located between the two switches 30c and 30d may be marked according to the action or event displayed (e.g., marking the scene as a "free throw" in a basketball game).
[0041] In some embodiments, the processor 201 may calculate and / or determine the time differences D1, D2, D3, D4 between the identified timestamps 304, 305 of the consecutive switches 30c-30d, 30c'-30d', and 30c"-30d" (with corresponding scenes 303b, 303b', and 303b") of the streams 300, 301, and 302, respectively. For example, based on the events captured between the timestamps 304, 305 of the consecutive switches 30c and 30d, the scene 303b in the main stream 300 may be marked as a "free throw" ( For example, based on image processing from the same media source by processor 201, or, for example, based on image processing from an external source, such as analysis of an audio commentary from a predefined commentary feed). In scenes 303b and 303b', at timestamp 304, there is a time difference D1 between the identified timestamp 304 of the mainstream 300 and the switch 30c' of the secondary stream 301. Similarly, there is a time difference D2 between the identified timestamp 304 of the mainstream 300 and the switch 30c" of the secondary stream 302. For scenes 303b and 303b', at timestamp 305, there is a time difference D3 between the identified timestamp 305 of the mainstream 300 and the switch 30d' of the secondary stream 301. Similarly, there is a time difference D4 between the identified timestamp 305 of the primary stream 300 and the switch 30d″ of the secondary stream 302. The processor 201 can analyze these time differences D1-D4 to apply the correct markings to the scenes in the secondary streams 301 and 302. In some embodiments, marking may not be required.
[0042] In some embodiments, the processor 201 can calculate at least one time offset between the main stream 300 and at least one sub-stream 301 and 302 for each determined time difference D1, D2, D3, D4 between the switches 30c, 30c', 30c", 30d, 30d' and 30d". It should be noted that the calculated time offset can be used to set the start and end time of each action and / or scene 303b' and 303b" in each sub-stream 301 and 302. Therefore, the processor 201 can mark at least one action and / or scene 303b' and 303b" in at least one sub-stream 301 and 302 based on the calculated at least one time offset, so that the start and end time of each action and / or scene 303b' and 303b" can be set in at least one sub-stream 301 and 302.
[0043] According to some embodiments, use of the data synchronization system 200 can reduce the amount of personnel required to "tag" unsynchronized media streams having time differences between them, as well as reduce overall costs and the amount of human error, while performing faster tagging using fewer computer resources (such as memory, CPU, and GPU). It should be noted that automatic tagging and / or labeling can be faster and more accurate (and less subject to human error) than manual tagging performed by a human tagger. This may be due to the fact that the data synchronization system 200 only tags a single stream (e.g., the mainstream) and only measures the remaining streams to determine the time difference without tagging the remaining streams (whereas manual tagging may require tagging other streams as well). In contrast to previous methods, the data synchronization system 200 can automatically synchronize the streams and thus prevent the need for individual correction and / or labeling of each stream. For example, compared to previously known methods, the data synchronization system 200 may require approximately ten times fewer computer resources than previously known media stream labeling methods, in which unsynchronized streams may require a large number of personnel to label. It should be noted that since analysis and / or processing of the unsynchronized streams is performed only once, the required computing power is used for the final step of determining the time difference between the streams, thereby requiring fewer processing resources than previous methods in which each media stream is analyzed individually.
[0044] Although Figure 3 Three switches per stream are shown, but there may be any number of switches in each stream. According to some embodiments, for each identified switch, data synchronization system 200 may store (e.g., in database 202) a timestamp of the switch in media stream 20. For example, primary stream 300 and secondary stream (e.g., 301 or 302) may have the following timestamps for the switch, where the numbers indicate the time in seconds in the media stream:
[0045] Mainstream:|10|14|16|17|20|22|23|25|28|32|36|38|
[0046] Secondary stream:|7|11|13|14|18|23|27|30|32|35|39|43|
[0047] For each media stream, the data synchronization system 200 can convert the absolute time into frequency by calculating the difference between consecutive switches. For example, the main stream 300 can have the following time difference (in seconds) between each consecutive switch:
[0048] Mainstream:|4|2|1|3|2|1|2|3|4|4|2|
[0049] Similarly, a secondary flow (eg, 301 or 302) may have the following time difference (in seconds) between each consecutive switch:
[0050] Secondary flow:|4|2|1|4|5|4|3|2|3|4|4|
[0051] The processor 201 may divide each media stream into a predefined number of 'N' windows (e.g., define 'N'=3 switches), so that synchronization of scene markings may be performed by calculating time differences for these windows. In some embodiments, at least one secondary stream may be marked only if at least one time offset of a corresponding timestamp closest to the primary stream is less than a predefined threshold.
[0052] In some embodiments, processor 201 may cross-correlate each such window on a frequency list for switching at at least one of secondary streams 301 and 302, and determine the MAE of these sets if the minimum absolute error MAE result is less than a predetermined threshold (e.g., if the MAE is less than two seconds). Thus, an absolute time offset may be calculated based on the determined MAE. The MAE may be calculated for the primary stream 300 and at least one of the secondary streams 301 and 302, wherein at least one time offset closest to the corresponding timestamp of the primary stream may be determined based on the closest MAE.
[0053] In some embodiments, a timing offset histogram may be calculated for each action and / or scene 303 for each time difference D1, D2, D3, D4 between the main stream 300 and at least one secondary stream 301 and 302. The histogram may be calculated for the time offsets to find at least one time offset D1, D2, D3, D4 that is closest to the corresponding timestamps 304 and 305 of the main stream 300.
[0054] The most common offset with the lowest average MAE may be selected in a recursive manner such that the same offset is determined after a predetermined number of checks (e.g., after three recursive checks), and the memory (e.g., Figure 1 The memory 120) can be cleared so that the algorithm starts from that point in the media stream, thereby marking the corresponding action and / or scene 303a or 303b in at least one of the secondary streams 301 and 302 with the same label as the action and / or scene 303a or 303b in the main stream 300 (for example, scene 303a' or 303b' in stream 301 and scene 303a" or 303b" in stream 302), despite the time difference.
[0055] According to some embodiments of the present invention, the processor 201 may receive a primary media stream 300 with predefined switches 30a-30d, timestamps 304 and 305, and markers of scenes 303a and 303b, such that analysis of the timestamps and / or switches 30a'-30d' and 30a"-30d" in at least one secondary stream 301 and 302, respectively, may allow the processor 201 to modify the markers of corresponding scenes in at least one secondary stream 301 and 302 based on the calculated time difference of the received primary stream 300. According to some embodiments, the processor 201 may determine multiple markers for the same scene (e.g., 303a or 303b), such as markers of "free throw", "game time", "score" for a single basketball game scene.
[0056] Reference now Figure 4A-4B , which shows a flow chart of a method for synchronizing multiple media streams according to some embodiments of the present invention. In some embodiments of the present invention, the multiple media streams can be substantially identical streams of the same event, the only difference being the mis-synchronization problem. The switching in the primary media stream (e.g., caused by Figure 2 processor 201 in the main flow (e.g., Figure 3 300) in the mainstream) (e.g., Figure 3 In some embodiments of the present invention, at least one scene (eg, Figure 3 scene 303a or 303b).
[0057] A timestamp may be identified 403 for each of a plurality of switches (e.g., switches 30a'-30d') in at least one secondary stream (e.g., secondary stream 301 or 302) based on a switch in the secondary media stream (e.g., by processor 201). A first set of time differences between the identified timestamps for each pair of consecutive switches in the primary stream may be determined 404, and at least a second set of time differences between the identified corresponding timestamps for each pair of consecutive switches in the at least one secondary stream may be determined 405.
[0058] For each determined time difference between switches, at least one time offset between the main stream and the at least one secondary stream may be calculated 406. In some embodiments, at least one scene in the at least one secondary stream may be marked 407 based on the calculated at least one time offset and the marking 402 of the main stream (e.g., based on the calculated at least one time offset of the corresponding timestamp closest to the main stream).
[0059] While certain features of the invention have been illustrated and described herein, numerous modifications, substitutions, changes and equivalents will occur to those skilled in the art. It is therefore to be understood that the appended claims are intended to cover all such modifications and changes that fall within the true spirit of the invention.
[0060] Various embodiments have been presented. Of course, each of these embodiments may include the features of the other embodiments presented, and embodiments not specifically described may include various features described herein.
Claims
1. A method for synchronizing multiple video streams, the method comprising: Multiple switching identification timestamps in the main video stream; identifying a corresponding timestamp for each of a plurality of corresponding switches in at least one secondary video stream; determining a first set of time differences between each pair of identified timestamps of consecutive switches in the primary video stream; determining at least a second set of time differences between the identified corresponding timestamps of each pair of corresponding consecutive switches in the at least one secondary video stream; calculating at least one time offset between the primary video stream and the at least one secondary video stream for each pair of consecutive switches in the primary video stream; repeatedly selecting the most common offset with a mean minimum absolute error (MAE) below a predefined threshold such that the same offset is determined after a predetermined number of checks and starting from a point in the media stream; as well as Scenes in the at least one secondary video stream are labeled with the same labels as corresponding scenes in the primary video stream despite the time difference.
2. The method according to claim 1, further comprising: Based on the determined first set of time differences and the at least second set of time differences, at least one scene in the main video stream is corresponded to at least one scene in the at least one secondary video stream; wherein, calculating at least one time offset between the main video stream and the at least one secondary video stream includes, for each of the at least one scene in the main video stream, calculating the time offset between the start time and / or end time of the at least one scene in the main video stream and the start time and / or end time of at least one corresponding scene in the at least one secondary video stream.
3. The method according to claim 2, further comprising: marking at least one scene in the primary video stream corresponding to at least one switch, wherein the at least one switch is a switch immediately before the start of the at least one scene or immediately after the end of the at least one scene; and At least one scene in the at least one secondary video stream is marked based on the calculated at least one time offset and the marking of the primary video stream.
4. The method of claim 1, further comprising automatically selecting the primary video stream from among the plurality of video streams.
5. The method of claim 1, further comprising calculating a histogram of the time offsets to find at least one time offset that is closest to a corresponding time stamp of the primary video stream.
6. The method according to claim 1, wherein: Each video stream comprises a plurality of media blocks, and wherein a switching is determined for each such media block.
7. The method of claim 1, further comprising calculating a minimum absolute error (MAE) for at least one of the primary video stream and the secondary video stream, wherein: At least one time offset closest to a corresponding time stamp of the primary video stream is determined based on the closest MAE.
8. A system for video stream synchronization, the system comprising: processor; as well as a database coupled to the processor and comprising a primary video stream and at least one secondary video stream of the video streams; Wherein, the processor is configured to: identifying a timestamp for each of a plurality of switches in the primary video stream; identifying a corresponding timestamp for each of a plurality of corresponding switches in the at least one secondary video stream; determining a first set of time differences between each pair of identified timestamps of consecutive switches in the primary video stream; determining at least a second set of time differences between the identified corresponding timestamps of each pair of consecutive switches in the at least one secondary video stream; calculating at least one time offset between the primary video stream and the at least one secondary video stream for each pair of consecutive switches in the primary video stream; repeatedly selecting the most common offset having a mean minimum absolute error (MAE) below a predefined threshold such that the same offset is determined after a predetermined number of checks and starting from a point in the media stream; and Scenes in the at least one secondary video stream are labeled with the same labels as corresponding scenes in the primary video stream despite the time difference.
9. The system according to claim 8, wherein: The processor is configured to correspond at least one scene in the main video stream to at least one scene in the at least one secondary video stream based on the determined first set of time differences and the at least second set of time differences; wherein the processor calculates the at least one time offset between the main video stream and the at least one secondary video stream by: for each of the at least one scene in the main video stream, calculating the time offset between the start time and / or end time of the at least one scene in the main video stream and the start time and / or end time of at least one corresponding scene in the at least one secondary video stream.
10. The system according to claim 9, wherein: The processor is configured to: marking at least one scene in the primary video stream corresponding to at least one switch, wherein the at least one switch is a switch immediately before the start of the at least one scene or immediately after the end of the at least one scene; and At least one scene in the at least one secondary video stream is marked based on the calculated at least one time offset.
11. The system according to claim 8, wherein: Each video stream comprises a plurality of media blocks, and wherein a switching is determined for each such media block.
12. The system according to claim 8, wherein: The processor is also configured to automatically select the primary video stream from among the plurality of video streams.
13. The system according to claim 8, wherein: The processor is further configured to calculate a histogram of the time offsets to find at least one time offset that is closest to a corresponding time stamp of the primary video stream.
14. The system according to claim 8, wherein: The processor is further configured to calculate a minimum absolute error (MAE) for at least one of the primary video stream and the secondary video stream, wherein at least one time offset closest to a corresponding time stamp of the primary video stream is determined based on a closest MAE.
15. A method of synchronizing multiple video streams with a received main video stream, wherein: The received primary video stream includes a timestamp for each of a plurality of switches in the primary video stream, the method comprising: identifying a corresponding timestamp for each of a plurality of corresponding switches in at least one secondary video stream; determining a first set of time differences between each pair of identified timestamps of consecutive switches in the primary video stream; determining at least a second set of time differences between the identified corresponding timestamps of each pair of consecutive switches in the at least one secondary video stream; calculating at least one time offset between the primary video stream and the at least one secondary video stream for each pair of consecutive switches in the primary video stream; repeatedly selecting the most common offset having a mean minimum absolute error (MAE) below a predefined threshold such that the same offset is determined after a predetermined number of checks and starting from a point in the media stream; and Scenes in the at least one secondary video stream are labeled with the same labels as corresponding scenes in the primary video stream despite the time difference.
16. The method according to claim 15, further comprising: Based on the determined first set of time differences and the at least second set of time differences, at least one scene in the main video stream is corresponded to at least one scene in the at least one secondary video stream; wherein, calculating at least one time offset between the main video stream and the at least one secondary video stream includes, for each of the at least one scene in the main video stream, calculating the time offset between the start time and / or end time of the at least one scene in the main video stream and the start time and / or end time of at least one corresponding scene in the at least one secondary video stream.
17. The method according to claim 16, further comprising: marking at least one scene in the primary video stream corresponding to at least one switch, wherein the at least one switch is a switch immediately before the start of the at least one scene or immediately after the end of the at least one scene; and At least one scene in the at least one secondary video stream is marked based on the calculated at least one time offset and the marking of the primary video stream.
18. The method of claim 15, further comprising calculating a histogram of time offsets to find at least one time offset that is closest to a corresponding time stamp of the primary video stream.
19. The method according to claim 15, wherein: Each video stream comprises a plurality of media blocks, and wherein a switching is determined for each such media block.
20. The method of claim 15, further comprising calculating a minimum absolute error (MAE) for at least one of the primary video stream and the secondary video stream, wherein: At least one time offset closest to a corresponding time stamp of the primary video stream is determined based on the closest MAE.
