CN113542811B - Video playing method, device and computer readable storage medium - Google Patents

Video playing method, device and computer readable storage medium Download PDF

Info

Publication number
CN113542811B
CN113542811B CN202110802047.XA CN202110802047A CN113542811B CN 113542811 B CN113542811 B CN 113542811B CN 202110802047 A CN202110802047 A CN 202110802047A CN 113542811 B CN113542811 B CN 113542811B
Authority
CN
China
Prior art keywords
videos
video
time
path
picture
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110802047.XA
Other languages
Chinese (zh)
Other versions
CN113542811A (en
Inventor
周明珠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN202110802047.XA priority Critical patent/CN113542811B/en
Publication of CN113542811A publication Critical patent/CN113542811A/en
Application granted granted Critical
Publication of CN113542811B publication Critical patent/CN113542811B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • H04N21/234381Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements by altering the temporal resolution, e.g. decreasing the frame rate by frame skipping
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/242Synchronization processes, e.g. processing of PCR [Program Clock References]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/4302Content synchronisation processes, e.g. decoder synchronisation
    • H04N21/4307Synchronising the rendering of multiple content streams or additional data on devices, e.g. synchronisation of audio on a mobile phone with the video output on the TV screen
    • H04N21/43072Synchronising the rendering of multiple content streams or additional data on devices, e.g. synchronisation of audio on a mobile phone with the video output on the TV screen of multiple content streams on the same device
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440281Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by altering the temporal resolution, e.g. by frame skipping

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

The embodiment of the application discloses a video playing method, a video playing device and a computer readable storage medium, and belongs to the technical field of videos. In this embodiment of the present application, in the case that there are different frame rates of multiple paths of videos, based on the time and the reference time of the last frame of the currently displayed frame and the frame rate of the multiple paths of videos, the first video of the multiple paths of videos that need to skip the frame is determined, so that the time of the frames displayed by each path of video in the multiple paths of videos after skip play is closest to the reference time, that is, the time of the frames displayed by each path of video after skip play is close, so that the multiple paths of videos can be played relatively synchronously in time, that is, the play synchronism of the multiple paths of videos in time is improved during playback of the multiple paths of videos is achieved.

Description

Video playing method, device and computer readable storage medium
Technical Field
The embodiment of the application relates to the technical field of video, in particular to a video playing method, a video playing device and a computer readable storage medium.
Background
Currently, multiple paths of cameras are adopted to collect videos in more and more video collection scenes, and after the multiple paths of videos are collected, people can search and observe target characters or events and the like through synchronously playing back the multiple paths of videos frame by frame.
In the related art, the frame rate of the plurality of cameras is set to be the same in advance, so that the frame intervals of the plurality of captured videos are the same, that is, the frame rates of the plurality of videos are the same. Thus, the time for playing one frame of picture of each path of video is the same, and the frame synchronous playing of the multipath video in the frame-by-frame playback can be realized.
However, if there is an inconsistency in the frame rate of the multiple cameras, that is, there is an inconsistency in the frame intervals of the multiple video captured, how to improve the play synchronicity of the multiple video playback is a problem that needs to be focused and solved at present.
Disclosure of Invention
The embodiment of the application provides a video playing method, a video playing device and a computer readable storage medium, so that the playing synchronism in time is improved when multiple paths of videos with different frame rates are played back. The technical scheme is as follows:
in one aspect, a video playing method is provided, and the method includes:
determining a plurality of reference picture times, wherein the plurality of reference picture times are the time of the displayed last frame picture corresponding to the multi-channel video respectively;
determining one or more first videos needing to skip pictures from the multiple videos based on the multiple reference picture times, the frame rates of the multiple videos and the reference time, wherein the frame rates of the multiple videos are different;
And skipping the pictures of each path of first video in the one path or the plurality of paths of first videos, so that the time of the pictures displayed by each path of video in the plurality of paths of videos after skipping the playing is closest to the reference time.
In another aspect, there is provided a video playing device, the device comprising:
the first determining module is used for determining a plurality of reference picture times, wherein the plurality of reference picture times are the times of the displayed last frame picture corresponding to the multipath videos respectively;
the second determining module is used for determining one or more paths of first videos needing to jump pictures from the multiple paths of videos based on the multiple reference picture time, the frame rate of the multiple paths of videos and the reference time, wherein the frame rates of the multiple paths of videos are different;
the skip play module is used for skip playing the pictures of each path of first video in the one path or the plurality of paths of first videos so that the time of the pictures displayed by each path of video in the plurality of paths of videos after skip play is closest to the reference time.
In another aspect, a computer device is provided, where the computer device includes a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus, where the memory is used to store a computer program, and where the processor is used to execute the program stored on the memory, so as to implement the steps of the video playing method described above.
In another aspect, a computer readable storage medium is provided, in which a computer program is stored, which when executed by a processor, implements the steps of the video playing method described above.
In another aspect, a computer program product is provided comprising instructions which, when run on a computer, cause the computer to perform the steps of the video playback method described above.
The technical scheme provided by the embodiment of the application at least has the following beneficial effects:
in this embodiment of the present application, in the case that there are different frame rates of multiple paths of videos, based on the time and the reference time of the last frame of the currently displayed frame and the frame rate of the multiple paths of videos, the first video of the multiple paths of videos that need to skip the frame is determined, so that the time of the frame displayed by each path of video in the multiple paths of videos after skip play is closest to the reference time, that is, the time of the frame displayed by each path of video after skip play is close, so that the multiple paths of videos can be played relatively synchronously in time, that is, the play synchronism of the multiple paths of videos in time is improved when the multiple paths of videos are played back.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a video playing method provided in an embodiment of the present application;
fig. 2 is a flowchart of another video playing method according to an embodiment of the present application;
fig. 3 is a schematic diagram of a playing flow of a multi-path video according to an embodiment of the present application;
fig. 4 is a flowchart of yet another video playing method according to an embodiment of the present application;
fig. 5 is a flowchart of yet another video playing method according to an embodiment of the present application;
fig. 6 is a schematic diagram of a playing flow of another multi-channel video according to an embodiment of the present application;
fig. 7 is a flowchart of yet another video playing method according to an embodiment of the present application;
fig. 8 is a flowchart of yet another video playing method according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a video playing device according to an embodiment of the present application;
Fig. 10 is a schematic structural diagram of a terminal according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
For ease of understanding, some terms in the embodiments of the present application will be explained first.
Frame rate: each picture in the video is a frame picture, and the time of each picture is a frame picture time, that is, the pictures in the video are in units of frames. The frequency (rate) at which images in frames appear continuously on the display.
Frame interval: the time interval between two consecutive frames.
Single frame: a still picture.
Some application scenarios according to embodiments of the present application are described below.
Currently, multiple paths of cameras are adopted to collect videos in more and more video collection scenes, and after the multiple paths of videos are collected, people can search and observe target characters or events and the like through synchronously playing back the multiple paths of videos frame by frame. For example, in banks, cells, shops, exchanges, etc., multi-angle multi-path videos are generally collected by multi-path cameras (also called monitors, cameras, etc.), and after the multi-path videos are collected, a user searches for, observes a target person, an event, etc. at multiple angles by playing back the multi-path videos in a frame-by-frame synchronization manner. In the embodiment of the application, even if the frame rates of the acquired multi-path video are different, the playing synchronism of the multi-path video in time can be improved through the scheme.
It should be noted that, the system architecture and the service scenario described in the embodiments of the present application are for more clearly describing the technical solution of the embodiments of the present application, and do not constitute a limitation on the technical solution provided in the embodiments of the present application, and those skilled in the art can know that, with the evolution of the system architecture and the appearance of the new service scenario, the technical solution provided in the embodiments of the present application is equally applicable to similar technical problems.
The video playing method provided in the embodiment of the present application is explained in detail below.
Fig. 1 is a flowchart of a video playing method provided in an embodiment of the present application. Taking the application of the method to a terminal as an example, please refer to fig. 1, the method includes the following steps.
Step 101: and determining a plurality of reference picture times which are the times of the displayed last frame picture corresponding to the multipath videos respectively.
In the embodiment of the application, the terminal determines a plurality of reference picture times, where the plurality of reference picture times are the times of the last displayed frame picture corresponding to the multiple paths of videos respectively. For example, the multi-path video pauses in the first moment in the playing process, and the time of the pictures respectively displayed by the multi-path video is the time of a plurality of reference pictures. For another example, when the terminal starts the player to open the multi-path video, the time of the first frame picture displayed by each path of video is the time of the multiple reference pictures.
Step 102: and determining one or more first videos needing to skip pictures from the multiple videos based on the multiple reference picture times, the frame rates of the multiple videos and the reference time, wherein the frame rates of the multiple videos are different.
In this embodiment of the present application, since the frame rates of the multiple videos are different (i.e., the frame rates of at least two videos in the multiple videos are different), the multiple videos cannot strictly realize frame synchronous playing, and in this scheme, the terminal can determine one or multiple first videos that need to skip a picture from the multiple videos based on the multiple reference picture times, the frame rates of the multiple videos, and the reference time. That is, in the video playing method provided in the embodiment of the present application, the terminal determines one or more first videos that need to skip the frame based on the time and the reference time of the last frame displayed by each video and the frame rate of each video.
Optionally, the reference time is located between the reference picture time corresponding to any video and the time of the last frame picture to be played in the video, and it should be noted that, in the case that the multi-path video is about to be played, the reference time may also be the time of the last frame picture to be played in the multi-path video. In this embodiment of the present application, the reference time may be selected from the times of a frame of picture to be played in the multiple video. Alternatively, the reference time is a time input by the user. Alternatively, the reference time is a time separated from any one of the reference picture times by a set length. That is, the reference time may be aligned or not aligned with the time of a certain frame of picture, and the reference time may be determined in various ways in the embodiment of the present application, which is not limited in the embodiment of the present application.
It should be noted that, in the embodiment of the present application, the following step 103 is further required to skip playing the frames of the first videos in each path, so that the time displayed by each path of video in the multiple paths of video after skip playing is closest to the reference time. It can be seen that in this solution, the reference time may be considered as the time when alignment of each path of video is expected after skip play, and if the reference time is far from the multiple reference picture times, the multiple paths of video may all need to skip pictures, but if the frame rates are different, the frame numbers of each path of video skip may be different. If the reference time is closer to the reference frames, it is possible that some of the multiple video frames need to skip frames, and another part of the multiple video frames need not skip frames. And how far or near the reference time is from the reference picture time is related to the way the reference time is determined. It can be seen that, the reference time may be determined in different manners, and one or more first videos determined to skip the frame may be different, and the number of frames of each first video to skip to play may also be different.
Step 103: and skipping the pictures of each path of first video in the one or more paths of first videos, so that the time of the pictures displayed by each path of video in the multiple paths of videos after skipping is closest to the reference time.
In this embodiment of the present application, after determining one or more first videos from the multiple videos based on the multiple reference picture times, the frame rate of the multiple videos, and the reference time, the terminal jumps to play the picture of each first video in the one or more first videos, so that the time of the picture displayed by each video in the multiple videos after the jump play is closest to the reference time. That is, the terminal jumps the frames of the first videos of each path, so that the time of the frames displayed by each path of video after the jump is close to the time as much as possible, and the playing synchronism of the multi-path video is improved during the playback. Under the condition of forward playing or backward playing the multi-path video, the scheme can improve the playing synchronism in time, and the forward playing principle is consistent with the backward playing principle.
In summary, in the case that the frame rates of the multiple paths of videos are different, the scheme can determine the first video of the multiple paths of videos needing to skip the frame based on the time and the reference time of the last frame of the currently displayed frame and the frame rate of the multiple paths of videos, so that the time of the displayed frame of each path of video in the multiple paths of videos after skip play is closest to the reference time, that is, the time of the displayed frame of each path of video after skip play is close, and thus the multiple paths of videos can be played relatively synchronously in time, and the play synchronism of the multiple paths of videos in time is improved when the multiple paths of videos are played back.
As can be seen from the foregoing, in this embodiment, the reference time is determined in different manners, and one or more paths of the first videos determined to be skipped may be different, and the number of frames of each path of the first video to be skipped may also be different. Based on this, the video playing method provided in the embodiments of the present application has multiple implementations, and the multiple implementations are described in detail below through multiple embodiments. In this application, the synchronous playing of multiple paths of videos refers to playing of multiple paths of videos relatively synchronously in time, even if the time of the pictures displayed by each path of videos during playing is as close as possible, so as to achieve the effect of relatively synchronously playing.
Fig. 2 is a flowchart of another video playing method according to an embodiment of the present application. It should be noted that, in the embodiment of fig. 2, the reference time is the time of the next frame of picture that needs to be played earliest in the multi-path video. Taking the application of the method to a terminal as an example, please refer to fig. 2, the method includes the following steps:
step 201: and determining a plurality of reference picture times which are the times of the displayed last frame picture corresponding to the multipath videos respectively.
In the embodiment of the application, the terminal determines a plurality of reference picture times, where the plurality of reference picture times are the times of the last displayed frame picture corresponding to the multiple paths of videos respectively. For example, the multi-path video pauses in the first moment in the playing process, and the time of the pictures respectively displayed by the multi-path video is the time of a plurality of reference pictures. For another example, when the terminal starts the player to open the multi-path video, the time of the first frame picture displayed by each path of video is the time of the multiple reference pictures.
Optionally, the terminal performs the step of determining a plurality of reference picture times upon detection of the trigger operation. The triggering operation may be a click operation, a sliding operation, or the like of the user. The multiple paths of video are played synchronously frame by clicking a play button on the terminal, and the terminal determines the multiple reference picture times again once each time the user clicks the play button, for example, the terminal takes the last displayed frame picture corresponding to the multiple paths of video as the multiple reference picture times. That is, the terminal executes the scheme by detecting the trigger operation, so as to realize the dynamic synchronous playing of the multipath video in time.
Optionally, the terminal may also automatically re-determine the multiple reference picture times after determining that the multiple videos are all paused according to the scheme, and then dynamically and synchronously play the multiple videos according to steps 202 to 203 described below. The terminal then automatically loops through steps 201 to 203 to achieve dynamic synchronized playback of the multiple videos over time. Of course, in the process of automatically synchronizing the playing, the user can pause the playing by clicking the pause button, and continue the playing by clicking the play button.
In the embodiment of the application, the multiple paths of videos can be forward-played or backward-played. For example, assuming that the terminal supports forward and reverse playback, the terminal performs steps 201 to 203 once every time the user clicks the forward or reverse playback button, that is, the step of jumping to play the picture of each path of the first video in the one or more paths of first videos is performed once every time a trigger operation is detected. Or after the user clicks the forward or backward button once, the terminal automatically loops through steps 201 to 203. In the process of playing the multi-path video, the user can click the pause button at any time, and the user can switch the forward playing to the backward playing and switch the backward playing to the forward playing, which is not limited in the embodiment of the application.
Step 202: and determining one or more first videos needing to jump pictures from the multiple videos based on the multiple reference picture times, the frame rate of the multiple videos and the reference time, wherein the frame rates of the multiple videos are different, and the reference time is the time of the next frame picture needing to be played earliest in the multiple videos.
In this embodiment of the present application, the reference time is the time of the next frame of picture that needs to be played earliest in the multi-channel video. First, an implementation of determining the reference time will be described, and the implementation of determining the reference time includes steps 2021 and 2022 described below.
Step 2021: and determining a plurality of first estimated picture times based on the plurality of reference picture times and the frame rate of the multi-path video, wherein the plurality of first estimated picture times are the times of next frame pictures which are respectively required to be played by the multi-path video according to the playing sequence.
In the embodiment of the application, the terminal determines a plurality of first estimated picture times based on the plurality of reference picture times and the frame rates of the multi-path video. Illustratively, the terminal determines a frame interval of the multi-path video based on a frame rate of the multi-path video. Under the condition that the multi-path video is being placed, the terminal adds the frame interval of a corresponding path of video to each reference picture time in the multiple reference picture times, and then the first estimated picture time corresponding to the corresponding path of video is obtained. Under the condition of inversely playing the multiple paths of videos, the terminal subtracts the frame interval of a corresponding path of video from each reference picture time in the multiple reference picture times to obtain a first estimated picture time corresponding to the corresponding path of video.
For example, for any one of the multiple paths of videos, in the case that the path of video is being placed, the first estimated picture time corresponding to the path of video is the time of the next frame picture of the last frame picture displayed by the path of video. Under the condition of inversely playing the video, the first estimated picture time corresponding to the video is the time of the previous frame picture of the last frame picture displayed by the video.
Step 2022: and determining a reference time from the first estimated picture times, wherein the reference time is the time of the next frame picture needing to be played earliest in the multi-channel video.
In this embodiment of the present application, the terminal determines a reference time from the plurality of first estimated frame times, where the reference time is a time of a next frame of picture that needs to be played earliest in the multi-channel video.
Under the condition that the multi-path video is being played, the reference time is the earliest first estimated picture time in the plurality of first estimated picture times. Under the condition of reverse playing the multi-path video, the reference time is the latest first estimated picture time in the plurality of first estimated picture times. That is, when the multi-path video is being played, the terminal selects, as the reference time, the time of the frame of the next frame of the multi-path video that needs to be played, which is the earliest (also called the smallest time). When the multi-path video is played back, the terminal selects, as the reference time, the time of the latest (or maximum) frame of the next frame of the multi-path video to be played.
Next, an implementation process of the terminal determining one or more first videos needing to skip a picture from the multiple videos based on the multiple reference picture times, the frame rates of the multiple videos, and the reference time will be described.
In the embodiment of the application, the terminal determines a plurality of first estimated picture times based on the plurality of reference picture times and the frame rate of the multi-path video. The terminal then determines one or more first videos from the multiple videos based on the plurality of reference picture times, the first plurality of predicted picture times, and the base time. It should be noted that, the method for determining the plurality of first estimated time frames by the terminal refers to the foregoing description, and is not repeated herein. In addition, since the plurality of first estimated picture times have been determined in the step of determining the reference time, the terminal may not need to determine the plurality of first estimated picture times again after determining the reference time, which is not limited in the embodiment of the present application.
Optionally, the terminal determines one or more first videos from the multiple videos based on the multiple reference picture times, the multiple first estimated picture times and the reference time, where one implementation manner of determining the one or more first videos from the multiple videos is: the terminal determines a plurality of pairs of first reference time differences corresponding to the multi-path video based on the plurality of reference picture times, the plurality of first estimated picture times, and the base time. And the terminal determines the videos with the first time difference larger than or equal to the second time difference corresponding to the same video in the multiple paths of videos as one or multiple paths of first videos. Each pair of first reference time differences comprises a first time difference and a second time difference, wherein the first time difference is the absolute value of the difference value between the reference picture time corresponding to the corresponding one-path video and the reference time, and the second time difference is the absolute value of the difference value between the first estimated picture time corresponding to the corresponding one-path video and the reference time.
That is, in the embodiment of the present application, the terminal determines that the corresponding one of the videos is one of the first videos by comparing the distance between the reference picture time corresponding to each of the videos and the reference time and the distance between the corresponding first estimated picture time and the reference time.
Taking forward playing as an example, for any one of the multiple paths of videos, if the reference picture time corresponding to the video is far from the reference time, the first estimated picture time corresponding to the video is near to the reference time, which indicates that the time of the last frame of picture displayed by the video is earlier, that is, the playing progress of the video is less, the video needs to be determined as a first video, and then the next frame of picture of the video needs to be continuously played through step 203 to keep up with the playing progress of other videos. If the reference picture time corresponding to the path of video is closer to the reference time, the first estimated picture time corresponding to the path of video is farther from the reference time, which indicates that the playing progress of the path of video is more, the path of video does not need to jump pictures, and then the pictures of the path of video are kept unchanged through step 203 so as to wait for other paths of video to keep up with the playing progress of the path of video.
It should be noted that, there are various ways in which the terminal determines whether each video of the multiple videos is the first video, and besides the above-described manner in which the terminal determines by calculating and comparing the time difference, the terminal may also determine based on the reference picture time, the frame rate, and the reference time by other manners, and the principle is similar to the above-described manner in which the time difference is calculated and compared no matter what manner is used for determining.
In this embodiment of the present application, after determining one or more first videos, the implementation process of the terminal jumping to play the picture of each first video in the one or more first videos includes the following step 203.
Step 203: and skipping playing the next frame picture of each path of first video in the one or more paths of first videos, and keeping the pictures of the videos except the one or more paths of second videos in the multiple paths of videos unchanged, so that the time of the pictures displayed by each path of videos in the multiple paths of videos after skipping is closest to the reference time.
In this embodiment of the present application, after determining one or more first videos, the terminal jumps to play a next frame picture of each first video in the one or more first videos, and keeps a picture of a video other than the one or more first videos in the multiple videos unchanged. The terminal jumps and plays the next frame picture of each path of first video in the one path or multiple paths of first videos. Therefore, the playing progress of the one or more paths of first videos can be increased so as to keep up with the playing progress of videos except the one or more paths of first videos in the multiple paths of videos, namely, the time of the displayed pictures of each path of videos in the multiple paths of videos after skip playing is closest to the reference time, and therefore dynamic frame synchronization of the multiple paths of videos in time is achieved.
Next, taking the multi-path video shown in fig. 3 as an example, an exemplary method for playing video shown in fig. 2 will be described. In fig. 3, four videos acquired by four cameras, namely, camera a, camera B, camera C, and camera D, are shown, and corresponding four videos are respectively video a, video B, video C, and video D. The frame rate of the video collected by camera a is 20, the corresponding frame interval is 50 milliseconds, the frame rate of the video collected by camera B is 10, the corresponding frame interval is 100 milliseconds, the frame rate of the video collected by camera C is 15, the corresponding frame interval is about 66.6 milliseconds, the frame rate of the video collected by camera D is 12, and the corresponding frame interval is about 83.3 milliseconds. As shown in fig. 3, the time of each frame in the video a is A0, A1, …, A7, … in sequence, the time of each frame in the camera B is B0, B1, …, B3, … in sequence, the time of each frame in the camera C is C0, C1, …, C6, … in sequence, and the time of each frame in the camera D is D0, D1, …, D4, … in sequence. Taking forward playing of the multiple paths of videos as an example, the flow of implementing single-frame synchronous playing of the multiple paths of videos is as follows:
1. after the user clicks a play key indicating single frame synchronization, the terminal determines reference picture time: the video A, B, C, D stops at time points A0, B0, C0, D0, respectively, at the first moment.
2. The terminal determines a first estimated picture time: and predicting the time points of the next frame picture to be played of each path of video as A1, B1, C1 and D1 according to the frame rate of each path of video.
3. The terminal determines a reference time: the smallest time point A1 among the first estimated picture times A1, B1, C1, D1 is taken as a reference time, as shown by a first broken line from the left in fig. 3.
4. The terminal determines the time difference: respectively calculating absolute values of differences between reference picture time and reference time corresponding to each path of video: the method comprises the steps of (1) calculating absolute values of differences between first estimated picture time and reference time corresponding to each path of video, wherein the absolute values are I A0-A1I, I B0-A1I, I C0-A1I and I D0-A1I: i A1-A1I, I B1-A1I, I C1-A1I, I D1-A1I.
5. The terminal determines a first video, jumps to play the next frame picture of the first video, and keeps the pictures of the videos except the first video in the four paths of videos unchanged: comparing the two time differences corresponding to each path of video, wherein I A0-A1I is larger than I A1-A1I, then video A is a path of first video, and the video A plays a picture of a time point A1, namely the video A jumps to a picture of the time point A1; if the I B0-A1I is equal to the I B1-A1I, the video B is a first video, and the video B jumps to a picture at a time point B1; if the I C0-A1I is larger than the I C1-A1I, the video C is a first video, and the video C jumps to a picture at a time point C1; and if the I D0-A1I is larger than the I D1-A1I, the video D is a first video, and the video D jumps to a picture at a time point D1.
6. Similarly, the user clicks the play button again, the terminal determines that the four reference picture times are A1, B1, C1 and D1 respectively, determines that the four first estimated picture times are A2, B2, C2 and D2 respectively, uses A2 as a reference time, and recalculates four pairs of time differences. The terminal compares the two time differences corresponding to each path of video, wherein the I A1-A2I is larger than the I A2-A2I, and then the video A jumps to a picture at a time point A2; the picture of the video B is kept unchanged when the I B1-A2I is smaller than the I B2-A2I, namely, the picture which is stopped at the time point B1 is continued; if the I C1-A2I is larger than the I C2-A2I, the video C jumps to a picture at a time point C2; if the |d1-a2| is smaller than the |d2-a2|, the picture of the video D remains unchanged, i.e., the picture is continued to stop at the time point D1.
7. Similarly, when the user clicks the play key once, one part of the multi-path video plays the next frame of picture, and the other part of the multi-path video remains unchanged, so that the video A, B, C and the video D with different frame rates are dynamically and synchronously played frame by frame in time under the forward play condition.
Taking the four paths of video as shown in fig. 3 as an example, assuming that the four paths of video are inverted, the principle of inverted is similar to that of forward, and the inverted is different from that of forward in a method for determining a reference time, and in the case of inverted, the reference time is the maximum time (i.e. the latest time) in four estimated picture times.
As can be seen from the description of fig. 3, the video playing method shown in fig. 2 is essentially that the terminal judges whether each path of video needs to be rendered to display the next frame by estimating the time of the next frame, so as to realize the dynamic synchronization of the multiple paths of video at the time point. Assuming that the terminal executes the present scheme by detecting the clicking operation of the user, from the visual effect, after the user clicks the play key of the single-frame synchronization, only a part of the pictures may be rendered and the next frame of pictures to be played may be displayed. If the user does not click the play key, the user can be ensured to watch each frame of picture of each path of video.
In summary, in this embodiment of the present application, when there are different frame rates of multiple paths of videos, based on the time and the reference time of the last frame of the currently displayed frame and the frame rate of the multiple paths of videos, the first video of the multiple paths of videos that need to skip the frame is determined, so that the time of the frame displayed by each path of video in the multiple paths of videos after skip play is closest to the reference time, that is, the time of the frame displayed by each path of video after skip play is close to the reference time, so that the multiple paths of videos can be played relatively synchronously in time, and the play synchronism of the multiple paths of videos in time is improved during playback.
Fig. 4 is a flowchart of still another video playing method according to an embodiment of the present application. It should be noted that, in the embodiment of fig. 4, the reference time is the time of the next frame of picture that needs to be played at the latest in the multi-channel video. Taking the application of the method to a terminal as an example, please refer to fig. 4, the method includes the following steps:
step 401: and determining a plurality of reference picture times which are the times of the displayed last frame picture corresponding to the multipath videos respectively.
In the embodiment of the application, the terminal determines a plurality of reference picture times, where the plurality of reference picture times are the times of the last displayed frame picture corresponding to the multiple paths of videos respectively. For example, the multi-path video pauses in the first moment in the playing process, and the time of the pictures respectively displayed by the multi-path video is the time of a plurality of reference pictures. For another example, when the terminal starts the player to open the multi-path video, the time of the first frame picture displayed by each path of video is the time of the multiple reference pictures.
Optionally, the terminal performs the step of determining a plurality of reference picture times upon detection of the trigger operation. The triggering operation may be a click operation, a sliding operation, or the like of the user. The multiple paths of video are played synchronously frame by clicking a play button on the terminal, and the terminal determines the multiple reference picture times again once each time the user clicks the play button, for example, the terminal takes the last displayed frame picture corresponding to the multiple paths of video as the multiple reference picture times. That is, the terminal executes the scheme by detecting the trigger operation, so as to realize the dynamic synchronous playing of the multipath video in time.
Optionally, the terminal may also automatically re-determine the multiple reference picture times after determining that the multiple videos are all paused according to the scheme, and then dynamically and synchronously play the multiple videos according to steps 402 to 403 described below. The terminal then automatically loops through steps 401 to 403 to achieve dynamic synchronized playback of the multiple video streams over time. Of course, in the process of automatically synchronizing the playing, the user can pause the playing by clicking the pause button, and continue the playing by clicking the play button.
In the embodiment of the application, the multiple paths of videos can be forward-played or backward-played. For example, assuming that the terminal supports forward and reverse playback, the terminal performs steps 401 to 403 once every time the user clicks the forward or reverse playback button, that is, the step of jumping to play the picture of each path of the first video of the one or more paths of first videos is performed once every time a trigger operation is detected. Alternatively, after the user clicks the forward or reverse button once, the terminal automatically loops through steps 401 to 403. In the process of playing the multi-path video, the user can click the pause button at any time, and the user can switch the forward playing to the backward playing and switch the backward playing to the forward playing, which is not limited in the embodiment of the application.
Step 402: and determining one or more second videos from the multiple videos based on the multiple reference picture times, the frame rate of the multiple videos and the reference time, wherein the frame rate of the multiple videos is different, and the reference time is the time of the next frame picture needing to be played latest in the multiple videos.
In this embodiment of the present application, the reference time is the time of the next frame of picture that needs to be played at the latest in the multiple paths of video. First, an implementation of determining the reference time will be described, and the implementation of determining the reference time includes the following steps 4021 and 4022.
Step 4021: and determining a plurality of first estimated picture times based on the plurality of reference picture times and the frame rate of the multi-path video, wherein the plurality of first estimated picture times are the times of next frame pictures which are respectively required to be played by the multi-path video according to the playing sequence.
It should be noted that, the implementation of step 4021 refers to step 2021 in the foregoing embodiment of fig. 2, and is not described herein.
Step 4022: and determining a reference time from the first estimated picture times, wherein the reference time is the time of the next frame picture needing to be played at the latest in the multi-channel video.
In this embodiment of the present application, the terminal determines a reference time from the plurality of first estimated frame times, where the reference time is a time of a next frame of picture that needs to be played earliest in the multi-channel video.
Under the condition that the multi-path video is being played, the reference time is the latest first estimated picture time in the first estimated picture times. Under the condition of reverse playing the multi-path video, the reference time is the earliest first estimated picture time in the plurality of first estimated picture times. That is, when the multi-path video is being played, the terminal selects, as the reference time, the time of the frame of the next frame of the multi-path video that needs to be played, which is the latest (or the largest) time. When the multi-path video is played back, the terminal selects, as the reference time, the time of the frame of the next frame of the multi-path video that needs to be played back, which is the earliest (also called the smallest time).
Next, an implementation process of the terminal determining one or more first videos needing to skip a picture from the multiple videos based on the multiple reference picture times, the frame rates of the multiple videos, and the reference time will be described. It should be noted that the one or more paths of first videos include a second video and a third video, where the second video is a video in the multiple paths of videos, where the video needs to skip a next frame of picture, and the third video is a video in the multiple paths of videos, where the video needs to skip a multi-frame picture. That is, the multiple paths of video need to skip frames, and due to the different frame rates of the multiple paths of video, one part of video needs to skip the next frame, and the other part of video needs to skip multiple frames.
In the embodiment of the present application, one implementation manner of determining one or more second videos from the multiple videos and determining one or more third videos by the terminal based on the multiple reference picture times, the frame rates of the multiple videos and the reference time is: the terminal determines a first estimated picture time and a second estimated picture time respectively corresponding to the multiple paths of videos based on the multiple reference picture times and the frame rates of the multiple paths of videos. The first estimated picture time is the time of the next frame picture required to be played by the corresponding path of video, and the second estimated picture time is the time of the next frame picture required to be played after the next frame picture is played by the corresponding path of video. The terminal determines one or more second videos from the multiple paths of videos based on the first estimated picture time, the second estimated picture time and the reference time which correspond to the multiple paths of videos respectively, and determines one or more third videos.
It should be noted that, the method for determining the first estimated time of the frame by the terminal refers to the foregoing description, and is not repeated herein. In addition, since the plurality of first estimated picture times have been determined in the step of determining the reference time, the terminal may not need to determine the first estimated picture time again after determining the reference time, which is not limited in the embodiment of the present application.
Optionally, the terminal determines a plurality of pairs of second reference time differences corresponding to the multiple paths of videos respectively based on the first estimated picture time and the second estimated picture time respectively corresponding to the multiple paths of videos and the reference time, wherein each pair of second reference time differences comprises a third time difference and a fourth time difference. The third time difference is the absolute value of the difference between the first estimated picture time corresponding to the corresponding one-path video and the reference time, and the fourth time difference is the absolute value of the difference between the second estimated picture time corresponding to the corresponding one-path video and the reference time. And the terminal determines videos with the third time difference, corresponding to the same video, of the multiple paths of videos being larger than or equal to the corresponding fourth time difference as one or multiple paths of second videos, and determines videos with the third time difference, corresponding to the same video, of the multiple paths of videos being smaller than the corresponding fourth time difference as one or multiple paths of third videos.
That is, in the embodiment of the present application, the terminal determines whether the corresponding one of the videos is one of the second videos and the third video by comparing the distance between the first estimated time of the corresponding one of the videos and the reference time with the distance between the corresponding second estimated time of the corresponding one of the videos and the reference time.
Taking forward playing as an example, for any one of the multiple paths of videos, if the first estimated picture time corresponding to the path of video is far from the reference time, the second estimated picture time corresponding to the path of video is near to the reference time, which indicates that the path of video is not close to the reference time enough even if the next frame of picture is replayed, the path of video needs to be determined as a path of third video. If the first estimated picture time corresponding to the path of video is closer to the reference time, the second estimated picture time corresponding to the path of video is farther from the reference time, which means that the path of video is closest to the reference time after the next frame of picture is played by the plurality of paths of video, and the path of video needs to be determined as a path of second video.
It should be noted that, there are various ways in which the terminal determines whether each video in the multiple paths of videos is the second video or the third video, and besides the above-described manner in which the terminal determines by calculating and comparing the time difference, the terminal may also determine based on the reference picture time, the frame rate and the reference time by other manners, and the principle is similar to the above-described manner in which the time difference is calculated and compared no matter what manner the terminal determines.
In the embodiment of the present application, after determining the second video and the third video, the implementation manner of playing the second video and the third video in a skip manner includes the following step 403.
Step 403: and skipping to play the next frame picture of each path of second video in the one path or the plurality of paths of second videos, and skipping to play the multi-frame picture of each path of third video in the one path or the plurality of paths of third videos, so that the time of the picture displayed by each path of video in the plurality of paths of videos after skipping to play is closest to the reference time.
In the embodiment of the application, the terminal jumps to play the next frame of each path of second video in the one path or multiple paths of second videos, jumps to play the multi-frame frames of each path of third video in the one path or multiple paths of third videos, so that the time of the displayed frames of each path of videos in the multiple paths of videos after the jump play is closest to the reference time, and the dynamic frame synchronization of the multiple paths of videos in time is realized.
In one embodiment, the step of skipping the multi-frame picture of each of the one or more third videos may be performed by skipping the last frame picture of the multi-frame picture of each of the one or more third videos to the corresponding third video.
In the embodiment of the present application, the terminal plays the multi-frame frames of each of the one or more paths of third videos in a skip manner, and two implementations are described below.
First implementation
The terminal takes the one or more paths of third videos as one or more paths of target videos, and jumps to play the next frame picture of each path of target videos in the one or more paths of target videos. And the terminal updates the reference picture time corresponding to the one or more paths of target videos. And the terminal determines one or more fourth videos from the one or more target videos based on the updated reference picture time corresponding to the one or more target videos, the frame rate of the one or more target videos and the reference time. The terminal takes the one or more paths of fourth videos as one or more paths of target videos, keeps the pictures of all paths of third videos except the one or more paths of fourth videos in the one or more paths of third videos unchanged, and returns to the step of jumping to play the next frame picture of all paths of target videos in the one or more paths of target videos until the terminal determines that the fourth video without jumping the pictures is determined based on the updated reference picture time corresponding to the one or more paths of target videos, the frame rate and the reference time of the one or more paths of target videos. That is, the terminal jumps the frames of the target video frame by frame, each path of target video jumps one frame of frame, judges whether the video needing to jump the next frame of frame exists or not, until the one path or multiple paths of third video are determined to be unnecessary to jump again, and at the moment, the time of the displayed frames of each path of video in the multiple paths of video is closest to the reference time.
The first implementation will be described in detail below through steps 4031 to 4034.
Step 4031: taking the one or more paths of third videos as one or more paths of target videos, and jumping to play the next frame picture of each path of target videos in the one or more paths of target videos.
That is, since the third video is a video that needs to skip multiple frames, in the embodiment of the present application, the terminal may skip to play the next frame of each third video in the one or multiple paths of third videos. Under the condition that the multi-path video is being placed, the next frame picture is the next frame picture of the last frame picture displayed by the corresponding third video. And under the condition of inversely playing the multiple paths of videos, the next frame is the previous frame of the last frame of the displayed corresponding third video.
Step 4032: and updating the reference picture time corresponding to the one or more paths of target videos.
Because for a path of target video with a particularly small frame rate, the terminal may need to continue playing to catch up with the playing progress, after skipping to play the next frame of each path of target video in the path or paths of target video, the terminal needs to determine whether each path of target video still needs to continue playing, that is, whether the playing progress catches up with the vicinity of the reference time. Based on the above, the terminal updates the reference picture time corresponding to the one or more target videos after jumping to play the next frame picture of each target video in the one or more target videos. The terminal updates the time of the last frame of picture currently played by the one or more target videos to the reference picture time corresponding to the one or more target videos.
Step 4033: and determining one or more fourth videos from the one or more target videos based on the updated reference picture time corresponding to the one or more target videos, the frame rate of the one or more target videos and the reference time.
In the embodiment of the application, after updating the one or more target videos, the terminal determines one or more fourth videos from the one or more target videos based on the updated reference picture time corresponding to the one or more target videos, the frame rate of the one or more target videos, and the reference time.
Optionally, the terminal determines one or more fourth videos from the one or more target videos based on the updated reference picture time corresponding to the one or more target videos, the frame rate of the one or more target videos, and the reference time, where an implementation manner of determining the one or more fourth videos from the one or more target videos is: the terminal updates the first estimated picture time corresponding to the one or more target videos respectively based on the updated reference picture time corresponding to the one or more target videos and the frame rate of the one or more target videos. And the terminal determines one or more fourth videos from the one or more target videos based on the updated reference picture time and the first estimated picture time corresponding to the one or more target videos and the reference time. That is, the terminal determines one or more fourth videos needing to continue to skip the frames based on the reference time, and the time of the last frame of the played one or more target videos and the time of the next frame of the played one or more target videos. It should be noted that, if there is only one path of target video, the terminal determines the target video as one path of fourth video.
The terminal may determine a frame interval of the one or more target videos based on a frame rate of the one or more target videos. Under the condition that the multiple paths of videos are being placed, the terminal adds the corresponding reference picture time of each path of target video in the updated one path or multiple paths of target videos to the corresponding frame interval to obtain the first estimated picture time corresponding to the corresponding path of updated target video. Under the condition of rewinding the multi-path video, the terminal subtracts the corresponding frame interval from the reference picture time corresponding to each path of target video in the updated one path or multi-path target video to obtain the first estimated picture time corresponding to the updated corresponding path of target video.
Optionally, the terminal determines one or more fourth videos from the one or more target videos based on the updated reference picture time and the first estimated picture time corresponding to the one or more target videos and the reference time, where an implementation manner of the one or more fourth videos is that: the terminal determines a plurality of pairs of third reference time differences corresponding to each path of target video in the one path or multiple paths of target video based on the updated reference picture time and the first estimated picture time corresponding to the one path or multiple paths of target video and the reference time. Each pair of third reference time differences comprises a fifth time difference and a sixth time difference, wherein the fifth time difference is the absolute value of the difference between the updated reference picture time corresponding to the corresponding one-path target video and the reference time, and the sixth time difference is the absolute value of the difference between the updated first estimated picture time corresponding to the corresponding one-path target video and the reference time. And the terminal determines the video with the fifth time difference larger than or equal to the corresponding sixth time difference in the same path of target video in the one path or multiple paths of target video as one path or multiple paths of fourth video.
That is, the terminal calculates two time differences based on the latest reference picture time, the first estimated picture time and the base time, and judges whether the corresponding video needs to continue to skip the next frame of picture by comparing the two time differences. It should be noted that, in addition to the terminal determining by calculating and comparing the time difference, it may also determine whether the corresponding target video further includes the fourth video that needs to continue to skip the frame by other methods, which is not limited in the embodiment of the present application.
Step 4034: taking the one or more paths of fourth videos as one or more paths of target videos, keeping the pictures of all paths of third videos except the one or more paths of fourth videos in the one or more paths of third videos unchanged, and returning to the step of jumping to play the next frame picture of all paths of target videos in the one or more paths of target videos until the terminal determines that the fourth video without jumping pictures is determined based on the updated reference picture time corresponding to the one or more paths of target videos, the frame rate and the reference time of the one or more paths of target videos.
That is, the terminal continues to skip the next frame of the one or more paths of fourth videos while keeping the frames of other videos unchanged, and then continues to circularly judge whether the fourth video needing to skip the frames exists or not until the fourth video needing to skip the frames is determined, wherein the time of the frames displayed by each path of videos in the multiple paths of videos is closest to the reference time.
Second implementation
The terminal determines the frame number to be played corresponding to each path of third video in the path or the paths of third videos based on the reference picture time, the reference time and the frame rate of the path or the paths of third videos, which correspond to the path or the paths of third videos, wherein the frame number to be played is the frame number of the corresponding path of third video to be continuously played, and the frame number to be played is larger than 1. And then, the terminal jumps to play multi-frame pictures of each path of third video in the one path or the plurality of paths of third videos based on the frame number to be played corresponding to each path of third video in the one path or the plurality of paths of third videos. Or the terminal jumps to play each path of third video in one path or multiple paths of third videos to the last frame of the multi-frame frames of the corresponding third video based on the frame number to be played corresponding to each path of third video in the one path or multiple paths of third videos.
That is, the terminal determines the number of frames of each path of third video to be continuously played, and then directly jumps to play the frame of the corresponding frame, or directly jumps to play the last frame of the multi-frame based on the number of frames to be played. Thus, whether each path of video still needs to play the next frame of picture continuously or not is judged without circulation.
Taking any one of the multiple third videos as an example, the terminal determines the frame interval T of the third video based on the frame rate f of the third video A Assuming that the reference picture time corresponding to the third video is A1 and the reference time is B2, the terminal solves the equation |A1- (n-1) T A -B2|≤|A1-nT A -B2|<|A1-(n+1)T A -B2I, obtaining the number n of frames to be played corresponding to the path of video. Or the terminal calculates the time difference I A1-B2I between the reference picture time corresponding to the video and the second base and the frame interval T of the video A And (5) the multiple relation is used for determining the number of frames to be played corresponding to the path of video. In addition, the terminal may determine the number of frames to be played of each path of the third video in other manners, which is not limited in the embodiment of the present application.
From the above description, if the reference time is the time of the next frame of picture that needs to be played at the latest in the multiple paths of videos, it is assumed that the terminal executes the scheme by detecting the click operation of the user, and each frame of picture is played, the user clicks the play button once, each path of video plays at least one frame of picture, and a part of videos with large frame rate play multiple frames of pictures. From the video effect, when the user clicks once, one part of the video jumps to the next frame of picture, and the other part of the video continuously plays a plurality of frames, so that the user can watch the video which is dynamically played.
In summary, in this embodiment of the present application, when there are different frame rates of multiple paths of videos, based on the time and the reference time of the last frame of the currently displayed frame and the frame rate of the multiple paths of videos, the first video of the multiple paths of videos that need to skip the frame is determined, so that the time of the frame displayed by each path of video in the multiple paths of videos after skip play is closest to the reference time, that is, the time of the frame displayed by each path of video after skip play is close, so that the multiple paths of videos can be played relatively synchronously in time, that is, the play synchronism of the multiple paths of videos in time is improved during playback of the multiple paths of videos.
In the embodiment of fig. 4, each time the skip play is performed, the multiple paths of videos actually skip at least one frame, and before the skip play is performed on the next frame, the terminal device determines which paths of videos need to skip the next frame and which paths of videos need to skip the multiple frames. In one possible implementation manner, the terminal may skip the next frame of each path of video in the multiple paths of video, and then determine which paths of video need to be played continuously, and which paths of video have unchanged frames. Such an implementation will be exemplarily described below by means of two embodiments of fig. 5 to 7.
Fig. 5 is a flowchart of still another video playing method according to an embodiment of the present application. Taking the application of the method to a terminal as an example, please refer to fig. 5, the method includes the following steps:
step 501: and jumping to play the next frame picture of each path of video in the multiple paths of video.
In the embodiment of the application, before determining the time of the multiple reference pictures, the terminal first jumps to play the next frame picture of each video in the multiple paths of videos. In an exemplary embodiment, the multiple paths of videos are all paused at a first moment in the playing process, and then the terminal jumps to play the next frame picture needed to be played by each path of video in the multiple paths of videos at the next moment. For example, in the case of playing the multiple paths of videos, after each time the multiple paths of videos pause playing, the terminal plays the next frame of the last frame of the displayed multiple paths of videos. Under the condition of playing back the multiple paths of videos, after each time the multiple paths of videos are paused, the terminal plays back the previous frame of the last frame of the displayed video in each path of videos.
Optionally, when the triggering operation is detected, the terminal executes a step of jumping to play the next frame picture of each path of video in the multiple paths of video. The triggering operation may be a click operation, a sliding operation, or the like of the user. In an exemplary embodiment, the user synchronously plays the multiple paths of videos by clicking a play key on the terminal, and each time the user clicks the play key, the terminal plays a next frame of each path of video in the multiple paths of videos according to a play sequence.
Step 502: and determining a plurality of reference picture times which are the times of the displayed last frame picture corresponding to the multipath video respectively.
In the embodiment of the application, after skipping the next frame of each path of video in the multiple paths of video, the terminal determines multiple reference picture times. The terminal determines, as a plurality of reference picture times, the times of the last displayed frame picture to which the multiplexed video respectively corresponds. That is, the terminal jumps to play the next frame of each video in the multiple video, and then uses the time of the currently displayed picture of the multiple video as multiple reference picture times.
Step 503: and determining a reference time from the plurality of reference picture times, wherein the reference time is the time of playing the latest frame picture in the multi-channel video played pictures.
Wherein, in the case of the multi-channel video being played, the base time is the latest reference picture time among the plurality of reference picture times. In the case of rewinding the multi-channel video, the base time is the earliest reference picture time among the plurality of reference picture times. That is, when the multi-path video is being displayed, the terminal selects, as the reference time, the time of the last frame of the multi-path video that has been displayed, which is the latest (or the largest) frame. In the case of rewinding the multiplexed video, the terminal selects, as the reference time, the time of one frame of the last frame of the multiplexed video that has been displayed, which is the earliest time (also referred to as the smallest time).
Step 504: one or more first videos are determined from the multiple videos based on the multiple reference picture times, the base time, and the frame rates of the multiple videos.
In the embodiment of the application, after determining the reference time, the terminal determines one or more first videos from the multiple videos based on the multiple reference picture times and the frame rates of the multiple videos.
The terminal determines one or more first videos from the multiple videos based on the multiple reference picture times and the frame rates of the multiple videos, wherein the implementation process of the first videos comprises the following steps: the terminal determines a plurality of first estimated picture times based on the plurality of reference picture times and the frame rate of the multi-path video, wherein the plurality of first estimated picture times are the times of next frame pictures which are respectively required to be played by the multi-path video. The terminal determines one or more first videos from the multiple videos based on the plurality of reference picture times, the plurality of first estimated picture times, and a base time. That is, the terminal determines the first video that needs to continue to skip the picture from the multiple videos based on the reference time, the time of the last frame of picture that the multiple videos have been played and the time of the next frame of picture that the multiple videos need to be played.
The terminal determines one or more first videos from the multiple videos based on the multiple reference picture times, the multiple first estimated picture times and the reference time, wherein one implementation manner of the terminal is as follows: the terminal determines a plurality of pairs of first reference time differences corresponding to the multi-path video based on the plurality of reference picture times, the plurality of first estimated picture times, and the base time. Each pair of first reference time differences comprises a first time difference and a second time difference, wherein the first time difference is the absolute value of the difference value between the reference picture time corresponding to the corresponding one-path video and the reference time, and the second time difference is the absolute value of the difference value between the first estimated picture time corresponding to the corresponding one-path video and the reference time. And the terminal determines the videos with the first time difference larger than or equal to the second time difference corresponding to the same video in the multiple paths of videos as one or multiple paths of first videos.
Similar to the embodiment of fig. 2, in the embodiment of the present application, the terminal determines whether the corresponding video is the first video that needs to continue to skip the frame by comparing the distance between the reference frame time corresponding to each video and the distance between the corresponding first estimated frame time and the reference frame time.
Taking forward playing as an example, for any one of the multiple paths of videos, if the reference picture time corresponding to the video is far from the reference time, the first estimated picture time corresponding to the video is near to the reference time, which indicates that the time of the last frame of picture played by the video is still earlier, that is, the playing progress of the video is less, the video needs to be determined as a first video, and then the video needs to be continuously played through steps 504 to 507 to keep up with the playing progress of other videos. If the reference picture time corresponding to the path of video is closer to the reference time, the first estimated picture time corresponding to the path of video is farther from the reference time, which indicates that the playing progress of the path of video is more, and then the pictures of the path of video are kept unchanged by step 504 to wait for other paths of video to keep up with the playing progress of the path of video.
It should be noted that, there are various implementations of the terminal in determining whether each video of the multiple videos is the first video, and this is only described by taking the terminal as an example by calculating and comparing the time difference.
After determining one or more paths of first videos, the terminal keeps the pictures of the videos except the one or more paths of first videos unchanged, and jumps to play the pictures of the one or more paths of first videos. The implementation process of skipping to play the one or more first videos includes the following steps 505 to 508.
Step 505: and keeping the pictures of the videos except the one or more first videos in the multiple paths of videos unchanged, taking the one or more first videos as one or more target videos, and jumping to play the next frame picture of the one or more target videos.
In this embodiment of the present application, before determining the reference picture time, the terminal has first played the next frame picture to be played in each path of video in the multiple paths of video according to the playing progress, so that the playing progress of the video with the smaller frame rate is more, the playing progress of the video with the larger frame rate is less, so that the video with the larger frame rate may be determined as the first video, and each path of first video needs to continue playing at least one frame picture to catch up with the playing progress. For a first video with a particularly small frame rate, it may be necessary to continue playing multiple frames to catch up with the playing progress, so as to achieve dynamic frame synchronization of the multiple video paths in time.
Based on this, the terminal keeps the pictures of the videos other than the one or more first videos in the plurality of videos unchanged. And for the one or more paths of first videos, the terminal takes the one or more paths of first videos as one or more paths of target videos, and jumps to play the next frame picture of each path of target videos in the one or more paths of target videos.
Step 506: and updating the reference picture time corresponding to the one or more paths of target videos.
For a target video with a particularly small frame rate, it may be necessary to continue playing multiple frames to catch up with the playing progress, so after skipping the next frame of each target video in the one or multiple target videos, the terminal needs to determine whether each video in the one or multiple target videos still needs to continue skipping the frames, that is, see whether the playing progress catches up to the vicinity of the reference time. Based on the above, the terminal updates the reference picture time corresponding to the one or more target videos after jumping to play the next frame picture of each target video in the one or more target videos. The terminal updates the time of the last frame of picture currently played by the one or more target videos to the reference picture time corresponding to the one or more target videos.
Step 507: and determining one or more fourth videos from the one or more target videos based on the updated reference picture time corresponding to the one or more target videos, the frame rate of the one or more target videos and the reference time.
After updating the one or more target videos, the terminal determines one or more fourth videos from the one or more target videos based on the updated reference picture time corresponding to the one or more target videos, the frame rate of the one or more target videos and the reference time.
Optionally, the implementation process of determining one or more fourth videos from the one or more target videos by the terminal based on the updated reference picture time corresponding to the one or more target videos, the frame rate and the reference time of the one or more target videos is as follows: the terminal updates the first estimated picture time corresponding to the one or more target videos respectively based on the updated reference picture time corresponding to the one or more target videos and the frame rate of the one or more target videos. And the terminal determines one or more fourth videos from the one or more target videos based on the updated reference picture time and the first estimated picture time corresponding to the one or more target videos and the reference time. That is, the terminal determines whether each path of target video in the multiple paths of target video needs to continue to skip the frame based on the reference time, the time of the last frame of the played one path or multiple paths of target video and the time of the next frame of the played one path. It should be noted that, if there is only one path of target video, the terminal determines the target video as one path of fourth video, or there is no fourth video that needs to skip the frame.
The terminal updates the first estimated picture time corresponding to the one or more target videos based on the updated reference picture time corresponding to the one or more target videos and the frame rate of the one or more target videos, wherein the implementation mode of updating the first estimated picture time corresponding to the one or more target videos respectively is as follows: the terminal determines the frame interval of the one or more target videos based on the frame rate of the one or more target videos. And under the condition that the playing sequence is forward playing, the terminal adds the corresponding reference picture time of each path of target video in the updated one path or multiple paths of target video to the corresponding frame interval to obtain the first estimated picture time corresponding to the corresponding path of target video after updating. And under the condition that the playing sequence is reverse playing, the terminal subtracts the corresponding frame interval from the reference picture time corresponding to each path of target video in the updated one path or multiple paths of target video to obtain the first estimated picture time corresponding to the corresponding path of target video after updating.
The terminal determines one or more fourth videos from the one or more target videos based on the updated reference picture time and the first estimated picture time corresponding to the one or more target videos and the reference time, wherein one implementation mode of the one or more fourth videos is as follows: the terminal updates a first reference time difference corresponding to each path of target video in the one path or multiple paths of target video based on the updated reference picture time and the first estimated picture time corresponding to the one path or multiple paths of target video and the reference time. I.e. updating the first time difference and the second time difference. And the terminal determines the video with the first updated time difference which is greater than or equal to the second updated time difference corresponding to the same path of target video in the path or paths of target videos as one path or a plurality of paths of fourth video.
Similar to the principle of step 504, the terminal updates the first reference time difference corresponding to the one or more target videos based on the reference time, the updated reference picture time and the updated first estimated picture time. And then, the terminal judges whether the corresponding target video is used as a fourth video by comparing the first time difference and the second time difference which are included in the first reference time difference corresponding to each target video. In step 507, the terminal may determine whether the corresponding target video is a fourth video through other manners besides determining by calculating and comparing the time differences, which is not limited in the embodiment of the present application.
Step 508: taking the one or more paths of fourth videos as one or more paths of target videos, keeping the pictures of the videos except the one or more paths of fourth videos in the multiple paths of videos unchanged, and returning to the step of jumping to play the next frame picture of each path of target videos in the one or more paths of target videos until the fact that the fourth videos needing to be jumped to play are determined.
That is, the terminal updates the one or more fourth videos into one or more target videos, and continues to skip and play the next frame of the one or more target videos, while keeping the frames of the videos except the one or more fourth videos unchanged until the multiple videos do not need to skip frames, at this time, the time of the frames displayed by each video in the multiple videos is closest to the reference time.
In short, for the one or more first videos, the terminal plays the next frame of each video which does not satisfy the play pause condition in the one or more first videos once in a circulating judgment manner, and keeps the frames of each video which satisfies the play pause condition unchanged until the one or more first videos do not need to jump the frames.
Next, taking the multi-path video shown in fig. 6 as an example, an exemplary video playing method shown in fig. 5 will be described. The four-way video shown in fig. 6 is identical to the four-way video shown in fig. 3, and the description of the four-way video may refer to the description of fig. 3 above, which is not repeated here. Taking forward playing of the multiple paths of videos as an example, the flow of implementing single-frame synchronous playing of the multiple paths of videos is as follows:
1. the four paths of video play at the first moment, and the pictures stop at time points A0, B0, C0 and D0 respectively.
2. After clicking a play key indicating single-frame synchronization, the terminal jumps to play the next frame picture of each video in the four paths of videos, namely, the four paths of videos jump to time points A1, B1, C1 and D1 respectively.
3. The terminal determines reference picture time, a base time and a first estimated picture time: the time points A1, B1, C1, D1 are respectively determined as reference picture times corresponding to the four-way video, the maximum time point B1 of the four reference picture times is taken as a reference time, and the time points A2, B2, C2, D2 are respectively determined as first estimated picture times corresponding to the four-way video as shown by a first dotted line from the left in fig. 5.
4. The terminal determines the time difference: respectively calculating absolute values of differences between reference picture time and reference time corresponding to each path of video: the method comprises the steps of (1) calculating absolute values of differences between first estimated picture time and reference time corresponding to each path of video, wherein the absolute values are I A1-B1I, B1-B1I, C1-B1I and D1-B1I: i A2-B1I, I B2-B1I, I C2-B1I, I D2-B1I.
5. The terminal determines a first video, takes the first video as a target video, jumps to play the picture of the target video, and keeps the picture of the video except the target video unchanged: comparing the two time differences corresponding to each path of video, wherein the I A1-B1I is larger than the I A2-B1I, and the video A is a path of first video; if the I B1-B1I is smaller than the I B2-B1I, keeping the picture of the video B unchanged, namely keeping the picture of the video B at a time point B1; if the I C1-B1I is larger than the I C2-B1I, the video C is a first video; if the |d1-b1| is smaller than the |d2-b1|, the picture of the video D remains unchanged, i.e., the picture of the video D stays at the time point D1. And taking the video A and the video C as two paths of target videos, and jumping to play the video A and the video C.
The process of jumping to play the target video comprises the following steps:
a. skipping the next frame of picture of the playing target video: the next frame of the video a and the video C is jumped to be played, that is, the video a jumps to the picture at the time point A2, and the video C jumps to the picture at the time point C2.
b. Updating the reference picture time and the first estimated picture time corresponding to the target video: and respectively updating the time points A2 and C2 to be the reference picture time corresponding to the video A and the video C, and respectively updating the time points A3 and C3 to be the first estimated picture time corresponding to the video A and the video C.
c. Updating the corresponding time difference of the target video: respectively calculating absolute values of differences between reference picture time and reference time corresponding to each path of target video: the absolute value of the difference value between the first estimated picture time and the reference time corresponding to each path of target video is calculated by the steps of I A2-B1I and C2-B1I: i A3-B1I and I C3-B1I.
d. Determining a fourth video, keeping the pictures of the videos except the fourth video unchanged, taking the fourth video as a target video, and returning to the step a: respectively comparing two time differences corresponding to the video A and the video C, wherein the I A2-B1I is smaller than the I A3-B1I, and keeping the picture of the video A unchanged, namely keeping the picture of the video A at a time point A2; and if the I C2-B1I is smaller than the I C3-B1I, the picture of the video C is kept unchanged, namely the video C stays on the picture at the time point C2. So far, the pictures displayed by the multi-path video are closest to the reference time, namely, the jump play is not needed to be continued, namely, the pictures are kept still.
6. And similarly, the user clicks the play key again, and the terminal returns to execute the steps 2 to 5. In the process of executing the step in this round, after detecting the clicking operation of the user, the terminal firstly plays the next frame picture of each video in the four paths of videos, that is, the four paths of videos jump to time points A3, B2, C3 and D2 respectively. Four reference picture times and four first estimated picture times are newly determined, and a time difference is calculated and compared with the time point B2 as a reference time. If the I A3-B2I is larger than the I A4-B2I, then the video A plays the next frame of picture, namely the video A jumps to the picture at the time point A4; if the I B2-B2I is larger than the I B3-B2I, the picture of the video B is kept unchanged, namely the video B stays on the picture at the time point B2; if the I C3-B2I is smaller than the I C4-B2I, the picture of the video C is kept unchanged, namely the video C stays on the picture at the time point C2; if D2-b2 is smaller than D3-b2, then the picture of video D remains unchanged, i.e. video D stays on the picture at time point D2. Updating the reference picture time and the first estimated picture time of the video A, updating the time difference corresponding to the video A, and determining that the video A does not need to continuously jump to the picture through the updated time difference. So far, the pictures displayed by the multi-path video are all closest to the reference time.
7. And similarly, when the user clicks the play key once, the terminal can play the next frame picture of each video in the multiple paths of videos first, and then the terminal judges which video needs to continue playing the next frame picture and which video needs to keep the picture unchanged through circulation. For each path of video needing to play the next frame picture, after the terminal plays the next frame picture of the video, continuously and circularly judging whether each path of video in the videos needs to continuously play the next frame or not until the terminal judges that each path of video in the multiple paths of video meets the play pause condition, thereby realizing dynamic synchronous play of the videos A, B, C and D with different frame rates in time under the forward play condition.
Taking the four paths of video as shown in fig. 6 as an example, assuming that the multiple paths of video are inverted, the principle of inverted is similar to that of forward, and the inverted is different from that of forward in a method for determining the reference time, and in the case of inverted, the reference time is the minimum time (i.e., the earliest time) in the four reference picture times.
As can be seen from the description of fig. 6, the video playing method shown in fig. 5 essentially includes that each path of video plays a next frame of picture first, and then the terminal judges whether each path of video needs to render and display the next frame or multiple frames of pictures again according to the time of the played next frame of picture, so as to realize dynamic synchronization of the multiple paths of video at a time point. If the terminal executes the scheme by detecting the click operation of the user, each path of video plays at least one frame of picture every time the user clicks a play key, wherein a part of video with large frame rate plays multiple frames of pictures. From the video effect, when the user clicks once, one part of the video jumps to the next frame of picture, and the other part of the video continuously plays a plurality of frames, so that the user can watch the video which is dynamically played.
In summary, in this embodiment of the present application, when there are different frame rates of multiple paths of videos, based on the time and the reference time of the last frame of the currently displayed frame and the frame rate of the multiple paths of videos, it is determined that the first video of the multiple paths of videos that needs to skip the frame continues to play, so that the time of the displayed frame of each path of video in the multiple paths of videos after skip play is closest to the reference time, that is, the time of the displayed frame of each path of video after skip play is close, so that the multiple paths of videos can be played relatively synchronously in time, and the play synchronism of the time is improved when playing the multiple paths of videos.
Fig. 7 is a flowchart of still another video playing method according to an embodiment of the present application. Taking the application of the method to a terminal as an example, please refer to fig. 7, the method includes the following steps:
step 701: and jumping to play the next frame picture of each path of video in the multiple paths of video.
In the embodiment of the application, before determining the time of the multiple reference pictures, the terminal first plays the next frame picture of each video in the multiple paths of videos. Optionally, when the terminal detects the triggering operation, the step of jumping to play the next frame of each path of video in the multiple paths of video is executed.
Step 702: and determining a plurality of reference picture times which are the times of the displayed last frame picture corresponding to the multipath video respectively.
In the embodiment of the application, after skipping the next frame of picture of each path of video in the multiple paths of video, the terminal determines multiple reference picture times. The terminal determines, as a plurality of reference picture times, the times of the last displayed frame picture to which the multiplexed video respectively corresponds.
Step 703: and determining a reference time from the plurality of reference picture times, wherein the reference time is the time of playing the latest frame picture in the multi-channel video played pictures.
It should be noted that, the implementation manner of the steps 701 to 703 may refer to the related descriptions of the steps 501 to 503 in the embodiment of fig. 5, which is not described herein.
In the embodiment of the application, after determining the plurality of reference picture times and the reference time, the terminal determines one or more first videos from the multiple videos based on the plurality of reference picture times, the reference time and the frame rates of the multiple videos. Wherein, the implementation process of the terminal determining one or more first videos from the multiple videos based on the multiple reference picture times, the reference time and the frame rate of the multiple videos includes the following steps 704 to 705.
Step 704: and determining the number of frames to be played corresponding to each path of video in the multiple paths of video based on the multiple reference picture time, the reference time and the frame rate of the multiple paths of video, wherein the number of frames to be played is the number of frames required to be continuously played for the corresponding path of video, and the number of frames to be played is greater than or equal to 0.
Unlike the embodiment shown in fig. 5, in the embodiment of the present application, the terminal directly determines the number of frames to be played corresponding to each path of video in the multiple paths of video, where the number of frames to be played is the number of frames that the corresponding path of video needs to be continuously played, and the number of frames to be played is greater than or equal to 0. That is, in the embodiment shown in fig. 6, the terminal directly determines the number of frames that each path of video needs to be continuously played, without continuously determining, in a cyclic manner, whether each path of video needs to be continuously played again with the next frame.
Taking any one of the multiple paths of videos as an example, the terminal is based on the path of videosFrame rate f, determining frame interval T of the video A Assuming that the reference picture time corresponding to the path of video is A1 and the reference time is B2, the terminal solves the equation |A1- (n-1) T A -B2|≤|A1-nT A -B2|<|A1-(n+1)T A -B2I, obtaining the number n of frames to be played corresponding to the path of video. Or the terminal calculates the time difference I A1-B2I between the reference picture time corresponding to the video and the base, and the frame interval T of the video A And (5) the multiple relation is used for determining the number of frames to be played corresponding to the path of video. In addition, the terminal may determine the number of frames to be played of each path of video in other manners, which is not limited in the embodiment of the present application.
Step 705: and determining the video with the corresponding frame number to be played greater than or equal to 1 in the multiple paths of videos as one path or multiple paths of first videos.
In this embodiment of the present application, after determining the number of frames to be played corresponding to each path of video in the multiple paths of videos, the terminal determines, as one or multiple paths of first videos, a video with a number of frames to be played greater than or equal to 1 corresponding to the multiple paths of videos. That is, the video with the corresponding frame number to be played of 0 is the video that needs to keep the picture unchanged, and the video with the corresponding frame number to be played of greater than or equal to 1 is the video that needs to be played continuously.
After determining one or more paths of first videos, the implementation process of the terminal to jump and play the picture of each path of first video in the one or more paths of first videos includes the following step 706.
Step 706: and skipping to play the picture of each path of first video in the one path or the plurality of paths of first videos based on the frame number to be played corresponding to the one path or the plurality of paths of first videos, and keeping the pictures of the videos except the one path or the plurality of paths of first videos in the plurality of paths of videos unchanged.
The terminal jumps to play the pictures of each path of first video in the path or paths of first videos based on the number of frames to be played corresponding to the path or paths of first videos, and one implementation mode is as follows: and for each path of first video in the one path or multiple paths of first videos, the terminal plays the next frame picture required to be played by the corresponding path of first video according to the playing sequence. The terminal determines the total frame number of the frames played by the corresponding first video after the first reference frames are played as the continuous playing frame number corresponding to the corresponding first video, wherein the first reference frames are frames with the time corresponding to the reference frame time in the corresponding first video. And if the number of continuous playing frames corresponding to the corresponding one path of first video is smaller than the number of corresponding frames to be played, returning to the step of executing the next frame picture to be played according to the playing sequence. If the continuous playing frame number corresponding to the corresponding one path of first video is equal to the corresponding frame number to be played, the playing of the corresponding path of first video is paused. That is, the terminal continuously updates the continuous playing frame number, and pauses playing the corresponding path of first video when the continuous playing frame number reaches the corresponding frame number to be played.
Optionally, the terminal may skip playing the frame of each path of the first video in the one or more paths of first videos to the last frame corresponding to the corresponding frame number to be played based on the frame number to be played corresponding to the one or more paths of first videos. That is, the terminal directly jumps to the picture in which each path of the first video is played to the picture in which the time is closest to the reference time.
Next, a video playing method shown in fig. 7 will be exemplarily described by way of an example. Assuming that the terminal synchronously plays the multi-path video by detecting a user click operation, this example includes the following steps 1 to 7.
1. The multiple video channels all keep the picture motionless at the first moment.
2. After clicking the play button once, the terminal plays the next frame of each path of video in the multiple paths of video.
3. The terminal determines a plurality of reference picture times and a base time.
4. The terminal calculates the number of frames to be played corresponding to each path of video based on the frame rate, the reference picture time and the base time.
5. The video with the number of frames to be played being not 0 is the first video. The terminal keeps the pictures of the videos except the first videos in the multiple paths of videos unchanged, and continues to play the pictures of the corresponding frames of the corresponding path of first videos based on the frames to be played corresponding to the paths of first videos.
6. And by analogy, the user clicks the play key again, and the terminal returns to execute the step 2, so that the dynamic synchronous play of videos with different frame rates in time is realized.
In summary, in this embodiment of the present application, when there are different frame rates of multiple paths of videos, based on the time and the reference time of the last frame of the currently displayed frame and the frame rate of the multiple paths of videos, the first video of the multiple paths of videos that need to skip the frame is determined, so that the time of the frame displayed by each path of video in the multiple paths of videos after skip play is closest to the reference time, that is, the time of the frame displayed by each path of video after skip play is close to the reference time, so that the multiple paths of videos can be played relatively synchronously in time, and the play synchronism of the multiple paths of videos in time is improved during playback.
In the embodiments of fig. 2 to 7, the time of the next frame picture that needs to be played earliest in the multiple video is taken as the reference time, or the time of the next frame picture that needs to be played latest in the multiple video is taken as the reference time, or the latest time in the time of the pictures that are currently displayed in the multiple video is taken as the reference time after the multiple video jumps to the next frame picture. In the embodiment of the present application, as can be seen from the description of the embodiment of fig. 1, the embodiment of the present application is not limited to the reference time, in one implementation, the reference time may be selected according to the method described in any one of the embodiments of fig. 2 to 7, and in another implementation, the time of any frame of the multiple paths of video to be played may also be used as the reference time. It can be seen that these two implementations can actually be considered as the reference time being the time of one frame of picture to be played of the multi-channel video. Next, a video playing method in the case where the reference time is the time of one frame of picture to be played of the multi-channel video will be described by way of the embodiment of fig. 8. It should be noted that, in the case where the reference time is not arbitrarily selected, the embodiment of fig. 8 may be regarded as a top-level implementation manner of the embodiments of fig. 2 to 4, and in the case where the reference time is arbitrarily selected, the embodiment of fig. 8 may be regarded as a parallel arrangement manner of the embodiments of fig. 2 to 4.
Fig. 8 is a flowchart of still another video playing method according to an embodiment of the present application. In the embodiment of fig. 8, the reference time is the time of a frame of the multi-channel video to be played. Taking the application of the method to a terminal as an example, please refer to fig. 8, the method includes the following steps:
step 801: and determining a plurality of reference picture times which are the times of the displayed last frame picture corresponding to the multipath videos respectively.
In the embodiment of the present application, the specific implementation manner of step 801 refers to the related descriptions in the embodiments of fig. 2 to 4, and will not be described herein again.
After determining the plurality of reference picture times, the terminal determines one or more first videos from among the plurality of videos that need to skip pictures based on the plurality of reference picture times, the frame rate of the plurality of videos, and the base time. The frame rates of the multiple paths of videos are different, and the reference time is the time of one frame of picture to be played of the multiple paths of videos. In the embodiment of fig. 8, the implementation of the terminal determining one or more first videos requiring a frame skip from among the multiple videos based on the multiple reference frame times, the frame rates of the multiple videos, and the reference time includes the following steps 802 and 803.
Step 802: and determining at least one estimated picture time corresponding to each path of video in the multiple paths of video based on the multiple reference picture times and the frame rate of the multiple paths of video, wherein the at least one estimated picture time comprises the time of at least one frame picture to be played in the corresponding path of video.
The terminal selects at least one time from the time of one frame of picture to be played of each path of video in the multiple paths of video as at least one estimated picture time corresponding to the corresponding path of video. For example, similar to the embodiment of fig. 2, for any video, the terminal takes the time of the next frame of the video to be played as the corresponding at least one estimated frame time, so that the at least one estimated frame time substantially includes the first estimated frame time in the embodiment of fig. 2. Alternatively, similar to the embodiment of fig. 4, the terminal takes the time of the next frame of the video to be played and the time of the next frame of the video as the corresponding at least one estimated frame time, so that the at least one estimated frame time substantially includes the first estimated frame time and the second estimated frame time in the embodiment of fig. 4. Or the terminal determines the time of all the pictures to be played in each path of video in the multiple paths of videos as corresponding at least one estimated picture time.
Based on the above, the terminal may further determine the reference time from at least one estimated picture time corresponding to each path of video in the multiple paths of video.
Step 803: and determining one or more first videos from the multiple paths of videos based on at least one estimated picture time and reference time respectively corresponding to each path of video in the multiple paths of videos.
In this embodiment of the present application, based on at least one estimated picture time and a reference time corresponding to each path of video in the multiple paths of videos, the terminal determines one or more paths of first videos from the multiple paths of videos, where an implementation manner of determining one or more paths of first videos includes: the terminal determines a plurality of pairs of reference time differences corresponding to the multi-path video based on at least one estimated picture time and reference time corresponding to each path of video in the multi-path video, wherein each pair of reference time differences comprises a first difference value and a second difference value. And the terminal determines the videos except the videos which do not meet the skip condition in the multiple paths of videos as one or multiple paths of first videos. The failure to meet the skip condition means that the first difference value corresponding to the corresponding one-path video is smaller than the corresponding second difference value, and the first reference time corresponding to the corresponding one-path video is consistent with the corresponding reference picture time.
The first difference value is the absolute value of the difference value between the first reference time and the reference time, and the second difference value is the absolute value of the difference value between the reference time and the second reference time. The first reference time is the time of a picture which is close to the playing direction and the time of which is closest to the reference time in the corresponding one path of video, and the second reference time is the time of a picture which is close to the waiting playing direction and the time of which is closest to the reference time in the corresponding one path of video. That is, in the case of forward playing multiple video, the first reference time is the time of the picture whose time is before and closest to the reference time in the corresponding video, and the second reference time is the time of the picture whose time is not earlier than and closest to the reference time in the corresponding video. Under the condition of reverse playing of multiple paths of videos, the first reference time is the time of a picture of the corresponding path of video, the time of which is positioned after the reference time and is closest to the reference time, and the second reference time is the time of a picture of the corresponding path of video, the time of which is not later than the reference time and is closest to the reference time.
Step 804: and skipping the pictures of each path of first video in the one or more paths of first videos, so that the time of the pictures displayed by each path of video in the multiple paths of videos after skipping is closest to the reference time.
In the embodiment of the present application, the implementation manner of step 804 is various, and some of the implementation manners are similar to those described in the embodiment of fig. 2 to fig. 4, and reference may be made to the related description of the foregoing embodiment, which is not repeated here.
In other implementations, the terminal may also determine, based on the reference picture time corresponding to the one or more first videos, the frame rate of the one or more first videos, and the reference time, the target time corresponding to each of the one or more first videos, where the target time is a time of a picture in the corresponding one of the first videos, where the time is closest to the reference time. The terminal jumps and plays the pictures of each path of first video in the one path or multiple paths of first videos frame by frame, and judges whether the time of the picture displayed at one time is the target time corresponding to the corresponding path of first video or not every time one frame of picture is jumped. If the time of the currently displayed picture is the target time corresponding to the corresponding path of first video, the playing of the corresponding path of first video is paused. If the time of the currently displayed picture is not the target time corresponding to the corresponding first video, continuing to jump to play the next frame picture of the corresponding first video. In addition to some implementations described above, the terminal may skip playing the first video in each path in other manners, so that the time of the frame displayed by each path of video in the multiple paths of video after skip playing is closest to the reference time.
In summary, in this embodiment of the present application, when there are different frame rates of multiple paths of videos, based on the time and the reference time of the last frame of the currently displayed frame and the frame rate of the multiple paths of videos, the first video of the multiple paths of videos that need to skip the frame is determined, so that the time of the frame displayed by each path of video in the multiple paths of videos after skip play is closest to the reference time, that is, the time of the frame displayed by each path of video after skip play is close to the reference time, so that the multiple paths of videos can be played relatively synchronously in time, and the play synchronism of the multiple paths of videos in time is improved during playback.
All the above optional technical solutions may be combined according to any choice to form an optional embodiment of the present application, which is not described in detail herein.
For example, assuming that the embodiment shown in fig. 2 is a first scheme, any of the embodiments shown in fig. 4 to 7 is a second scheme, where the first scheme and the second scheme may be combined to form an alternative embodiment of the present application, for example, in a case where the first scheme and the second scheme are combined, since the first scheme can ensure that a user sees a frame-by-frame picture, the first scheme may be regarded as a slow synchronous play scheme, and since a part of the second scheme may continuously render and display a multi-frame picture, or skip directly to play to the last frame of the multi-frame picture, the second scheme may be regarded as a fast synchronous play scheme. Based on the above, a slow play key corresponding to the first scheme and a fast play key corresponding to the second scheme can be set on the terminal, the user can realize fast synchronous play of the multi-channel video through the terminal by clicking the fast play key, and the user can realize slow synchronous play of the multi-channel video through the terminal by clicking the slow play key. The fast play key can further comprise a fast forward play key and a fast reverse play key, so that the fast forward play and the fast reverse play functions are realized. The slow play key may further include a slow forward play key and a slow reverse play key to realize the functions of slow forward play and slow reverse play.
Fig. 9 is a schematic structural diagram of a video playing apparatus 900 provided in the embodiment of the present application, where the video playing apparatus 900 may be implemented by software, hardware, or a combination of both as part or all of a computer device, and the computer device may be a terminal in the foregoing embodiment. Referring to fig. 9, the apparatus 900 includes: a first determination module 901, a second determination module 902, and a skip play module 903.
A first determining module 901, configured to determine a plurality of reference picture times, where the plurality of reference picture times are the times of the displayed last frame picture corresponding to the multiple paths of videos respectively;
a second determining module 902, configured to determine, from among the multiple videos, one or more first videos that need to skip a picture, based on multiple reference picture times, frame rates of the multiple videos, and a base time, where the frame rates of the multiple videos are different;
the skip play module 903 is configured to skip play the frames of each of the one or more paths of first videos, so that the time of the frames displayed by each of the paths of videos after skip play is closest to the reference time.
Optionally, the reference time is the time of the next frame of picture needing to be played earliest in the multi-path video;
The skip play module 903 includes:
the first skip play sub-module is used for skip playing the next frame picture of each path of first video in one path or multiple paths of first videos, and keeping the pictures of the videos except the one path or the multiple paths of first videos unchanged.
Optionally, the reference time is the time of one frame of picture to be played in the multi-path video;
the second determining module 902 includes:
the first determining submodule is used for determining at least one estimated picture time corresponding to each path of video in the multiple paths of video respectively based on the multiple reference picture times and the frame rate of the multiple paths of video, wherein the at least one estimated picture time comprises the time of at least one frame of picture to be played in the corresponding path of video;
the second determining submodule is used for determining one or more paths of first videos from the multiple paths of videos based on at least one estimated picture time and reference time corresponding to each path of video in the multiple paths of videos.
Optionally, the second determining submodule is specifically configured to:
determining a plurality of pairs of reference time differences corresponding to the multi-path videos based on at least one estimated picture time and reference time corresponding to each path of video in the multi-path videos, wherein each pair of reference time differences comprises a first difference value and a second difference value, the first difference value is an absolute value of a difference value between the first reference time and the reference time, and the second difference value is an absolute value of a difference value between the reference time and the second reference time;
The first reference time is the time of a picture which is close to the played direction and has the time closest to the reference time in the corresponding one-path video, and the second reference time is the time of a picture which is close to the to-be-played direction and has the time closest to the reference time in the corresponding one-path video;
and determining videos except for the condition that the jump condition is not met in the multiple paths of videos as one path or multiple paths of first videos, wherein the condition that the jump condition is not met means that the first difference value corresponding to the corresponding path of video is smaller than the corresponding second difference value, and the first reference time corresponding to the corresponding path of video is consistent with the corresponding reference picture time.
Optionally, the second determining module 702 includes:
a third determining sub-module, configured to determine a plurality of first estimated picture times based on the plurality of reference picture times and frame rates of the plurality of videos, where the plurality of first estimated picture times are times of next frames of pictures of the plurality of videos that need to be played respectively;
and a fourth determination sub-module for determining one or more first videos from the multiple videos based on the plurality of reference picture times, the plurality of first estimated picture times, and the base time.
Optionally, the fourth determining submodule is specifically configured to:
determining a plurality of pairs of first reference time differences corresponding to the multi-path video based on a plurality of reference picture times, a plurality of first estimated picture times and a reference time, wherein each pair of first reference time differences comprises a first time difference and a second time difference, the first time difference is the absolute value of the difference between the reference picture time corresponding to the corresponding path of video and the reference time, and the second time difference is the absolute value of the difference between the first estimated picture time corresponding to the corresponding path of video and the reference time;
And determining videos with the first time difference larger than or equal to the second time difference corresponding to the same video in the multiple paths of videos as one or multiple paths of first videos.
Optionally, the reference time is the time of the next frame picture needing to be played at the latest in the multiple paths of videos, one or multiple paths of first videos comprise a second video and a third video, the second video is the video needing to skip the next frame picture, and the third video is the video needing to skip multiple frame pictures;
the second determining module 902 includes:
a fifth determining sub-module for determining one or more second videos from among the multiple videos based on the multiple reference picture times, the frame rates of the multiple videos, and the base time, and determining one or more third videos;
the jump play module includes:
the second skip play sub-module is used for skip playing the next frame picture of each path of second video in one path or multiple paths of second videos;
the third skip play sub-module is used for skip playing the multi-frame picture of each path of third video in one path or multiple paths of third videos, or skip playing the last frame picture of the multi-frame picture of each path of third video in one path or multiple paths of third videos to the corresponding third video.
Optionally, the third jump playing sub-module is specifically configured to:
Taking one or more paths of third videos as one or more paths of target videos, and jumping to play the next frame picture of each path of target videos in the one or more paths of target videos;
updating the reference picture time corresponding to one or more paths of target videos;
determining one or more fourth videos from one or more target videos based on the reference picture time corresponding to the updated one or more target videos, the frame rate of the one or more target videos and the reference time;
and taking the one or more paths of fourth videos as one or more paths of target videos, keeping the pictures of all paths of third videos except the one or more paths of fourth videos in the one or more paths of third videos unchanged, and returning to the step of jumping to play the next frame picture of all paths of target videos in the one or more paths of target videos until the fourth videos without jumping pictures are determined based on the updated reference picture time corresponding to the one or more paths of target videos, the frame rate of the one or more paths of target videos and the reference time.
Optionally, the fifth determining submodule is specifically configured to:
determining a first estimated picture time and a second estimated picture time corresponding to the multiple paths of videos respectively based on the multiple reference picture times and the frame rates of the multiple paths of videos, wherein the first estimated picture time is the time of a next frame picture required to be played by the corresponding path of videos, and the second estimated picture time is the time of a frame picture required to be played after the next frame picture is played by the corresponding path of videos;
And determining one or more second videos from the multiple videos based on the first estimated picture time and the second estimated picture time which correspond to the multiple videos respectively and the reference time, and determining one or more third videos.
Optionally, the second determining module 902 further includes:
a sixth determining submodule, configured to determine a frame number to be played corresponding to each third video in one or more third videos based on a reference picture time, a reference time and a frame rate of the one or more third videos corresponding to the one or more third videos, where the frame number to be played is a frame number that the corresponding one third video needs to be continuously played, and the frame number to be played is greater than 1;
the third jump playing sub-module is specifically configured to:
jumping to play the pictures of each path of third video in one path or multiple paths of third videos based on the frame number to be played corresponding to each path of third video in one path or multiple paths of third videos;
the third jump playing sub-module is specifically configured to:
and jumping to play each path of third video in one path or multiple paths of third videos to the last frame of the multi-frame frames of the corresponding third video based on the frame number to be played corresponding to each path of third video in the one path or multiple paths of third videos.
Optionally, the step of skipping the picture of each of the one or more first videos is performed once every time a trigger operation is detected.
In summary, in this embodiment of the present application, when there are different frame rates of multiple paths of videos, based on the time and the reference time of the last frame of the currently displayed frame and the frame rate of the multiple paths of videos, the first video of the multiple paths of videos that need to skip the frame is determined, so that the time of the frame displayed by each path of video in the multiple paths of videos after skip play is closest to the reference time, that is, the time of the frame displayed by each path of video after skip play is close to the reference time, so that the multiple paths of videos can be played relatively synchronously in time, and the play synchronism of the multiple paths of videos in time is improved during playback.
It should be noted that: in the video playing device provided in the above embodiment, when playing video, only the division of the above functional modules is used for illustration, in practical application, the above functional allocation may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the video playing device and the video playing method provided in the foregoing embodiments belong to the same concept, and specific implementation processes of the video playing device and the video playing method are detailed in the method embodiments and are not repeated herein.
Fig. 10 shows a block diagram of a terminal 1000 according to an exemplary embodiment of the present application. The terminal 1000 may be: smart phones, tablet computers, MP3 players (Moving Picture Experts Group Audio Layer III, motion picture expert compression standard audio plane 3), MP4 (Moving Picture Experts Group Audio Layer IV, motion picture expert compression standard audio plane 4) players, notebook computers, desktop computers or televisions, etc. Terminal 1000 can also be referred to as a user device, portable terminal, laptop terminal, desktop terminal, player, monitor, etc.
In general, terminal 1000 can include: a processor 1001 and a memory 1002.
The processor 1001 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so on. The processor 1001 may be implemented in at least one hardware form of DSP (Digital Signal Processing ), FPGA (Field-Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array ). The processor 1001 may also include a main processor, which is a processor for processing data in an awake state, also referred to as a CPU (Central Processing Unit ), and a coprocessor; a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 1001 may be integrated with a GPU (Graphics Processing Unit, image processor) for taking care of rendering and drawing of content that the display screen needs to display. In some embodiments, the processor 1001 may also include an AI (Artificial Intelligence ) processor for processing computing operations related to machine learning.
Memory 1002 may include one or more computer-readable storage media, which may be non-transitory. Memory 1002 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 1002 is used to store at least one instruction for execution by processor 1001 to implement the video playback method provided by the method embodiments herein.
In some embodiments, terminal 1000 can optionally further include: a peripheral interface 1003, and at least one peripheral. The processor 1001, the memory 1002, and the peripheral interface 1003 may be connected by a bus or signal line. The various peripheral devices may be connected to the peripheral device interface 1003 via a bus, signal wire, or circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 1004, a display 1005, a camera assembly 1006, audio circuitry 1007, a positioning assembly 1008, and a power supply 1009.
Peripheral interface 1003 may be used to connect I/O (Input/Output) related at least one peripheral to processor 1001 and memory 1002. In some embodiments, processor 1001, memory 1002, and peripheral interface 1003 are integrated on the same chip or circuit board; in some other embodiments, either or both of the processor 1001, memory 1002, and peripheral interface 1003 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
Radio Frequency circuit 1004 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. Radio frequency circuitry 1004 communicates with a communication network and other communication devices via electromagnetic signals. The radio frequency circuit 1004 converts an electrical signal into an electromagnetic signal for transmission, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 1004 includes: antenna systems, RF transceivers, one or more amplifiers, tuners, oscillators, digital signal processors, codec chipsets, subscriber identity module cards, and so forth. Radio frequency circuitry 1004 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: metropolitan area networks, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and/or WiFi (Wireless Fidelity ) networks. In some embodiments, the radio frequency circuitry 1004 may also include NFC (Near Field Communication ) related circuitry, which is not limited in this application.
The display screen 1005 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display 1005 is a touch screen, the display 1005 also has the ability to capture touch signals at or above the surface of the display 1005. The touch signal may be input to the processor 1001 as a control signal for processing. At this time, the display 1005 may also be used to provide virtual buttons and/or virtual keyboards, also referred to as soft buttons and/or soft keyboards. In some embodiments, display 1005 may be one, disposed on the front panel of terminal 1000; in other embodiments, display 1005 may be provided in at least two, separately provided on different surfaces of terminal 1000 or in a folded configuration; in other embodiments, display 1005 may be a flexible display disposed on a curved surface or a folded surface of terminal 1000. Even more, the display 1005 may be arranged in a non-rectangular irregular pattern, i.e., a shaped screen. The display 1005 may be made of LCD (Liquid Crystal Display ), OLED (Organic Light-Emitting Diode) or other materials.
The camera assembly 1006 is used to capture images or video. Optionally, camera assembly 1006 includes a front camera and a rear camera. Typically, the front camera is disposed on the front panel of the terminal and the rear camera is disposed on the rear surface of the terminal. In some embodiments, the at least two rear cameras are any one of a main camera, a depth camera, a wide-angle camera and a tele camera, so as to realize that the main camera and the depth camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize a panoramic shooting and Virtual Reality (VR) shooting function or other fusion shooting functions. In some embodiments, camera assembly 1006 may also include a flash. The flash lamp can be a single-color temperature flash lamp or a double-color temperature flash lamp. The dual-color temperature flash lamp refers to a combination of a warm light flash lamp and a cold light flash lamp, and can be used for light compensation under different color temperatures.
The audio circuit 1007 may include a microphone and a speaker. The microphone is used for collecting sound waves of users and environments, converting the sound waves into electric signals, and inputting the electric signals to the processor 1001 for processing, or inputting the electric signals to the radio frequency circuit 1004 for voice communication. For purposes of stereo acquisition or noise reduction, the microphone may be multiple, each located at a different portion of terminal 1000. The microphone may also be an array microphone or an omni-directional pickup microphone. The speaker is used to convert electrical signals from the processor 1001 or the radio frequency circuit 1004 into sound waves. The speaker may be a conventional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, not only the electric signal can be converted into a sound wave audible to humans, but also the electric signal can be converted into a sound wave inaudible to humans for ranging and other purposes. In some embodiments, audio circuit 1007 may also include a headphone jack.
The location component 1008 is used to locate the current geographic location of terminal 1000 to enable navigation or LBS (Location Based Service, location-based services). The positioning component 1008 may be a positioning component based on the united states GPS (Global Positioning System ), the beidou system of china, the grainer system of russia, or the galileo system of the european union.
Power supply 1009 is used to power the various components in terminal 1000. The power source 1009 may be alternating current, direct current, disposable battery or rechargeable battery. When the power source 1009 includes a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, terminal 1000 can further include one or more sensors 1010. The one or more sensors 1010 include, but are not limited to: acceleration sensor 1011, gyroscope sensor 1012, pressure sensor 1013, fingerprint sensor 1014, optical sensor 1015, and proximity sensor 1016.
The acceleration sensor 1011 can detect the magnitudes of accelerations on three coordinate axes of the coordinate system established with the terminal 1000. For example, the acceleration sensor 1011 may be used to detect components of gravitational acceleration in three coordinate axes. The processor 1001 may control the display screen 1005 to display a user interface in a landscape view or a portrait view according to the gravitational acceleration signal acquired by the acceleration sensor 1011. The acceleration sensor 1011 may also be used for the acquisition of motion data of a game or a user.
The gyro sensor 1012 may detect the body direction and the rotation angle of the terminal 1000, and the gyro sensor 1012 may collect the 3D motion of the user to the terminal 1000 in cooperation with the acceleration sensor 1011. The processor 1001 may implement the following functions according to the data collected by the gyro sensor 1012: motion sensing (e.g., changing UI according to a tilting operation by a user), image stabilization at shooting, game control, and inertial navigation.
Pressure sensor 1013 may be disposed on a side frame of terminal 1000 and/or on an underlying layer of display 1005. When the pressure sensor 1013 is provided at a side frame of the terminal 1000, a grip signal of the terminal 1000 by a user can be detected, and the processor 1001 performs right-and-left hand recognition or quick operation according to the grip signal collected by the pressure sensor 1013. When the pressure sensor 1013 is provided at the lower layer of the display screen 1005, the processor 1001 controls the operability control on the UI interface according to the pressure operation of the user on the display screen 1005. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
The fingerprint sensor 1014 is used to collect a fingerprint of the user, and the processor 1001 identifies the identity of the user based on the fingerprint collected by the fingerprint sensor 1014, or the fingerprint sensor 1014 identifies the identity of the user based on the collected fingerprint. Upon recognizing that the user's identity is a trusted identity, the processor 1001 authorizes the user to perform relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying for and changing settings, etc. Fingerprint sensor 1014 may be disposed on the front, back, or side of terminal 1000. When a physical key or vendor Logo is provided on terminal 1000, fingerprint sensor 1014 may be integrated with the physical key or vendor Logo.
The optical sensor 1015 is used to collect ambient light intensity. In one embodiment, the processor 1001 may control the display brightness of the display screen 1005 based on the ambient light intensity collected by the optical sensor 1015. Specifically, when the intensity of the ambient light is high, the display brightness of the display screen 1005 is turned up; when the ambient light intensity is low, the display brightness of the display screen 1005 is turned down. In another embodiment, the processor 1001 may dynamically adjust the shooting parameters of the camera module 1006 according to the ambient light intensity collected by the optical sensor 1015.
Proximity sensor 1016, also referred to as a distance sensor, is typically located on the front panel of terminal 1000. Proximity sensor 1016 is used to collect the distance between the user and the front of terminal 1000. In one embodiment, when proximity sensor 1016 detects a gradual decrease in the distance between the user and the front face of terminal 1000, processor 1001 controls display 1005 to switch from the bright screen state to the off screen state; when proximity sensor 1016 detects a gradual increase in the distance between the user and the front of terminal 1000, processor 1001 controls display 1005 to switch from the off-screen state to the on-screen state.
Those skilled in the art will appreciate that the structure shown in fig. 10 is not limiting and that terminal 1000 can include more or fewer components than shown, or certain components can be combined, or a different arrangement of components can be employed.
In some embodiments, there is also provided a computer readable storage medium having stored therein a computer program which, when executed by a processor, implements the steps of the video playback method of the above embodiments. For example, the computer readable storage medium may be ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
It is noted that the computer readable storage medium mentioned in the embodiments of the present application may be a non-volatile storage medium, in other words, may be a non-transitory storage medium.
It should be understood that all or part of the steps to implement the above-described embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The computer instructions may be stored in the computer-readable storage medium described above.
That is, in some embodiments, there is also provided a computer program product containing instructions that, when run on a computer, cause the computer to perform the steps of the video playback method described above.
It should be understood that references herein to "at least one" mean one or more, and "a plurality" means two or more. In the description of the embodiments of the present application, unless otherwise indicated, "/" means or, for example, a/B may represent a or B; "and/or" herein is merely an association relationship describing an association object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone. In addition, in order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second", and the like are used to distinguish the same item or similar items having substantially the same function and effect. It will be appreciated by those of skill in the art that the words "first," "second," and the like do not limit the amount and order of execution, and that the words "first," "second," and the like do not necessarily differ.
The above embodiments are provided for the purpose of not limiting the present application, but rather, any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application are intended to be included within the scope of the present application.

Claims (31)

1. A video playing method, the method comprising:
determining a plurality of reference picture times, wherein the plurality of reference picture times are the time of the displayed last frame picture corresponding to the multi-channel video respectively;
determining one or more first videos needing to skip pictures from the multiple videos based on the multiple reference picture times, the frame rates of the multiple videos and the reference time, wherein the frame rates of the multiple videos are different;
skipping to play the pictures of each path of first video in the one path or the plurality of paths of first videos, and keeping the pictures of the videos except the one path or the plurality of paths of first videos unchanged in the plurality of paths of videos so that the time of the pictures displayed by each path of videos in the plurality of paths of videos is closest to the reference time after skipping;
the reference time is the time of one frame of picture to be played of the multi-path video;
the determining one or more first videos needing to skip pictures from the multiple videos based on the multiple reference picture times, the frame rate of the multiple videos and the reference time includes:
determining at least one estimated picture time corresponding to each path of video in the multiple paths of video based on the multiple reference picture times and the frame rate of the multiple paths of video, wherein the at least one estimated picture time comprises the time of at least one frame of picture to be played in the corresponding path of video;
Determining one or more paths of first videos from the multiple paths of videos based on at least one estimated picture time and the reference time which correspond to each path of video in the multiple paths of videos respectively;
the determining the one or more first videos from the multiple paths of videos based on at least one estimated picture time and the reference time respectively corresponding to each path of video in the multiple paths of videos includes:
determining a plurality of pairs of reference time differences corresponding to the multi-path video based on at least one estimated picture time and the reference time corresponding to each path of video in the multi-path video, wherein each pair of reference time differences comprises a first difference value and a second difference value, the first difference value is an absolute value of a difference value between the first reference time and the reference time, and the second difference value is an absolute value of a difference value between the reference time and the second reference time;
the first reference time is the time of a picture which is close to the played direction and has the time closest to the reference time in the corresponding one-path video, and the second reference time is the time of a picture which is close to the to-be-played direction and has the time closest to the reference time in the corresponding one-path video;
And determining videos except for the condition that the jump condition is not met in the multiple paths of videos as one path or multiple paths of first videos, wherein the condition that the jump condition is not met means that the first difference value corresponding to the corresponding path of video is smaller than the corresponding second difference value, and the first reference time corresponding to the corresponding path of video is consistent with the corresponding reference picture time.
2. The method of claim 1, wherein if the reference time is a time of a next frame of picture to be played earliest in the multi-channel video;
the step of skipping plays the picture of each path of first video in the one path or the plurality of paths of first videos comprises the following steps:
and skipping to play the next frame picture of each path of first video in the one or more paths of first videos.
3. The method of claim 2, wherein determining at least one estimated picture time for each of the multiple paths of video based on the multiple reference picture times and the frame rates of the multiple paths of video comprises:
determining a plurality of first estimated picture times based on the plurality of reference picture times and the frame rate of the multi-path video, wherein the plurality of first estimated picture times are the times of next frame pictures which are respectively required to be played by the multi-path video;
The determining the one or more first videos from the multiple paths of videos based on at least one estimated picture time and the reference time respectively corresponding to each path of video in the multiple paths of videos includes:
the one or more first videos are determined from the multiple videos based on the plurality of reference picture times, the plurality of first estimated picture times, and the base time.
4. The method of claim 3, wherein the determining the one or more first videos from the multiple videos based on the plurality of reference picture times, the plurality of first predicted picture times, and the base time comprises:
determining a plurality of pairs of first reference time differences corresponding to the multi-path video based on the plurality of reference picture times, the plurality of first estimated picture times and the reference time, wherein each pair of first reference time differences comprises a first time difference and a second time difference, the first time difference is an absolute value of a difference value between the reference picture time corresponding to a corresponding path of video and the reference time, and the second time difference is an absolute value of a difference value between the first estimated picture time corresponding to a corresponding path of video and the reference time;
And determining videos with the first time difference larger than or equal to the second time difference corresponding to the same video in the multiple paths of videos as one or multiple paths of first videos.
5. The method according to claim 1, wherein if the reference time is a time of a next frame of picture to be played latest in the multiple paths of videos, the one or multiple paths of first videos include a second video and a third video, the second video is a video to be skipped to the next frame of picture, and the third video is a video to be skipped to multiple frames of pictures;
the step of skipping plays the picture of each path of first video in the one path or the plurality of paths of first videos comprises the following steps:
jumping to play the next frame picture of each path of second video in one path or multiple paths of second video;
and skipping the multi-frame picture of each path of third video in one path or multiple paths of third videos, or skipping the last frame picture of the multi-frame picture of each path of third video in one path or multiple paths of third videos to the corresponding third video.
6. The method of claim 5, wherein skipping the multi-frame picture of each of the one or more third videos comprises:
Taking the one or more paths of third videos as one or more paths of target videos, and jumping to play the next frame picture of each path of target videos in the one or more paths of target videos;
updating the reference picture time corresponding to the one or more paths of target videos;
determining one or more fourth videos from the one or more target videos based on the updated reference picture time corresponding to the one or more target videos, the frame rate of the one or more target videos and the reference time;
and taking the one or more paths of fourth videos as one or more paths of target videos, keeping the pictures of all paths of third videos except the one or more paths of fourth videos in the one or more paths of third videos unchanged, and returning to the step of jumping to play the next frame picture of each path of target videos in the one or more paths of target videos until the fourth video without jumping pictures is determined based on the updated reference picture time corresponding to the one or more paths of target videos, the frame rate of the one or more paths of target videos and the reference time.
7. The method of claim 5, wherein determining at least one predicted picture time for each of the plurality of paths of video based on the plurality of reference picture times and the frame rate of the plurality of paths of video comprises:
Determining a first estimated picture time and a second estimated picture time corresponding to the multiple paths of videos respectively based on the multiple reference picture times and the frame rates of the multiple paths of videos, wherein the first estimated picture time is the time of a next frame picture required to be played by a corresponding path of video, and the second estimated picture time is the time of a next frame picture required to be played after the next frame picture is played by the corresponding path of video;
the determining the one or more first videos from the multiple paths of videos based on at least one estimated picture time and the reference time respectively corresponding to each path of video in the multiple paths of videos includes:
and determining one or more second videos from the multiple paths of videos based on the first estimated picture time and the second estimated picture time which correspond to the multiple paths of videos respectively and the reference time, and determining the one or more third videos.
8. The method of claim 5, wherein after determining one or more first videos from the plurality of videos, further comprising:
determining the frame number to be played corresponding to each path of third video in one path or multiple paths of third videos based on the reference picture time, the reference time and the frame rate of the one path or multiple paths of third videos, wherein the frame number to be played is the frame number to be continuously played for the corresponding path of third video, and the frame number to be played is larger than 1;
The skipping plays multi-frame pictures of each path of third video in the one or more paths of third videos, including:
jumping to play the picture of each path of third video in the one path or the plurality of paths of third video based on the frame number to be played corresponding to each path of third video in the one path or the plurality of paths of third video;
the step of jumping playing each path of third video in one path or multiple paths of third video to the last frame of the multi-frame frames of the corresponding third video comprises the following steps:
and jumping to play each path of third video in one path or multiple paths of third videos to the last frame picture of the multi-frame picture of the corresponding third video based on the frame number to be played corresponding to each path of third video in the one path or multiple paths of third videos.
9. The method according to any one of claims 1-8, wherein the step of skipping pictures of each of the one or more first videos is performed once per detection of a trigger operation.
10. A video playing method, the method comprising:
determining a plurality of reference picture times, wherein the plurality of reference picture times are the time of the displayed last frame picture corresponding to the multi-channel video respectively;
Determining one or more first videos needing to skip pictures from the multiple videos based on the multiple reference picture times, the frame rates of the multiple videos and the reference time, wherein the frame rates of the multiple videos are different;
skipping to play the pictures of each path of first video in the one path or the plurality of paths of first videos, and keeping the pictures of the videos except the one path or the plurality of paths of first videos unchanged in the plurality of paths of videos so that the time of the pictures displayed by each path of videos in the plurality of paths of videos is closest to the reference time after skipping;
the reference time is the time of the next frame picture needing to be played at the latest in the multiple paths of videos, the one or multiple paths of first videos comprise a second video and a third video, the second video is the video needing to jump to the next frame picture, and the third video is the video needing to jump to multiple frame pictures;
the determining one or more first videos needing to skip pictures from the multiple videos based on the multiple reference picture times, the frame rate of the multiple videos and the reference time includes:
determining a first estimated picture time and a second estimated picture time corresponding to the multiple paths of videos respectively based on the multiple reference picture times and the frame rates of the multiple paths of videos, wherein the first estimated picture time is the time of a next frame picture required to be played by a corresponding path of video, and the second estimated picture time is the time of a next frame picture required to be played after the next frame picture is played by the corresponding path of video; determining a plurality of pairs of second reference time differences corresponding to the multi-path video respectively based on the first estimated picture time and the second estimated picture time which correspond to the multi-path video respectively and the reference time, wherein each pair of second reference time differences comprises a third time difference and a fourth time difference, the third time difference is the absolute value of the difference between the first estimated picture time corresponding to the corresponding path of video and the reference time, and the fourth time difference is the absolute value of the difference between the second estimated picture time corresponding to the corresponding path of video and the reference time; determining videos with third time differences larger than or equal to the corresponding fourth time differences in the same path of videos in the multiple paths of videos as one path or multiple paths of second videos, and determining videos with third time differences smaller than the corresponding fourth time differences in the same path of videos in the multiple paths of videos as one path or multiple paths of third videos;
The step of skipping plays the picture of each path of first video in the one path or the plurality of paths of first videos comprises the following steps:
jumping to play the next frame picture of each path of second video in the one path or the plurality of paths of second videos;
and skipping to play the multi-frame picture of each path of third video in the one or more paths of third videos, or skipping to play each path of third video in the one or more paths of third videos to the last frame picture of the multi-frame picture of the corresponding third video.
11. The method of claim 10, wherein skipping the multi-frame picture of each of the one or more third videos comprises:
taking the one or more paths of third videos as one or more paths of target videos, and jumping to play the next frame picture of each path of target videos in the one or more paths of target videos;
updating the reference picture time corresponding to the one or more paths of target videos;
determining one or more fourth videos from the one or more target videos based on the updated reference picture time corresponding to the one or more target videos, the frame rate of the one or more target videos and the reference time;
and taking the one or more paths of fourth videos as one or more paths of target videos, keeping the pictures of all paths of third videos except the one or more paths of fourth videos in the one or more paths of third videos unchanged, and returning to the step of jumping to play the next frame picture of each path of target videos in the one or more paths of target videos until the fourth video without jumping pictures is determined based on the updated reference picture time corresponding to the one or more paths of target videos, the frame rate of the one or more paths of target videos and the reference time.
12. The method of claim 10, wherein the determining one or more second videos from the multiple videos based on the multiple reference picture times, the frame rates of the multiple videos, and the base time, and after determining one or more third videos, further comprises:
determining the frame number to be played corresponding to each path of third video in one path or multiple paths of third videos based on the reference picture time, the reference time and the frame rate of the one path or multiple paths of third videos, wherein the frame number to be played is the frame number to be continuously played for the corresponding path of third video, and the frame number to be played is larger than 1;
the skipping plays multi-frame pictures of each path of third video in the one or more paths of third videos, including:
jumping to play the picture of each path of third video in the one path or the plurality of paths of third video based on the frame number to be played corresponding to each path of third video in the one path or the plurality of paths of third video;
the step of jumping playing each path of third video in one path or multiple paths of third video to the last frame of the multi-frame frames of the corresponding third video comprises the following steps:
and jumping to play each path of third video in one path or multiple paths of third videos to the last frame picture of the multi-frame picture of the corresponding third video based on the frame number to be played corresponding to each path of third video in the one path or multiple paths of third videos.
13. The method according to any one of claims 10-12, wherein the step of skipping pictures of each of the one or more first videos is performed once per detection of a trigger operation.
14. A video playing method, the method comprising:
determining a plurality of reference picture times, wherein the plurality of reference picture times are the time of the displayed last frame picture corresponding to the multi-channel video respectively;
determining one or more first videos needing to skip pictures from the multiple videos based on the multiple reference picture times, the frame rates of the multiple videos and the reference time, wherein the frame rates of the multiple videos are different;
skipping to play the pictures of each path of first video in the one path or the plurality of paths of first videos, and keeping the pictures of the videos except the one path or the plurality of paths of first videos unchanged in the plurality of paths of videos so that the time of the pictures displayed by each path of videos in the plurality of paths of videos is closest to the reference time after skipping;
the step of jumping to play the pictures of each path of first video in the one path or the plurality of paths of first video is executed once under the condition that a triggering operation is detected once;
The reference time is the time of the next frame picture needing to be played earliest in the multiple paths of videos, and the determining one or multiple paths of first videos needing to jump to a picture from the multiple paths of videos based on the multiple reference picture times, the frame rate of the multiple paths of videos and the reference time comprises the following steps:
determining a plurality of first estimated picture times based on the plurality of reference picture times and the frame rate of the multi-path video, wherein the plurality of first estimated picture times are the times of next frame pictures which are respectively required to be played by the multi-path video;
determining a plurality of pairs of first reference time differences corresponding to the multi-path video based on the plurality of reference picture times, the plurality of first estimated picture times and the reference time, wherein each pair of first reference time differences comprises a first time difference and a second time difference, the first time difference is an absolute value of a difference value between the reference picture time corresponding to a corresponding path of video and the reference time, and the second time difference is an absolute value of a difference value between the first estimated picture time corresponding to a corresponding path of video and the reference time;
and determining videos with the first time difference larger than or equal to the second time difference corresponding to the same video in the multiple paths of videos as one or multiple paths of first videos.
15. The method of claim 14, wherein the skipping the picture of each of the one or more first videos comprises:
and skipping to play the next frame picture of each path of first video in the one or more paths of first videos.
16. A video playback device, the device comprising:
the first determining module is used for determining a plurality of reference picture times, wherein the plurality of reference picture times are the times of the displayed last frame picture corresponding to the multipath videos respectively;
the second determining module is used for determining one or more paths of first videos needing to jump pictures from the multiple paths of videos based on the multiple reference picture time, the frame rate of the multiple paths of videos and the reference time, wherein the frame rates of the multiple paths of videos are different;
the skip play module is used for skipping the pictures of each path of first video in the one path or the plurality of paths of first videos, keeping the pictures of the videos except the one path or the plurality of paths of first videos unchanged, so that the time of the pictures displayed by each path of videos in the plurality of paths of videos after skip play is closest to the reference time;
the reference time is the time of one frame of picture to be played of the multi-path video; the second determining module includes:
A first determining submodule, configured to determine at least one estimated picture time corresponding to each path of video in the multiple paths of video based on the multiple reference picture times and the frame rates of the multiple paths of video, where the at least one estimated picture time includes a time of at least one frame of picture to be played in the corresponding path of video;
the second determining submodule is used for determining one or more paths of first videos from the multiple paths of videos based on at least one estimated picture time and the reference time which correspond to each path of video in the multiple paths of videos respectively;
the second determining submodule is specifically configured to determine a plurality of pairs of reference time differences corresponding to the multiple paths of videos based on at least one estimated picture time and the reference time corresponding to each path of video in the multiple paths of videos, where each pair of reference time differences includes a first difference value and a second difference value, the first difference value is an absolute value of a difference value between the first reference time and the reference time, and the second difference value is an absolute value of a difference value between the reference time and the second reference time;
the first reference time is the time of a picture which is close to the played direction and has the time closest to the reference time in the corresponding one-path video, and the second reference time is the time of a picture which is close to the to-be-played direction and has the time closest to the reference time in the corresponding one-path video;
And determining videos except for the condition that the jump condition is not met in the multiple paths of videos as one path or multiple paths of first videos, wherein the condition that the jump condition is not met means that the first difference value corresponding to the corresponding path of video is smaller than the corresponding second difference value, and the first reference time corresponding to the corresponding path of video is consistent with the corresponding reference picture time.
17. The apparatus of claim 16, wherein if the reference time is a time of a next frame of the multi-channel video that needs to be played earliest;
the jump play module includes:
the first skip play sub-module is used for skip playing the next frame picture of each path of first video in the one path or multiple paths of first video.
18. The apparatus of claim 17, wherein the first determining submodule is specifically configured to determine a plurality of first estimated picture times based on the plurality of reference picture times and frame rates of the multiple paths of video, the plurality of first estimated picture times being times of next frames of pictures that the multiple paths of video respectively need to be played;
the second determining submodule is specifically configured to determine the one or more first videos from the multiple videos based on the multiple reference picture times, the multiple first estimated picture times, and the reference time.
19. The apparatus of claim 18, wherein the second determination submodule is specifically configured to:
determining a plurality of pairs of first reference time differences corresponding to the multi-path video based on the plurality of reference picture times, the plurality of first estimated picture times and the reference time, wherein each pair of first reference time differences comprises a first time difference and a second time difference, the first time difference is an absolute value of a difference value between the reference picture time corresponding to a corresponding path of video and the reference time, and the second time difference is an absolute value of a difference value between the first estimated picture time corresponding to a corresponding path of video and the reference time;
and determining videos with the first time difference larger than or equal to the second time difference corresponding to the same video in the multiple paths of videos as one or multiple paths of first videos.
20. The apparatus of claim 16, wherein if the reference time is a time of a next frame of picture to be played at the latest in the multiple paths of videos, the one or more paths of first videos include a second video and a third video, the second video is a video to be skipped to the next frame of picture, and the third video is a video to be skipped to multiple frames of pictures;
The jump play module includes:
the second skip play sub-module is used for skip playing the next frame picture of each path of second video in one path or multiple paths of second videos;
the third skip play sub-module is used for skip playing the multi-frame picture of each path of third video in one path or multiple paths of third videos, or skip playing the last frame picture of the multi-frame picture of each path of third video in one path or multiple paths of third videos to the corresponding third video.
21. The apparatus of claim 20, wherein the third skip play sub-module is specifically configured to:
taking the one or more paths of third videos as one or more paths of target videos, and jumping to play the next frame picture of each path of target videos in the one or more paths of target videos;
updating the reference picture time corresponding to the one or more paths of target videos;
determining one or more fourth videos from the one or more target videos based on the updated reference picture time corresponding to the one or more target videos, the frame rate of the one or more target videos and the reference time;
and taking the one or more paths of fourth videos as one or more paths of target videos, keeping the pictures of all paths of third videos except the one or more paths of fourth videos in the one or more paths of third videos unchanged, and returning to the step of jumping to play the next frame picture of each path of target videos in the one or more paths of target videos until the fourth video without jumping pictures is determined based on the updated reference picture time corresponding to the one or more paths of target videos, the frame rate of the one or more paths of target videos and the reference time.
22. The apparatus of claim 20, wherein the first determining submodule is specifically configured to determine a first estimated picture time and a second estimated picture time corresponding to the multiple paths of videos respectively based on the multiple reference picture times and a frame rate of the multiple paths of videos, the first estimated picture time being a time of a next frame of picture to be played by a corresponding path of video, and the second estimated picture time being a time of a next frame of picture to be played after the corresponding path of video plays the next frame of picture;
the second determining submodule is specifically configured to determine the one or more second videos from the multiple videos based on the first estimated picture time and the second estimated picture time, which correspond to the multiple videos, respectively, and the reference time, and determine the one or more third videos.
23. The apparatus of claim 20, wherein the second determining module further comprises:
a sixth determining submodule, configured to determine a frame number to be played corresponding to each third video in the one or more third videos based on a reference picture time, the reference time and a frame rate of the one or more third videos corresponding to the one or more third videos, where the frame number to be played is a frame number required to be continuously played by the corresponding one third video, and the frame number to be played is greater than 1;
The third jump playing sub-module is specifically configured to:
jumping to play the picture of each path of third video in the one path or the plurality of paths of third video based on the frame number to be played corresponding to each path of third video in the one path or the plurality of paths of third video;
the third jump playing sub-module is specifically configured to:
and jumping to play each path of third video in one path or multiple paths of third videos to the last frame picture of the multi-frame picture of the corresponding third video based on the frame number to be played corresponding to each path of third video in the one path or multiple paths of third videos.
24. The apparatus of any of claims 16-23, wherein the step of skipping pictures of each of the one or more first videos is performed once per detection of a trigger operation.
25. A video playback device, the device comprising:
the first determining module is used for determining a plurality of reference picture times, wherein the plurality of reference picture times are the times of the displayed last frame picture corresponding to the multipath videos respectively;
the second determining module is used for determining one or more paths of first videos needing to jump pictures from the multiple paths of videos based on the multiple reference picture time, the frame rate of the multiple paths of videos and the reference time, wherein the frame rates of the multiple paths of videos are different;
The skip play module is used for skipping the pictures of each path of first video in the one path or the plurality of paths of first videos, keeping the pictures of the videos except the one path or the plurality of paths of first videos unchanged, so that the time of the pictures displayed by each path of videos in the plurality of paths of videos after skip play is closest to the reference time;
the reference time is the time of the next frame picture needing to be played at the latest in the multiple paths of videos, the one or multiple paths of first videos comprise a second video and a third video, the second video is the video needing to jump to the next frame picture, and the third video is the video needing to jump to multiple frame pictures;
the second determining module includes:
a fifth determining submodule, configured to determine a first estimated picture time and a second estimated picture time corresponding to the multiple paths of videos respectively based on the multiple reference picture times and the frame rates of the multiple paths of videos, where the first estimated picture time is a time of a next frame picture to be played by a corresponding path of video, and the second estimated picture time is a time of a frame picture to be played after the next frame picture to be played by the corresponding path of video; determining a plurality of pairs of second reference time differences corresponding to the multi-path video respectively based on the first estimated picture time and the second estimated picture time which correspond to the multi-path video respectively and the reference time, wherein each pair of second reference time differences comprises a third time difference and a fourth time difference, the third time difference is the absolute value of the difference between the first estimated picture time corresponding to the corresponding path of video and the reference time, and the fourth time difference is the absolute value of the difference between the second estimated picture time corresponding to the corresponding path of video and the reference time; determining videos with third time differences larger than or equal to the corresponding fourth time differences in the same path of videos in the multiple paths of videos as one path or multiple paths of second videos, and determining videos with third time differences smaller than the corresponding fourth time differences in the same path of videos in the multiple paths of videos as one path or multiple paths of third videos;
The jump play module includes:
the second skip play sub-module is used for skip playing the next frame picture of each path of second video in the one path or multiple paths of second video;
and the third skip play sub-module is used for skip playing the multi-frame picture of each path of third video in the one or more paths of third videos, or skip playing the last frame picture of the multi-frame picture of each path of third video in the one or more paths of third videos to the corresponding third video.
26. The apparatus of claim 25, wherein the third skip play sub-module is specifically configured to:
taking the one or more paths of third videos as one or more paths of target videos, and jumping to play the next frame picture of each path of target videos in the one or more paths of target videos;
updating the reference picture time corresponding to the one or more paths of target videos;
determining one or more fourth videos from the one or more target videos based on the updated reference picture time corresponding to the one or more target videos, the frame rate of the one or more target videos and the reference time;
and taking the one or more paths of fourth videos as one or more paths of target videos, keeping the pictures of all paths of third videos except the one or more paths of fourth videos in the one or more paths of third videos unchanged, and returning to the step of jumping to play the next frame picture of each path of target videos in the one or more paths of target videos until the fourth video without jumping pictures is determined based on the updated reference picture time corresponding to the one or more paths of target videos, the frame rate of the one or more paths of target videos and the reference time.
27. The apparatus of claim 25, wherein the second determining module further comprises:
a sixth determining submodule, configured to determine a frame number to be played corresponding to each third video in the one or more third videos based on a reference picture time, the reference time and a frame rate of the one or more third videos corresponding to the one or more third videos, where the frame number to be played is a frame number required to be continuously played by the corresponding one third video, and the frame number to be played is greater than 1;
the third jump playing sub-module is specifically configured to:
jumping to play the picture of each path of third video in the one path or the plurality of paths of third video based on the frame number to be played corresponding to each path of third video in the one path or the plurality of paths of third video;
the third jump playing sub-module is specifically configured to:
and jumping to play each path of third video in one path or multiple paths of third videos to the last frame picture of the multi-frame picture of the corresponding third video based on the frame number to be played corresponding to each path of third video in the one path or multiple paths of third videos.
28. The apparatus of any of claims 25-27, wherein the step of skipping pictures of each of the one or more first videos is performed once per detection of a trigger operation.
29. A video playback device, the device comprising:
the first determining module is used for determining a plurality of reference picture times, wherein the plurality of reference picture times are the times of the displayed last frame picture corresponding to the multipath videos respectively;
the second determining module is used for determining one or more paths of first videos needing to jump pictures from the multiple paths of videos based on the multiple reference picture time, the frame rate of the multiple paths of videos and the reference time, wherein the frame rates of the multiple paths of videos are different;
the skip play module is used for skipping the pictures of each path of first video in the one path or the plurality of paths of first videos, keeping the pictures of the videos except the one path or the plurality of paths of first videos unchanged, so that the time of the pictures displayed by each path of videos in the plurality of paths of videos after skip play is closest to the reference time;
the step of jumping to play the pictures of each path of first video in the one path or the plurality of paths of first video is executed once under the condition that a triggering operation is detected once;
the reference time is the time of the next frame of picture needing to be played earliest in the multi-path video, and the second determining module includes:
A third determining sub-module, configured to determine a plurality of first estimated picture times based on the plurality of reference picture times and the frame rates of the multiple paths of videos, where the plurality of first estimated picture times are times of next frames of pictures that need to be played by the multiple paths of videos respectively;
a fourth determining sub-module configured to determine the one or more first videos from the multiple videos based on the plurality of reference picture times, the plurality of first estimated picture times, and the base time;
wherein the fourth determination submodule is specifically configured to:
determining a plurality of pairs of first reference time differences corresponding to the multi-path video based on the plurality of reference picture times, the plurality of first estimated picture times and the reference time, wherein each pair of first reference time differences comprises a first time difference and a second time difference, the first time difference is an absolute value of a difference value between the reference picture time corresponding to a corresponding path of video and the reference time, and the second time difference is an absolute value of a difference value between the first estimated picture time corresponding to a corresponding path of video and the reference time;
and determining videos with the first time difference larger than or equal to the second time difference corresponding to the same video in the multiple paths of videos as one or multiple paths of first videos.
30. The apparatus of claim 29, wherein the skip play module comprises:
the first skip play sub-module is used for skip playing the next frame picture of each path of first video in the one path or multiple paths of first video.
31. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program which, when executed by a processor, implements the steps of the method of any of claims 1-15.
CN202110802047.XA 2021-07-15 2021-07-15 Video playing method, device and computer readable storage medium Active CN113542811B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110802047.XA CN113542811B (en) 2021-07-15 2021-07-15 Video playing method, device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110802047.XA CN113542811B (en) 2021-07-15 2021-07-15 Video playing method, device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN113542811A CN113542811A (en) 2021-10-22
CN113542811B true CN113542811B (en) 2023-05-16

Family

ID=78128157

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110802047.XA Active CN113542811B (en) 2021-07-15 2021-07-15 Video playing method, device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN113542811B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108206966A (en) * 2016-12-16 2018-06-26 杭州海康威视数字技术股份有限公司 A kind of video file synchronous broadcast method and device
CN108600814A (en) * 2018-04-08 2018-09-28 浙江大华技术股份有限公司 A kind of audio video synchronization playback method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101246916B1 (en) * 2006-04-21 2013-03-25 삼성전자주식회사 Method and apparatus for compensating of audio/video synchronization
CN104410807B (en) * 2014-11-24 2018-04-20 深圳市华宝电子科技有限公司 A kind of multi-channel video synchronized playback method and device
CN110430445B (en) * 2019-06-26 2021-12-10 深圳拙河科技有限公司 Video synchronous playing method, device, equipment and medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108206966A (en) * 2016-12-16 2018-06-26 杭州海康威视数字技术股份有限公司 A kind of video file synchronous broadcast method and device
CN108600814A (en) * 2018-04-08 2018-09-28 浙江大华技术股份有限公司 A kind of audio video synchronization playback method and device

Also Published As

Publication number Publication date
CN113542811A (en) 2021-10-22

Similar Documents

Publication Publication Date Title
WO2021008055A1 (en) Video synthesis method and apparatus, and terminal and storage medium
US20220157285A1 (en) Method for synthesizing video, terminal and storage medium
US11200022B2 (en) Method and apparatus of playing audio data
CN109348247B (en) Method and device for determining audio and video playing time stamp and storage medium
CN110022363B (en) Method, device and equipment for correcting motion state of virtual object and storage medium
CN110324689B (en) Audio and video synchronous playing method, device, terminal and storage medium
CN109688461B (en) Video playing method and device
US20220164159A1 (en) Method for playing audio, terminal and computer-readable storage medium
CN109922356B (en) Video recommendation method and device and computer-readable storage medium
WO2020249025A1 (en) Identity information determining method and apparatus, and storage medium
CN113573122B (en) Audio and video playing method and device
CN109635133B (en) Visual audio playing method and device, electronic equipment and storage medium
CN110868636B (en) Video material intercepting method and device, storage medium and terminal
CN112929654B (en) Method, device and equipment for detecting sound and picture synchronization and storage medium
CN112866584B (en) Video synthesis method, device, terminal and storage medium
CN114245218A (en) Audio and video playing method and device, computer equipment and storage medium
CN107888975B (en) Video playing method, device and storage medium
CN110868642B (en) Video playing method, device and storage medium
CN113032590A (en) Special effect display method and device, computer equipment and computer readable storage medium
CN110990623A (en) Method and device for displaying audio subtitles, computer equipment and storage medium
CN113542811B (en) Video playing method, device and computer readable storage medium
CN113141538B (en) Media resource playing method, device, terminal, server and storage medium
WO2021258608A1 (en) Bandwidth determination method and apparatus, and terminal, and storage medium
CN111464829B (en) Method, device and equipment for switching media data and storage medium
CN111369434B (en) Method, device, equipment and storage medium for generating spliced video covers

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant