METHOD AND A SYSTEM FOR COMPARING VIDEO FILES
20170293803 · 2017-10-12
Inventors
Cpc classification
H04N21/23113
ELECTRICITY
H04N21/2747
ELECTRICITY
International classification
H04N21/2747
ELECTRICITY
Abstract
There is disclosed a method of selecting a candidate video, the candidate video potentially being a near-duplicate of a given video, the given video having a given video duration. The method is executed at an electronic device, the electronic device having access to a video storage. The method comprises: determining a variance parameter, the variance parameter being determined based on the first video duration; receiving, from the video storage, a plurality of candidate videos; selecting a first candidate video from the plurality of candidate videos, the first candidate video having a first candidate video duration; comparing the first candidate video duration with the variance parameter; in response to the first candidate video duration being within the variance parameter, determining that the first candidate video is an actual candidate for being a near-duplicate of the given video.
Claims
1. A method of selecting a candidate video, the candidate video potentially being a near-duplicate of a given video, the given video having a given video duration, the method executed at an electronic device, the electronic device having access to a video storage, the method comprising: determining a variance parameter, the variance parameter being determined based on the first video duration; receiving, from the video storage, a plurality of candidate videos; selecting a first candidate video from the plurality of candidate videos, the first candidate video having a first candidate video duration; comparing the first candidate video duration with the variance parameter; in response to the first candidate video duration being within the variance parameter, determining that the first candidate video is an actual candidate for being a near-duplicate of the given video.
2. The method of claim 1, further comprising comparing the first candidate video with the given video.
3. The method of claim 2, wherein the given video comprises a given video signature and the first candidate video comprises a first candidate video signature; wherein the comparing the first candidate video with the given video comprises comparing the first candidate video signature and the given video signature.
4. The method of claim 3, wherein comparing the first candidate video signature and the given video signature is executed in a bit-by-bit manner.
5. The method of claim 3, further comprising comparing at least one of: audio tracks, meta data, and titles for the given video and the first candidate video.
6. The method of claim 1, further comprising: selecting a second candidate video from the plurality of candidate videos, the second candidate video having a second candidate video duration; comparing the second candidate video duration with the variance parameter; if the second candidate video duration is outside the variance parameter, determining that the second candidate video is not an actual candidate for being a near-duplicate of the given video.
7. The method of claim 5, further comprising: comparing the first candidate video with the given video; not comparing the second candidate video with the given video.
8. The method of claim 1, wherein the variance parameter comprises: as an upper limit of variance, the first video duration; as a lower limit, a value that is the first video duration less a pre-determined variance window.
9. The method of claim 1, wherein the variance parameter comprises: as an upper limit of variance, a value that is the first video duration plus a pre-determined variance window; as a lower limit, a value that is the first video duration less the pre-determined variance window.
10. The method of claim 1, further comprising comparing the first candidate video with the given video to determine if the first candidate video being the near-duplicate of the given video.
11. The method of claim 9, in response to the first candidate video being the near-duplicate of the given video, executing at least one action with at least one of: the first candidate video and the given video.
12. The method of claim 1, wherein selecting the first candidate video from the plurality of candidate videos comprises: ranking the plurality of candidate videos in an order of respective candidate video duration; selecting the first video candidate being a video candidate with a lowest duration.
13. An electronic device comprising: a communication interface for communication via a communication network with a video storage, the video storage hosting a plurality of videos, a processor operationally connected with the communication interface, the processor configured to: receive, from the video storage, a plurality of candidate videos; a candidate video of the plurality of candidate videos potentially being a near-duplicate of a given video, the given video having a given video duration; determine a variance parameter, the variance parameter being determined based on the first video duration; select a first candidate video from the plurality of candidate videos, the first candidate video having a first candidate video duration; compare the first candidate video duration with the variance parameter; in response to the first candidate video duration being within the variance parameter, determine that the first candidate video is an actual candidate for being a near-duplicate of the given video.
14. The system of claim 13, the processor being further configured to compare the first candidate video with the given video.
15. The electronic device of claim 14, wherein the given video comprises a given video signature and the first candidate video comprises a first candidate video signature; wherein to compare, the processor is configured to compare the first candidate video signature and the given video signature.
16. The electronic device of claim 15, wherein comparing the first candidate video signature and the given video signature is executed in a bit-by-bit manner.
17. The electronic device of claim 13, the processor being further configured to: select a second candidate video from the plurality of candidate videos, the second candidate video having a second candidate video duration; compare the second candidate video duration with the variance parameter; if the second candidate video duration is outside the variance parameter, to determine that the second candidate video is not an actual candidate for being a near-duplicate of the given video.
18. The electronic device of claim 17, the processor being further configured to: compare the first candidate video with the given video; not compare the second candidate video with the given video.
19. The electronic device of claim 13, wherein to select the first candidate video from the plurality of candidate videos, the processor is configured to: rank the plurality of candidate videos in an order of respective candidate video duration; select the first video candidate being a video candidate with a lowest duration.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0045] For a better understanding of the present technology, as well as other aspects and further features thereof, reference is made to the following description which is to be used in conjunction with the accompanying drawings, where:
[0046]
[0047]
[0048]
[0049]
DETAILED DESCRIPTION
[0050] With reference to
[0051] The system 100 comprises an electronic device 102. The electronic device 102 is typically associated with a user (not depicted) and, as such, can sometimes be referred to as a “client device”. It should be noted that the fact that the electronic device 102 is associated with the user does not need to suggest or imply any mode of operation—such as a need to log in, a need to be registered or the like.
[0052] The implementation of the electronic device 102 is not particularly limited, but as an example, the electronic device 102 may be implemented as a personal computer (desktops, laptops, netbooks, etc.), a wireless communication device (a cell phone, a smartphone, a tablet and the like), as well as network equipment (a router, a switch, or a gateway). Within the depiction of
[0053] The electronic device 102 is coupled to a communications network 106. In some non-limiting embodiments of the present technology, the communications network 106 can be implemented as the Internet. In other embodiments of the present technology, the communications network 106 can be implemented differently, such as any wide-area communications network, local-area communications network, a private communications network and the like.
[0054] Also coupled to the communications network is a server 108. The server 108 can be implemented as a conventional computer server. In an example of an embodiment of the present technology, the server 108 can be implemented as a Dell™ PowerEdge™ Server running the Microsoft™ Windows Server™ operating system. Needless to say, the server 108 can be implemented in any other suitable hardware and/or software and/or firmware or a combination thereof. In the depicted non-limiting embodiment of present technology, the server 108 is a single server. In alternative non-limiting embodiments of the present technology, the functionality of the server 108 may be distributed and may be implemented via multiple servers.
[0055] In alternative embodiments of the present technology, the electronic device 102 and the server 108 can be implemented as part of the same hardware (i.e. a single computing device), in which case the communications network 106 can be implemented as a BUS or the like.
[0056] There is also provided a video repository 110. In some embodiments of the present technology, the video repository 110 can be implemented as a storage of a plurality of video files. In alternative embodiments of the present technology, the video repository 110 can be a distributed entity containing a plurality of electronic video files. For example, the video repository 110 can be a conglomeration of some or all of the electronic video files available on various servers (not depicted) within the communications network 106.
[0057] Alternatively, the video repository 110 can be a conglomeration of electronic video files available at a particular entity, such as a library or a research institution, as an example. In other words, embodiments of the present technology can be useful for indexing and searching videos stored on a local computing apparatus (a hard drive, a server or the like) or a remote computing apparatus (server and the like) or a distributed storage (a storage of images distributed amongst a number of servers and the like).
[0058] For the purpose of examples to be provided herein below, it shall be assumed that the video repository 110 hosts four videos—a first video 112, a second video 114, a third video 116 and a fourth video 118. Obviously, the four videos depicted herein is not a limiting factor and, as such, in various implementations the video repository 110 will store many more videos in addition to the first video 112, the second video 114, the third video 116 and the fourth video 118.
[0059] The source of the video files stored by the video repository 110 is not particularly limited. For example, some or all of the first video 112, the second video 114, the third video 116 and the fourth video 118 may have been uploaded by various users of the system 100. Alternatively, some or all of the first video 112, the second video 114, the third video 116 and the fourth video 118 can be uploaded by an operator of the server 108 (for example, the server 108 can be maintained as part of a video downloading or streamlining service, such as the Netflix service, for example).
[0060] In alternative embodiments, the video repository 110 can be a search index of a video vertical or a general search engine. Yet alternatively, the video repository 110 can be maintained by a video aggregator service or the like.
[0061] The video files stored by the server 108 (such as the first video 112, the second video 114, the third video 116 and the fourth video 118) do not need to (but can be) all be in the same file format. The video encoding formats used can vary, some examples of the video file format include but are not limited to: Audio Video Interleaved (AVI), Windows Media Video (WMV), MPEG, GIF, Advanced Systems Format (ASF), and the like. In alternative embodiments, the server can maintain multiple versions of the same video file, each video file of the multiple versions being encoded in accordance with its respective encoding standard.
[0062] Each of the first video 112, the second video 114, the third video 116 and the fourth video 118 is associated with duration—i.e. a time indication of the length of the respective one of the first video 112, the second video 114, the third video 116 and the fourth video 118. As an example only, with reference to
[0063] In the illustration of
[0064] As such, the video repository 110 can maintain the first video 112, the second video 114, the third video 116 and the fourth video 118 in a chronological order of uploading, the chronological order of when the particular video was created, by genre, by source, by a user identifier of the user who uploaded the video file and the like.
[0065] The electronic device 102 comprises hardware and/or software and/or firmware (or a combination thereof), as is known in the art, to execute a video indexing application 104. The video indexing application 104 is configured to create, maintain, access and search a processed video information database 120.
[0066] With reference to
[0067] First, we shall address how the video indexing application 104 generates a variance parameter. As has been aluded to above, the variance parameter is calculated for each video file, i.e. for each of the first video 112, the second video 114, the third video 116 and the fourth video 118. In other words, for a given collection of video files (including the first video 112, the second video 114, the third video 116 and the fourth video 118 and other video files) the variance parameter for each video file in the collection is calculated independently for each given video file.
[0068] Furthermore, when describing the analysis routines below and when viewed from the perspective of the collection of video files as a whole (including the first video 112, the second video 114, the third video 116 and the fourth video 118 and other video files), the variance parameter can be said to be “dynamic” Dynamic, as used herein, is meant to denote the fact that the variance parameter is not pre-determined for all of the video files within the collection of video files, but is rather calculated individually for each video files for which the near-duplicates are to be analyzed. As can be seen in
[0069] For a given one of the first video 112, the second video 114, the third video 116 and the fourth video 118 and other video files, the variance parameter is calculated as follows. The video indexing application 104 determines the duration of the given video (i.e. one of the first video 112, the second video 114, the third video 116 and the fourth video 118). The video indexing application 104 then determines the variance window.
[0070] In some embodiments of the present technology, the variance window can be determined based on a window variance parameter, which can be expressed as a percentage and can be pre-determined to be 5%. The value of 5% is used as an example only and other values are possible. In some embodiments, the value of the variance window parameter is determined empirically.
[0071] The video indexing application 104 first determines the variance window. Using the second video 114 as an example and recalling that the second video 114 duration is forty nine minutes, the video indexing application 104 determines the variance window as follows:
Δ1=0.05*49 min=2.45 min (Formula 1)
[0072] Where Δ1 is the variance window and 0.05 is the variance window parameter of 5%.
[0073] Next, the video indexing application 104 determines a lower limit and an upper limit of the variance parameter. In some embodiments, the upper limit is set as the duration of the given video. In the example of the second video 114, the upper limit is set as follows: t2=49 min. The video indexing application 104 calculates the lower limit of the variance parameter as follows:
t2−Δ1=46.15 min (Formula 2)
[0074] Where t2 is the duration of the given video (in the example being reviewed here—duration of the second video 114) and Δ1 is the variance window. Hence, for the second video 114, the variance parameter is determined to be between 46.15 minutes and 49 minutes.
[0075] It should be understood, however, that the above description is provided as an example only and other ways of determining the variance parameter and/or variance window are possible.
[0076] As another example, for the second video 114, an alterative approach to determining the variance parameter can be implemented as follows. In some alternative embodiments of the present technology, the variance window can be determined based on a window variance parameter, which can be expressed as a percentage and can be pre-determined to be 5%. The value of 5% is used as an example only and other values are possible. In some embodiments, the value of the window variance parameter is determined empirically.
[0077] The video indexing application 104 first determines the variance window. Using the second video 114 as an example and recalling that the second video 114 duration is forty nine minutes, the video indexing application 104 determines the variance window as follows:
Δ1=0.05*49 min=2.45 min (Formula 1)
[0078] Where Δ1 is the variance window.
[0079] The video indexing application 104 can determine the lower limit of the variance parameter substantially as has been described above:
t2−Δ1=46.15 min (Formula 2)
[0080] Where t2 is the duration of the given video (in the example being reviewed here—duration of the second video 114) and Δ1 is the variance window.
[0081] In some embodiments, the upper limit is determined as follows:
t2+Δ1=51.45 min (Formula 3)
[0082] Hence, for the second video 114, within these embodiments, the variance parameter is determined to be between 46.15 minutes and 51.45 minutes.
[0083] Naturally, yet other variations are possible. For example, rather than a percentage, the variance window parameter can be expressed as a constant value, such as 15 seconds, 30 seconds, 1 minute and the like.
[0084] Additionally, where the lower limit and the upper limit of the variance parameter is calculated, the variance window used for the determination of the upper limit and the lower limit does not need to be the same. For example, a first variance window of 5% can be applied for determining the lower limit, while a second variance window of 3% can be applied for determining the upper limit (or vice versa).
[0085] As another example, a first variance window of 60 seconds can be applied for determining the lower limit, while a second variance window of 1.5 minutes can be applied for determining the upper limit (or vice versa).
[0086] Naturally, the exact values of the respective first and second variance windows can vary and can be determined empirically based on analysis of the effect of upper/lower limits variations on likelihood of near-duplicate candidate videos actually being the near-duplicate videos.
[0087] An example of a process for comparing candidate near-duplicate videos will be described momentarily. Broadly speaking, however, if a duration of a given near-duplicate video falls within the variance parameter, the given near duplicate video is considered to be an actual near-duplicate video candidate and is selected for further analysis (by means of bit-by-bit comparison, video signature comparison and the like).
[0088] In some embodiments of the present technology the routine for selecting near-duplicate video candidates can be implemented as follows. It is noted that the routine for selecting near-duplicate video candidates can be executed by the video indexing application 104.
[0089] Ranking/Organizing Step
[0090] In some embodiments of the present technology, the first video 112, the second video 114, the third video 116 and the fourth video 118 are first ranked/organized in an order of the length of the duration. In some embodiments, the video indexing application 104 ranks/organizes the first video 112, the second video 114, the third video 116 and the fourth video 118 in an ascending order of the duration, as depicted in
[0091] Iterative Near-Duplicate Candidate Determination Process
[0092] Next, the video indexing application 104 starts an iterative near-duplicate candidate determination process.
[0093] The second video 114 is selected as a given video for which near-duplicate video candidates are to be selected. The video indexing application 104 then determines the variance parameter for the second video 114, as has been described in detail above. It will be recalled that in a given example, the variance parameter for the second video 114 has been determined to be 46.15 minutes and 49 minutes. Since the duration of the first video 112 is nineteen minutes (t1=19 min), the video indexing application 104 determines that the duration of the first video 112 is below the lower limit of the variance parameter of the second video 114 (and thus is outside of the variance parameter of the second video 114). Thus, the video indexing application 104 does not select the first video 112 as an actual near-duplicate candidate for the second video 114.
[0094] The video indexing application 104 then selects the third video 116 as the given video for which near-duplicate video candidates are to be selected. Akin to the process of determining the variance parameter described above the video indexing application 104 determines the variance window as follow: Δ2=0.05*50 min=2.5 min. The video indexing application 104 then determines the upper limit and the lower limit of the variance parameter for the third video 116. The video indexing application 104 determines the upper limit of the variance parameter to be the duration of the third video 116 (t3=50 min) and the lower limit of the variance parameter is determined as, t3−Δ2=47.5 min. Thus, the variance parameter for the third video 116 is set as between 47.5 m min and 50 min.
[0095] Next, the video indexing application 104 determines which ones of the potential near-duplicate video candidates are actual near-duplicate video candidates for the second video 114. Returning to the example presented herein, the duration of the first video 112 is t1=19 min, which is below the lower limit of the third video 116, thus the video indexing application 104 determines that the first video 112 is not an actual near-duplicate candidate for the third video 116.
[0096] For the second video 114, the duration thereof is above the lower limit of the variance parameter and below the upper limit of the variance parameter, thus the video indexing application 104 determines that the duration of the second video 114 is within the variance parameter of the third video 116, thus, the video indexing application 104 selects the second video 114 as an actual candidate for being a near-duplicate of the third video 116.
[0097] Once the second video 114 is determined to be an actual near-duplicate candidate for the third video 116, the video indexing application 104 then determines if the second video 114 is actually a near-duplicate of the third video 116. In some embodiments of the present technology, the video indexing application 104 can compare a video signature of the second video 114 with a video signature of the third video 116. In those embodiments, where video signatures are made up of signature visual words, the video indexing application 104 determines a number of overlapping signature visual words between the signature of the second video 114 and the signature of the third video 116.
[0098] In response to the number of overlapping signature visual words being above a pre-determined matching threshold, the video indexing application 104 determines that the second video 114 is actually a near-duplicate of the third video 116.
[0099] In some additional embodiments of the present technology, in addition to or instead of the video signatures, the video indexing application 104 can compare audio tracks of the second video 114 and the third video 116. In some additional embodiments of the present technology, the video indexing application 104 can additionally compare titles of the second video 114 and the third video 116. In some additional embodiments of the present technology, the video indexing application 104 can additionally compare other metadata of the second video 114 and the third video 116.
[0100] The video indexing application 104 then repeats the process with the fourth video 118, as well as other videos potentially present within the collection.
[0101] It is noted that the videos that were not determined to actually be near-duplicate video candidates (such as the first video 112) are not compared with the target video, thus, potentially leading to saved time and/or saved computing resources.
[0102] In those embodiments of the present technology, where the video files have been ranked in an ascending order of video duration, an additional technical effect of reducing computational resources required can be achieved by comparing either only lower duration videos (where the upper limit of the variance parameter is set at the given video duration) or lower duration videos and immediately following longer duration videos (where the upper limit of the variance parameter is set using the variance window parameter).
[0103] In some embodiments of the present technology, the video indexing application 104, once it selects all the near-duplicates for the given video, can execute one or more actions in relation to the given video and/or some or all of its near-duplicate videos.
[0104] In some embodiments, the video indexing application 104 “merges” the given video and at least some of its identified near-duplicate videos. How the video indexing application 104 executes the merging is not particularly limited and can include one or more of the following actions.
[0105] The video indexing application 104 can merge the metadata associated with the given video and at least some of its identified near-duplicate videos. The metadata can include description, titles, audio tracks and the like.
[0106] The video indexing application 104 can merge the video signature associated with the given video and at least some of its identified near-duplicate videos. For example, video words (i.e. visual words) from the video signature of the given video can be added to the video signature of the at least some of its identified near-duplicates and vice versa.
[0107] In some embodiments of the present technology, the video indexing application 104 can create a cluster containing the given video and at least some of its identified near-duplicates. The so-created cluster can include a cluster ID, as well as links (such as URLs or the like) to the given video and at least some of its identified near-duplicates. The video indexing application 104 can store the cluster information in the above mentioned processed video information database 120.
[0108] Given the architecture and examples provided herein above, it is possible to execute a method of selecting a candidate video (the candidate video potentially being a near-duplicate of a given video, the given video having a given video duration). With reference to
[0109] Step 402—Determining a Variance Parameter, the Variance Parameter Being Determined Based on the First Video Duration
[0110] The method 400 starts at step 402, where the video indexing application 104 determines a variance parameter, the variance parameter being determined based on the first video duration (in this case, the first video duration is the duration of the video for which the near-duplicate videos are to be determined).
[0111] In some embodiments of the method 400, the variance parameter comprises: as an upper limit of variance, the first video duration; as a lower limit, a value that is the first video duration less a pre-determined variance window.
[0112] In some embodiments of the method 400, the variance parameter comprises: as an upper limit of variance, a value that is the first video duration plus a pre-determined variance window; as a lower limit, a value that is the first video duration less the pre-determined variance window.
[0113] Step 404—Receiving, from the Video Storage, a Plurality of Candidate Videos
[0114] At step 404, the video indexing application 104 receives, from the video repository 110, a plurality of candidate videos.
[0115] Step 406—Selecting a First Candidate Video from the Plurality of Candidate Videos, the First Candidate Video Having a First Candidate Video Duration
[0116] At step 406, the video indexing application 104 selects a first candidate video from the plurality of candidate videos, the first candidate video having a first candidate video duration.
[0117] In some embodiments of the method 400, selecting the first candidate video from the plurality of candidate videos comprises: ranking the plurality of candidate videos in an order of respective candidate video duration and selecting the first video candidate being a video candidate with a lowest duration.
[0118] Step 408—Comparing the First Candidate Video Duration with the Variance Parameter
[0119] At step 408, the video indexing application 104 compares the first candidate video duration with the variance parameter.
[0120] Step 410—in Response to the First Candidate Video Duration Being within the Variance Parameter, Determining that the First Candidate Video is an Actual Candidate for Being a Near-Duplicate of the Given Video
[0121] At step 410, in response to the first candidate video duration being within the variance parameter, the video indexing application 104 determines that the first candidate video is an actual candidate for being a near-duplicate of the given video.
[0122] Once the video indexing application 104 determines that the first candidate video is an actual candidate for being a near-duplicate of the given video, the method 400 further comprises comparing the first candidate video with the given video to determine if the first candidate video being the near-duplicate of the given video.
[0123] In some embodiments of the meth video storage (108) od 400, the given video comprises a given video signature and the first candidate video comprising a first candidate video signature. Within these embodiments, the video indexing application 104 can compare the first candidate video with the given video by comparing the first candidate video signature and the given video signature. The comparing the first candidate video signature and the given video signature can be executed in a bit-by-bit manner
[0124] In some embodiments of the method 400, the video indexing application 104 the can additionally (or alternatively) compare at least one of: audio tracks, meta data, and titles for the given video and the first candidate video.
[0125] In some embodiments of the method 400, the method 400 further comprises: selecting a second candidate video from the plurality of candidate videos, the second candidate video having a second candidate video duration; comparing the second candidate video duration with the variance parameter; if the second candidate video duration is outside the variance parameter, determining that the second candidate video is not an actual candidate for being a near-duplicate of the given video. In some embodiments of the method 400, the method 400 further comprises comparing the first candidate video with the given video (as it has been determined to be the actual candidate for being near-duplicate video) and not comparing the second candidate video with the given video (as it has been determined not to be the actual candidate for being near-duplicate video).
[0126] It should be expressly understood that not all technical effects mentioned herein need to be enjoyed in each and every embodiment of the present technology. For example, embodiments of the present technology may be implemented without the user enjoying some of these technical effects, while other embodiments may be implemented with the user enjoying other technical effects or none at all.
[0127] Modifications and improvements to the above-described implementations of the present technology may become apparent to those skilled in the art. The foregoing description is intended to be exemplary rather than limiting. The scope of the present technology is therefore intended to be limited solely by the scope of the appended claims.