Viewing devices and programs
The viewing terminal and program synchronize multiple videos by adjusting playback rates based on reference times and thresholds to correct time deviations, addressing synchronization issues in web browsers.
Patent Information
- Application Number
- JP2020104209
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2020-06-17
- Publication Date
- 2024-10-09
- Estimated Expiration
- 2040-06-17
AI Technical Summary
Web browsers lack a mechanism to synchronize multiple videos played using HTMLMediaElements, leading to playback time discrepancies due to network congestion or processing fluctuations, which can cause visual defects if the lag exceeds the display refresh cycle.
A viewing terminal and program that utilize a reference time acquisition section, synchronization processing sections, and video playback sections to adjust playback rates based on current and reference times, ensuring synchronization by adding or subtracting thresholds to correct time deviations.
The solution effectively synchronizes multiple videos by correcting playback time discrepancies, maintaining synchronization even when external factors cause deviations, ensuring smooth and synchronized video playback.
Smart Images

Figure 0007564648000001 
Figure 0007564648000002 
Figure 0007564648000003
Abstract
Description
[Technical field]
[0001] The present invention relates to a viewing terminal and a program for playing back a plurality of moving images for a user to view. [Background technology]
[0002] Conventionally, as an element of a program for playing video (image and audio) on an audiovisual terminal, for example, an "HTMLMediaElement" which is a component constituting a web page is used (see, for example, Non-Patent Documents 1 to 4).
[0003] This HTMLMediaElement is an element for playing video, and is written in HTML (HyperText Markup Language) so that it can be run on a web browser.
[0004] The viewing terminal can play back a predetermined video at a predetermined position on the screen by executing an HTML file in which HTMLMediaElement is written (for example, see Non-Patent Document 5). [Prior art documents] [Non-patent literature]
[0005] [Non-Patent Document 1] “HTMLMediaElement”, [online], [searched May 12, 2020], Internet<URL:https: / / developer.mozilla.org / ja / docs / Web / API / HTMLMediaElement> [Non-Patent Document 2] “4.8.12 Media elements”, [online], [searched May 12, 2020], Internet<URL:https: / / html.spec.whatwg.org / multipage / the-video-element.html#htmlmediaelement> [Non-Patent Document 3] “4.7.10 Media elements”, [online], [searched May 12, 2020], Internet<URL:https: / / www.w3.org / TR / html50 / embedded-content-0.html#htmlmediaelement> [Non-Patent Document 4] “4.8.10.11.3 ASSIGNING A MEDIA CONTROLLER DECLARATIVELY”, [online], [Retrieved May 12, 2020], Internet <URL:https: / / http: / / www.w3.org / TR / 2012 / CR-html5-20121217 / embedded-content-0.html#attr--media-mediagroup> [Non-Patent Document 5] “HTML5 Video Events and API”, [online], [searched May 12, 2020], Internet<URL:https: / / www.w3.org / 2010 / 05 / video / mediaevents.html> Summary of the Invention [Problem to be solved by the invention]
[0006] However, when a viewing device uses multiple HTMLMediaElements simultaneously to play multiple videos, web browsers currently do not implement a mechanism for synchronizing multiple videos.
[0007] Previously, the mediaGroup attribute defined in HTML5 allowed multiple HTMLMediaElements to be grouped together, and when playback was started or stopped for one HTMLMediaElement, the other grouped HTMLMediaElements could also start or stop playing in sync. In other words, synchronization of playback start and stop can be achieved on the premise that HTMLMediaElements are grouped using the mediaGroup attribute.
[0008] However, for example, if a video is being played in one HTMLMediaElement and another video is played in another HTMLMediaElement without stopping the first video, these videos cannot be synchronized. Note that this function of the mediaGroup attribute was deleted in HTML5.1, which was later revised in HTML5.
[0009] In addition, a temporary freeze may occur in one HTMLMediaElement due to external factors such as network congestion or load fluctuations in the processing of a viewing terminal. In this case, a difference occurs in the playback time between one HTMLMediaElement and another HTMLMediaElement, making it impossible to play videos between different HTMLMediaElements in a synchronized state.
[0010] The aforementioned external factors cause a difference in playback time between different HTMLMediaElements. In that case, if the difference in playback time is less than the display refresh cycle, the visual defect in the video is not noticeable. However, if the difference in playback time is greater than the display refresh cycle, the display timing of the video frames is shifted, and the difference in playback time becomes visually noticeable.
[0011] Furthermore, when playing videos on HTMLMediaElements running on different browsers, or when playing videos on HTMLMediaElements on browsers running on different viewing devices, it is not possible to play each video in synchronization with the time accuracy of the display refresh period.
[0012] Therefore, the present invention has been made to solve the above-mentioned problems, and its object is to provide a viewing terminal and program that can correct the playback time discrepancy and achieve synchronization of video playback, even if the playback times differ when playing each video using multiple video playback elements. [Means for solving the problem]
[0013] In order to solve the above problem, the audiovisual terminal of claim 1 comprises: By running a video viewing program on a web browser, In a viewing terminal that plays multiple videos that a user views, The time on the clock of the viewing device Reference time As a reference time acquisition unit that acquires a reference time of the plurality of moving images, a plurality of synchronization processing units corresponding to the plurality of moving images, and a plurality of moving image playback units corresponding to the plurality of moving images, The video consists of video and audio. a current time comparison unit, each of the plurality of synchronization processing units inputting a current time indicating a playback time of the video being played by the corresponding video playback unit, inputting the reference time acquired by the reference time acquisition unit, adding a predetermined threshold value to the reference time to obtain an added time, and subtracting the threshold value from the reference time to obtain a subtracted time, comparing the current time with the added time and the subtracted time to determine whether the current time is ahead of or behind the current time, or is neither ahead of or behind the current time; a correction value calculation unit that inputs the current time of the video being played by the corresponding video playback unit and the reference time acquired by the reference time acquisition unit, calculates a difference between the current time and the reference time as a time offset, and determines a playback rate correction value by dividing the time offset by a preset correction time, with the preset time being set as a preset correction time when the time offset becomes zero after a preset time has elapsed; and inputs the playback rate correction value calculated by the correction value calculation unit; When the current time comparison unit determines that the current time is ahead, a predetermined reference playback rate The reference playback rate is calculated by subtracting the playback rate correction value from the and if it is determined that the current time is late, The reference playback rate is calculated by adding the playback rate correction value to the reference playback rate. and a playback rate correction unit that, when it is determined that the current time is neither advanced nor delayed, determines the reference playback rate as the playback rate, and each of the plurality of video playback units receives the playback rate from the corresponding synchronization processing unit, and corrects the playback rate of the corresponding video based on the playback rate. The video and audio of The present invention is characterized by regenerating the above-mentioned.
[0014] Moreover, the viewing terminal of claim 2 is A viewing terminal that plays back a plurality of videos that a user views includes a reference time acquisition unit that acquires a predetermined reference time, a plurality of synchronization processing units corresponding to each of the plurality of videos, and a plurality of video playback units corresponding to each of the plurality of videos, and when each of the plurality of synchronization processing units corresponds to each of the plurality of video playback units, each of the plurality of synchronization processing units inputs a current time indicating the playback time of the video being played by the corresponding video playback unit and inputs the reference time acquired by the reference time acquisition unit, adds a predetermined threshold value to the reference time to obtain an addition time, subtracts the threshold value from the reference time to obtain a subtraction time, compares the current time with the addition time and the subtraction time, and determines whether the current time is ahead, behind, or neither ahead nor behind; and when it is determined by the current time comparison unit that the current time is ahead, a rate lower than a predetermined reference playback rate is detected. and a playback rate correction unit which calculates a playback rate based on the reference playback rate when it is determined that the current time is delayed, calculates a rate higher than the reference playback rate as the playback rate when it is determined that the current time is neither advanced nor delayed, and calculates the reference playback rate as the playback rate, wherein each of the plurality of video playback units receives the playback rate from the corresponding synchronization processing unit and plays the corresponding video based on the playback rate, and when each of the plurality of video playback units plays the video using HTMLMediaElement, the current time comparison unit of the corresponding synchronization processing unit receives the current time and the reference time to calculate the addition time and the subtraction time at the timing of a timeupdate event that is fired when the current time is updated by the HTMLMediaElement, and compares the current time with the addition time and the subtraction time to make a judgment, and the playback rate correction unit calculates the playback rate. It is characterized by:
[0015] Furthermore, the viewing terminal of claim 3 is characterized in that, in the viewing terminal described in claim 1 or 2, the threshold value is set to a predetermined value that is less than or equal to half the refresh period of the display unit on which the video is displayed.
[0017] Furthermore, claims 4 The program according to claim 1 3 The present invention is characterized in that the audiovisual terminal functions as any one of the audiovisual terminals described above. Effect of the Invention
[0018] As described above, according to the present invention, even if the playback times differ when playing back videos using multiple video playback elements, the playback time difference can be corrected and synchronization of video playback can be achieved. [Brief description of the drawings]
[0019] [Figure 1] 2 is a diagram illustrating an example of a schematic configuration of a video viewing program executed by a viewing terminal according to an embodiment of the present invention. FIG. [Diagram 2] 1 is a block diagram showing an example of the configuration of a viewing terminal according to an embodiment of the present invention. [Diagram 3] 4 is a block diagram showing a configuration example of a synchronization processing unit of the first example. FIG. [Figure 4] 13 is a flowchart illustrating an example of processing by a synchronization processing unit of the first example. [Diagram 5] FIG. 11 is a block diagram showing a configuration example of a synchronization processing unit of a second example. [Figure 6] 13 is a flowchart illustrating an example of processing by a correction value calculation unit. [Figure 7] FIG. 1 is a diagram illustrating synchronization of multiple videos being played on two viewing terminals. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0020] The present invention is characterized in that, when playing back a plurality of videos, a current time indicating the playback time of each video is compared with an added time and a subtracted time obtained by adding and subtracting a predetermined threshold value to and from a reference time, a playback rate is calculated based on the comparison result, and the video is played back at the playback rate.
[0021] Specifically, the present invention obtains a playback rate that is lower than a predetermined reference playback rate when the current time is advanced, obtains a playback rate that is higher than the reference playback rate when the current time is delayed, and obtains the playback rate to be the reference playback rate when the current time is neither advanced nor delayed.
[0022] Even if the playback time of any of the videos is shifted when multiple videos are being played back, the playback time shift can be corrected to achieve synchronization of the video playback.
[0023] [Video viewing program] First, a video executed by a viewing terminal according to an embodiment of the present invention picture The schematic configuration of the viewing program will be described. Fig. 1 is a diagram for explaining a schematic configuration example of a video viewing program, showing an example in which four videos are played back. Fig. 1 shows only components directly related to the present invention, and components not directly related are omitted.
[0024] This video viewing program is a program for playing back four videos, and is composed of a screen configuration program 100 and a data control program 101. Screen configuration program 100 is a program in which video playback sections 12-1 to 12-4 of HTMLMediaElement, which are elements for playing back the respective videos, are written in HTML, and the data to be displayed on the screen and its position are defined.
[0025] The data control program 101 is a program in which the reference time acquisition unit 10, the current time comparison unit 20, the playback rate correction unit 21, etc. are written in JavaScript (registered trademark), and defines processing related to data handled by the video viewing program.
[0026] As the HTML file of the screen configuration program 100 is executed, the video playback units 12-1 to 12-4 play the respective videos (for example, see the screen of the viewing terminal 1a shown in FIG. 7 described later). Then, a predetermined event is fired at a predetermined timing by the HTMLMediaElement, and the current time comparison unit 20 of the data control program 101 is called and operates.
[0027] The current time comparison unit 20 inputs the current time (currentTime) indicating the playback time of the video from one of the video playback units 12-1 to 12-4 corresponding to the fired event, and also inputs the reference time from the reference time acquisition unit 10. The reference time is the time managed by the viewing terminal that executes the video viewing program, and the four videos are synchronized according to this reference time. The current time comparison unit 20 then compares the current time with the addition time and subtraction time obtained by adding or subtracting a predetermined threshold value TH to or from the reference time.
[0028] The playback rate correction unit 21 obtains a playback rate (playbackRate) based on the comparison result, and outputs the playback rate to the moving image playback units 12-1 to 12-4 corresponding to the fired event. The moving image playback units 12-1 to 12-4 corresponding to the fired event receive the playback rate from the playback rate correction unit 21 and play the moving images at the playback rate.
[0029] [Viewing device] Next, a viewing terminal according to an embodiment of the present invention will be described. This viewing terminal is a terminal that executes the video viewing program shown in FIG.
[0030] 2 is a block diagram showing an example of the configuration of a viewing terminal according to an embodiment of the present invention. This viewing terminal 1 includes a reference time acquisition unit 10, synchronization processing units 11-1 to 11-4 (hereinafter collectively referred to as "synchronization processing unit 11"), video playback units 12-1 to 12-4 (hereinafter collectively referred to as "video playback unit 12"), and a display unit 13. The viewing terminal 1 plays back four videos in a synchronized state.
[0031] The synchronization processing unit 11-1 and the moving image reproducing unit 12-1 correspond to each other and reproduce a first moving image. The synchronization processing units 11-2 to 11-4 and the moving image reproducing units 12-2 to 12-4 also correspond to each other and reproduce the second to fourth moving images, respectively.
[0032] In addition, the viewing terminal 1 may be a mobile terminal such as a smartphone, a personal computer, a television, etc., and may be any terminal on which a video viewing program runs on a web browser and on which videos are viewed by a user operating the viewing terminal 1.
[0033] The reference time acquisition unit 10 acquires the reference time when the four videos are synchronized in the viewing terminal 1, and outputs this to the synchronization processing unit 11. Here, the reference time may be the internal time of the viewing terminal 1 on which the video viewing program is running. In this case, the reference time acquisition unit 10 acquires time information from a clock (not shown) (a clock provided in the viewing terminal 1) and uses this as the reference time.
[0034] The reference time acquisition section 10 may acquire the current time output from any one of the video playback sections 12-1 to 12-4 as the reference time.
[0035] The synchronization processing unit 11 receives a signal indicating that a timeupdate event has been fired from the video playback unit 12 in response to firing of the timeupdate event by the HTMLMediaElement in the corresponding video playback unit 12. In response to this, the synchronization processing unit 11 receives the current time from the video playback unit 12 and the reference time from the reference time acquisition unit 10.
[0036] The synchronization processing unit 11 compares the current time with an addition time and a subtraction time obtained by adding or subtracting a predetermined threshold value TH to or from a reference time, calculates a playback rate according to the comparison result, and outputs the playback rate to the video playback unit 12. Details of the synchronization processing unit 11 will be described later.
[0037] The video playback unit 12 plays video using HTMLMediaElement. When the current time indicating the playback time of the video is updated, the video playback unit 12 fires a timeupdate event using HTMLMediaElement, and outputs a signal indicating the firing to the corresponding synchronization processing unit 11.
[0038] The timeupdate event fires within 250ms of the current time being updated. The current time is updated continuously while the video is playing, but is not updated when the video is stopped.
[0039] The video playback unit 12 acquires the current time in the HTMLMediaElement, and outputs the current time to the corresponding synchronization processing unit 11. The video playback unit 12 also receives a playback rate from the corresponding synchronization processing unit 11, and plays the video by outputting the video to the display unit 13 at the playback rate by the HTMLMediaElement.
[0040] Display unit 13 receives moving images from moving image reproducing units 12-1 to 12-4 and displays the received moving images on a screen. As a result, moving images are reproduced by moving image reproducing units 12-1 to 12-4 at the reproduction rates received from corresponding synchronization processing units 11-1 to 11-4.
[0041] In this way, for each of the four videos, each time a timeupdate event is fired, the playback rate of the video is updated according to the video's current time relative to the reference time so that the current time approaches the reference time, or more precisely, so that the current time approaches the range of the reference time ± threshold value TH. The range of the reference time ± threshold value TH refers to the time range from (reference time - threshold value TH) to (reference time + threshold value TH).
[0042] Next, the synchronization processing unit 11 shown in Fig. 2 will be described in detail. The synchronization processing unit 11 of the first example described below is an example that compares the current time with an addition time and a subtraction time obtained by adding or subtracting a predetermined threshold value to or from a reference time, and calculates a playback rate by adding or subtracting a predetermined playback rate correction value to or from a reference playback rate according to the comparison result. The synchronization processing unit 11 of the second example is an example that calculates a playback rate correction value in the synchronization processing unit 11 of the first example according to a time offset d that is the difference between the current time and the reference time.
[0043] (Synchronization processing unit 11 / first example) First, a first example of the synchronization processing unit 11 will be described. Fig. 3 is a block diagram showing a configuration example of the first example of the synchronization processing unit 11, and Fig. 4 is a flowchart showing a processing example of the first example of the synchronization processing unit 11. This synchronization processing unit 11a includes a current time comparison unit 20 and a playback rate correction unit 21.
[0044] The current time comparison unit 20 judges whether or not a signal indicating that a timeupdate event has been fired has been input (step S401). If the current time comparison unit 20 judges in step S401 that a signal indicating that a timeupdate event has been fired has not been input (step S401: N), the current time comparison unit 20 waits until the signal is input.
[0045] When the current time comparison unit 20 determines in step S401 that a signal indicating that a timeupdate event has been fired has been input (step S401: Y), it performs the processes of steps S402 to S409, which will be described later, and returns to step S401. That is, the current time comparison unit 20 repeats the processes of steps S402 to S409 every time a timeupdate event is fired.
[0046] The current time comparison unit 20 proceeds from step S401(Y) and receives the current time from the corresponding video playback unit 12 (step S402) and the reference time from the reference time acquisition unit 10 (step S403). The current time comparison unit 20 also receives a preset threshold value TH.
[0047] The current time comparison unit 20 adds the threshold value TH to the reference time to obtain the time of the addition result (addition time), compares the current time with the addition time, and determines whether the current time is ahead of the addition time (step S404).
[0048] If the current time comparison unit 20 determines in step S404 that the current time is ahead of the added time (step S404: Y), it outputs a comparison result indicating that the current time is ahead to the playback rate correction unit 21 and proceeds to step S406.
[0049] On the other hand, if the current time comparison section 20 determines in step S404 that the current time is not ahead of the added time (step S404: N), the process proceeds to step S405.
[0050] The current time comparison unit 20 proceeds from step S404 (N) to subtract the threshold value TH from the reference time to obtain the time resulting from the subtraction (subtraction time), and compares the current time with the subtraction time to determine whether the current time is later than the subtraction time (step S405).
[0051] If the current time comparison unit 20 determines in step S405 that the current time is later than the subtraction time (step S405: Y), it outputs a comparison result indicating that the current time is later to the playback rate correction unit 21 and proceeds to step S407.
[0052] On the other hand, if the current time comparison unit 20 determines in step S405 that the current time is not later than the subtraction time (step S405: N), it generates a comparison result indicating that the current time is neither advanced nor delayed. Then, the current time comparison unit 20 outputs the comparison result to the playback rate correction unit 21, and proceeds to step S408. In this case, the current time is within the range of the reference time ± the threshold value TH.
[0053] As the threshold value TH in steps S404 and S405, a value equal to or smaller than R / 2 is used, where R is the refresh cycle time of the display of the display unit 13 on which the video viewing player of the viewing terminal 1 operates.
[0054] This is because, to synchronize all HTMLMediaElements in video playback units 12-1 to 12-4, the difference in the current time (i.e., the range of ±threshold TH (2×TH) from the reference time) needs to be kept within the refresh cycle time R, including the maximum and minimum. In this case, the difference in the current time from the reference time is in the range of -1 / 2 to 1 / 2 in the refresh cycle time R.
[0055] In other words, by using a value of R / 2 as the threshold value TH, it is possible to correct the deviation in the display timing of video frames within the time R of the refresh cycle.
[0056] For example, the threshold value TH is preferably a value of about 1 / 4 of the refresh cycle time R, i.e., R / 4. This allows the deviation of the current time, including the maximum and minimum, to be kept within about 1 / 2 of the refresh cycle time R. In this case, the deviation of the current time from the reference time is in the range of -1 / 4 to 1 / 4 in the refresh cycle time R.
[0057] The playback rate correction unit 21 receives the comparison result from the current time comparison unit 20 and also receives a preset playback rate correction value. When the comparison result indicates that the current time is ahead, moving on from step S404(Y), the playback rate correction unit 21 subtracts the playback rate correction value from 1, which is the reference playback rate, and sets the subtraction result as the playback rate (step S406). The reference playback rate indicates the rate when the video is played back at normal speed.
[0058] As a result, when the current time is ahead of the reference time and has a difference exceeding the threshold value TH, a playback rate lower than the reference playback rate is set so that the current time approaches the reference time.
[0059] Here, it is desirable to use a value in the range where the change in the playback rate is not visually noticeable when the video is being played back as the playback rate correction value. For example, the playback rate correction value is R, which is the refresh cycle time. In this case, if the current time is off by R seconds from the reference time, the correction is performed over one second, and the current time approaches the reference time.
[0060] Also, moving from step S405 (Y), if the comparison result indicates that the current time is delayed, the playback rate correction unit 21 adds the playback rate correction value to the reference playback rate of 1, and sets the addition result as the playback rate (step S407).
[0061] As a result, when the current time is delayed and has a difference exceeding the threshold value TH with respect to the reference time, a playback rate higher than the reference playback rate is set so that the current time approaches the reference time.
[0062] Also, moving from step S405(N), if the comparison result indicates that the current time is neither advanced nor delayed, the playback rate correction unit 21 sets the playback rate to 1, which is the reference playback rate (step S408).
[0063] As a result, if the current time does not deviate from the reference time by more than the threshold value TH, i.e., if the current time is neither advanced nor delayed, the reference playback rate is set as the playback rate so that the current time does not deviate from the reference time. In other words, the playback rate returns to the reference playback rate, which is the normal speed.
[0064] The playback rate correction unit 21 proceeds from steps S406 to S408 and outputs the playback rate to the corresponding moving image playback unit 12 (step S409).
[0065] As a result, when the current time of the video being played back by the video playback unit 12 is advanced, the video is played back at a playback rate lower than the reference playback rate, so that the current time is counted slower than usual and approaches the reference time.
[0066] In addition, when the current time of the video being played back by the video playback unit 12 is delayed, the video is played back at a playback rate higher than the reference playback rate, so that the current time is counted faster than usual and approaches the reference time.
[0067] When the current time of the video being played back by the video playback unit 12 is neither advanced nor delayed, the video is played back at the same playback rate as the reference playback rate, so that the current time is counted at a normal speed and playback continues with the current time close to the reference time.
[0068] (Synchronization processing unit 11 / second example) Next, a second example of the synchronization processing unit 11 will be described. Fig. 5 is a block diagram showing a configuration example of the second example of the synchronization processing unit 11. This synchronization processing unit 11b includes a current time comparison unit 20, a playback rate correction unit 21, and a correction value calculation unit 22.
[0069] Comparing the synchronization processing unit 11a of the first example shown in Fig. 3 with the synchronization processing unit 11b of the second example, both synchronization processing units 11a, 11b have in common the fact that they include a current time comparison unit 20 and a playback rate correction unit 21. On the other hand, the synchronization processing unit 11b differs from the synchronization processing unit 11a, which does not include the correction value calculation unit 22, in that it includes a correction value calculation unit 22. In Fig. 5, parts common to Fig. 3 are given the same reference numerals as in Fig. 3, and detailed explanations thereof will be omitted.
[0070] The correction value calculation unit 22 receives the current time from the video playback unit 12 and the reference time from the reference time acquisition unit 10, and calculates a playback rate correction value according to the time deviation d, which is the difference between the current time and the reference time. The correction value calculation unit 22 then outputs the playback rate correction value to the playback rate correction unit 21. The correction value calculation unit 22 will be described in detail later.
[0071] The playback rate correction unit 21 receives the comparison result from the current time comparison unit 20 and receives the playback rate correction value from the correction value calculation unit 22. Then, in steps S406 and S407, the playback rate correction unit 21 calculates the playback rate using the playback rate correction value received from the correction value calculation unit 22. Alternatively, the playback rate correction unit 21 calculates the playback rate in step S408. The playback rate correction unit 21 outputs the playback rate to the corresponding video playback unit 12.
[0072] 6 is a flowchart showing an example of processing by the correction value calculation unit 22. The correction value calculation unit 22 receives an input of the current time from the corresponding video playback unit 12 (step S601) and also receives an input of the reference time from the reference time acquisition unit 10 (step S602).
[0073] The correction value calculation unit 22 calculates the time offset d, which is the difference (absolute value) between the current time and the reference time (step S603), and divides the time offset d by a preset correction time a (d / a) to obtain a playback rate correction value (step S604). The correction time a indicates the time for correcting the time offset d of the video. In other words, by using d / a as the playback rate correction value, the time offset d of the video becomes 0 after the correction time a has elapsed.
[0074] The correction value calculation unit 22 determines whether the playback rate correction value is greater than a preset upper limit value (step S605). If the correction value calculation unit 22 determines in step S605 that the playback rate correction value is greater than the upper limit value (step S605: Y), the correction value calculation unit 22 sets the playback rate correction value to the upper limit value (e.g., 1 / 4) (step S606) and proceeds to step S609.
[0075] On the other hand, if the correction value calculation unit 22 determines in step S605 that the playback rate correction value is not greater than the upper limit value (step S605: N), the correction value calculation unit 22 proceeds to step S607.
[0076] The correction value calculation unit 22 proceeds from step S605(N) and determines whether or not the playback rate correction value is smaller than a preset lower limit value (step S607).
[0077] If it is determined in step S607 that the playback rate correction value is smaller than the lower limit value (step S607: Y), the correction value calculation unit 22 sets the playback rate correction value to the lower limit value (for example, 1 / 60) (step S608) and proceeds to step S609.
[0078] On the other hand, if the correction value calculation unit 22 determines in step S607 that the playback rate correction value is not smaller than the lower limit value (step S607: N), the process proceeds to step S609.
[0079] The correction value calculation unit 22 proceeds from step S606, step S607(N) or step S608, and outputs the playback rate correction value to the playback rate correction unit 21 (step S609).
[0080] As a result, the value (d / a) obtained by dividing the time deviation d by the correction time a is used as the playback rate correction value, so the smaller the time deviation d, the closer the playback rate is to the reference playback rate of 1. Also, the larger the time deviation d, the farther the playback rate is from 1. Furthermore, the smaller the correction time a, the shorter the time it takes for the time deviation d to reach 0, and the larger the correction time a, the longer the time it takes for the time deviation d to reach 0.
[0081] Here, when there is a discrepancy in the current time of the video, a method may be considered in which the playback rate is immediately changed to 0 or to a larger value. However, by using the method according to the embodiment of the present invention, the change in the playback rate can be suppressed, so that the change in the playback rate is not visually noticeable.
[0082] Moreover, the playback rate correction value output to the playback rate correction unit 21 is a value between a preset lower limit and an upper limit. If the playback rate correction value d / a is greater than the upper limit, it is limited to the upper limit, so that the change in the playback rate can be made even less visually noticeable.
[0083] Furthermore, when the playback rate correction value d / a is smaller than the lower limit, it is limited to the lower limit. Therefore, the playback rate calculated based on the playback rate correction value can be a rate at which video playback can be controlled.
[0084] As described above, according to the audiovisual terminal 1 of the embodiment of the present invention, in the first example of the synchronization processing unit 11a, the current time comparison unit 20 adds or subtracts a preset threshold value TH to or from the reference time to obtain the addition time and the subtraction time when a timeupdate event of an HTMLMediaElement of the corresponding video playback unit 12 is fired. Then, the current time comparison unit 20 compares the current time with the addition time and the subtraction time.
[0085] When the comparison process determines that the current time is ahead, the playback rate correction unit 21 subtracts a preset playback rate correction value from the reference playback rate to obtain the playback rate. When the comparison process determines that the current time is behind, the playback rate correction unit 21 adds the playback rate correction value to the reference playback rate to obtain the playback rate. When the comparison process determines that the current time is neither ahead nor behind, the playback rate correction unit 21 obtains the reference playback rate as the playback rate.
[0086] The moving image playback unit 12 corresponding to the synchronization processing unit 11 a plays back the moving image at the playback rate determined by the playback rate correction unit 21 .
[0087] As a result, when it is determined that the current time of the video being played is advanced, the video is played at a playback rate slower than the reference playback rate, when it is determined that the current time is delayed, the video is played at a playback rate faster than the reference playback rate, and when it is determined that the current time is neither advanced nor delayed, the video is played at the reference playback rate.
[0088] By performing this process each time a timeupdate event is fired for all videos being played simultaneously, the current times of all videos can be kept within the range of the reference time ±threshold TH. In other words, the current times of all videos can be kept within the time range from the time before the threshold TH to the time after the threshold TH, that is, within a time range of TH × 2, with the reference time at the center.
[0089] Therefore, even if there is a difference in playback time when playing back videos using multiple HTMLMediaElement video playback elements, the difference in playback time can be corrected and video playback synchronization can be achieved.
[0090] In particular, by setting threshold value TH to half (R / 2) of refresh cycle time R of the display of display unit 13, the deviation of the current time of all moving images can be kept within refresh cycle time R.
[0091] Furthermore, according to the viewing terminal 1 of the embodiment of the present invention, in the second example synchronization processing unit 11b, the correction value calculation unit 22 calculates a time offset d, which is the difference between the current time of the video and the reference time, divides the time offset d by a preset correction time a (d / a), and uses the division result as the playback rate correction value.
[0092] The playback rate correction unit 21 calculates the playback rate using the playback rate correction value calculated by the correction value calculation unit 22 in accordance with the result of the comparison process by the current time comparison unit 20, and the video playback unit 12 plays the video at the playback rate calculated by the playback rate correction unit 21.
[0093] In this way, the playback rate correction value is calculated according to the time offset d and the correction time a, and the playback rate correction value is reflected in the playback rate, so that the change in the playback rate can be made visually inconspicuous.
[0094] In addition, according to the viewing terminal 1 of the embodiment of the present invention, multiple video images can be synchronized, and further, by using multiple viewing terminals 1, all video images being played on the multiple viewing terminals 1 can be synchronized.
[0095] Fig. 7 is a diagram explaining synchronization of multiple videos being played on two viewing terminals 1. In the case where there are two viewing terminals 1 as shown in Fig. 2, the first viewing terminal 1 is viewing terminal 1a and the second viewing terminal 1 is viewing terminal 1b. The viewing terminal 1a plays a total of four videos 111-114 on a web browser 110 by video playback units 12-1-12-4. The viewing terminal 1b plays a total of four videos 121-124 on a web browser 120 by video playback units 12-1-12-4.
[0096] Here, the reference time acquisition unit 10 of the viewing terminals 1a and 1b acquires the time from the clocks of the viewing terminals 1a and 1b, and uses this as the reference time. It is assumed that the clocks of the viewing terminals 1a and 1b are synchronized with Universal Time Coordinates or the like.
[0097] This makes it possible to synchronize a total of eight HTMLMediaElements in the audiovisual terminals 1a and 1b, i.e., to synchronize a total of eight videos played back in the audiovisual terminals 1a and 1b.
[0098] Although the present invention has been described above with reference to the embodiments, the present invention is not limited to the above-described embodiments and can be modified in various ways without departing from the technical concept thereof.
[0099] For example, in the viewing terminal 1 shown in Fig. 2, the synchronization processing unit 11 performs synchronization processing to find the playback rate every time a timeupdate event is fired by HTMLMediaElement in the video playback unit 12. The present invention does not limit the timing of the synchronization processing by the synchronization processing unit 11 to a timing within 250 ms when the timeupdate event is fired, but may be a timing when another event is fired, or may be a timing of another time interval. In short, the timing of the synchronization processing by the synchronization processing unit 11 may be any timing as long as it is a predetermined cycle.
[0100] Also, the audiovisual terminal 1 shown in FIG. 2 is configured to play back video in the video playback unit 12 using a video playback element that is an HTMLMediaElement, but other video playback elements may be used.
[0101] 1, 2 and 7 are configured to play four videos, but may play a number of videos other than four. In this case, the viewing terminals 1, 1a and 1b each include the same number of synchronization processing units 11 and video playback units 12 as the number of videos to be played.
[0102] A normal computer can be used as the hardware configuration of the audiovisual terminal 1 according to the embodiment of the present invention. The audiovisual terminal 1 is configured by a computer equipped with a CPU, a volatile storage medium such as a RAM, a non-volatile storage medium such as a ROM, an interface, etc.
[0103] The functions of the reference time acquisition section 10, synchronization processing sections 11-1 to 11-4, video playback sections 12-1 to 12-4 and display section 13 provided in the audiovisual terminal 1 are each realized by causing a CPU to execute a program in which these functions are written.
[0104] These programs are stored in the storage medium and are read and executed by the CPU. These programs can also be distributed by storing them in a storage medium such as a magnetic disk (floppy disk, hard disk, etc.), an optical disk (CD-ROM, DVD, etc.), or a semiconductor memory, and can also be transmitted and received via a network. [Explanation of symbols]
[0105] 1. Viewing device 10 Reference time acquisition section 11, 11a, 11b, 11-1, 11-2, 11-3, 11-4 Synchronization processing unit 12, 12-1, 12-2, 12-3, 12-4 Video playback section 13 Display section 20 Current time comparison section 21 Playback rate correction section 22 Correction value calculation unit 100 Screen Configuration Programs 101 Data Control Program 110,120 Web browsers 111,112,113,114,121,122,123,124 Videos TH Threshold d Time difference a Correction time
Claims
1. A viewing terminal that plays multiple videos for a user to view by running a video viewing program on a web browser, a reference time acquisition unit that acquires the time of a clock provided in the viewing terminal as a reference time, a plurality of synchronization processing units corresponding to the plurality of videos, respectively, and a plurality of video playback units corresponding to the plurality of videos, each of the plurality of synchronization processing units corresponding to each of the plurality of video playback units, and the video is composed of video and audio, Each of the plurality of synchronization processing units a current time comparison unit which inputs a current time indicating the playback time of the video being played by the corresponding video playback unit, inputs the reference time acquired by the reference time acquisition unit, adds a predetermined threshold value to the reference time to obtain an added time, subtracts the threshold value from the reference time to obtain a subtracted time, and compares the current time with the added time and the subtracted time to determine whether the current time is ahead of or behind the video, or is neither ahead of or behind the video; a correction value calculation unit which inputs the current time of the video being played by the corresponding video playback unit and the reference time acquired by the reference time acquisition unit, calculates a difference between the current time and the reference time as a time deviation amount, and determines a playback rate correction value by dividing the time deviation amount by a preset correction time, where the preset time is a time when the time deviation amount becomes zero after a predetermined time has elapsed; a playback rate correction unit which receives the playback rate correction value calculated by the correction value calculation unit, and calculates a playback rate lower than the reference playback rate by subtracting the playback rate correction value from a predetermined reference playback rate when the current time comparison unit determines that the current time is ahead, and calculates a playback rate higher than the reference playback rate by adding the playback rate correction value to the reference playback rate when the current time comparison unit determines that the current time is behind, and calculates the reference playback rate as the playback rate when the current time is neither ahead nor behind, Each of the plurality of video playback units a viewing terminal which receives the playback rate from a corresponding synchronization processing unit, and plays back the video and audio of the corresponding video based on the playback rate.
2. In a viewing terminal that plays multiple videos that a user views, a reference time acquisition unit that acquires a predetermined reference time, a plurality of synchronization processing units corresponding to the plurality of videos, and a plurality of video playback units corresponding to the plurality of videos, Each of the plurality of synchronization processing units a current time comparison unit which inputs a current time indicating the playback time of the video being played by the corresponding video playback unit, inputs the reference time acquired by the reference time acquisition unit, adds a predetermined threshold value to the reference time to obtain an added time, subtracts the threshold value from the reference time to obtain a subtracted time, and compares the current time with the added time and the subtracted time to determine whether the current time is ahead of or behind the video, or is neither ahead of or behind the video; a playback rate correction unit which, when it is determined by the current time comparison unit that the current time is advanced, determines a rate lower than a predetermined reference playback rate as the playback rate, and, when it is determined that the current time is delayed, determines a rate higher than the reference playback rate as the playback rate, and, when it is determined that the current time is neither advanced nor delayed, determines the reference playback rate as the playback rate, Each of the plurality of video playback units receiving the playback rate from the corresponding synchronization processing unit, and playing the corresponding video based on the playback rate; When each of the plurality of video playback units plays the video by HTMLMediaElement, at the timing of a timeupdate event that is fired when the current time is updated by the HTMLMediaElement, The viewing terminal is characterized in that the current time comparison unit of the corresponding synchronization processing unit inputs the current time and the reference time to determine the addition time and the subtraction time, and compares the current time with the addition time and the subtraction time to make a judgment, and the playback rate correction unit determines the playback rate.
3. 3. The viewing terminal according to claim 1, The viewing terminal is characterized in that the threshold value is set to a predetermined value equal to or less than 1 / 2 of a refresh cycle time of a display unit on which the moving image is displayed.
4. A program for causing a computer to function as the audiovisual terminal according to any one of claims 1 to 3.
Citation Information
Patent Citations
Pressure alleviating device for delivery port of screw type compressor
JP1988036083A
Synchronous moving image reproduction system
JP2014150408A
Image information playback unit, image information playback device and synchronization control method
WO2012153434A1
Display terminal device, content data display method, and content data display program
WO2017042938A1
