CN111541927A - Video playing method and device - Google Patents
Video playing method and device Download PDFInfo
- Publication number
- CN111541927A CN111541927A CN202010386054.1A CN202010386054A CN111541927A CN 111541927 A CN111541927 A CN 111541927A CN 202010386054 A CN202010386054 A CN 202010386054A CN 111541927 A CN111541927 A CN 111541927A
- Authority
- CN
- China
- Prior art keywords
- video
- playing
- progress
- playing progress
- synchronous
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 83
- 230000001360 synchronised effect Effects 0.000 claims abstract description 79
- 230000008569 process Effects 0.000 claims abstract description 32
- 230000000007 visual effect Effects 0.000 claims abstract description 25
- 238000012545 processing Methods 0.000 claims abstract description 10
- 238000004891 communication Methods 0.000 claims description 19
- 238000004590 computer program Methods 0.000 claims description 14
- 230000000694 effects Effects 0.000 description 10
- 238000010586 diagram Methods 0.000 description 5
- 230000009471 action Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000036316 preload Effects 0.000 description 2
- 230000001960 triggered effect Effects 0.000 description 2
- 238000013500 data storage Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing 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/4302—Content synchronisation processes, e.g. decoder synchronisation
- H04N21/4307—Synchronising 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/47—End-user applications
- H04N21/472—End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
- H04N21/47217—End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for controlling playback functions for recorded or on-demand content, e.g. using progress bars, mode or play-point indicators or bookmarks
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Human Computer Interaction (AREA)
- Television Signal Processing For Recording (AREA)
Abstract
The embodiment of the invention provides a video playing method and a video playing device, wherein in the process of playing a first video, when a preset synchronous playing condition is met, the current playing progress of the first video is obtained and used as a first playing progress; determining a playing progress synchronous with the first playing progress in a second video to be synchronously played with the first video as a second playing progress; wherein the first video and the second video are: shooting the same shooting object by adopting different shooting visual angles to obtain a plurality of videos; and playing the second video from the second playing progress, based on the processing, synchronous playing of a plurality of videos obtained by shooting the same shooting object at different shooting visual angles can be realized, and a better visual experience is provided for a user to simultaneously present video pictures of a plurality of different shooting visual angles of the same shooting object.
Description
Technical Field
The present invention relates to the field of video processing technologies, and in particular, to a video playing method and apparatus.
Background
With the rapid development of internet technology, users can watch various video resources through a network. In order to provide better viewing experience for a user, for a scene, the scene can be shot from different shooting angles, videos of the scene under a plurality of different shooting angles are obtained, and then the user can simultaneously view the videos of the scene under a plurality of different shooting angles.
For example, a plurality of cameras can be used for shooting a performance stage, one camera can be used for shooting the panorama of the whole performance stage, one camera can be used for shooting the close-up of the actors in the performance stage, and then the video of the panorama of the whole performance stage and the video of the close-up of the actors can be obtained.
However, in the related art, no corresponding method is provided for realizing the synchronous playing of the multiple videos.
Disclosure of Invention
The embodiment of the invention aims to provide a video playing method and a video playing device, so that synchronous playing of a plurality of videos obtained by shooting the same shooting object at different shooting visual angles is realized, and a better visual experience is provided for a user to simultaneously present video pictures of a plurality of different shooting visual angles of the same shooting object. The specific technical scheme is as follows:
in a first aspect of the present invention, there is provided a video playing method, where the method includes:
in the process of playing a first video, when a preset synchronous playing condition is met, acquiring the current playing progress of the first video as a first playing progress;
determining a playing progress synchronous with the first playing progress in a second video to be synchronously played with the first video as a second playing progress; wherein the first video and the second video are: shooting the same shooting object by adopting different shooting visual angles to obtain a plurality of videos;
and starting to play the second video from the second playing progress.
Optionally, the preset synchronous playing condition includes at least one of the following conditions:
receiving a video synchronous playing instruction; the video synchronous playing instruction is used for indicating that the first video and the second video are played synchronously;
detecting the playing progress of the first video corresponding to the second video;
detecting the first video fast-forward playing;
and detecting the fast-backward playing of the first video.
Optionally, the determining, as a second playing progress, a playing progress synchronized with the first playing progress in a second video to be played synchronously with the first video includes:
determining a target video segment corresponding to the second video in the first video;
and calculating the difference between the first playing progress and the playing progress corresponding to the starting time of the target video segment in the first video, and taking the difference as a second playing progress.
Optionally, the method further includes:
in the process of simultaneously playing the first video and the second video, when the first video is detected to be paused, pausing the playing of the second video; and/or the presence of a gas in the gas,
and when the first video is detected to be resumed to be played, resuming to play the second video.
Optionally, the method further includes:
in the process of simultaneously playing the first video and the second video, when a preset adjustment playing condition is met, acquiring the current playing progress of the first video as a third playing progress and the current playing progress of the second video as a fourth playing progress;
judging whether the first video and the second video meet the preset synchronous playing requirement currently or not based on the third playing progress and the fourth playing progress;
if not, determining the playing progress synchronous with the third playing progress in the second video as a fifth playing progress;
and starting to play the second video from the fifth playing progress.
Optionally, the preset adjustment playing condition includes at least one of the following:
detecting that the first video is recovered to a normal playing state from a pause playing state;
detecting that the second video is recovered to a normal playing state from a pause playing state;
and detecting that the second video resumes playing.
Optionally, before the playing the second video from the second playing progress, the method further includes:
the video data of the second video is loaded from the server in advance and cached;
the playing the second video starting from the second playing progress comprises:
playing the second video based on target video data in the cached video data of the second video; wherein the target video data comprises: and the video data corresponds to the second playing progress and the video data corresponds to the playing progress behind the second playing progress.
Optionally, at least one key video frame exists in a plurality of video frames corresponding to each preset duration in the first video and the second video.
Optionally, the method is applied to a terminal, where the terminal includes a first player and a second player, the first player is used to process or play the first video, and the second player is used to process or play the second video.
In a second aspect of the present invention, there is also provided a video playback apparatus, including:
the device comprises an acquisition module, a synchronization module and a synchronization module, wherein the acquisition module is used for acquiring the current playing progress of a first video as a first playing progress when a preset synchronous playing condition is met in the process of playing the first video;
the determining module is used for determining the playing progress synchronous with the first playing progress in a second video to be synchronously played with the first video to be used as a second playing progress; wherein the first video and the second video are: shooting the same shooting object by adopting different shooting visual angles to obtain a plurality of videos;
and the playing module is used for starting to play the second video from the second playing progress.
Optionally, the preset synchronous playing condition includes at least one of the following conditions:
receiving a video synchronous playing instruction; the video synchronous playing instruction is used for indicating that the first video and the second video are played synchronously;
detecting the playing progress of the first video corresponding to the second video;
detecting the first video fast-forward playing;
and detecting the fast-backward playing of the first video.
Optionally, the determining module is specifically configured to determine, in the first video, a target video segment corresponding to the second video;
and calculating the difference between the first playing progress and the playing progress corresponding to the starting time of the target video segment in the first video, and taking the difference as a second playing progress.
Optionally, the apparatus further comprises:
the synchronization module is used for pausing the playing of the second video when the first video is detected to be paused in the process of simultaneously playing the first video and the second video; and/or the presence of a gas in the gas,
and when the first video is detected to be resumed to be played, resuming to play the second video.
Optionally, the apparatus further comprises:
the adjusting module is used for acquiring the current playing progress of the first video as a third playing progress and the current playing progress of the second video as a fourth playing progress when a preset adjusting playing condition is met in the process of simultaneously playing the first video and the second video;
judging whether the first video and the second video meet the preset synchronous playing requirement currently or not based on the third playing progress and the fourth playing progress;
if not, determining the playing progress synchronous with the third playing progress in the second video as a fifth playing progress;
and starting to play the second video from the fifth playing progress.
Optionally, the preset adjustment playing condition includes at least one of the following:
detecting that the first video is recovered to a normal playing state from a pause playing state;
detecting that the second video is recovered to a normal playing state from a pause playing state;
and detecting that the second video resumes playing.
Optionally, the apparatus further comprises:
the storage module is used for preloading the video data of the second video from a server and caching the video data;
the playing module is specifically configured to play the second video based on target video data in the cached video data of the second video; wherein the target video data comprises: and the video data corresponds to the second playing progress and the video data corresponds to the playing progress behind the second playing progress.
Optionally, at least one key video frame exists in a plurality of video frames corresponding to each preset duration in the first video and the second video.
Optionally, the apparatus is applied to a terminal, where the terminal includes a first player and a second player, the first player is configured to process or play the first video, and the second player is configured to process or play the second video.
In another aspect of the present invention, there is also provided an electronic device, including 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;
a memory for storing a computer program;
and the processor is used for realizing any video playing method when executing the program stored in the memory.
In yet another aspect of the present invention, there is also provided a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements any of the video playing methods described above.
In yet another aspect of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform any of the video playback methods described above.
In the video playing method provided by the embodiment of the invention, in the process of playing the first video, when a preset synchronous playing condition is met, the current playing progress of the first video is obtained and is taken as the first playing progress; determining a playing progress synchronous with the first playing progress in a second video to be synchronously played with the first video as a second playing progress; wherein the first video and the second video are: shooting the same shooting object by adopting different shooting visual angles to obtain a plurality of videos; and playing the second video from the second playing progress, based on the processing, synchronous playing of a plurality of videos obtained by shooting the same shooting object at different shooting visual angles can be realized, and a better visual experience is provided for a user to simultaneously present video pictures of a plurality of different shooting visual angles of the same shooting object.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
Fig. 1 is a flowchart of a video playing method provided in an embodiment of the present invention;
fig. 2 is another flowchart of a video playing method provided in an embodiment of the present invention;
fig. 3 is another flowchart of a video playing method provided in the embodiment of the present invention;
fig. 4 is another flowchart of a video playing method provided in the embodiment of the present invention;
fig. 5 is a block diagram of a video playing system according to an embodiment of the present invention;
fig. 6 is a structural diagram of a video playback device according to an embodiment of the present invention;
fig. 7 is a structural diagram of an electronic device provided in an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention.
An embodiment of the present invention provides a video playing method, which may be applied to an electronic device, where the electronic device is used to play a video, and the electronic device may be an intelligent device such as a mobile phone and a tablet computer, and referring to fig. 1, the method may include the following steps:
s101: in the process of playing the first video, when a preset synchronous playing condition is met, the current playing progress of the first video is obtained and used as the first playing progress.
S102: and determining the playing progress synchronous with the first playing progress in a second video to be synchronously played with the first video as a second playing progress.
Wherein the first video and the second video are: and shooting a plurality of videos obtained by shooting the same shooting object by adopting different shooting visual angles.
S103: and starting to play the second video from the second playing progress.
Therefore, the video playing method provided by the embodiment of the invention can realize synchronous playing of a plurality of videos obtained by shooting the same shooting object at different shooting visual angles, and provides better visual experience for a user to simultaneously present video pictures of the same shooting object at the different shooting visual angles.
In step S101, the preset synchronization playing condition may indicate that another video (i.e., the second video in the embodiment of the present invention) to be synchronized with the first video needs to be played currently.
It should be noted that the first video and the second video may be: and shooting a plurality of videos obtained by shooting the same shooting object by adopting different shooting visual angles.
In different shooting scenes, the shooting subjects may be different.
For example, for a shooting scene of a stage performance, the shooting subjects of the first video and the second video may be a performance stage, and then the shooting perspective of the first video may be a panorama of the performance stage, and the shooting perspective of the second video may be a close-up of an actor in the performance stage.
Alternatively, the shooting subjects of the first video and the second video may be actors a in the performance stage, the shooting perspective of the first video may be full-body pictures of the actors a, and the shooting perspective of the second video may be close-ups of the faces of the actors a.
For another example, for a shooting scene of video teaching, the shooting objects of the first video and the second video may be a platform, the shooting angle of the first video may be a panorama of the platform, and the shooting angle of the second video may be a close-up of a teacher in the platform.
It should be noted that the time lengths of the first video and the second video may be the same or different.
For example, if the first video is a video of a 1-hour stage show and the video frame of the first video is a panorama of the entire performance stage in which actor a appears for 1 hour, the second video may be a video of a 1-hour stage show and the video frame of the second video is a close-up of actor a.
Alternatively, the first video is a 1 hour video of a stage show and the video frame of the first video is a panorama of the entire performance stage in which actor B appears for 20 minutes, the second video may be a 20 minute video of the stage show and the video frame of the second video is a close-up of actor B.
The playing progress of the video may be represented by a currently played time length of the video, for example, if the time length of the first video is 1 hour and the video is currently played for 20 minutes, the first playing progress may represent the 20 th minute.
In one embodiment, the preset synchronized playing condition may include at least one of the following:
receiving a video synchronous playing instruction; the video synchronous playing instruction is used for indicating that a first video and a second video are played synchronously;
detecting the playing progress corresponding to the first video playing to the second video;
detecting a first video fast forward playing;
and detecting the fast-backward playing of the first video.
In the embodiment of the present invention, the electronic device may be provided with two different play modes, including: a synchronized play mode and an unsynchronized play mode. The user can select different playing modes through the electronic equipment to play the video.
For example, a "mode switching" button may be provided in an interface of the electronic device, and when the user clicks the button, the electronic device may switch the play mode.
Or, when the user horizontally puts the electronic device, the electronic device may automatically switch to the synchronous play mode, and when the user vertically puts the electronic device, the electronic device may automatically switch to the asynchronous play mode.
Accordingly, the video synchronous playing instruction may be triggered by the user clicking a "mode switching" button, or may be triggered by the user when the electronic device is laid horizontally.
In another mode, when the first video is played to the playing progress corresponding to the second video, the preset synchronous playing condition is also met, and at this time, the first video and the second video can be synchronously played.
For example, the first video is a video of a 1-hour stage show, and the video frames of the first video are panoramas of the entire performance stage in which actor B appears for 20 minutes, the second video may be a video of a 20-minute stage show, and the video frames of the second video are close-ups of actor B, which appears at times corresponding to 20-40 minutes of the first video, that is, actor B appears at 20-40 minutes of the first video.
Correspondingly, when the first video is played to the playing progress (namely, 20 th minute) corresponding to the second video, it is determined that the preset synchronous playing condition is met, and the first video and the second video can be synchronously played.
In another mode, in the process of playing the first video, if the user selects to fast forward or fast rewind to play the first video, the user may fast forward to the playing progress corresponding to the second video, or fast rewind to the playing progress corresponding to the second video, so that it may be determined that the preset synchronous playing condition is met.
With respect to step S102, in one embodiment, if the duration of the second video is the same as the duration of the first video, the first playing progress may be directly determined as the second playing progress.
In one embodiment, referring to fig. 2, S102 may include:
s1021: in the first video, a target video segment corresponding to the second video is determined.
S1022: and calculating the difference between the first playing progress and the corresponding playing progress of the starting time of the target video segment in the first video to be used as a second playing progress.
The target video segment in the first video corresponding to the second video represents a video segment in the first video that needs to be played synchronously with the second video, and it can be understood that if the duration of the second video is the same as that of the first video, the target video segment in the first video corresponding to the second video represents the whole first video. The duration of the target video segment is the same as the duration of the second video.
For example, if the first video is a video of a 1-hour stage show and the video frame of the first video is a panorama of the entire performance stage in which actor a appears for 1 hour, the second video may be a video of a 1-hour stage show and the video frame of the second video is a close-up of actor a. At this time, the target video segment is the first video, and the start time of the target video segment is the start time of the first video. The corresponding playing progress of the starting time of the target video segment in the first video is 0 minute.
When the preset synchronous playing condition is determined to be met, if the current first video is played to the 30 th minute, namely the first playing progress is the 30 th minute. The difference between the first playing progress and the corresponding playing progress of the starting time of the target video segment in the first video is 30 minutes, and further, the second playing progress can be determined to be 30 minutes, and the second video can be played from 30 minutes.
As another example, the first video is a 1-hour video of a stage performance, and the video frames of the first video are panoramas of the entire performance stage in which actor B appears for 20 minutes, the second video may be a 20-minute video of the stage performance, and the video frames of the second video are close-ups of actor B, which appears at times corresponding to 20-40 minutes of the first video, that is, actor B appears at 20-40 minutes of the first video. At this time, the target video segment corresponding to the second video is the video segment from the 20 th minute to the 40 th minute in the first video, and the starting time of the target video segment is the 20 th minute, and the playing progress of the starting time of the target video segment in the first video is the 20 th minute.
When the preset synchronous playing condition is determined to be met, if the current first video is played to the 30 th minute, namely the first playing progress is the 30 th minute. The difference between the first playing progress and the corresponding playing progress of the starting time of the target video segment in the first video is 10 minutes, and further, the second playing progress can be determined to be 10 minutes, and the second video can be played from 10 minutes.
In one embodiment, to further improve the playing effect of the synchronized playing of the first video and the second video, the method may further include the following steps:
in the process of simultaneously playing the first video and the second video, when the first video is detected to be paused, pausing the playing of the second video; and/or resuming playing the second video when resuming playing of the first video is detected.
Wherein resuming the playback means switching from the paused playback to the normal playback.
In the embodiment of the present invention, since the second video needs to be played synchronously with the first video, when the user selects to pause playing the first video, the electronic device may pause playing the second video, and when the user selects to resume playing the first video, the electronic device may resume playing the second video, so as to keep playing the second video and the first video synchronously.
In an embodiment, in order to further improve the playing effect of the synchronized playing of the first video and the second video, on the basis of fig. 1, referring to fig. 3, the method may further include the following steps:
s104: in the process of simultaneously playing the first video and the second video, when a preset adjustment playing condition is met, the current playing progress of the first video is obtained and used as a third playing progress, and the current playing progress of the second video is used as a fourth playing progress.
S105: judging whether the first video and the second video meet the preset synchronous playing requirement or not based on the third playing progress and the fourth playing progress; if not, determining the playing progress synchronous with the third playing progress in the second video as a fifth playing progress; and starting to play the second video from the fifth playing progress.
If the preset synchronous playing requirement is not met, the synchronous playing effect between the second video and the first video is poor, and the playing progress of the second video needs to be adjusted.
In the embodiment of the invention, in the process of synchronously playing the first video and the second video, the influence of a network and the operation of a user can cause that the second video and the first video cannot achieve a better synchronous playing effect, and at the moment, the playing progress of the second video can be adjusted, so that the second video and the first video can achieve a better synchronous playing effect.
In one implementation, it may be determined whether a difference between the third playing progress and the fourth playing progress falls within a preset range, and if not, it indicates that the preset synchronous playing requirement is not satisfied, and the synchronous playing effect between the second video and the first video is poor, so that the playing progress of the second video needs to be adjusted. The preset range can be determined according to the playing progress corresponding to the playing from the first video to the second video.
For example, the first video is a video of a 1-hour stage show, and the video frames of the first video are panoramas of the entire performance stage in which actor B appears for 20 minutes, the second video may be a video of a 20-minute stage show, and the video frames of the second video are close-ups of actor B, which appears at times corresponding to 20-40 minutes of the first video, that is, actor B appears at 20-40 minutes of the first video.
If the playing progress from the playing of the first video to the playing of the second video is 20 minutes, the preset range may be 19 minutes, 57 seconds to 20 minutes, 3 seconds, and the third playing progress is 32 minutes, 30 seconds.
If the current fourth playing progress is 12 minutes and 35 seconds, the difference value between the third playing progress and the fourth playing progress is 19 minutes and 55 seconds, and the current fourth playing progress does not belong to the preset range, and the preset synchronous playing requirement is determined not to be met; if the current fourth playing progress is 12 minutes and 25 seconds, the difference value between the third playing progress and the fourth playing progress is 20 minutes and 5 seconds, and the current fourth playing progress does not belong to the preset range, determining that the preset synchronous playing requirement is not met; and if the current fourth playing progress is 12 minutes and 28 seconds, the difference value between the third playing progress and the fourth playing progress is 20 minutes and 2 seconds, and the current fourth playing progress belongs to the preset range, and the preset synchronous playing requirement is determined to be met.
The method for determining a fifth playing progress synchronized with the third playing progress in the second video and starting to play the second video from the fifth playing progress may refer to the detailed description of determining a second playing progress synchronized with the first playing progress and starting to play the second video from the second playing progress in the foregoing embodiments.
In addition, if the first video and the second video currently meet the preset synchronous playing requirement, the playing progress of the second video may not be adjusted.
In one embodiment, the preset adjustment playing condition may include at least one of the following:
detecting that the first video is recovered to a normal playing state from a pause playing state;
detecting that the second video is recovered to a normal playing state from the pause playing state;
and detecting that the second video resumes playing.
In the embodiment of the present invention, due to a network reason, a pause may occur when the first video is played, and after the first video is restored from the pause playing state to the normal playing state, the second video may be out of synchronization with the first video.
In addition, a pause may occur during playing the second video, and after the second video is restored from the pause playing state to the normal playing state, the second video may be out of synchronization with the first video.
In addition, when the first video resumes playing, the second video may resume playing synchronously, however, due to the different time consumption for loading the video, when the second video resumes playing, the second video may be out of synchronization with the first video.
Therefore, when any one of the above conditions is detected, it can be determined that the preset adjustment playing condition is met, and then, it can be determined whether the first video and the second video currently meet the preset synchronous playing requirement, so as to perform corresponding processing.
In an embodiment, in order to increase the loading speed of the second video and further increase the effect of playing the second video in synchronization with the first video, referring to fig. 4, before S103, the method may further include the following steps:
s106: and the video data of the second video is preloaded from the server and cached.
Accordingly, step S103 may include the steps of:
s1031: and playing the second video based on the target video data in the video data of the cached second video.
Wherein the target video data includes: and the video data corresponds to the second playing progress and the video data which is positioned behind the second playing progress and corresponds to the playing progress.
In the embodiment of the present invention, before playing the second video, the electronic device may load the video data of the second video from the server in advance and cache the video data.
In one implementation, the electronic device may cache the video data of the second video locally, or the electronic device may also cache the video data of the second video in a storage device located in the same local area network as the electronic device, where the storage device may be a server. The manner in which the electronic device caches the video data of the second video is not limited to the above manner.
Furthermore, when the second video needs to be played at the second playing progress, the electronic device may acquire the video data of the cached second video, and start playing from the video data corresponding to the second playing progress, so that the loading speed of the video data may be increased, and the effect of playing the second video and the first video synchronously may be improved, compared with the case of acquiring the video data of the second video from the server in real time.
In one embodiment, in order to further improve the effect of the synchronous playing of the second video and the first video, at least one key video frame exists in a plurality of video frames corresponding to each preset time length in the first video and the second video.
The preset time period may be 1 second, or may also be 2 seconds, but is not limited thereto.
In the embodiment of the present invention, because the key video frames carry relevant information required by the electronic device to play the video, for example, when the user selects to fast forward play the 11 th, 10 th video, if there is no key video frame in the multiple videos corresponding to the 11 th, 10 th, second, the electronic device cannot start playing from the 11 th, 10 th, second, and will start playing from the adjacent time containing the key video frames, for example, there is a key video frame in the multiple video frames corresponding to the 11 th, 13 th, second, and correspondingly, the electronic device may start playing from the 11 th, 13 th, second, and further, there is a certain error in the video playing.
Therefore, in order to reduce the error of video playing, when the first video and the second video are generated, at least one key video frame in a plurality of video frames corresponding to every 1 second can be set in the first video and the second video, and further, the electronic device can accurately play the video from the corresponding time, so that the effect of synchronously playing the second video and the first video is improved.
In one embodiment, the method may be applied to a terminal, which may include a first player for processing or playing a first video and a second player for processing or playing a second video.
In the embodiment of the invention, the terminal can be an application program installed in a mobile phone or a tablet computer, the application program can run the first player and the second player in different threads, and then a user can watch the first video and the second video in the display interface of the application program simultaneously.
Processing the video may include: the method comprises the following steps of obtaining video data of a video, decompressing the video data, decoding the video data, caching the video data and the like.
The first player may acquire video data of the first video from the server and play the first video based on the acquired video data.
The second player may acquire video data of the second video from the server and play the second video based on the acquired video data; or, the second player may pre-load the video data of the second video from the server and cache the video data, and subsequently, when synchronous playing is required, the second player may play the second video based on the cached video data of the second video.
Specifically, referring to fig. 5, fig. 5 is a block diagram of a video playing system according to an embodiment of the present invention.
The kernel player is used for providing bottom support for playing the video.
On the basis of the kernel player, the first player can process the video data of the first video and play the first video based on the video data of the first video, the second player can pre-load the video data of the second video and cache the video data, when synchronous playing is needed, the second player can play the second video based on the cached video data of the second video, and in addition, the first player and the second player can also support fast forward playing, fast backward playing, pause playing, resuming playing, adjusting the size of a playing interface, adjusting the style of the playing interface and other functions.
In one implementation manner, when the first video and the second video are played synchronously, the first player may play the first video in a first playing area in a display interface of the terminal, and the second player may play the second video in a second playing area in the display interface, where the first playing area is different from the second playing area. In addition, the first playing area and the second playing area may have overlapping playing areas, or may be adjacent and non-overlapping playing areas.
The interactive module can acquire the playing condition of the first player playing the first video and the playing condition of the second player playing the second video, and further, based on the method provided by the embodiment of the invention, the synchronous playing of the second video and the first video is realized.
Based on the same inventive concept, an embodiment of the present invention further provides a video playing apparatus, referring to fig. 6, where fig. 6 is a structural diagram of the video playing apparatus provided in the embodiment of the present invention, and the apparatus may include:
an obtaining module 601, configured to obtain a current playing progress of a first video as a first playing progress when a preset synchronous playing condition is met in a process of playing the first video;
a determining module 602, configured to determine, in a second video to be played synchronously with the first video, a playing progress synchronous with the first playing progress as a second playing progress; wherein the first video and the second video are: shooting the same shooting object by adopting different shooting visual angles to obtain a plurality of videos;
a playing module 603, configured to start playing the second video from the second playing progress.
Optionally, the preset synchronous playing condition includes at least one of the following conditions:
receiving a video synchronous playing instruction; the video synchronous playing instruction is used for indicating that the first video and the second video are played synchronously;
detecting the playing progress of the first video corresponding to the second video;
detecting the first video fast-forward playing;
and detecting the fast-backward playing of the first video.
Optionally, the determining module 602 is specifically configured to determine, in the first video, a target video segment corresponding to the second video;
and calculating the difference between the first playing progress and the playing progress corresponding to the starting time of the target video segment in the first video, and taking the difference as a second playing progress.
Optionally, the apparatus further comprises:
the synchronization module is used for pausing the playing of the second video when the first video is detected to be paused in the process of simultaneously playing the first video and the second video; and/or the presence of a gas in the gas,
and when the first video is detected to be resumed to be played, resuming to play the second video.
Optionally, the apparatus further comprises:
the adjusting module is used for acquiring the current playing progress of the first video as a third playing progress and the current playing progress of the second video as a fourth playing progress when a preset adjusting playing condition is met in the process of simultaneously playing the first video and the second video;
judging whether the first video and the second video meet the preset synchronous playing requirement currently or not based on the third playing progress and the fourth playing progress;
if not, determining the playing progress synchronous with the third playing progress in the second video as a fifth playing progress;
and starting to play the second video from the fifth playing progress.
Optionally, the preset adjustment playing condition includes at least one of the following:
detecting that the first video is recovered to a normal playing state from a pause playing state;
detecting that the second video is recovered to a normal playing state from a pause playing state;
and detecting that the second video resumes playing.
Optionally, the apparatus further comprises:
the storage module is used for preloading the video data of the second video from a server and caching the video data;
the playing module 603 is specifically configured to play the second video based on target video data in the cached video data of the second video; wherein the target video data comprises: and the video data corresponds to the second playing progress and the video data corresponds to the playing progress behind the second playing progress.
Optionally, at least one key video frame exists in a plurality of video frames corresponding to each preset duration in the first video and the second video.
Optionally, the apparatus is applied to a terminal, where the terminal includes a first player and a second player, the first player is configured to process or play the first video, and the second player is configured to process or play the second video.
Therefore, the video playing device provided by the embodiment of the invention can realize synchronous playing of a plurality of videos obtained by shooting the same shooting object at different shooting visual angles, and provides better visual experience for a user to simultaneously present video pictures of the same shooting object at the different shooting visual angles.
An embodiment of the present invention further provides an electronic device, as shown in fig. 7, including a processor 701, a communication interface 702, a memory 703 and a communication bus 704, where the processor 701, the communication interface 702, and the memory 703 complete mutual communication through the communication bus 704,
a memory 703 for storing a computer program;
the processor 701 is configured to implement the following steps when executing the program stored in the memory 703:
in the process of playing a first video, when a preset synchronous playing condition is met, acquiring the current playing progress of the first video as a first playing progress;
determining a playing progress synchronous with the first playing progress in a second video to be synchronously played with the first video as a second playing progress; wherein the first video and the second video are: shooting the same shooting object by adopting different shooting visual angles to obtain a plurality of videos;
and starting to play the second video from the second playing progress.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In another embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the video playing method in any of the above embodiments.
In yet another embodiment of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the video playback method of any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized 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. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus, the electronic device, the computer-readable storage medium, and the computer program product embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.
Claims (12)
1. A video playback method, the method comprising:
in the process of playing a first video, when a preset synchronous playing condition is met, acquiring the current playing progress of the first video as a first playing progress;
determining a playing progress synchronous with the first playing progress in a second video to be synchronously played with the first video as a second playing progress; wherein the first video and the second video are: shooting the same shooting object by adopting different shooting visual angles to obtain a plurality of videos;
and starting to play the second video from the second playing progress.
2. The method according to claim 1, wherein the preset synchronized playing condition comprises at least one of the following:
receiving a video synchronous playing instruction; the video synchronous playing instruction is used for indicating that the first video and the second video are played synchronously;
detecting the playing progress of the first video corresponding to the second video;
detecting the first video fast-forward playing;
and detecting the fast-backward playing of the first video.
3. The method according to claim 1, wherein the determining, as the second play progress, the play progress synchronized with the first play progress in the second video to be played synchronously with the first video, comprises:
determining a target video segment corresponding to the second video in the first video;
and calculating the difference between the first playing progress and the playing progress corresponding to the starting time of the target video segment in the first video, and taking the difference as a second playing progress.
4. The method of claim 1, further comprising:
in the process of simultaneously playing the first video and the second video, when the first video is detected to be paused, pausing the playing of the second video; and/or the presence of a gas in the gas,
and when the first video is detected to be resumed to be played, resuming to play the second video.
5. The method of claim 1, further comprising:
in the process of simultaneously playing the first video and the second video, when a preset adjustment playing condition is met, acquiring the current playing progress of the first video as a third playing progress and the current playing progress of the second video as a fourth playing progress;
judging whether the first video and the second video meet the preset synchronous playing requirement currently or not based on the third playing progress and the fourth playing progress;
if not, determining the playing progress synchronous with the third playing progress in the second video as a fifth playing progress;
and starting to play the second video from the fifth playing progress.
6. The method according to claim 5, wherein the preset adjustment playing condition comprises at least one of the following:
detecting that the first video is recovered to a normal playing state from a pause playing state;
detecting that the second video is recovered to a normal playing state from a pause playing state;
and detecting that the second video resumes playing.
7. The method of claim 1, wherein prior to the playing the second video from the second playback progress, the method further comprises:
the video data of the second video is loaded from the server in advance and cached;
the playing the second video starting from the second playing progress comprises:
playing the second video based on target video data in the cached video data of the second video; wherein the target video data comprises: and the video data corresponds to the second playing progress and the video data corresponds to the playing progress behind the second playing progress.
8. The method of claim 1, wherein at least one key video frame exists in the plurality of video frames corresponding to each preset duration in the first video and the second video.
9. The method according to any one of claims 1 to 8, wherein the method is applied to a terminal, and the terminal comprises a first player and a second player, wherein the first player is used for processing or playing the first video, and the second player is used for processing or playing the second video.
10. A video playback apparatus, comprising:
the device comprises an acquisition module, a synchronization module and a synchronization module, wherein the acquisition module is used for acquiring the current playing progress of a first video as a first playing progress when a preset synchronous playing condition is met in the process of playing the first video;
the determining module is used for determining the playing progress synchronous with the first playing progress in a second video to be synchronously played with the first video to be used as a second playing progress; wherein the first video and the second video are: shooting the same shooting object by adopting different shooting visual angles to obtain a plurality of videos;
and the playing module is used for starting to play the second video from the second playing progress.
11. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1-9 when executing a program stored in the memory.
12. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of the claims 1-9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010386054.1A CN111541927A (en) | 2020-05-09 | 2020-05-09 | Video playing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010386054.1A CN111541927A (en) | 2020-05-09 | 2020-05-09 | Video playing method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111541927A true CN111541927A (en) | 2020-08-14 |
Family
ID=71979209
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010386054.1A Pending CN111541927A (en) | 2020-05-09 | 2020-05-09 | Video playing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111541927A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112995743A (en) * | 2021-02-03 | 2021-06-18 | 上海哔哩哔哩科技有限公司 | Video playing method and device |
CN115314750A (en) * | 2022-08-10 | 2022-11-08 | 润博全景文旅科技有限公司 | Video playing method, device and equipment |
CN115396720A (en) * | 2022-07-21 | 2022-11-25 | 贝壳找房(北京)科技有限公司 | Video fusion method based on video control, electronic equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101490738A (en) * | 2006-08-02 | 2009-07-22 | 松下电器产业株式会社 | Video image display device and video image display method |
CN107846623A (en) * | 2017-10-31 | 2018-03-27 | 广东中星电子有限公司 | A kind of video interlink method and system |
CN109547831A (en) * | 2018-11-19 | 2019-03-29 | 网宿科技股份有限公司 | A kind of method, apparatus, calculating equipment and the storage medium of blank and audio video synchronization |
CN110719529A (en) * | 2019-10-24 | 2020-01-21 | 北京文渊佳科技有限公司 | Multi-channel video synchronization method, device, storage medium and terminal |
CN110996157A (en) * | 2019-12-20 | 2020-04-10 | 上海众源网络有限公司 | Video playing method and device, electronic equipment and machine-readable storage medium |
-
2020
- 2020-05-09 CN CN202010386054.1A patent/CN111541927A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101490738A (en) * | 2006-08-02 | 2009-07-22 | 松下电器产业株式会社 | Video image display device and video image display method |
CN107846623A (en) * | 2017-10-31 | 2018-03-27 | 广东中星电子有限公司 | A kind of video interlink method and system |
CN109547831A (en) * | 2018-11-19 | 2019-03-29 | 网宿科技股份有限公司 | A kind of method, apparatus, calculating equipment and the storage medium of blank and audio video synchronization |
CN110719529A (en) * | 2019-10-24 | 2020-01-21 | 北京文渊佳科技有限公司 | Multi-channel video synchronization method, device, storage medium and terminal |
CN110996157A (en) * | 2019-12-20 | 2020-04-10 | 上海众源网络有限公司 | Video playing method and device, electronic equipment and machine-readable storage medium |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112995743A (en) * | 2021-02-03 | 2021-06-18 | 上海哔哩哔哩科技有限公司 | Video playing method and device |
CN115396720A (en) * | 2022-07-21 | 2022-11-25 | 贝壳找房(北京)科技有限公司 | Video fusion method based on video control, electronic equipment and storage medium |
CN115396720B (en) * | 2022-07-21 | 2023-11-14 | 贝壳找房(北京)科技有限公司 | Video fusion method based on video control, electronic equipment and storage medium |
CN115314750A (en) * | 2022-08-10 | 2022-11-08 | 润博全景文旅科技有限公司 | Video playing method, device and equipment |
CN115314750B (en) * | 2022-08-10 | 2023-09-29 | 润博全景文旅科技有限公司 | Video playing method, device and equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9077956B1 (en) | Scene identification | |
US10075758B2 (en) | Synchronizing an augmented reality video stream with a displayed video stream | |
US9253533B1 (en) | Scene identification | |
CN111436005B (en) | Method and apparatus for displaying image | |
CN111787415B (en) | Video interaction method and device, electronic equipment and storage medium | |
WO2017107441A1 (en) | Method and device for capturing continuous video pictures | |
CN108495185B (en) | Video title generation method and device | |
CN104967803A (en) | A video recording method and device | |
CN108966016B (en) | Video clip rebroadcasting method and device and terminal equipment | |
CN111541927A (en) | Video playing method and device | |
WO2021213191A1 (en) | Video processing method, terminal, and computer readable storage medium | |
CN103873914A (en) | Audience life image shooting method, device and multimedia equipment | |
CN110996157A (en) | Video playing method and device, electronic equipment and machine-readable storage medium | |
US20240121349A1 (en) | Video shooting method and apparatus, electronic device and storage medium | |
CN112929728A (en) | Video rendering method, device and system, electronic equipment and storage medium | |
CN108616769B (en) | Video-on-demand method and device | |
US20170249971A1 (en) | Method for generating image in which sound source is inserted and apparatus therefor | |
CN108882004B (en) | Video recording method, device, equipment and storage medium | |
CN117793478A (en) | Method, apparatus, device, medium, and program product for generating explanation information | |
JPWO2015178234A1 (en) | Image search system, search screen display method | |
CN115174812B (en) | Video generation method, video generation device and electronic equipment | |
CN114528433B (en) | Template selection method and device, electronic equipment and storage medium | |
US20230319346A1 (en) | Systems and methods for automatically generating content items from identified events | |
CN113727167B (en) | Video resource playing method, device, equipment and readable storage medium | |
CN116095365A (en) | Special effect processing method, device, electronic equipment and storage medium |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200814 |