CN113438550B - Video playing method, video conference method, live broadcasting method and related devices - Google Patents
Video playing method, video conference method, live broadcasting method and related devices Download PDFInfo
- Publication number
- CN113438550B CN113438550B CN202010206036.0A CN202010206036A CN113438550B CN 113438550 B CN113438550 B CN 113438550B CN 202010206036 A CN202010206036 A CN 202010206036A CN 113438550 B CN113438550 B CN 113438550B
- Authority
- CN
- China
- Prior art keywords
- video
- video frame
- screen
- target
- playing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 109
- 238000009432 framing Methods 0.000 claims description 2
- 238000010586 diagram Methods 0.000 description 19
- 238000004891 communication Methods 0.000 description 13
- 238000001514 detection method Methods 0.000 description 4
- 241001465754 Metazoa Species 0.000 description 2
- 210000005252 bulbus oculi Anatomy 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000001960 triggered effect Effects 0.000 description 2
- 230000000007 visual effect Effects 0.000 description 2
- 210000001508 eye Anatomy 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/44—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
- H04N21/4402—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
- H04N21/440263—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by altering the spatial resolution, e.g. for displaying on a connected PDA
- H04N21/440272—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by altering the spatial resolution, e.g. for displaying on a connected PDA for performing aspect ratio conversion
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/21—Server components or server architectures
- H04N21/218—Source of audio or video content, e.g. local disk arrays
- H04N21/2187—Live feed
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/44—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
- H04N21/44008—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving operations for analysing video streams, e.g. detecting features or characteristics in the video stream
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N7/00—Television systems
- H04N7/14—Systems for two-way working
- H04N7/15—Conference systems
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 video playing method, a video conference method, a live broadcast method and a related device, wherein the video playing method comprises the following steps: obtaining a video stream, wherein the video stream comprises a plurality of video frames; when a vertical screen playing instruction of the video stream is detected, determining a target coordinate area, wherein the target coordinate area is a local coordinate area of a current video frame; and playing the vertical screen video based on the target video image corresponding to the target coordinate area in the current video frame. The embodiment of the invention can support the mobile terminal to play the video in a full screen mode in a vertical screen state, and reduce the playing delay.
Description
Technical Field
The embodiment of the invention relates to the technical field of videos, in particular to a video playing method, a video conference method, a live broadcasting method and a related device.
Background
Along with the popularization of mobile terminals, users are more and more common to watch videos by using the mobile terminals, and it is particularly necessary to research a technical scheme for supporting full-screen video playing so that the users can obtain a good video watching effect when the mobile terminals play videos.
At present, a mobile terminal can support full-screen video playing in a horizontal screen state, however, in a vertical screen state of the mobile terminal, a user often has a requirement for full-screen video playing, and therefore, how to provide a technical scheme to support the mobile terminal to play the full-screen video in the vertical screen state becomes a problem to be solved by technical personnel in the field.
Disclosure of Invention
In view of this, embodiments of the present invention provide a video playing method, a video conference method, a live broadcast method, and a related apparatus, so as to support a mobile terminal to play a video in a full screen mode in a vertical screen state.
To solve the above problem, an embodiment of the present invention provides a video playing method, including:
obtaining a video stream, wherein the video stream comprises a plurality of video frames;
when a vertical screen playing instruction of the video stream is detected, determining a target coordinate area, wherein the target coordinate area is a local coordinate area of a current video frame;
and playing a vertical screen video based on the target video image corresponding to the target coordinate area in the current video frame.
An embodiment of the present invention further provides a video playing device, including:
the video stream acquisition module is used for acquiring a video stream, and the video stream comprises a plurality of video frames;
the coordinate area determination module is used for determining a target coordinate area when a vertical screen playing instruction of the video stream is detected, wherein the target coordinate area is a local coordinate area of a current video frame;
and the vertical screen playing module is used for playing a vertical screen video based on the target video image corresponding to the target coordinate area in the current video frame.
The embodiment of the invention also provides a video conference method, which is applied to the first mobile terminal and comprises the following steps:
when the first mobile terminal and the second mobile terminal establish video conference connection, acquiring a real-time video stream acquired by the second mobile terminal;
when a vertical screen playing instruction of the real-time video stream is detected, determining a target coordinate area, wherein the target coordinate area is a local coordinate area of a current video frame in the real-time video stream;
and playing the vertical screen video of the real-time video stream based on the target video image corresponding to the target coordinate area in the current video frame.
The embodiment of the invention also provides a live broadcast method, which comprises the following steps:
acquiring a live video stream, wherein the live video stream comprises a plurality of video frames;
when a vertical screen playing instruction of the live video stream is detected, determining a target coordinate area, wherein the target coordinate area is a local coordinate area of a current video frame in the live video stream;
and playing a vertical screen video of the live video stream based on a target video image corresponding to the target coordinate area in the current video frame.
The embodiment of the present invention further provides a mobile terminal, which includes at least one memory and at least one processor, where the memory stores one or more computer-executable instructions, and the processor invokes the one or more computer-executable instructions to execute the video playing method, or execute the video conference method, and execute the live broadcasting method.
An embodiment of the present invention further provides a storage medium, where the storage medium stores one or more computer-executable instructions, and the one or more computer-executable instructions are used to execute the video playing method, or execute the video conference method, or execute the live broadcast method.
Compared with the prior art, the technical scheme of the embodiment of the invention has the following advantages:
the video playing method provided by the embodiment of the invention can obtain the video stream comprising a plurality of video frames, and when the vertical screen playing instruction of the video stream is detected during the playing or playing process of the video stream, the embodiment of the invention can determine the target coordinate area corresponding to the target video image in the current video frame, so that the vertical screen video of the video stream is played based on the target video image corresponding to the target coordinate area in the current video frame, and the full-screen video playing in the vertical screen state is realized. Therefore, when the vertical screen video needs to be played for the acquired video stream, the embodiment of the invention can determine the target video image in the video frame based on the target coordinate area of the target video image in the video frame, so that the vertical screen video of the mobile terminal in the vertical screen state is played based on the target video image, and the full-screen video playing of the mobile terminal in the vertical screen state is supported. Meanwhile, the embodiment of the invention realizes the playing of the vertical screen video in the vertical screen state by determining the target video image in the video frame, and does not relate to the switching of the player among different video streams, so the video playing method provided by the embodiment of the invention can reduce the playing delay.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flow chart of a current video playback;
fig. 2 is an alternative flowchart of a video playing method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a coordinate system of a video frame according to an embodiment of the present invention;
fig. 4 is an alternative flowchart of a video playing method according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of an alternative scenario for determining a target coordinate area according to an embodiment of the present invention;
fig. 6 is another alternative flowchart of a video playing method according to an embodiment of the present invention;
fig. 7 is a schematic diagram illustrating splicing and playing of video frames according to an embodiment of the present invention;
FIG. 8 is an alternative diagram of forming a video frame according to an embodiment of the present invention;
FIG. 9 is a schematic diagram of another alternative method for forming video frames according to an embodiment of the present invention;
fig. 10 is a flowchart illustrating a video playing method according to another alternative embodiment of the present invention;
fig. 11 is an alternative schematic diagram of a video playing method according to an embodiment of the present invention;
FIG. 12 is an alternative flow chart for determining a target coordinate area provided by embodiments of the present invention;
FIG. 13 is an alternative diagram of a video frame according to an embodiment of the present invention;
FIG. 14 is a diagram of another exemplary coordinate system provided by an embodiment of the present invention;
fig. 15 is yet another alternative flowchart of a video playing method according to an embodiment of the present invention;
fig. 16 is an alternative flowchart of a video conference method according to an embodiment of the present invention;
fig. 17 is an exemplary diagram of a horizontal screen video and a vertical screen video in a video conference scene according to an embodiment of the present invention;
fig. 18 is an alternative block diagram of a video playback device according to an embodiment of the present invention;
fig. 19 is another alternative block diagram of a video playing device according to an embodiment of the present invention;
fig. 20 is a block diagram of a mobile terminal according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
At present, a full-screen playing video can be realized by a mobile terminal in a horizontal screen state, and in a vertical screen state, the video image is reduced by a certain proportion and then played in a partial area of a screen.
In order to support a mobile terminal to play a video in a full screen mode in a vertical screen mode, the current technical scheme is that on the basis of a horizontal screen video stream of the video (the horizontal screen video stream can be regarded as a video stream played in the full screen mode in the horizontal screen mode of the mobile terminal), a new path of vertical screen video stream for the vertical screen full screen play is added, so that the mobile terminal plays the horizontal screen video stream in the horizontal screen mode and is switched to the vertical screen video stream for playing in the vertical screen mode; the process of this process may be as shown in fig. 1, and the process may be executed by a mobile terminal, for example, a smart phone, a tablet computer, and the like, and referring to fig. 1, the process may include:
and S10, respectively acquiring a horizontal screen video stream and a vertical screen video stream of the video.
The video stream of the video may include a horizontal screen video stream and a vertical screen video stream, the horizontal screen video stream is used for full-screen playing in the horizontal screen state of the mobile terminal, and the vertical screen video stream is used for full-screen playing in the vertical screen state of the mobile terminal. The horizontal screen state refers to a state of horizontal display of the screen of the mobile terminal, and the vertical screen state refers to a state of vertical display of the screen of the mobile terminal.
The cross-screen video stream and the vertical-screen video stream have a corresponding relationship, for example, the cross-screen video stream corresponds to a cross-screen video stream identifier (such as an ID), the vertical-screen video stream corresponds to a vertical-screen video stream identifier, and the establishment of the corresponding relationship between the cross-screen video stream and the vertical-screen video stream can be realized by establishing the corresponding relationship between the cross-screen video stream identifier and the vertical-screen video stream identifier; when the mobile terminal acquires the horizontal screen video stream, the corresponding vertical screen video stream can be synchronously acquired based on the corresponding relationship, for example, the identifier of the vertical screen video stream is determined from the corresponding relationship according to the acquired identifier of the horizontal screen video stream, so that the vertical screen video stream is acquired based on the determined identifier of the vertical screen video stream.
The landscape video stream and the portrait video stream may use the same soundtrack, such as audio coincidence of the landscape video stream and the portrait video stream at the same video time point. The landscape video stream may include a plurality of landscape video frames, one landscape video frame may be a video image of the landscape video stream, and the image width-to-length ratio of the landscape video frame may be 16; the vertical screen video stream may include a plurality of vertical screen video frames, and the image width-to-length ratio of the vertical screen video frames is 9.
And S11, when a vertical screen playing instruction is detected, playing a vertical screen video frame of the current video time point.
In this embodiment, in the process of starting or playing the video, when the vertical screen playing instruction is detected, the mobile terminal may play the vertical screen video frame corresponding to the current video time point. Optionally, the vertical screen playing instruction may be obtained by triggering after detecting that the user clicks a key on the screen of the mobile terminal (for example, after the user clicks a vertical screen playing button displayed on a video playing page, the vertical screen playing instruction is triggered), or may be obtained by triggering after detecting that the posture of the mobile terminal changes, if the rotation direction of the mobile terminal can be detected, the vertical screen playing instruction is detected if the rotation direction matches with a preset vertical direction, for example, when the rotation direction is detected to be greater than 45 degrees relative to the horizontal direction, the rotation direction is considered to match with the preset vertical direction, a triggering condition of the vertical screen playing instruction is met, and then the vertical screen playing instruction is detected. The rotation direction of the mobile terminal can be detected by a gyroscope and the like located inside the mobile terminal.
Optionally, when a vertical screen playing instruction is detected, the embodiment of the present invention may determine a current video time point, and play a vertical screen video frame corresponding to the current video time point in the vertical screen video stream. The current video time point may be a starting time point of video playing or a certain time point in the video playing process. In an optional example, a video player of the mobile terminal may record a current video time point of a video, and when a vertical screen playing instruction is detected, the video player may switch to a vertical screen video stream, so as to play a corresponding vertical screen video frame according to the recorded current video time point.
And S12, when a horizontal screen playing instruction is detected, playing a horizontal screen video frame corresponding to the current video time point.
In the process of starting or playing the video, when a transverse screen playing instruction is detected, the mobile terminal can play a transverse screen video frame corresponding to the current video time point. Optionally, the horizontal screen playing instruction may be obtained by triggering after detecting that the user clicks a key on the screen of the mobile terminal (for example, after the user clicks a horizontal screen playing button displayed on a video playing page, the horizontal screen playing instruction is triggered), or may be obtained by triggering after detecting that the spatial state of the mobile terminal changes, for example, the rotation direction of the mobile terminal may be detected, and if the rotation direction is detected to be matched with a preset horizontal direction, for example, if the rotation direction is detected to be greater than 45 degrees with respect to a vertical direction, the rotation direction is considered to be matched with the preset horizontal direction.
Optionally, when a cross-screen playing instruction is detected, the embodiment of the present invention may determine a current video time point of the video, and play a cross-screen video frame corresponding to the current video time point in the cross-screen video stream. The current video time point may be a starting time point of video playing or a certain time point in the video playing process.
Although the method can realize that the mobile terminal plays the horizontal screen video in a full screen mode in the horizontal screen state and plays the vertical screen video in the full screen mode in the vertical screen state, the player of the mobile terminal needs to switch between the horizontal screen video stream and the vertical screen video stream for playing, and playing delay is easy to occur. Moreover, the loading schedules of the landscape video stream and the portrait video stream in the above method may not be completely synchronized, for example, the landscape video stream is already loaded and played to a certain video time point, and the portrait video stream may not be yet loaded to the video time point, which also causes a play delay when the mobile terminal switches the played video streams.
In order to solve the problem of play delay and support full-screen video playing in the vertical screen state of the mobile terminal, embodiments of the present invention provide an improved video playing scheme, where one video stream is used to implement full-screen video playing in the vertical screen state and full-screen video playing in the horizontal screen state, and the problem of play delay can be solved.
As an optional implementation, fig. 2 shows an optional flow of a video playing method provided in an embodiment of the present invention, where the method may be executed by a mobile terminal, and the mobile terminal may be a mobile terminal device such as a smart phone, a tablet computer, a PC (personal computer), and a smart television that plays a video; referring to fig. 2, the process may include:
step S20, obtaining a video stream, wherein the video stream comprises a plurality of video frames.
In optional implementation, a user can use a mobile terminal to open a video APP (application software), and after the user selects a video on a video recommendation page or a video search page of the video APP, the mobile terminal can request a corresponding video stream from a video server, so that the mobile terminal can acquire the video stream; of course, the embodiment of the present invention may also support the mobile terminal to interact with the video server in a browser, an applet, or other manners, so as to obtain the video stream.
The video stream may be a combination of image data and audio data, and in an embodiment of the present invention, the video stream may include a plurality of video frames, and the video frames are video images in the video stream. In an alternative example, the video frame and the audio both correspond to a video time point, so that at a specific video time point, the video player of the mobile terminal can play the video frame and the audio of the corresponding video time point.
In an optional implementation of the embodiment of the present invention, the video stream may be a horizontal-screen video stream directly, and correspondingly, the video frame may be a horizontal-screen video frame.
In another alternative implementation, the video frames in the video stream may be spliced based on the landscape screen video frames and the portrait screen video frames. Optionally, on one hand, the horizontal-screen video frame and the vertical-screen video frame may belong to different video streams, for example, the video frames are obtained by splicing a horizontal-screen video frame in a horizontal-screen video stream and a vertical-screen video frame in a vertical-screen video stream, optionally, the horizontal-screen video stream and the vertical-screen video stream may be video streams of the same video with different image proportions, for example, an aspect ratio of an image in the horizontal-screen video stream is 16; the process of splicing the video frames can be implemented by a video server. Alternatively, on the other hand, the landscape screen video frame and the portrait screen video frame may belong to the same video stream, for example, the portrait screen video frame may be formed based on a video image in the landscape screen video frame, and the video image may be a subject image in the landscape screen video frame or a non-subject image.
And S21, when a vertical screen playing instruction of the video stream is detected, determining a target coordinate area, wherein the target coordinate area is a local coordinate area of the current video frame.
In the embodiment of the invention, the target coordinate area is used for selecting a target video image in the current video frame so as to play a vertical screen video based on the target video image.
In the process of starting or playing the video, when a vertical screen playing instruction is detected, a target coordinate area corresponding to a target video image used for vertical screen playing in a current video frame can be determined, and therefore the vertical screen video is played based on the target video image corresponding to the target coordinate area in the current video frame. The current video frame may be considered as a video frame of a current video time point in the video stream.
In the embodiment of the invention, the video frame is established with a coordinate system to distinguish different positions of the video frame. Fig. 3 shows a schematic diagram of a coordinate system of a video frame, wherein in the coordinate system, the upper left corner of the video frame is taken as a coordinate origin O, the transverse direction of the video frame is taken as an X direction, and the longitudinal direction of the video frame is taken as a Y direction, and the position of each coordinate point in each direction of the coordinate system can be identified by the number of pixels. For example, the coordinates of the P point may be (180, 150), where the horizontal coordinate value 180 indicates that the P point is 180 pixels away from the O point in the X direction, and the vertical coordinate value 150 indicates that the P point is 150 pixels away from the O point in the Y direction. Further, based on the coordinate data of the video frame, a coordinate region of the video frame may be determined. For example, based on the coordinate data of the 4 points of the PQMN, the coordinate region C can be determined.
In the embodiment of the invention, the video image played in the vertical screen is only a partial area in the video frame, and correspondingly, the target coordinate area is a local coordinate area of the current video frame.
The target coordinate area corresponding to the target video image in the current video frame can be determined by the mobile terminal according to algorithm calculation, and can also be determined according to coordinate data provided by the video server.
It should be noted that one or more video images for vertical screen playing in the current video frame may be used, and if one video image for vertical screen playing in the current video frame is used, a corresponding target coordinate area of the video image in the current video frame is determined; if a plurality of video images for vertical screen playing in the current video frame are available, the corresponding target coordinate area of the target video image indicated by the indication information in the current video frame can be determined by acquiring the indication information of the user.
Optionally, the scheme that the mobile terminal determines the coordinate region according to the algorithm calculation may be applicable to a case that the video stream is a landscape screen video stream, the corresponding video frame is a landscape screen video frame, and the target video image may be a local video image in the video frame, such as a main image corresponding to a video main body in the video frame; the embodiment of the invention can identify the video main body in the video frame by adopting an algorithm, thereby determining the coordinate area of the video image corresponding to the video main body and obtaining the coordinate area corresponding to the target video image in the video frame.
It should be noted that the video subject may be a video object mainly expressing video content in a video frame, where the video object is, for example, a person, an animal, a building, a scene, and the like in the video frame, and the embodiment of the present invention is not limited thereto. In an alternative example, the embodiment of the present invention may identify persons and animals in the video frame, so as to identify the video main body in the video frame, and in another alternative example, the embodiment of the present invention may identify element information such as an outline, a position, an occupied picture ratio, and the like of each video object in the video frame, so as to determine video content that intentionally expresses the video content from the video frame based on the element information of each video object in the video frame, so as to identify the video main body in the video frame;
optionally, the mobile terminal may set an algorithm component for identifying the video body in the video frame, for example, the mobile terminal may set an auto flip algorithm for identifying a main character in the video frame, so as to identify the video body in the video frame, and use a coordinate region corresponding to the video body as a coordinate region corresponding to a target video image in the video frame;
with respect to the specific manner of identifying the video subject in the landscape video frame, the embodiments of the present invention are not limited thereto, and the above description is only an example illustration for easy understanding.
In the scheme that the video server provides the coordinate data, the mobile terminal may further obtain the coordinate data from the video server, and the coordinate data may record a coordinate area corresponding to the target video image in each video frame, so that based on the coordinate data, the mobile terminal may determine the coordinate area corresponding to the target video image in the current video frame. The scheme that the video server provides the coordinate data can be suitable for the situation that the video stream is a horizontal-screen video stream, or the situation that video frames in the video stream are obtained by splicing horizontal-screen video frames and vertical-screen video frames.
In an optional implementation, the current video frame may be a starting video frame of video playing, or may be a certain video frame in the video playing process. In an optional example, the video player of the mobile terminal may record a current video time point of the video stream, and further determine a current video frame in the video stream according to the recorded current video time point, so as to determine a coordinate region corresponding to the target video image in the current video frame.
And S22, playing a vertical screen video based on the target video image corresponding to the target coordinate area in the current video frame.
Based on the target coordinate area, the embodiment of the invention can determine the target video image corresponding to the target coordinate area, thereby realizing full-screen video playing in a vertical screen state based on the target video image. It can be understood that, in the process from the detection of the horizontal screen playing instruction to the next detection of the vertical screen playing instruction, at each video time point, the embodiment of the present invention may determine the corresponding target video image, and play the vertical screen video based on the target video image determined at each video time point, thereby implementing the playing of the vertical screen video in the process from the detection of the horizontal screen playing instruction to the next detection of the vertical screen playing instruction.
Optionally, the image size of the target video image may not be adapted to a vertical screen interface of the mobile terminal, and the image size of the target video image may be adjusted to be adapted to the vertical screen interface of the mobile terminal in the embodiment of the present invention, so that the vertical screen video of the video stream is played based on the adjusted target video image.
The video playing method provided by the embodiment of the invention can obtain the video stream comprising a plurality of video frames, and when the vertical screen playing instruction of the video stream is detected during the playing or playing process of the video stream, the embodiment of the invention can determine the target coordinate area corresponding to the target video image in the current video frame, so that the vertical screen video of the video stream is played based on the target video image corresponding to the target coordinate area in the current video frame, and the full-screen video playing under the vertical screen state is realized. Therefore, when the vertical screen video needs to be played for the acquired video stream, the embodiment of the invention can determine the target video image in the video frame based on the target coordinate area of the target video image in the video frame, and play the vertical screen video of the mobile terminal in the vertical screen state based on the target video image, thereby realizing the purpose of supporting the mobile terminal to play the video in the full screen state in the vertical screen state. Meanwhile, the embodiment of the invention realizes full-screen video playing in a vertical screen state by determining the target video image in the video frame, and does not relate to switching of a player among different video streams, so that the video playing method provided by the embodiment of the invention can reduce the playing delay.
In an alternative implementation, if there are multiple video images used for vertical screen playing in a current video frame, the embodiment of the present invention may determine a target coordinate area of a target video image. Optionally, fig. 4 shows an optional flow of a video playing method provided in an embodiment of the present invention, where the method may be executed by a mobile terminal, and the mobile terminal may be a smart phone, a tablet computer, a PC (personal computer), and the like that play a video, and referring to fig. 4, the flow may include:
step S30, acquiring a video stream, wherein the video stream comprises a plurality of video frames;
step S31, when a vertical screen playing instruction of the video stream is detected, determining a target coordinate area corresponding to a target video image indicated by the indication information in a current video frame;
in the embodiment of the invention, a plurality of video images for vertical screen playing in the current video frame are used, and a target video image for current vertical screen playing is selected from the plurality of video images; the user indication may be represented by the indication information, in an example, the indication information may be manual selection information of the user, for example, when there are a plurality of video subjects in the current video frame, the user may click on a video subject to be played, so that based on the indication clicked by the user, the embodiment of the present invention may determine a corresponding target coordinate region of the indicated video subject in the current video frame; in another example, the indication information may also be eyeball tracking information of the user, and by tracking an eyeball attention area of the user, an area that the user pays attention to in the current video frame may be determined, so that a video image of the area may be taken as a target video image, and a target coordinate area of the video image of the area may be determined.
Taking the schematic diagram of the optional scene for determining the target coordinate area shown in fig. 5 as an example, the number of the video images for vertical screen playing in the current video frame is 3, which is A1, A2, and A3 respectively. In one example, the display interface may display corresponding prompt information to prompt a user to send out indication information to indicate a target video image for vertical screen playing, where the indication information may be generated by clicking a key in the display interface by the user or by detecting a specific action of the user. In another example, the mobile terminal may perform eye tracking on the user, acquire a face image through the camera, and identify a target coordinate region corresponding to the video image of the target region, where the target coordinate region is A3 as can be seen from the example in fig. 5.
And S32, playing a vertical screen video based on the target video image corresponding to the target coordinate area in the current video frame.
In another optional implementation, if there is one video image used for vertical screen playing in the current video frame, the embodiment of the present invention may directly determine the video image used for vertical screen playing in the current video frame as the target video image without user instruction, and determine the target coordinate area corresponding to the video image in the current video frame.
In an alternative implementation, the video frames in the video stream acquired by the mobile terminal may include a horizontal screen video frame and a vertical screen video frame which are spliced together; in this case, when the mobile terminal acquires the video stream, the mobile terminal may further acquire first coordinate data corresponding to the video stream, where the first coordinate data may record a coordinate area of a vertical screen video frame and a coordinate area of a horizontal screen video frame in each video frame, that is, the first coordinate data may distinguish a horizontal screen video frame and a vertical screen video frame in the video frames; therefore, after the mobile terminal acquires the video stream and the first coordinate data, the mobile terminal can play the horizontal screen video frame based on the coordinate area of the horizontal screen video frame in the video frame indicated by the first coordinate data in the horizontal screen state, and play the vertical screen video frame based on the coordinate area of the vertical screen video frame in the video frame indicated by the first coordinate data in the vertical screen state.
Optionally, fig. 6 shows another optional flow of the video playing method provided in the embodiment of the present invention, where the method may be executed by a mobile terminal, and the mobile terminal may be a smart phone, a tablet computer, a PC (personal computer), or the like that plays a video, and referring to fig. 6, the flow may include:
and S40, acquiring a video stream and first coordinate data corresponding to the video stream.
In the embodiment of the invention, the video stream comprises a plurality of video frames, and one video frame can be spliced by a horizontal screen video frame and a vertical screen video frame. The splicing of the horizontal screen video frame and the vertical screen video frame can be realized by a video server, and because the image proportion of the horizontal screen video frame and the vertical screen video frame is different, the horizontal screen video frame and the vertical screen video frame can be aligned on an image when being spliced, the video server can splice the vertical screen video frame with the horizontal screen video frame after rotating a preset angle in a first direction, so that the long pixel edge of the vertical screen video frame is connected with the wide pixel edge of the horizontal screen video frame. Referring to fig. 7, an alternative splicing method for video frames is shown, after rotating 90 degrees in a counterclockwise direction, a vertical-screen video frame 110 is spliced with the horizontal-screen video frame 100 to form the video frame.
Optionally, the splicing manner of the horizontal screen video frame and the vertical screen video frame may also be other manners, for example, the vertical screen video frame is directly spliced above, below, to the left, to the right, and the like of the horizontal screen video frame without rotating, so as to form the video frame.
In the embodiment of the invention, when the video stream is acquired, the first coordinate data corresponding to the video stream is also acquired, and the first coordinate data at least records the coordinate area of the vertical screen video frame in each video frame.
S41, when a vertical screen playing instruction of the video stream is detected, determining a target coordinate area;
in the embodiment of the invention, the coordinate area of the vertical screen video frame in the current video frame can be determined from the first coordinate data based on the acquired first coordinate data, so that the target coordinate area in the current video frame is obtained.
In this embodiment, since the coordinate area of the vertical screen video frame in each video frame is recorded in the first coordinate data, when a vertical screen playing instruction of the video stream is detected, the embodiment of the present invention may determine the coordinate area of the vertical screen video frame in the current video frame from the first coordinate data based on the current video time point. Taking fig. 7 as an example, the coordinate area of the spliced vertical screen video frame 110 is determined as the target coordinate area.
It should be noted that the number of the vertical screen video frames in the current video frame may be one or more; if the number of the vertical screen video frames in the current video frame is one, the embodiment of the invention can directly determine the vertical screen video frame as the target video image, so that the target coordinate area corresponding to the vertical screen video frame in the current video frame is determined based on the first coordinate data; if the number of the vertical screen video frames in the current video frame is multiple, the embodiment of the present invention needs to acquire the indication information of the user, and based on the first coordinate data, determines the target coordinate area of the target vertical screen video frame indicated by the indication information in the current video frame, that is, when the number of the vertical screen video frames in the current video frame is multiple, the embodiment of the present invention needs to select the vertical screen video frame as the video image based on the user indication.
It should be noted that, if the splicing manner of the horizontal screen video frame and the vertical screen video frame in each video frame is the same, the coordinate areas of the horizontal screen video frame and the vertical screen video frame in the video frames may be fixed, so that the first coordinate data may record the coordinate areas of the fixed horizontal screen video frame and the fixed vertical screen video frame, which is only an alternative, of course.
And S42, playing a vertical screen video based on the target video image corresponding to the target coordinate area in the current video frame.
Optionally, the mobile terminal may use a video player to frame the target video image from the current video frame based on the target coordinate region, so as to play the vertical screen video based on the framed target video image.
In optional implementation, if the vertical screen video frame is spliced with the horizontal screen video frame after rotating for a preset angle in a first direction, and the long pixel edge of the vertical screen video frame is connected with the wide pixel edge of the horizontal screen video frame; correspondingly, in this step, when the vertical screen video is played, the vertical screen video frame may be rotated by the preset angle in the second direction, and the image size of the rotated vertical screen video frame is adjusted to be adapted to the vertical screen interface of the mobile terminal, so that the vertical screen video of the video stream is played based on the adjusted vertical screen video frame, wherein the second direction is opposite to the first direction. Taking fig. 7 as an example, after determining the vertical screen video frame 110, the vertical screen video frame 110 may be rotated 90 degrees clockwise, and further the image size of the rotated vertical screen video frame may be adjusted to be adapted to the vertical screen interface of the mobile terminal, and the vertical screen video of the video stream is played based on the adjusted vertical screen video frame.
In the video playing method provided by the embodiment of the invention, the video frames of the video stream comprise the horizontal screen video frame and the vertical screen video frame which are spliced based on the same video time point, so that when the mobile terminal detects the vertical screen playing instruction of the video stream after acquiring the video stream, the target coordinate area corresponding to the vertical screen video frame serving as the target video image can be determined from the video frames based on the first coordinate data corresponding to the video stream, and the full-screen video playing in the vertical screen state is further realized.
It should be noted that the video frames in the video stream may be formed by splicing horizontal screen video frames of a horizontal screen video stream and vertical screen video frames of a vertical screen video stream; when the video stream is a horizontal-screen video stream, the embodiment of the invention can form a vertical-screen video frame based on a local video image of a horizontal-screen video frame in the horizontal-screen video stream, and then splice the horizontal-screen video frame in the horizontal-screen video stream with the formed vertical-screen video frame to form a video frame.
In an alternative example, referring to the alternative schematic diagram of forming video frames shown in fig. 8, a horizontal screen video frame of a horizontal screen video stream is spliced with a vertical screen video frame of a vertical screen video stream to obtain a video frame.
In another optional example, referring to another optional schematic diagram of forming a video frame shown in fig. 9, the video stream is a horizontal-screen video stream, a video image corresponding to a video main body in the horizontal-screen video frame forms a vertical-screen video frame, and the vertical-screen video frame and the horizontal-screen video frame are spliced to obtain the video frame.
In an alternative implementation, fig. 10 shows another optional flow of the video playing method provided in the embodiment of the present invention, where the flow may include:
s50, acquiring a video stream and first coordinate data corresponding to the video stream;
in the embodiment of the invention, when a video stream is acquired, first coordinate data corresponding to the video stream is also acquired; the first coordinate data records the coordinate area of the vertical screen video frame in each video frame and further records the coordinate area of the horizontal screen video frame in each video frame, so that the embodiment of the invention can determine the horizontal screen video frame according to the coordinate area of the horizontal screen video frame in the horizontal screen state.
And S51, when a cross screen playing instruction of the video stream is detected, determining a coordinate area corresponding to a cross screen video frame in the current video frame from the first coordinate data.
In this embodiment, since the coordinate area of the landscape video frame in each video frame is recorded in the first coordinate data, for the current video frame, the embodiment of the present invention may determine the coordinate area corresponding to the landscape video frame in the current video frame.
S52, playing a cross screen video based on the cross screen video frame corresponding to the coordinate area;
according to the video playing method provided by the embodiment of the invention, the video frames of the video stream comprise the spliced horizontal screen video frame and the vertical screen video frame, and based on the video frame, when the horizontal screen playing instruction of the video stream is detected, the horizontal screen video frame and the vertical screen video frame can be distinguished based on the first coordinate data corresponding to the video frame, so that the horizontal screen video is played in the horizontal screen state, and the vertical screen video is played in the vertical screen state.
In an optional implementation, an embodiment of the present invention provides a technical solution for supporting a vertical-screen full-screen video playing, where the video stream may be a horizontal-screen video stream, and the video frame is a horizontal-screen video frame; optionally, as shown in fig. 11, the video playing method provided in the embodiment of the present invention may include: acquiring the cross screen video stream and second coordinate data corresponding to the cross screen video stream; when a vertical screen playing instruction of the video stream is detected, determining a target coordinate area; and playing a vertical screen video based on the target video image corresponding to the target coordinate area in the current horizontal screen video frame.
According to the embodiment of the invention, when the cross-screen video stream is acquired, the second coordinate data corresponding to the cross-screen video stream can be acquired; and the second coordinate data at least records a coordinate area corresponding to the video image for vertical screen playing in each horizontal screen video frame.
It should be noted that, in the embodiment of the present invention, the video image used for the vertical screen playing is a local video image in the horizontal screen video frame, for example, a main body image, and a coordinate area of the main body image corresponding to the video main body in the horizontal screen video frame may be used as a coordinate area corresponding to the video image used for the vertical screen playing.
In the embodiment of the present invention, the number of video images for vertical screen playing in the current horizontal screen video frame may be one or multiple. If the number of the video images used for vertical screen playing in the current horizontal screen video frame is one, the video images can be directly used as target video images, and therefore a target coordinate area corresponding to the video images in the current horizontal screen video frame is determined based on the second coordinate data; if the number of the video images for vertical screen playing in the current horizontal screen video frame is multiple, the embodiment of the present invention needs to combine at least information, so as to determine the corresponding target coordinate area of the target video image indicated by the indication information in the current horizontal screen video frame based on the second coordinate data.
The target video image belongs to a local video image in a horizontal screen video frame, and when the full-screen playing of a vertical screen is carried out, the embodiment of the invention can frame the target video image from the current horizontal screen video frame through a video player based on the target coordinate area, adjust the image size of the framed target video image to be matched with a vertical screen interface, and play the target video image with the adjusted image size.
Optionally, further, in the embodiment of the present invention, when the cross-screen play instruction of the video stream is detected, the cross-screen video can be directly played based on the cross-screen video frame.
According to the video playing method provided by the embodiment of the invention, the video stream is a horizontal screen video stream, the video frames are horizontal screen video frames, and the second coordinate data corresponding to the horizontal screen video stream can at least record the coordinate area of the video image in each horizontal screen video frame.
When the mobile terminal is in a horizontal screen state, a user watching screen has a wider visual field, and when the mobile terminal is in a vertical screen state, the visual field of the user watching screen is more focused; based on the characteristic, the content of the vertical screen video can be formed by the main body image corresponding to the video main body in the horizontal screen video, so that the main body image in the horizontal screen video is focused when the vertical screen video is played by the mobile terminal, different playing side points are provided when the horizontal screen video and the vertical screen video are played by the mobile terminal, and the possibility of realizing different film watching effects of the horizontal screen video and the vertical screen video is provided.
In an optional implementation, an embodiment of the present invention further provides a technical solution for determining a target coordinate area, where the video stream is a cross-screen video stream, and the video frame is a cross-screen video frame. According to the scheme, the mobile terminal can identify the video main body in the video frame, so that the video image corresponding to the video main body in the video frame is determined as the target video image in the video frame; based on this, the embodiment of the present invention may determine the target coordinate area by determining the coordinate area of the video image corresponding to the video subject in the video frame. Fig. 12 shows an optional process of determining a target coordinate area in a current video frame according to an embodiment of the present invention, where the process may be executed by a mobile terminal, and specifically may be executed when the mobile terminal detects a vertical screen play instruction of a video stream and needs to determine the target coordinate area, and referring to fig. 12, the process may include:
s70, determining a video main body in the current horizontal screen video frame;
the video subject is a main displayed object in the video frame, for example, in a multi-person scene, the main displayed character is the video subject, and the example of the video frame shown in fig. 13 is taken, where the character selected by the dashed box is the main displayed character. In addition, in the case of combining audio scenes in a video stream, the video subject may be, for example, a character corresponding to audio.
In an optional example, in a multi-person scene, an auto flip algorithm may be used to identify main characters of a video, and then determine that a main task is a video subject, so as to determine a target coordinate area in a video frame.
It can be understood that when the target video image is only a partial area of the landscape screen video frame, the main content of the video can be effectively displayed by taking the video image corresponding to the video main body as the target video image. In the embodiment of the present invention, the target video image in one video frame may be a video image corresponding to a video subject in the video frame.
In this embodiment, the video subject is a main displayed object in the video frame, and the determination of the corresponding target coordinate area in the video frame can be realized by determining the video subject.
And S71, determining a target coordinate area corresponding to the video image corresponding to the video main body in the current horizontal screen video frame.
In the embodiment of the present invention, the number of the video subjects may be one or more; if the number of the video main bodies is one, the video image corresponding to the video main body can be directly used as a target video image, and the target coordinate area corresponding to the video image corresponding to the video main body in the current horizontal screen video frame can be determined; if the number of the video subjects is multiple, the embodiment of the present invention may determine the video image corresponding to the target video subject indicated by the indication information, and the corresponding target coordinate area in the current horizontal screen video frame.
In the embodiment of the invention, the vertical screen video can be played based on the video image of the video main body corresponding to the target coordinate area in the vertical screen state by determining the target coordinate area. For example, as shown in fig. 14, two main images, namely, main images C1 and C2, exist in a landscape screen video frame, and then a coordinate system is established by using the upper left corner as an origin, increasing the downward Y-axis coordinate and increasing the rightward X-axis coordinate, so that after the main image serving as the target video image is determined from the landscape screen video frame, the video image in the coordinate area may be framed by using a video player based on the coordinate area of the main image, and then the portrait screen video is played based on the framed video image.
It should be noted that the embodiment of the present invention may also allow a user to indicate a plurality of target video images, and this case may be applicable to a case where the video frames include a spliced horizontal-screen video frame and a vertical-screen video frame, and may also be applicable to a case where the video frames are specifically horizontal-screen video frames; accordingly, a process of playing the portrait video based on the plurality of target video images may be as shown in fig. 15, including:
and S80, if the indicated number of the target video images is multiple, adjusting the image sizes of the multiple target video images, and splicing the multiple target video images with the adjusted image sizes to form a played vertical screen video frame.
Optionally, when a plurality of target video images are provided, the embodiment of the present invention may adjust the image sizes of the plurality of target video images, so that the overall image size of the plurality of target video images after the image size adjustment corresponds to the image size of the vertical screen video frame, and thus the plurality of target video images after the image size adjustment are spliced to obtain the current vertical screen video frame.
Optionally, in a case that the video frames include a horizontal screen video frame and a vertical screen video frame that are spliced, the target video image may be a vertical screen video frame, and one video frame of the video stream may have one horizontal screen video frame and a plurality of vertical screen video frames that are spliced; the target video image may also be a video image in a landscape video frame, such as a subject image corresponding to a video subject.
And S81, playing the formed vertical screen video frame.
It can be understood that, when the number of the target video images is one, the embodiment of the present invention may adjust the image size of the target video images, and the target video images after the image size is adjusted may be used as the played vertical screen video frames.
The video playing method provided by the embodiment of the invention can be applied in various scenes, such as video conferences, live broadcasts, shopping videos, comprehensive videos and the like; in an application example, an embodiment of the present invention further provides a video conference method, which is applied to a first mobile terminal, and in an alternative implementation, as shown in fig. 16, the video conference method may include:
step S200, after the first mobile terminal and the second mobile terminal establish video conference connection, acquiring a real-time video stream acquired by the second mobile terminal.
Each mobile terminal participating in the video conference can acquire real-time video stream data through each camera and forward the real-time video stream data to other mobile terminals participating in the video conference through the video conference server. In a video conference with participation of a first mobile terminal and a second mobile terminal, after the first mobile terminal establishes a video conference connection with the second mobile terminal, the first mobile terminal can acquire a real-time video stream collected by the second mobile terminal and forwarded by a video conference server. The real-time video stream may include landscape video frames captured by the second mobile terminal.
Step S210, when a vertical screen playing instruction of the real-time video stream is detected, determining a target coordinate area, wherein the target coordinate area is a local coordinate area of a current video frame in the real-time video stream.
Step S220, based on the target video image corresponding to the target coordinate area in the current video frame, the vertical screen video of the real-time video stream is played.
The optional implementation of step S210 and step S220 may refer to the description of the corresponding parts above, and will not be described herein again.
As shown in fig. 17, in a video conference in which users D1 and D2 participate, a terminal of the user D1 may obtain a real-time video stream collected by a terminal of the user D2, when the terminal of the user D1 is horizontally placed, the terminal of the user D1 may play a cross-screen video frame of the real-time video stream, and when the terminal of the user D1 is vertically placed, the terminal of the user D1 may identify a video subject in the cross-screen video frame, so that a vertical-screen video is played based on a target coordinate region corresponding to a video image corresponding to the video subject in the current cross-screen video frame.
In another application scenario, the video playing method provided by the embodiment of the present invention may be applicable in a live broadcast scenario, and the specific live broadcast process may be: the method comprises the steps that a mobile terminal obtains a live video stream, wherein the live video stream comprises a plurality of video frames; when detecting a vertical screen playing instruction of the live video stream, the mobile terminal determines a target coordinate area, wherein the target coordinate area is a local coordinate area of a current video frame in the live video stream; and the mobile terminal plays the vertical screen video of the live video stream based on the target video image corresponding to the target coordinate area in the current video frame. The specific technical implementation involved in the live broadcast flow can be cross-referenced with the corresponding parts in the foregoing.
While various embodiments of the present invention have been described above, various alternatives described in the various embodiments can be combined and cross-referenced without conflict to extend the variety of possible embodiments that can be considered disclosed and disclosed in connection with the embodiments of the present invention.
In the following, the video playing apparatus provided in the embodiment of the present invention is introduced, and the apparatus described below may be considered as a functional module that is required by the terminal to implement the video playing method provided in the embodiment of the present invention. The contents of the apparatus described below may be referred to in correspondence with the contents of the video playback method described above.
In an alternative implementation, fig. 18 shows a block diagram of a video playing apparatus provided in an embodiment of the present invention, and as shown in fig. 18, the apparatus may include:
a video stream obtaining module 200, configured to obtain a video stream, where the video stream includes a plurality of video frames;
a coordinate area determination module 210, configured to determine a target coordinate area when a vertical screen playing instruction of the video stream is detected, where the target coordinate area is a local coordinate area of a current video frame;
and a vertical screen playing module 220, configured to play a vertical screen video based on the target video image corresponding to the target coordinate area in the current video frame.
Optionally, the coordinate area determining module 210, configured to determine the target coordinate area, includes:
and if the number of the video images used for vertical screen playing in the current video frame is multiple, determining a target video image used for vertical screen playing indicated by the indication information and a corresponding target coordinate area in the current video frame.
Optionally, the coordinate area determining module 210 is configured to determine the target coordinate area, and includes:
and if one video image for vertical screen playing in the current video frame is available, determining a corresponding target coordinate area of the video image in the current video frame.
Optionally, the video frames include horizontal screen video frames and vertical screen video frames that are spliced together.
Optionally, the video stream obtaining module 200 is configured to, when obtaining the video stream, further obtain first coordinate data corresponding to the video stream, where the first coordinate data at least records a coordinate area of a vertical screen video frame in each video frame;
optionally, the coordinate area determining module 210 is configured to determine the target coordinate area, and includes:
and if the number of the vertical screen video frames in the current video frame is multiple, determining a corresponding target coordinate area of the target vertical screen video frame indicated by the indication information in the current video frame based on the first coordinate data.
Optionally, the coordinate area determining module 210, configured to determine the target coordinate area, includes:
and if the number of the vertical screen video frames in the current video frame is one, determining a target coordinate area corresponding to the vertical screen video frame in the current video frame based on the first coordinate data.
In another alternative implementation, fig. 19 shows another alternative block diagram of the video playing apparatus provided in the embodiment of the present invention, wherein the first coordinate data further records a coordinate area of a landscape video frame in each video frame; as shown in fig. 19, the apparatus further comprises:
a cross screen playing module 230, configured to, when a cross screen playing instruction of the video stream is detected, determine a coordinate area corresponding to a cross screen video frame in a current video frame from the first coordinate data, and play a cross screen video based on the cross screen video frame corresponding to the coordinate area.
Optionally, the video image corresponding to the video main body in the horizontal screen video frame forms the vertical screen video frame.
Optionally, the vertical screen video frame is spliced with the horizontal screen video frame after rotating for a preset angle in the first direction, and the long pixel edge of the vertical screen video frame is connected with the wide pixel edge of the horizontal screen video frame.
Optionally, the video stream is a cross-screen video stream, and the video frame is a cross-screen video frame; the video stream obtaining module 200 is configured to, when obtaining the video stream, further obtain second coordinate data corresponding to the horizontal screen video stream, where the second coordinate data at least records a coordinate area corresponding to a video image for vertical screen playing in each horizontal screen video frame.
Optionally, the coordinate area determining module 210, configured to determine the target coordinate area, includes:
and if the number of the video images used for vertical screen playing in the current horizontal screen video frame is multiple, determining a corresponding target coordinate area of the target video image indicated by the indication information in the current horizontal screen video frame based on the second coordinate data.
Optionally, the coordinate area determining module 210, configured to determine the target coordinate area, includes:
and if the number of the video images used for vertical screen playing in the current horizontal screen video frame is one, determining a target coordinate area corresponding to the video images in the current horizontal screen video frame based on the second coordinate data.
Optionally, the video stream is a cross-screen video stream, and the video frame is a cross-screen video frame; the coordinate area determining module 210, configured to determine the target coordinate area, includes:
determining a video main body in a current horizontal screen video frame;
and if the number of the video main bodies is multiple, determining a video image corresponding to the target video main body indicated by the indication information and a corresponding target coordinate area in the current horizontal screen video frame.
Optionally, the video stream is a cross-screen video stream, and the video frame is a cross-screen video frame; the coordinate area determining module 210, configured to determine the target coordinate area, includes:
determining a video main body in a current horizontal screen video frame;
and if the number of the video main bodies is one, determining a target coordinate area corresponding to the video image corresponding to the video main body in the current horizontal screen video frame.
Optionally, the vertical screen playing module 220 is configured to, based on the target video image corresponding to the target coordinate area in the current video frame, play a vertical screen video including:
based on the target coordinate area, framing a target video image from the current horizontal screen video frame through a video player, adjusting the image size of the framed target video image to be matched with the vertical screen interface, and playing the target video image with the adjusted image size.
Optionally, the cross-screen playing module 230 is configured to detect a cross-screen playing instruction of the target video stream, and play a cross-screen video based on a cross-screen video frame.
The embodiment of the invention also provides a mobile terminal, and the mobile terminal can realize the video playing method provided by the embodiment of the invention by loading the device in the form of computer executable instructions (such as a program). Optionally, fig. 20 shows a block diagram of a mobile terminal provided in the embodiment of the present invention, and as shown in fig. 20, the mobile terminal may include: at least one processor 1, at least one communication interface 2, at least one memory 3 and at least one communication bus 4;
in the embodiment of the present invention, the number of the processor 1, the communication interface 2, the memory 3, and the communication bus 4 is at least one, and the processor 1, the communication interface 2, and the memory 3 complete mutual communication through the communication bus 4; it is clear that the illustrated communication connection illustration of the processor 1, the communication interface 2, the memory 3 and the communication bus 4 is only optional;
optionally, the communication interface 2 may be an interface of a communication module for performing network communication;
the processor 1 may be a central processing unit CPU or an Application Specific Integrated Circuit ASIC or one or more Integrated circuits configured to implement an embodiment of the invention.
The memory 3 may comprise a high-speed RAM memory and may also comprise a non-volatile memory, such as at least one disk memory.
The memory 3 stores one or more computer-executable instructions, and the processor 1 calls the one or more computer-executable instructions to execute the video playing method provided by the embodiment of the present invention.
Embodiments of the present invention may also provide a storage medium, where the storage medium may store one or more computer-executable instructions, and the one or more computer-executable instructions may be configured to execute the video playing method provided in the embodiments of the present invention.
Although the embodiments of the present invention have been disclosed, the present invention is not limited thereto. Various changes and modifications may be effected therein by one skilled in the art without departing from the spirit and scope of the invention as defined in the appended claims.
Claims (21)
1. A video playback method, comprising:
obtaining a video stream, the video stream comprising a plurality of video frames, the video frames comprising: the horizontal screen video frame and the vertical screen video frame are spliced;
when a vertical screen playing instruction of the video stream is detected, determining a target coordinate area, wherein the target coordinate area is a local coordinate area of a current video frame;
and playing the vertical screen video based on the target video image corresponding to the target coordinate area in the current video frame.
2. The video playback method of claim 1, the determining a target coordinate region comprising:
and if a plurality of video images used for vertical screen playing in the current video frame exist, determining a corresponding target coordinate area of the target video image indicated by the indication information in the current video frame.
3. The video playback method of claim 1, the determining a target coordinate region comprising:
and if one video image for vertical screen playing in the current video frame is available, determining a corresponding target coordinate area of the video image in the current video frame.
4. The video playback method of claim 1, while acquiring the video stream, the method further comprising:
and acquiring first coordinate data corresponding to the video stream, wherein the first coordinate data at least records a coordinate area of a vertical screen video frame in each video frame.
5. The video playback method of claim 4, the determining a target coordinate region comprising:
and if the number of the vertical screen video frames in the current video frame is multiple, determining a corresponding target coordinate area of the target vertical screen video frame indicated by the indication information in the current video frame based on the first coordinate data.
6. The video playback method of claim 4, the determining a target coordinate region comprising:
and if the number of the vertical screen video frames in the current video frame is one, determining a target coordinate area corresponding to the vertical screen video frame in the current video frame based on the first coordinate data.
7. The video playback method according to claim 4, wherein the first coordinate data further records a coordinate area of a landscape video frame in each video frame; the method further comprises the following steps:
when a cross screen playing instruction of the video stream is detected, a coordinate area corresponding to a cross screen video frame in a current video frame is determined from the first coordinate data, and a cross screen video is played based on the cross screen video frame corresponding to the coordinate area.
8. The video playing method according to any one of claims 4 to 7, wherein the video image corresponding to the video subject in the horizontal screen video frame forms the vertical screen video frame.
9. The video playing method according to claim 1, wherein the vertical screen video frame is spliced with the horizontal screen video frame after being rotated by a preset angle in a first direction, and a long pixel edge of the vertical screen video frame is connected with a wide pixel edge of the horizontal screen video frame.
10. The video playing method according to claim 1, wherein the video stream is a landscape video stream, and the video frames are landscape video frames; while acquiring the video stream, the method further comprises:
and acquiring second coordinate data corresponding to the transverse screen video stream, wherein the second coordinate data at least records a coordinate area corresponding to a video image for vertical screen playing in each transverse screen video frame.
11. The video playback method of claim 10, the determining a target coordinate region comprising:
and if the number of the video images used for vertical screen playing in the current horizontal screen video frame is multiple, determining a corresponding target coordinate area of the target video image indicated by the indication information in the current horizontal screen video frame based on the second coordinate data.
12. The video playback method of claim 10, the determining a target coordinate region comprising:
and if the number of the video images used for vertical screen playing in the current horizontal screen video frame is one, determining a target coordinate area corresponding to the video images in the current horizontal screen video frame based on the second coordinate data.
13. The video playing method according to claim 1, wherein the video stream is a landscape video stream, and the video frames are landscape video frames; the determining the target coordinate area includes:
determining a video main body in a current horizontal screen video frame;
and if the number of the video main bodies is multiple, determining a video image corresponding to the target video main body indicated by the indication information, and determining a corresponding target coordinate area in the current horizontal screen video frame.
14. The video playing method according to claim 1, wherein the video stream is a landscape video stream, and the video frames are landscape video frames; the determining the target coordinate area includes:
determining a video main body in a current horizontal screen video frame;
and if the number of the video main bodies is one, determining a target coordinate area corresponding to the video image corresponding to the video main body in the current horizontal screen video frame.
15. The video playing method according to any one of claims 10 to 14, wherein playing a portrait video based on a target video image corresponding to the target coordinate area in the current video frame includes:
based on the target coordinate area, framing a target video image from the current horizontal screen video frame through a video player, adjusting the image size of the framed target video image to be matched with the vertical screen interface, and playing the target video image with the adjusted image size.
16. The video playback method of any of claims 10-14, further comprising:
and detecting a transverse screen playing instruction of the video stream, and playing a transverse screen video based on a transverse screen video frame.
17. A video playback apparatus comprising:
a video stream acquisition module configured to acquire a video stream, where the video stream includes a plurality of video frames, and the video frames include: the horizontal screen video frame and the vertical screen video frame are spliced;
the coordinate area determination module is used for determining a target coordinate area when a vertical screen playing instruction of the video stream is detected, wherein the target coordinate area is a local coordinate area of a current video frame;
and the vertical screen playing module is used for playing a vertical screen video based on the target video image corresponding to the target coordinate area in the current video frame.
18. A video conference method is applied to a first mobile terminal and comprises the following steps:
when the first mobile terminal and the second mobile terminal establish video conference connection, acquiring a real-time video stream acquired by the second mobile terminal, wherein the real-time video stream comprises a plurality of video frames, and the video frames comprise: the horizontal screen video frame and the vertical screen video frame are spliced;
when a vertical screen playing instruction of the real-time video stream is detected, determining a target coordinate area, wherein the target coordinate area is a local coordinate area of a current video frame in the real-time video stream;
and playing the vertical screen video of the real-time video stream based on the target video image corresponding to the target coordinate area in the current video frame.
19. A live broadcast method, comprising:
obtaining a live video stream, the live video stream comprising a plurality of video frames, the video frames comprising: the horizontal screen video frame and the vertical screen video frame are spliced;
when a vertical screen playing instruction of the live video stream is detected, determining a target coordinate area, wherein the target coordinate area is a local coordinate area of a current video frame in the live video stream;
and playing a vertical screen video of the live video stream based on a target video image corresponding to the target coordinate area in the current video frame.
20. A mobile terminal comprising at least one memory and at least one processor, the memory storing one or more computer-executable instructions that are invoked by the processor to perform a video playback method as claimed in any of claims 1-16, or to perform a video conferencing method as claimed in claim 18, or to perform a live method as claimed in claim 19.
21. A storage medium storing one or more computer-executable instructions for invocation by a processor to perform a video playback method as claimed in any one of claims 1 to 16, or to perform a video conferencing method as claimed in claim 18, or to perform a live method as claimed in claim 19.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010206036.0A CN113438550B (en) | 2020-03-23 | 2020-03-23 | Video playing method, video conference method, live broadcasting method and related devices |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010206036.0A CN113438550B (en) | 2020-03-23 | 2020-03-23 | Video playing method, video conference method, live broadcasting method and related devices |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113438550A CN113438550A (en) | 2021-09-24 |
CN113438550B true CN113438550B (en) | 2023-03-24 |
Family
ID=77753239
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010206036.0A Active CN113438550B (en) | 2020-03-23 | 2020-03-23 | Video playing method, video conference method, live broadcasting method and related devices |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113438550B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114155255B (en) * | 2021-12-14 | 2023-07-28 | 成都索贝数码科技股份有限公司 | Video horizontal screen-to-vertical screen method based on space-time track of specific person |
CN116546333B (en) * | 2023-04-03 | 2023-10-31 | 华光影像科技合肥有限公司 | Method, system and camera for simultaneously outputting video pictures of different shooting modes |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101237556A (en) * | 2008-03-03 | 2008-08-06 | 宇龙计算机通信科技(深圳)有限公司 | Realization method, image display method and communication terminal for terminal with dual cameras |
KR101744893B1 (en) * | 2015-03-09 | 2017-06-09 | 김창곤 | Cross shape display device |
CN106101553B (en) * | 2016-07-27 | 2019-09-27 | 维沃移动通信有限公司 | A kind of photographic method and mobile terminal |
CN106973228B (en) * | 2017-03-31 | 2020-02-21 | 联想(北京)有限公司 | Shooting method and electronic equipment |
CN108650542B (en) * | 2018-05-09 | 2022-02-01 | 腾讯科技(深圳)有限公司 | Method for generating vertical screen video stream and processing image, electronic equipment and video system |
-
2020
- 2020-03-23 CN CN202010206036.0A patent/CN113438550B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN113438550A (en) | 2021-09-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111818359B (en) | Processing method and device for live interactive video, electronic equipment and server | |
CN113438436B (en) | Video playing method, video conference method, live broadcast method and related equipment | |
WO2021175055A1 (en) | Video processing method and related device | |
US9600741B1 (en) | Enhanced image generation based on multiple images | |
CN109167931B (en) | Image processing method, device, storage medium and mobile terminal | |
US9473741B2 (en) | Teleconference system and teleconference terminal | |
US20150222815A1 (en) | Aligning videos representing different viewpoints | |
CN107682714B (en) | Method and device for acquiring online video screenshot | |
CN113438550B (en) | Video playing method, video conference method, live broadcasting method and related devices | |
CN112887609B (en) | Shooting method and device, electronic equipment and storage medium | |
CN111147911A (en) | Video clipping method and device, electronic equipment and storage medium | |
CN113778360B (en) | Screen projection method and electronic equipment | |
CN111050204A (en) | Video clipping method and device, electronic equipment and storage medium | |
CN113010135A (en) | Data processing method and device, display terminal and storage medium | |
CN112954380B (en) | Video playing processing method and device | |
CN114390206A (en) | Shooting method and device and electronic equipment | |
CN113676692A (en) | Video processing method and device in video conference, electronic equipment and storage medium | |
CN113453022A (en) | Image display method and device, television and storage medium | |
WO2023125316A1 (en) | Video processing method and apparatus, electronic device, and medium | |
CN112672057B (en) | Shooting method and device | |
CN114915852B (en) | Video call interaction method, device, computer equipment and storage medium | |
CN113657255A (en) | Method for automatically selecting people and storage equipment | |
CN108933881B (en) | Video processing method and device | |
CN114143442B (en) | Image blurring method, computer device, and computer-readable storage medium | |
CN114979746B (en) | Video processing method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |