CN113382267A - Visual angle switching method and device, terminal and storage medium - Google Patents

Visual angle switching method and device, terminal and storage medium Download PDF

Info

Publication number
CN113382267A
CN113382267A CN202110506722.4A CN202110506722A CN113382267A CN 113382267 A CN113382267 A CN 113382267A CN 202110506722 A CN202110506722 A CN 202110506722A CN 113382267 A CN113382267 A CN 113382267A
Authority
CN
China
Prior art keywords
key frame
frame image
view
switching
video
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.)
Granted
Application number
CN202110506722.4A
Other languages
Chinese (zh)
Other versions
CN113382267B (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.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and 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 Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN202110506722.4A priority Critical patent/CN113382267B/en
Publication of CN113382267A publication Critical patent/CN113382267A/en
Application granted granted Critical
Publication of CN113382267B publication Critical patent/CN113382267B/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/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/21805Source of audio or video content, e.g. local disk arrays enabling multiple viewpoints, e.g. using a plurality of cameras
    • 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/232Content retrieval operation locally within server, e.g. reading video streams from disk arrays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/65Transmission of management data between client and server
    • H04N21/658Transmission by the client directed to the server
    • H04N21/6587Control parameters, e.g. trick play commands, viewpoint selection

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The embodiment of the invention provides a visual angle switching method, a visual angle switching device, a terminal and a storage medium, wherein the method comprises the following steps: responding to switching indication operation of a user in the playing period of the current visual angle video, and determining visual angle switching time; searching a key frame image for switching the visual angle from a key frame image set corresponding to the visual angle switching moment in the plurality of key frame image sets, and playing the key frame image for switching the visual angle; and responding to the confirmation indication operation of the user, and acquiring the video data of the target video clip to play the target video clip. The commonly configured terminal can also perform view switching when the provided network bandwidth is the common network bandwidth, thereby improving the applicability of view switching.

Description

Visual angle switching method and device, terminal and storage medium
Technical Field
The present invention relates to the field of video, and in particular, to a method, an apparatus, a terminal, and a storage medium for switching a view angle.
Background
The free visual angle technology is a technology that a plurality of cameras with different visual angles shoot the same scene to obtain videos with a plurality of visual angles, and a user can see the videos with different visual angles through visual angle switching.
When the multi-view video is played, a user may switch from a current view to any view different from the current view, so that fluency of video switching is ensured. Currently, the implementation of view switching is: a user terminal needs to acquire video data of videos of all viewing angles from a server in real time, decode the video data of all videos in parallel, and play the video data of the switched viewing angles obtained by decoding at the switching time.
Acquiring video data of videos of all views from a server in real time requires a high network bandwidth of a terminal provided to a user by a network provider, and decoding video data of all videos in parallel requires a high configuration of a terminal device of the user. The terminal of the user not only needs to have high configuration, but also needs to provide the terminal of the user with high network bandwidth to perform view switching, and the current view switching has poor applicability, and cannot be applied to the terminal with common configuration and/or provided network bandwidth as common network bandwidth.
Disclosure of Invention
An object of the embodiments of the present invention is to provide a method, an apparatus, a terminal and a storage medium for switching a view angle, so as to improve applicability of the view angle switching. The specific technical scheme is as follows:
in a first aspect of the present invention, there is provided a method for switching a viewing angle, including:
responding to switching indication operation of a user in the playing period of the current visual angle video, and determining visual angle switching time;
searching a key frame image of a switching visual angle from a key frame image set corresponding to a visual angle switching moment in a plurality of key frame image sets, and playing the key frame image of the switching visual angle, wherein the key frame image of the switching visual angle belongs to a visual angle video with the switching visual angle, the switching visual angle is different from the visual angle of a current visual angle video, each key frame image in the key frame image sets is from a different visual angle video, and the playing moment corresponding to each key frame image in the key frame image sets is the same;
and responding to the confirmation indication operation of the user, acquiring video data of a target video clip from a server to play the target video clip, wherein the target video clip belongs to a view angle video with a target view angle, and the target view angle is a view angle corresponding to the key frame image aimed at by the confirmation indication operation.
In a second aspect of the present invention, there is provided a method for switching a viewing angle, which is applied to a viewing angle switching system, where the viewing angle switching system includes a terminal and a server, and includes:
the terminal responds to switching indication operation of a user in the playing period of the current visual angle video, and determines visual angle switching time;
the server receives a view switching time sent by the terminal, searches a view-switching key frame image from a key frame image set corresponding to the view switching time in a plurality of key frame image sets, and plays the view-switching key frame image, wherein the view-switching key frame image belongs to a view video with the switched view, the switched view is different from the view of the current view video, each key frame image in the key frame image sets is from a different view video, and the playing time corresponding to each key frame image in the key frame image sets is the same;
the terminal receives the key frame image of the switching visual angle sent by the server and plays the key frame image of the switching visual angle;
and the terminal responds to the confirmation indication operation of the user, and acquires video data of a target video clip from the server so as to play the target video clip, wherein the target video clip belongs to a view angle video with a target view angle, and the target view angle is a view angle corresponding to the key frame image aimed at by the confirmation indication operation.
In a third aspect of the present invention, there is also provided a viewing angle switching apparatus, including:
a first response unit configured to determine a view switching time in response to a user performing a switching instruction operation during a playing period of a current view video;
a second response unit, configured to find a key frame image of a switched view angle from a key frame image set corresponding to a view angle switching time in a plurality of key frame image sets, and play the key frame image of the switched view angle, where the key frame image of the switched view angle belongs to a view angle video with the switched view angle, and the switched view angle is different from a view angle of a current view angle video, each key frame image in the key frame image sets is from a different view angle video, and the play time corresponding to each key frame image in the key frame image sets is the same;
a third response unit, configured to, in response to a confirmation instruction operation of the user, acquire video data of a target video clip from a server to play the target video clip, where the target video clip belongs to a view video having a target view angle, and the target view angle is a view angle corresponding to a key frame image targeted by the confirmation instruction operation.
In yet another aspect of the present invention, there is also provided a computer-readable storage medium having stored therein instructions, which when run on a computer, cause the computer to execute any of the above-described perspective switching methods.
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 above-described perspective switching methods.
The method and the device for switching the visual angle provided by the embodiment of the invention realize that the key frame image for switching the visual angle is found from the key frame image set corresponding to the visual angle switching moment when the visual angle is switched during the period that a user watches the video, the key frame image for switching the visual angle is played, and the video data of the target video clip is obtained so as to play the target video clip. Compared with the method for decoding the video data of all videos in parallel, finding out one image from one image set only needs to be located to the corresponding image, and for a processor of the terminal, the cost for finding out one image from one image set is extremely low, so that the processor of the terminal does not need to have extremely high decoding capacity, and the commonly configured terminal can find out the key frame image for switching the view angle from the key frame image set corresponding to the view angle switching moment. Meanwhile, the video data of the target video clip is only the video data of one view angle video, and the network bandwidth required for acquiring the video data of the target video clip is far less than the network bandwidth required for acquiring the video data of all the view angles from the server in real time. Therefore, the commonly configured terminal can also switch the view angle under the condition that the provided network bandwidth is the common network bandwidth, and the applicability of view angle switching is improved.
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 method for switching a viewing angle according to a first embodiment of the present invention;
fig. 2 is a flowchart of a method for switching a viewing angle according to a second embodiment of the present invention;
fig. 3 is a flowchart of a method for switching a viewing angle according to a third embodiment of the present invention;
fig. 4 is a flowchart of a method for switching a viewing angle according to a fourth embodiment of the present invention;
FIG. 5 is a diagram illustrating an effect of storing a set of key frame images via a folder;
FIG. 6 is a diagram illustrating an effect of view switching;
fig. 7 is a flowchart of a fifth embodiment of a method for switching a viewing angle according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a viewing angle switching apparatus according to an embodiment of the present invention;
fig. 9 is a block diagram of a terminal suitable for implementing the method provided by the 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.
Referring to fig. 1, a flowchart of a method for switching a viewing angle according to a first embodiment of the present invention is shown.
Step 101, responding to a switching instruction operation performed by a user in a playing period of a current visual angle video, and determining a visual angle switching moment.
Each of a plurality of videos obtained by shooting the same scene by a plurality of corresponding cameras with different view angles may be referred to as a view angle video. For each of the plurality of cameras, the corresponding angle of view of the camera is the angle of view that the camera takes when taking a picture. That is, the view angle video is obtained by shooting the same scene by a plurality of cameras, and the view angles adopted by any two cameras in the plurality of cameras during shooting are different.
For example, for a scene, the camera 1 photographs the scene at an angle of view 1 to obtain an angle of view video 1, and the camera 2 photographs the scene at a second angle of view to obtain an angle of view video 2.
Each of the plurality of view videos has a view, the view of each of the view videos is different, and for each of the view videos, the view of the view video is a view adopted by a camera shooting the view video when shooting.
In this embodiment, when the user desires to view a view video different from the current view video among the plurality of view videos during the playing of the current view video, the user performs a switching instruction operation. The switching instruction operation indicates that the view angle switching is required. For example, the user clicks a button in the playback interface indicating that a view angle switch is required.
The current view video is a view video of the currently playing videos with multiple views. The playing period of the current view video may refer to a time period for playing the current view video.
The view switching time, the playback time, the candidate view switching time, the current playback time, and the like in the embodiments of the present invention are all times on the playback time axis relative to 0 time on the playback time axis. For example, the current playback time is 10s, and the time interval between the current playback time and 0 of the playback time axis is 10 s.
In this embodiment, a plurality of candidate view angle switching times may be preset based on a preset duration. A time interval before the end time of the view video and 0 time of the play time axis, which is an integral multiple of a preset time period, may be set as the candidate view switching time. The end time of the view video is also a time on the playback time axis relative to 0 time on the playback time axis. For example, the preset time length is 1s, the time length of the view video is 100s, and the end time of the view video is 100 s. A time 1s at which a time interval with 0 of the play time axis is 1 time of the preset time length, and a time 2s.
In the present embodiment, in determining the view angle switching timing, a view angle switching timing of a candidate later than the end timing of the switching instruction operation by the user among all the candidate view angle switching timings may be determined first. Then, of all the view angle switching times of candidates later than the end time of the switching instruction operation by the user, the view angle switching time of a candidate closest to the end time of the switching instruction operation by the user may be determined as the view angle switching time.
In this embodiment, when determining the viewing angle switching time, the current switching interval may also be determined first, and the current switching interval may indicate: switching is performed after the current switching interval from the end time of the switching instruction operation of the user, that is, switching is performed at the reference time obtained by adding the end time of the switching instruction operation of the user and the current switching interval, so that smooth switching can be realized. If the reference time happens to be a certain candidate view switching time, the reference time can be directly determined as the view switching time. If the reference time is not the candidate view switching time, the candidate view switching time closest to the reference time may be determined as the view switching time.
In this embodiment, the current switching interval may be a priori long. The correspondence of the handover association condition with the a priori handover interval may be pre-established. The handover-associated condition includes data items of a data transmission rate, a video frame rate, and the like of the network that may affect the fluency of the handover. In the corresponding relationship between the switching association condition and the prior switching interval, each preset switching association condition corresponds to one prior switching interval respectively.
When the current switching interval is determined, the data transmission rate of the current network, the frame rate of the current view video, and the like may be acquired to determine the current switching association condition. The current switching association condition is one of all the preset switching conditions, the prior switching interval corresponding to the current switching association condition can be found from the corresponding relationship between the switching association condition and the prior switching interval, and the found prior switching interval is determined as the current switching interval.
For each switching association condition, the prior switching interval corresponding to the switching association condition can be obtained by performing a plurality of tests under the switching association condition, and the prior switching interval corresponding to the switching association condition indicates: under the switching association condition, switching is carried out after a priori switching interval corresponding to the switching association condition from the end time of the switching indication operation, and smooth switching can be realized. For any switching association condition, each time the test is performed under the switching association condition, switching may be performed after a candidate switching interval from the end time of the switching instruction operation of the operation and maintenance engineer under the switching association condition, then, the switching fluency corresponding to the candidate switching interval may be determined according to the index evaluating the fluency of switching, and the switching interval of the candidate with the highest switching fluency corresponding to all the candidate switching intervals participating in the test may be determined as the prior switching interval corresponding to the switching association condition.
In this embodiment, a neural network, such as a convolutional neural network, may also be trained in advance in a supervised learning manner, so that the neural network learns the association relationship between the handover association condition and the handover interval. When the current switching interval is determined, the data transmission rate of the current network, the frame rate of the current view video, and the like may be acquired to determine the current switching association condition. And inputting the current switching association condition into the neural network, and outputting the current switching interval by the neural network.
Each training data of the neural network includes: the expected switching interval corresponding to the switching association condition used for training and the switching association condition used for training. The switching association condition for training includes data items such as data transmission rate, video frame rate, and the like of the network. The expected handover interval corresponding to the handover association condition used for training indicates: under the switching association condition for training, switching is performed after the expected switching interval from the end time of the switching indication operation, so that smooth switching can be realized, and the expected switching interval corresponding to the switching association condition for training can be obtained through testing. When training the neural network, the neural network outputs a predicted switching interval using the switching-related condition for training as an input, and updates the parameters of the neural network according to a loss between the predicted switching interval and an expected switching interval corresponding to the switching-related condition for training.
Step 102, finding out the key frame image for switching the visual angle from the key frame image set corresponding to the visual angle switching moment in the plurality of key frame image sets, and playing the key frame image for switching the visual angle.
In this embodiment, a plurality of key frame image sets may be generated by the server before performing step 101. Before performing step 101, the user's terminal may obtain a plurality of key frame image sets from the server, store the plurality of key frame image sets locally, and store the plurality of key frame image sets in a storage space of the user's terminal.
The server may combine, for each candidate view angle switching time of a plurality of preset candidate view angle switching times, images in each view angle video, whose corresponding playing time is the candidate view angle switching time, into a key frame image set, where the key frame image set corresponds to the candidate view angle switching time.
In this embodiment, for each key frame image set, each key frame image in the key frame image set is from one perspective video in the multiple perspective videos, and the perspective video from which each key frame image in the key frame image set is from is different.
For example, the plurality of perspectives includes: view angle 1, view angle 2. For a set of key frame images, the set of key frame images comprising: one key frame image from view video with view 1, one key frame image from view video with view 2.
In this embodiment, for any frame of image, the playing time corresponding to the frame of image is: and when the view video to which the frame of image belongs is played independently, namely the view video to which the frame of image belongs is played from the time 0 of the playing time axis, the time of playing the frame of image.
In other words, for any frame of image, when the view angle video to which the frame of image belongs is played alone, the frame of image is played at the playing time corresponding to the frame of image, so that the user can see the frame of image.
For example, for one frame image whose corresponding play time is 10s in a video having view 1, when a view video having view 1 is played alone, at 10s, one frame image whose corresponding play time is 10s in a view video having view 1 is played. For one frame image whose corresponding play time is 10s in the video having view 2, when the view video having view 2 is played alone, one frame image whose corresponding play time is 10s in the view video having view 2 is played at 10 th s.
In this embodiment, for each key frame image set, the playing time corresponding to each key frame image in the key frame image set is the same.
Each key frame image set corresponds to a candidate view switching time, and for each key frame image set, the candidate view switching time corresponding to the key frame image set is the same as the playing time corresponding to the key frame image in the key frame image set.
For example, the plurality of perspectives includes: view angle 1, view angle 2. For a key frame image set, the candidate view switching time corresponding to the key frame image set is 10s, and the key frame image set includes: the corresponding key frame image with the playing time of 10s in the view angle video with the view angle 1 and the corresponding key frame image with the playing time of 10s in the view angle video with the view angle 2.
In this embodiment, the key frame image of the switched view belongs to a view video having a switched view that is different from the view of the current view video.
When the key frame image for switching the view angle is found from the key frame image set corresponding to the view angle switching time in the plurality of key frame image sets, each key frame image set corresponds to one candidate view angle switching time, and the view angle switching time of one candidate of all the candidate view angle switching times is determined as the view angle switching time in step 101. Then, a key frame image for switching the view angle can be found from the key frame image set corresponding to the view angle switching time.
When the key frame image for switching the view angle is found from the key frame image set corresponding to the view angle switching time in the multiple key frame image sets, and the key frame image for switching the view angle is played, the key frame image for each switching view angle can be found from the key frame image set corresponding to the view angle switching time in the multiple key frame image sets, and the key frame image for each switching view angle can be played, so that the key frame image for each switching view angle is displayed to a user, and the user can see the key frame image for each switching view angle. And playing a part of the searched key frame images with the switched view angles in all the key frame images with the switched view angles, and displaying the part of the key frame images with the switched view angles to the user. The key frame image different from the played key frame image of the switched view angle among the key frame images of all the searched switched view angles may be played in response to an instruction operation by the user, and the key frame image different from the played key frame image of the switched view angle may be presented to the user, where the instruction operation by the user indicates that the key frame image different from the played key frame image of the switched view angle is desired to be seen.
For example, the plurality of perspectives includes: view angle 1, view angle 2. The current visual angle video has a visual angle 1, and the visual angles 2. Assuming that the determined view switching time is 10s, the key frame image of view 2 and the key frame image of view 3 may be found from the key frame image set corresponding to 10 s. Play key frame image of view 2, key frame image of view 3. Assuming that, in a case where a key frame image corresponding to a part of switched views in the key frame image set of 10s is played, the played part of switched views is composed of a key frame image of view 2 and a key frame image of view 3, it is possible to play, in response to an instruction operation by the user, a key frame image different from the key frame image of view 2 and the key frame image of view 3 in the key frame image set of 10 s.
In this embodiment, for any one frame of image, playing the one frame of image may be: rendering the frame of image to obtain a rendered image, and displaying the rendered image.
And 103, responding to the confirmation instruction operation of the user, acquiring the video data of the target video clip from the server to play the target video clip.
In this embodiment, the target video clip belongs to a view video having a target view, where the target view is a view corresponding to a key frame image targeted by the confirmation instruction operation of the user.
For example, the plurality of perspectives includes: view angle 1, view angle 2. Assuming that the determined view switching time is 10s, playing a key frame image with a corresponding playing time of 10s in the view video with the view 2 and playing a key frame image with a corresponding playing time of 10s in the view video with the view 3.
Assuming that the user desires to switch from view 1 to view 2, the user performs a confirmation instruction operation, for example, clicks a corresponding key frame image with a play time of 10s in a view video with view 2, the key frame image for which the confirmation instruction operation by the user is directed is a corresponding key frame image with a play time of 10s in a view video with view 2, and the view corresponding to the key frame image for which the confirmation instruction operation by the user is directed is view 2.
In this embodiment, the first frame image of the target video clip may be an image of the perspective video with the target view angle, the corresponding playing time of which is the end time of the confirmation instruction operation of the user, and the first frame image of the target video clip may also be an image of the perspective video with the target view angle, the corresponding playing time of which is later than the end time of the confirmation instruction operation of the user and the corresponding playing time of which is closest to the end time. The last frame image of the target video clip may be a last frame image of a view video having the target view angle.
In this embodiment, the video data of the target video segment may include encoded data of an image in the target video segment. When the video data of the target video clip is acquired, a request can be sent to the server, the video data of the target video clip sent by the server is received, and the video data of the target video clip is sent in a streaming mode. And the player running on the user terminal decodes the received coded data of each frame of image according to the sequence from the receiving time to the night, one frame of image is obtained through decoding each time, and one frame of image is played, so that the target video clip is played.
In this embodiment, during the period when the user watches the video, when the view angle is switched, the key frame image for switching the view angle is found from the key frame image set corresponding to the view angle switching time, the key frame image for switching the view angle is played, and the video data of the target video clip is acquired to play the target video clip. The commonly configured terminal can find out the key frame image for switching the view angle from the key frame image set corresponding to the view angle switching moment. Meanwhile, the video data of the target video clip is only the video data of one view angle video, and the network bandwidth required for acquiring the video data of the target video clip is far less than the network bandwidth required for acquiring the video data of all the view angles from the server in real time. Therefore, the commonly configured terminal can also switch the view angle under the condition that the provided network bandwidth is the common network bandwidth, and the applicability of view angle switching is improved.
Referring to fig. 2, a flowchart of a method for switching a viewing angle according to a second embodiment of the present invention is shown.
Step 201, in response to a user performing a switching instruction operation during a playing period of a current view video, determining a view switching time.
Step 202, finding out the key frame image for switching the view angle from the key frame image set corresponding to the view angle switching time in the plurality of key frame image sets, and playing the key frame image for switching the view angle.
In this embodiment, the switching view angle is an arbitrary view angle different from the current view angle, and the current view angle is a view angle corresponding to the currently played video.
In this embodiment, the plurality of views may have a preset order, and the preset order of the plurality of views may be an order of descending order of the view numbers. When a key frame image for switching a view angle is found from a key frame image set corresponding to a view angle switching time among a plurality of key frame image sets, a key frame image for a next view angle to the view angle of the current view angle video may be found from the key frame image set corresponding to the view angle switching time. If the view of the current view video is the last view of the multiple views, i.e., the view with the largest sequence number, the next view of the current view video may be: the first view of the plurality of views, i.e., the view with the smallest ordinal number.
For example, the plurality of perspectives includes: view angle 1, view angle 2. If the view angle of the current view angle video is view angle 1, and the next view angle of view angle 1 is view angle 2, and with respect to view angle 1, view angle 2 is a switching view angle, the key frame image of view angle 2 can be found from the key frame image set corresponding to the view angle switching time. If the view angle of the current view-angle video is view angle N, the next view angle of view angle N may be view angle 1, and with respect to view angle N, view angle N is a switching view angle, and the key frame image of view angle 1 may be found from the key frame image set corresponding to the view angle switching time.
In this embodiment, when the key frame image for switching the viewing angle is found from the key frame image set corresponding to the viewing angle switching time, one key frame image may also be randomly selected from all key frame images belonging to the key frame image set and having different viewing angles from the current viewing angle video, and the randomly selected key frame image may be used as the found key frame image for switching the viewing angle.
Step 203, in response to the selection operation of the user, finding out the key frame image of the selected view angle from the key frame image set corresponding to the view angle switching moment, and playing the key frame image of the selected view angle, wherein the selected view angle is different from the view angle corresponding to the key frame image played before.
In this embodiment, the selection operation by the user may be a leftward or rightward sliding on the screen of the terminal. The selection operation by the user may also be a rotation operation performed by the user on the terminal of the user. The user starts to rotate the user terminal at one time every time the user performs the rotation operation, and when the rotation of the user terminal is stopped, the user is considered to perform the rotation operation once. The rotation operation may be a rotation of the user's terminal around the z-axis of the user terminal coordinate system. The origin of the user terminal coordinate system may be a center of gravity of the user terminal, an x-axis of the user terminal coordinate system is a coordinate axis in a horizontal direction, a y-axis of the user terminal coordinate system is a coordinate axis in a vertical direction, and a z-axis of the user terminal coordinate system is perpendicular to both the x-axis and the y-axis.
In this embodiment, the key frame image played before may refer to a key frame image that has already been played after the user performs the switching instruction operation. One previously played key frame image may be a view-switching key frame image that is searched for and played, and may also be a view-selecting key frame image that is played because a selection operation has been performed.
In this embodiment, after all the key frame images of the selected view angle in the key frame image set corresponding to the view angle switching time are played, the user may be notified that all the view angles have been displayed, specifically, a prompt message is displayed on the play interface, and the prompt message is used to prompt the user that there is no key frame image of the selected view angle other than the played key frame image of the selected view angle. In addition, the user can be provided with a selection review operation, namely, the review operation is that the user plays the key frame image played before. And responding to a review operation of a user, finding out a key frame image of a review view from the key frame image set corresponding to the view switching moment, and playing the key frame image of the review view, wherein the review view is any view different from the view of the currently played key frame image.
And step 204, responding to the confirmation instruction operation of the user, and acquiring the video data of the target video clip from the server to play the target video clip.
In this embodiment, the target video clip belongs to a view video having a target view, where the target view is a view corresponding to a key frame image targeted by the confirmation instruction operation of the user.
In this embodiment, the key frame image targeted by the confirmation instruction operation of the user is the key frame image currently played when the user performs the confirmation instruction operation. If the number of times of the selection operation by the user is one, the key frame image for which the confirmation instruction operation by the user is directed is: and searching the key frame image of the selected view angle in response to one selection operation. If the number of times of the selection operation by the user is multiple, the key frame image for which the confirmation instruction operation by the user is directed is: and searching the key frame image of the selected view angle in response to the last selection operation.
For example, the plurality of perspectives includes: view angle 1, view angle 2. The visual angle of the current visual angle video is visual angle 1, the switching visual angle corresponding to the searched key frame image is visual angle 2, the visual angle 2 is not the visual angle which the user expects to convert, and the user performs selection operation.
And the user performs selection operation for the 1 st time, responds to the selection operation performed for the 1 st time, finds out the key frame image of the selected view angle from the key frame image set corresponding to the view angle switching moment as the key frame image of the view angle 3, and plays the key frame image of the view angle 3.
If the user desires to switch from the viewing angle 1 to the viewing angle 3, the user performs a confirmation instruction operation, the number of times of performing the selection operation by the user is one, and the key frame image for which the confirmation instruction operation by the user is directed is as follows: the searched key frame image of the viewing angle 3 is operated in response to the selection of the user. The target view is a view 3 corresponding to the key frame image targeted by the confirmation instruction operation of the user.
If the user does not want to switch from the view 1 to the view 3, the user performs the selection operation for the 2 nd time, responds to the selection operation performed for the 2 nd time, and plays the key frame image of the view 4, wherein the key frame image of the selected view found from the key frame image set corresponding to the view switching time is the key frame image of the view 4.
If the user desires to switch from the view angle 1 to the view angle 4, the user performs a confirmation instruction operation, the number of times of performing the selection operation of the user is multiple, the key frame image of the selected view angle found in response to the last performed selection operation is the key frame image of the view angle 4, and the key frame image for which the confirmation instruction operation of the user is directed is: key frame image of view 4. The target view is a view 4 corresponding to the key frame image targeted by the confirmation instruction operation of the user.
In this embodiment, during the period when the user watches the video, when the viewing angle is switched, the key frame image for switching the viewing angle may be found first, and the key frame image for switching the viewing angle is played, and further, in response to the selection operation of the user, the corresponding key frame image for selecting the viewing angle may be found, and the corresponding key frame image for selecting the viewing angle may be played. Therefore, when the visual angle is switched, the user can independently watch the key frame image corresponding to the corresponding visual angle, so that the user can know the playing effect of the corresponding visual angle conveniently, and the user can finally confirm the visual angle expected to be switched to.
Referring to fig. 3, a flowchart of a method for switching a viewing angle according to a third embodiment of the present invention is shown.
Step 301, in response to a user performing a switching instruction operation during a playing period of a current view video, determining a view switching time.
Step 302, when the current playing time reaches the view switching time, the playing of the current view video is stopped.
In this embodiment, when the current playing time reaches the view switching time, the image of the current view video whose corresponding playing time is the view switching time may be played, and then any one frame of image of the current view video whose corresponding playing time is later than the view switching time may not be played, so that the playing of the current view video is stopped. After the playing of the current view video is stopped and before the user performs the selection operation, the user can see the image of which the corresponding playing time is the view switching time in the current view video.
For example, the view switching time is 10s, when the current playing time reaches 10s, an image with the corresponding playing time of 10s in the current view video is played, and then any one frame of image with the corresponding playing time later than 10s in the current view video is not played any more, so that the playing of the current view video is stopped. After the playing of the current view video is stopped and before the user performs the selection operation, the user can see the image of the current view video corresponding to the playing time of 10 s.
Step 303, in response to the selection operation of the user, finding out a key frame image for switching the view angle from the key frame image set corresponding to the view angle switching time in the plurality of key frame image sets, and playing the key frame image for switching the view angle.
In this embodiment, after the current view video stops being played, the user may perform a selection operation. In the present embodiment, the switching view angle is a view angle different from the view angle of the current view angle video, which is selected by the selection operation of the user. In other words, the user can select a switching view different from the view of the current view video by the selection operation.
In this embodiment, the number of times of the selection operation by the user may be one or more. If the number of times of the selection operation by the user is one, step 303 is executed once. If the selection operation of the user is performed for a plurality of times, step 303 is performed for a plurality of times, and the switching viewing angle selected by the selection operation is different each time.
The plurality of views may have a preset order, and the preset order of the plurality of views may be an order of the ordinal numbers of the views from small to large. The switching view selected by the user through the first selection operation may be a next view of a view of the current view video from the multiple views, and if the view of the current view video is the last view, the next view of the current view video may be a first view from the multiple views. The switching view angle selected by the user through the non-first selection operation may be: and the next view angle of the switching view angle selected by the last selection operation which is not the first selection operation in all the selectable view angles. Any one view different from the view of the current view video may be used as the optional view. If the switching view selected by the previous selection operation is the view with the largest sequence number in all selectable views, the next view may be: the view with the smallest ordinal number among all selectable views.
In this embodiment, in response to a selection operation by a user, one key frame image may be randomly selected from all selectable key frame images, and the randomly selected key frame image may be used as a key frame image for switching a viewing angle. All the selectable key frame images are composed of key frame images except the currently played key frame image in all the selectable key frame images of the view angle, and any view angle different from the view angle of the current view angle video can be used as the selectable view angle.
In this embodiment, each time the user performs a selection operation, the key frame image of the switching view angle selected by the selection operation may be found from the key frame image set corresponding to the view angle switching time in response to the selection operation of the user, the found key frame image of the switching view angle is played, and the user may see the played key frame image of the switching view angle.
In this embodiment, if the user performs the selecting operation for multiple times, the switching viewing angle selected by the selecting operation is different each time, and the searched key frame images for switching the viewing angle are different.
For example, the plurality of perspectives includes: view angle 1, view angle 2. The view of the current view video is view 1.
The user performs selection operation for the 1 st time, the switching visual angle selected by the selection operation performed for the 1 st time is visual angle 2, in response to the selection operation performed for the 1 st time, the key frame image of the visual angle 2 is found from the key frame image set corresponding to the visual angle switching time, and the key frame image of the visual angle 2 is played, so that after the selection operation performed for the 1 st time is finished, the user can see the found key frame image of the visual angle 2. The found key frame image of view 2 is a frame image played at the time of view switching under the condition that the view video with view 2 is played independently.
And the user performs selection operation for the 2 nd time, the switching visual angle selected by the selection operation performed for the 2 nd time is the visual angle 3, in response to the selection operation performed for the 2 nd time, the key frame image of the visual angle 3 is found from the key frame image set corresponding to the visual angle switching time, and the key frame image of the visual angle 3 is played, so that after the selection operation performed for the 2 nd time is finished, the user can see the found key frame image of the visual angle 3. The found key frame image of the view angle 3 is a frame image played at the view angle switching time under the condition of independently playing the view angle video with the view angle 3.
And 304, responding to the confirmation instruction operation of the user, and acquiring the video data of the target video clip from the server to play the target video clip.
In this embodiment, the target video clip belongs to a view video having a target view, where the target view is a view corresponding to a key frame image targeted by the confirmation instruction operation of the user.
In this embodiment, the key frame image targeted by the confirmation instruction operation of the user is the key frame image currently played when the user performs the confirmation instruction operation.
If the number of times of the selection operation by the user is one, the user can perform the confirmation instruction operation after the selection operation is completed. If the number of times of the selection operation by the user is multiple, the user can perform the confirmation instruction operation after the last selection operation is completed.
In this embodiment, if the number of times of the selection operation by the user is performed is one, the key frame image to which the confirmation instruction operation by the user is directed is: and selecting the key frame image with the switched view angle through one-time selection operation. If the number of times of the selection operation by the user is multiple, the key frame image for which the confirmation instruction operation by the user is directed is: and selecting the key frame image with the switched visual angle through the last selection operation.
For example, the plurality of perspectives includes: view angle 1, view angle 2. The visual angle of the current visual angle video is visual angle 1, the user performs selection operation for the 1 st time, the switching visual angle selected by the selection operation performed for the 1 st time is visual angle 2, the key frame image of the visual angle 2 is found from the key frame image set corresponding to the visual angle switching moment in response to the selection operation performed for the 1 st time, and the key frame image of the visual angle 2 is played.
If the user desires to switch from the view angle 1 to the view angle 2, the user performs a confirmation instruction operation, the number of times of performing the selection operation by the user is one, and the key frame image for which the confirmation instruction operation by the user is directed is as follows: the key frame image of view 2 in the key frame image set corresponding to the view switching time. The target view is a view 2 corresponding to the key frame image targeted by the confirmation instruction operation of the user.
If the user does not want to switch from the view 1 to the view 2, the user performs selection operation for the 2 nd time, the view switching operation performed by the selection operation for the 2 nd time is the view 3, and in response to the selection operation performed for the 2 nd time, the key frame image of the view 3 is found from the key frame image set corresponding to the view switching time, and the key frame image of the view 3 is played.
If the user desires to switch from the view angle 1 to the view angle 3, the user performs the confirmation instruction operation, the selection operation of the user is performed for a plurality of times, and the switching view angle selected by the last selection operation is the view angle 3. The key frame images of the switched view angle selected by the last selection operation are: the key frame image of view 3 in the key frame image set corresponding to the view switching time. The key frame image for which the user confirmation instruction operation is directed is: the key frame image of view 3 in the key frame image set corresponding to the view switching time. The target view is a view 3 corresponding to the key frame image targeted by the confirmation instruction operation of the user.
In this embodiment, the target video clip belongs to a view video having a target view, where the target view is a view corresponding to the key frame image for which the confirmation instruction operation is performed. The first frame image of the target video clip may be a next frame image of the key frame image for which the confirmation indication operation of the user is directed. The last frame image of the target video clip may be a last frame image of a view video having the target view angle.
In other words, the target video clip is a video clip played after the view switching time in the view video having the target view, in the case where the view video having the target view is played alone.
For example, the determined view switching time is 10s, the current view video is view video 1, the target view is view 2, and the target video clip is a video clip played after 10s in the view video with view 2 when the view video with view 2 is played alone. The first frame image of the target video clip is a frame image which is next to a frame image corresponding to a frame image with a playing time of 10s in the video with the view angle 2, and the last frame image of the target video clip is the last frame image in the video with the view angle 2.
In this embodiment, when the user watches the video and performs the view switching, the playing of the current view video is stopped when the current playing time reaches the view switching time, so that the terminal overhead and the network resource of the user can be saved. And responding to the selection operation of the user, finding out the corresponding key frame image of the selected visual angle, and playing the corresponding key frame image of the selected visual angle. Therefore, when the visual angle is switched, the user can independently watch the key frame image corresponding to the corresponding visual angle, so that the user can know the playing effect of the corresponding visual angle conveniently, and the user can finally confirm the visual angle expected to be switched to.
Referring to fig. 4, a flowchart of a method for switching a viewing angle according to a fourth embodiment of the present invention is shown.
Step 401, a plurality of key frame image sets are obtained from a server, and the plurality of key frame image sets are generated by the server.
In this embodiment, all the key frame image sets may be generated by the server, and the terminal of the user may acquire a plurality of key frame image sets from the server, store the plurality of key frame image sets locally, and store the plurality of key frame image sets in the storage space of the terminal of the user.
In this embodiment, the plurality of key frame image sets obtained from the server may be all key frame image sets, in other words, obtaining the plurality of key frame image sets from the server may refer to obtaining all key frame image sets from the server.
In this embodiment, the plurality of key frame image sets acquired from the server may also be a part of all key frame image sets. When the key frame image sets except the part of key frame image sets need to be acquired, acquiring the key frame image sets except the part of key frame image sets from the server. For example, in the case where a part of the acquired key frame image sets does not include a key frame image set corresponding to the view switching time, another part of the key frame image sets including a key frame image set corresponding to the view switching time is acquired from the server.
In this embodiment, for each of the plurality of view videos, the key frame images may be extracted from the view video based on a preset time length, and the key frame images whose corresponding playing time is before the ending time of the view video and whose time interval between the corresponding playing time and 0 time of the playing time axis is an integral multiple of the preset time length may be extracted.
For example, the preset duration is 1s, for each of the plurality of view videos, a key frame image whose time interval between the corresponding playing time and the 0 time of the playing time axis is 1 time of the preset duration, that is, a corresponding key frame image whose playing time is 1s, and a key frame image whose time interval between the corresponding playing time and the 0 time of the playing time axis is 2 times of the preset duration, that is, a corresponding key frame image whose playing time is 2s are extracted from the view video, that is, a corresponding key frame image whose time interval between the corresponding playing time and the 0 time of the playing time axis is n times of the preset duration, that is, a corresponding key frame image ns whose playing time is ns, are extracted before the ending time of the view video.
In this embodiment, a plurality of key frame images corresponding to the same playing time may be extracted from a plurality of perspective videos each time, and a plurality of key frame images corresponding to the same playing time extracted from a plurality of perspective videos each time may directly constitute a key frame image set, so that all key frame image sets may be obtained.
For example, the key frame images are extracted from each perspective video based on the preset time length 1s, a plurality of key frame images corresponding to the same playing time 1s extracted from a plurality of perspective videos at the 1 st time can directly constitute one key frame image, a plurality of key frame images corresponding to the same playing time 2s extracted from a plurality of perspective videos at the 2 nd time can directly constitute one key frame image, and so on.
In this embodiment, for each view-angle video, all the key frame images extracted from the view-angle video may be first grouped into an extracted image set of the view-angle video.
For each view video, in the extracted image set of the view video, the key frame images extracted from the view video may be arranged in the order from early to late according to the corresponding playing time. The key frame images at the same position in the extracted image set of each view video correspond to the same playing time, and the key frame images at the same position in the extracted image set of each view video can be aggregated into a key frame image set, so that all key frame image sets can be obtained.
For example, for each view video of a plurality of view videos, the decimated image set of the view video sequentially includes: the corresponding playing time in the visual angle video is a key frame image with 1s, and the corresponding playing time in the visual angle video is a key frame image with 2s.
The method comprises the steps that the 1 st key frame image in the extracted image set of each visual angle video corresponds to the same playing time, namely 1s, the 1 st key frame image in the extracted image set of each visual angle video is aggregated into a key frame image set 1, and the key frame image set 1 comprises the following steps: and the corresponding key frame image with the playing time of 1s in the extracted image set of each visual angle video. The 2 nd key frame image in the extracted image set of each view video corresponds to the same playing time, i.e. 2s, and the 2 nd key frame image in the extracted image set of each view video is aggregated into a key frame image set 2, wherein the key frame image set 2 comprises: and correspondingly, the key frame image with the playing time of 2s in the extracted image set of each visual angle video, and so on.
In this embodiment, for each view video, an identifier may be assigned to each key frame image in the extracted image set of the view video. The identifier of the key frame image may indicate that the key frame image is the first key frame image in the extracted image set to which the key frame image belongs, in the order from early to late according to the corresponding playing time. Then, the key frame images with the same identification in the extracted image set of each view video can be aggregated into a key frame image set.
In this embodiment, for each view video, the extracted image set of the view video may be stored in the folder corresponding to the extracted image set of the view video, and the file name of the image in the folder corresponding to the extracted image set of the view video indicates the position of the image in the extracted image set of the view video.
For example, the name of the folder corresponding to the extracted image set of the view video 1 is S1, and the name of the folder corresponding to the extracted image set of the view video 2 is S2.
The folder named S1 includes: a key frame image with a file name of t1, a key frame image with a file name of t 2. The folder named S2 includes: a key frame image with a file name of t1, a key frame image with a file name of t 2. The folder named S20 includes: a key frame image with a file name of t1, a key frame image with a file name of t 2.
The key frame image of file name t1 in the folder named S1 indicates: the key frame image with the file name t1 in the folder named S1 is the 1 st key frame image in the extracted image set of perspective video 1. The key frame image of file name t2 in the folder named S1 indicates: the key frame image with file name t2 in the folder named S1 is the 2 nd key frame image in the extracted image set of perspective video 1, and so on. The key frame image of file name t1 in the folder named S2 indicates: the key frame image with the file name t1 in the folder named S2 is the 2 nd key frame image in the extracted image set of view video 2. The key frame image of file name t2 in the folder named S2 indicates: the key frame image with file name t2 in the folder named S2 is the 2 nd key frame image in the extracted image set of view video 2, and so on.
When each key frame image set is generated, the server can read out the key frame images with the same file name in the folder corresponding to each view angle video, and aggregate the key frame images with the same file name in the folder corresponding to each view angle video into the key frame image set.
For example, the name of the folder corresponding to the extracted image set of the view video 1 is S1, and the name of the folder corresponding to the extracted image set of the view video 2 is S2. A plurality of key frame images having the same file name in a folder named S1-a folder named S20 are read, and the plurality of key frame images having the same file name are aggregated into one key frame image set. The key frame images with the file name t1 in the folder-name S20 with the name S1 are aggregated as a key frame image set 1, the key frame images with the file name t2 in the folder-name S20 with the name S1 are aggregated as a key frame image set 2, and so on.
In this embodiment, for each key frame image set, the key frame image set may be stored in a folder corresponding to the key frame image set. For each key frame image set, in the folder corresponding to the key frame image set, the file name of the key frame image in the key frame image set is the sequence number of the view angle video to which the key frame image belongs.
For each key frame image set, the file name of each key frame image in the key frame image set may be modified to the sequence number of the view angle video to which the key frame image belongs, and then, the file name of each key frame image in the key frame image set is changed into the corresponding folder of the key frame image set.
Please refer to fig. 5, which shows an effect diagram of storing a key frame image set through a folder.
T1, T2, and T3. The multiple view video is 20 view video.
The folder named T1 includes 1.jpg, 2.jpg. ·..20.jpg, with 1.jpg in the T1 folder belonging to view video 1, 2.jpg in the T1 folder belonging to view video 2, and 20.jpg in the T1 folder belonging to view video 20. Assume that the set of key frame images corresponding to the folder named T1 corresponds to the candidate view switching time 1 s. The playback time corresponding to 1.jpg in the folder named T1 and the playback time corresponding to 2.jpg in the folder named T1 are both 1 s. The title T2 folder includes 1.jpg, 2.jpg. ·. Assume that the set of key frame images corresponding to the folder named T2 corresponds to the candidate view switching time 2s. The playback time corresponding to 1.jpg in the folder named T2 and the playback time corresponding to 2.jpg in the folder named T2 are both 2s.
Step 402, in response to a play instruction operation of a user, selecting a view video from a plurality of view videos as a current view video, and acquiring video data of the current view video to play the current view video.
In this embodiment, a view angle video may be selected from a plurality of view angle videos as a current view angle video in response to a play instruction operation of a user, one view angle video may be randomly selected, the randomly selected one video is used as the current view angle video, a screenshot of each view angle video may also be displayed, the user clicks the screenshot of one view angle video, the view angle video to which the screenshot clicked by the user belongs is instructed to be used as the current video, and the view angle video to which the screenshot clicked by the user belongs is selected as the current video. After the current visual angle video is selected, the video data of the current visual angle video is obtained, the video data of the current visual angle video is provided for a player running on a terminal of a user, and the player plays the current visual angle video based on the video data of the current visual angle video. The play instruction operation of the user may be clicking a button in the video play page, which instructs to play the video.
Step 403, in response to the user performing the switching instruction operation during the playing period of the current view video, determining the view switching time.
And step 404, stopping playing the current visual angle video when the current playing time reaches the visual angle switching time.
Step 405, in response to the selection operation of the user, finding out a key frame image for switching the view angle from the key frame image set corresponding to the view angle switching time in the plurality of key frame image sets, and playing the key frame image for switching the view angle.
And step 406, in response to the confirmation instruction operation of the user, acquiring the video data of the target video clip to play the target video clip.
In this embodiment, a plurality of key frame image sets are acquired from the server in advance, and the plurality of key frame image sets are generated by the server, so that the overhead of switching the view angle of the terminal of the user can be saved.
Please refer to fig. 6, which shows an effect diagram of the view angle switching.
The current view video is view video m. And in the playing period of the visual angle video m, acquiring the video data of the visual angle video m from the server, and playing the visual angle video m by a player running on the terminal of the user based on the video data of the visual angle video m. During the playing period of the view angle video m, the user desires to switch from the view angle m to the view angle n, and during the playing period of the view angle video m, the user performs a switching instruction operation. When the current playing time reaches 10s, playing an image m.jpg of the viewing angle video m, which is 10s at the corresponding playing time, and then not playing any image of the viewing angle video m, which is later than 10s at the corresponding playing time, so that the playing of the viewing angle video m is stopped, and after the playing of the viewing angle video m is stopped and before the user performs the selection operation, the image seen by the user is m.jpg. The key frame image for which the user confirmation instruction operation is directed is: and key frame images of the view angle n in the key frame image set corresponding to the view angle switching moment. The target view is a view n corresponding to the key frame image targeted by the confirmation instruction operation of the user. And acquiring the video data of the target video clip after the confirmation instruction operation is performed by the user. The first frame image of the target video segment may be a next frame image of n.jpg in the view angle video n, and the last frame image of the target video segment may be a last frame image in the view angle video n. The player running on the user's terminal plays the target video segment based on the video data of the target video segment.
Referring to fig. 7, a flowchart of a fifth embodiment of a method for switching a viewing angle according to an embodiment of the present invention is shown.
In step 701, the terminal determines a view switching time in response to a user switching instruction operation during a playing period of a current view video.
The specific implementation of step 701 in this embodiment may refer to the specific implementation of step 101 in the first embodiment.
In some implementations of this embodiment, the method further includes: the terminal responds to switching instruction operation of a user in the playing period of the current visual angle video, and before the visual angle switching time is determined, a plurality of key frame image sets are obtained from the server, and the server generates the key frame image sets through the following steps: for each visual angle video, extracting a key frame image from the visual angle video to obtain an extracted image set of the visual angle video, and storing the extracted image set of the visual angle video in a folder corresponding to the visual angle video, wherein the key frame images in the extracted image set of the visual angle video are arranged in the order from early to late according to the corresponding playing time, and the file names of the key frame images in the folder corresponding to the extracted image set of the visual angle video indicate the positions of the key frame images in the extracted image set of the visual angle video; reading out the key frame images with the same file name in the folder corresponding to each visual angle video, and aggregating the key frame images with the same file name in the folder corresponding to each visual angle video into a key frame image set.
In some implementations of this embodiment, the method further includes: the terminal responds to the playing indication operation of the user and selects one visual angle video from the multiple visual angle videos as the current visual angle video before the visual angle switching time is determined in response to the user switching indication operation in the playing period of the current visual angle video; and acquiring video data of the current visual angle video so as to play the current visual angle video.
Step 702, the server receives the view switching time sent by the terminal, finds out the key frame image for switching the view from the key frame image set corresponding to the view switching time in the multiple key frame image sets, and plays the key frame image for switching the view.
In this embodiment, the key frame image of the switched view belongs to a view video with a switched view, and the switched view is different from the view of the current view video, each key frame image in the key frame image set is from a different view video, and the playing time corresponding to each key frame image in the key frame image set is the same. The specific implementation of step 702 in this embodiment is the same as the specific implementation of step 102 in the first embodiment, and only the execution subject is different.
In some implementations of this embodiment, the method further includes: after the terminal responds to the switching indication operation of a user in the playing period of the current visual angle video, and the visual angle switching time is determined, when the current playing time reaches the visual angle switching time, the terminal stops playing the current visual angle video; the server responds to the selection operation of the user, finds out the key frame image of the switched visual angle from the key frame image set corresponding to the visual angle switching time in the plurality of key frame image sets, and plays the key frame image of the switched visual angle, wherein the switched visual angle is a visual angle which is selected through the selection operation and is different from the visual angle of the current visual angle video.
And 703, the terminal receives the key frame image of the switching visual angle sent by the server and plays the key frame image of the switching visual angle.
In step 704, the terminal responds to the confirmation instruction operation of the user, and acquires the video data of the target video clip from the server to play the target video clip.
In this embodiment, the target video clip belongs to a view video having a target view, where the target view is a view corresponding to the key frame image for which the confirmation instruction operation is performed. The specific implementation of step 704 in this embodiment may refer to the specific implementation of step 103 in the first embodiment.
In some implementations of this embodiment, the method further includes: before the terminal responds to the confirmation indication operation of the user, the server responds to the selection operation of the user, finds out the key frame image of the selected visual angle from the key frame image set corresponding to the visual angle switching moment, and plays the key frame image of the selected visual angle, wherein the selected visual angle is different from the visual angle corresponding to the key frame image played before.
In some optional implementations of this embodiment, the first frame image of the target video segment is a frame image subsequent to the key frame image for which the confirmation instruction operation is performed.
Fig. 8 is a schematic structural diagram of a viewing angle switching apparatus according to an embodiment of the present invention. Specific implementations of operations performed by the various units or sub-units in the apparatus may be as described above with reference to the specific implementations of the corresponding operations in the method embodiments.
As shown in fig. 8, the viewing angle switching apparatus according to the embodiment of the present invention includes: a first response unit 801, a second response unit 802, and a third response unit 803.
The first response unit 801 is configured to determine a view switching time in response to a user performing a switching instruction operation during playback of a current view video;
the second responding unit 802 is configured to find a key frame image of a switching view angle from a key frame image set corresponding to a view angle switching time in a plurality of key frame image sets, and play the key frame image of the switching view angle, where the key frame image of the switching view angle belongs to a view angle video with the switching view angle, and the switching view angle is different from a view angle of a current view angle video, each key frame image in the key frame image sets is from a different view angle video, and the play time corresponding to each key frame image in the key frame image sets is the same;
the third responding unit 803 is configured to, in response to a confirmation instruction operation by the user, acquire video data of a target video clip from a server to play the target video clip, where the target video clip belongs to a view angle video having a target view angle, and the target view angle is a view angle corresponding to a key frame image for which the confirmation instruction operation is directed.
In some embodiments, the viewing angle switching device further comprises:
a fourth response unit configured to, in response to a selection operation by the user, find out a key frame image of a selected view angle from the key frame image set corresponding to a view angle switching time, and play the key frame image of the selected view angle, before the confirmation instruction operation in response to the user, where the selected view angle is different from a view angle corresponding to a key frame image that has been played before.
In some embodiments, the viewing angle switching device further comprises:
a playback stop unit configured to stop playing the current view angle video when the current playback time reaches the view angle switching time after determining the view angle switching time in response to a user performing a switching instruction operation during playback of the current view angle video; the second responding unit 802 is further configured to, in response to the selection operation of the user, find a key frame image of a switched view angle from a key frame image set corresponding to a view angle switching time in the plurality of key frame image sets, and play the key frame image of the switched view angle, where the switched view angle is a view angle different from a view angle of the current view angle video selected by the selection operation.
In some embodiments, the viewing angle switching device further comprises:
an acquisition unit configured to acquire, from a server, a plurality of key frame image sets before a viewpoint switching time is determined in response to a switching instruction operation by a user during playback of a current viewpoint video, wherein the key frame image sets are generated by the server by: for each visual angle video, extracting a key frame image from the visual angle video to obtain an extracted image set of the visual angle video, and storing the extracted image set of the visual angle video in a folder corresponding to the visual angle video, wherein the key frame images in the extracted image set of the visual angle video are arranged in the order from early to late according to the corresponding playing time, and the file names of the key frame images in the folder corresponding to the extracted image set of the visual angle video indicate the positions of the key frame images in the extracted image set of the visual angle video; reading out the key frame images with the same file name in the folder corresponding to each visual angle video, and aggregating the key frame images with the same file name in the folder corresponding to each visual angle video into a key frame image set.
In some embodiments, the first frame image of the target video segment is a subsequent frame image of a key frame image for which the confirmation indication operation is directed.
In some embodiments, the viewing angle switching device further comprises:
a selection playing unit configured to select one viewing angle video from the plurality of viewing angle videos as a current viewing angle video in response to a play instruction operation by a user before determining a viewing angle switching time in response to a switch instruction operation by the user during playing of the current viewing angle video; and acquiring video data of the current visual angle video so as to play the current visual angle video.
The embodiment of the present invention further provides a terminal, as shown in the figure, which includes a processor 901, a communication interface 902, a memory 903 and a communication bus 904, where the processor 901, the communication interface 902, and the memory 903 utilize the communication bus 904 to complete mutual communication,
a memory 903 for storing computer programs;
the processor 901 is configured to implement the following steps when executing the program stored in the memory 903:
responding to switching indication operation of a user in the playing period of the current visual angle video, and determining visual angle switching time; searching a key frame image of a switching visual angle from a key frame image set corresponding to a visual angle switching moment in a plurality of key frame image sets, and playing the key frame image of the switching visual angle, wherein the key frame image of the switching visual angle belongs to a visual angle video with the switching visual angle, the switching visual angle is different from the visual angle of a current visual angle video, each key frame image in the key frame image sets is from a different visual angle video, and the playing moment corresponding to each key frame image in the key frame image sets is the same; and responding to the confirmation indication operation of the user, acquiring video data of a target video clip from a server to play the target video clip, wherein the target video clip belongs to a view angle video with a target view angle, and the target view angle is a view angle corresponding to the key frame image aimed at by the confirmation indication operation.
The communication bus mentioned in the above terminal 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 terminal and other equipment.
The Memory may include a Random Access Memory (RAM), or may include a non-volatile Memory (non-volatile Memory), such as all disk memories. Alternatively, the memory may be any 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 Integrated Circuit may 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 yet another embodiment, a computer-readable storage medium is provided, having stored thereon instructions, which, when executed on a computer, cause the computer to perform the method of any of the above embodiments.
In a further embodiment provided by the present invention, there is also provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially implemented using 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 using wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. 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 system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
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 (10)

1. A method for switching visual angles is applied to a terminal, and is characterized in that the method comprises the following steps:
responding to switching indication operation of a user in the playing period of the current visual angle video, and determining visual angle switching time;
searching a key frame image of a switching visual angle from a key frame image set corresponding to a visual angle switching moment in a plurality of key frame image sets, and playing the key frame image of the switching visual angle, wherein the key frame image of the switching visual angle belongs to a visual angle video with the switching visual angle, the switching visual angle is different from the visual angle of a current visual angle video, each key frame image in the key frame image sets is from a different visual angle video, and the playing moment corresponding to each key frame image in the key frame image sets is the same;
and responding to the confirmation indication operation of the user, acquiring video data of a target video clip from a server to play the target video clip, wherein the target video clip belongs to a view angle video with a target view angle, and the target view angle is a view angle corresponding to the key frame image aimed at by the confirmation indication operation.
2. The method of claim 1, wherein prior to the operation of indicating a confirmation in response to the user, the method further comprises:
and responding to the selection operation of the user, finding out a key frame image of a selected visual angle from a key frame image set corresponding to the visual angle switching moment, and playing the key frame image of the selected visual angle, wherein the selected visual angle is different from the visual angle corresponding to the key frame image played before.
3. The method according to claim 1, wherein after determining the view switching time in response to a user performing a switching instruction operation during playback of the current view video, the method further comprises:
when the current playing time reaches the view switching time, stopping playing the current view video;
the finding out a key frame image for switching a view angle from a key frame image set corresponding to a view angle switching time in a plurality of key frame image sets, and playing the key frame image for switching the view angle includes:
and responding to the selection operation of the user, finding out a key frame image of a switching visual angle from a key frame image set corresponding to the visual angle switching time in the plurality of key frame image sets, and playing the key frame image of the switching visual angle, wherein the switching visual angle is a visual angle which is selected by the selection operation and is different from the visual angle of the current visual angle video.
4. The method according to claim 1, wherein before determining the view switching time in response to a user performing a switching instruction operation during playback of the current view video, the method further comprises:
obtaining a plurality of key frame image sets from a server, wherein the key frame image sets are generated by the server by:
for each visual angle video, extracting a key frame image from the visual angle video to obtain an extracted image set of the visual angle video, and storing the extracted image set of the visual angle video in a folder corresponding to the visual angle video, wherein the key frame images in the extracted image set of the visual angle video are arranged in the order from early to late according to the corresponding playing time, and the file names of the key frame images in the folder corresponding to the extracted image set of the visual angle video indicate the positions of the key frame images in the extracted image set of the visual angle video;
reading out the key frame images with the same file name in the folder corresponding to each visual angle video, and aggregating the key frame images with the same file name in the folder corresponding to each visual angle video into a key frame image set.
5. The method according to claim 1, wherein the first frame image of the target video segment is a frame image subsequent to the key frame image for which the confirmation instruction operation is performed.
6. The method according to claim 1, wherein before determining the view switching time in response to a user performing a switching instruction operation during playback of the current view video, the method further comprises:
responding to the playing instruction operation of a user, and selecting one visual angle video from a plurality of visual angle videos as a current visual angle video;
and acquiring video data of the current visual angle video so as to play the current visual angle video.
7. A visual angle switching method is applied to a visual angle switching system, and is characterized in that the visual angle switching system comprises a terminal and a server, and the method comprises the following steps:
the terminal responds to switching indication operation of a user in the playing period of the current visual angle video, and determines visual angle switching time;
the server receives a view switching time sent by the terminal, searches a view-switching key frame image from a key frame image set corresponding to the view switching time in a plurality of key frame image sets, and plays the view-switching key frame image, wherein the view-switching key frame image belongs to a view video with the switched view, the switched view is different from the view of the current view video, each key frame image in the key frame image sets is from a different view video, and the playing time corresponding to each key frame image in the key frame image sets is the same;
the terminal receives the key frame image of the switching visual angle sent by the server and plays the key frame image of the switching visual angle;
and the terminal responds to the confirmation indication operation of the user, and acquires video data of a target video clip from the server so as to play the target video clip, wherein the target video clip belongs to a view angle video with a target view angle, and the target view angle is a view angle corresponding to the key frame image aimed at by the confirmation indication operation.
8. A viewing angle switching apparatus, characterized in that the apparatus comprises:
a first response unit configured to determine a view switching time in response to a user performing a switching instruction operation during a playing period of a current view video;
a second response unit, configured to find a key frame image of a switched view angle from a key frame image set corresponding to a view angle switching time in a plurality of key frame image sets, and play the key frame image of the switched view angle, where the key frame image of the switched view angle belongs to a view angle video with the switched view angle, and the switched view angle is different from a view angle of a current view angle video, each key frame image in the key frame image sets is from a different view angle video, and the play time corresponding to each key frame image in the key frame image sets is the same;
a third response unit, configured to, in response to a confirmation instruction operation of the user, acquire video data of a target video clip from a server to play the target video clip, where the target video clip belongs to a view video having a target view angle, and the target view angle is a view angle corresponding to a key frame image targeted by the confirmation instruction operation.
9. A terminal is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other by utilizing the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1-6 when executing a program stored in the memory.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-6.
CN202110506722.4A 2021-05-10 2021-05-10 Viewing angle switching method, device, terminal and storage medium Active CN113382267B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110506722.4A CN113382267B (en) 2021-05-10 2021-05-10 Viewing angle switching method, device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110506722.4A CN113382267B (en) 2021-05-10 2021-05-10 Viewing angle switching method, device, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN113382267A true CN113382267A (en) 2021-09-10
CN113382267B CN113382267B (en) 2023-08-08

Family

ID=77572411

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110506722.4A Active CN113382267B (en) 2021-05-10 2021-05-10 Viewing angle switching method, device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN113382267B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10191261A (en) * 1996-12-20 1998-07-21 Nippon Telegr & Teleph Corp <Ntt> Multiple viewpoint video reproducing method
US20040126085A1 (en) * 2002-08-07 2004-07-01 Mx Entertainment System for selecting video tracks during playback of a media production
CN101300840A (en) * 2005-11-04 2008-11-05 微软公司 Multi-view video delivery
CN102833584A (en) * 2012-05-22 2012-12-19 中华电信股份有限公司 Video streaming method of multi-view interactive television
CN106341711A (en) * 2016-09-27 2017-01-18 成都西可科技有限公司 Multi-position video live broadcast playback method and system
CN109257611A (en) * 2017-07-12 2019-01-22 阿里巴巴集团控股有限公司 A kind of video broadcasting method, device, terminal device and server
CN110225369A (en) * 2019-07-16 2019-09-10 百度在线网络技术(北京)有限公司 Video selection playback method, device, equipment and readable storage medium storing program for executing
CN111356018A (en) * 2020-03-06 2020-06-30 北京奇艺世纪科技有限公司 Play control method and device, electronic equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10191261A (en) * 1996-12-20 1998-07-21 Nippon Telegr & Teleph Corp <Ntt> Multiple viewpoint video reproducing method
US20040126085A1 (en) * 2002-08-07 2004-07-01 Mx Entertainment System for selecting video tracks during playback of a media production
CN101300840A (en) * 2005-11-04 2008-11-05 微软公司 Multi-view video delivery
CN102833584A (en) * 2012-05-22 2012-12-19 中华电信股份有限公司 Video streaming method of multi-view interactive television
CN106341711A (en) * 2016-09-27 2017-01-18 成都西可科技有限公司 Multi-position video live broadcast playback method and system
CN109257611A (en) * 2017-07-12 2019-01-22 阿里巴巴集团控股有限公司 A kind of video broadcasting method, device, terminal device and server
CN110225369A (en) * 2019-07-16 2019-09-10 百度在线网络技术(北京)有限公司 Video selection playback method, device, equipment and readable storage medium storing program for executing
CN111356018A (en) * 2020-03-06 2020-06-30 北京奇艺世纪科技有限公司 Play control method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113382267B (en) 2023-08-08

Similar Documents

Publication Publication Date Title
CN104994425B (en) A kind of video identifier method and apparatus
US9066145B2 (en) Commenting correlated to temporal point of video data
CN107509107B (en) Method, device and equipment for detecting video playing fault and readable medium
CN104243590B (en) Resource object recommends method and apparatus
US20210160577A1 (en) Method for playing video, electronic device and storage medium
WO2021213191A1 (en) Video processing method, terminal, and computer readable storage medium
CN110944123A (en) Intelligent guide method for sports events
JP2014155190A (en) Video data delivery device, video data delivery system, and program
WO2019114330A1 (en) Video playback method and apparatus, and terminal device
US20170353753A1 (en) Communication apparatus, communication control method, and communication system
CN113194349A (en) Video playing method, commenting method, device, equipment and storage medium
CN111163306B (en) VR video processing method and related device
CN113556568B (en) Cloud application running method, system, device and storage medium
US10674188B2 (en) Playback apparatus, method of controlling playback apparatus, playback method and server apparatus
CN113382267B (en) Viewing angle switching method, device, terminal and storage medium
CN116049490A (en) Material searching method and device and electronic equipment
EP3598738A1 (en) Video synthesis method, apparatus and device, and video playing method, apparatus and device
CN112188269B (en) Video playing method and device and video generating method and device
US9270763B2 (en) Method and apparatus for sharing electronic content
CN112201047B (en) Suspected vehicle foothold analysis method and device based on Flink framework
CN104185064A (en) Media file identification method and device
CN112911348B (en) Video management system, method and terminal based on ONVIF protocol
CN111683215B (en) Video playback method and device, electronic equipment and computer readable storage medium
US10885343B1 (en) Repairing missing frames in recorded video with machine learning
CN111935501B (en) Scene recognition method and device

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