CN113259764A - Video playing method, video playing device, electronic equipment and video playing system - Google Patents

Video playing method, video playing device, electronic equipment and video playing system Download PDF

Info

Publication number
CN113259764A
CN113259764A CN202110760086.8A CN202110760086A CN113259764A CN 113259764 A CN113259764 A CN 113259764A CN 202110760086 A CN202110760086 A CN 202110760086A CN 113259764 A CN113259764 A CN 113259764A
Authority
CN
China
Prior art keywords
video stream
stream data
source video
spliced
sub
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110760086.8A
Other languages
Chinese (zh)
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 Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information 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 Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202110760086.8A priority Critical patent/CN113259764A/en
Publication of CN113259764A publication Critical patent/CN113259764A/en
Priority to PCT/CN2022/086135 priority patent/WO2023279793A1/en
Pending legal-status Critical Current

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/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/44016Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving splicing one content stream with another content stream, e.g. for substituting a video clip
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/4302Content synchronisation processes, e.g. decoder synchronisation
    • H04N21/4307Synchronising the rendering of multiple content streams or additional data on devices, e.g. synchronisation of audio on a mobile phone with the video output on the TV screen
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/854Content authoring
    • H04N21/8547Content authoring involving timestamps for synchronizing content
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/265Mixing

Abstract

The present disclosure relates to a video playing method, a playing device, an electronic device and a system, wherein the video playing method includes: acquiring a plurality of source video stream data; transversely splicing a plurality of source video stream data to obtain spliced video stream data, wherein a spliced image of one frame in the spliced video stream data comprises a plurality of sub-images, and the plurality of sub-images correspond to images of corresponding frames in the plurality of source video stream data; and sending the spliced video stream data to the client so that the client can switchably play the source video stream data in the spliced video stream data. The method avoids the problem that playing of different source video stream data is not synchronous due to time delay when the client pulls multiple streams, ensures that the source video stream data can be played synchronously, ensures that the playing effect of the client is good, and ensures that the experience of the client is good.

Description

Video playing method, video playing device, electronic equipment and video playing system
Technical Field
The present disclosure relates to the field of live broadcast, and in particular, to a video playing method, a video playing apparatus, an electronic device, a video playing system, and a computer-readable storage medium.
Background
In the related art, a method for solving the problem that a live broadcast room needs to be switched when multi-view live broadcast is performed is generally to simultaneously pull multiple live broadcast video data streams for a client to switch and play the video data streams of different views. However, in the process of stream pulling, a random delay problem occurs, that is, data of a plurality of source video streams are not completely transmitted synchronously, so that video data streams of different view angles have a problem of time asynchronization during playing.
Therefore, a need exists for a method for solving the problem of playback asynchronism caused by time delay when video data streams of different views are pulled.
Disclosure of Invention
The present disclosure provides a video playing method, a playing device, an electronic device, a system and a computer readable storage medium, so as to at least solve the problem of playing asynchronization caused by time delay when video data streams of different view angles are pulled in the related art. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a method for playing a video, including: acquiring a plurality of source video stream data; transversely splicing a plurality of source video stream data to obtain spliced video stream data, wherein a spliced image of one frame in the spliced video stream data comprises a plurality of sub-images, and the plurality of sub-images correspond to images of corresponding frames in the plurality of source video stream data; and sending the spliced video stream data to a client so that the client can switchably play a plurality of source video stream data in the spliced video stream data.
Optionally, before the step of horizontally splicing the plurality of source video stream data to obtain spliced video stream data, the method further includes: acquiring attribute information of each source video, wherein the attribute information of each source video at least comprises the resolution of each source video, and after the step of transversely splicing a plurality of source video stream data to obtain spliced video stream data, the method further comprises the following steps: and determining the position information of each sub-image in the spliced images of each frame and sending the position information to the client according to at least the resolution of each source video and the splicing sequence of the source video stream data, so that the client can play the source video stream data in the spliced video stream data in a switching manner according to the position information.
Optionally, the step of determining the position information of each sub-image in the stitched image of each frame according to at least the resolution of each source video and the stitching order of the source video stream data includes: determining that a first starting pixel value of the sub-image corresponding to the first source video stream data in the spliced image is 0, and a first end pixel value is a pixel value in the resolution of the first source video stream data; determining an nth starting pixel value and an nth end pixel value of the subimages corresponding to the nth source video stream data in the stitched image according to the stitching sequence, the pixel values of (N-1) source video stream data before the nth source video stream data is stitched, wherein N is a positive integer greater than or equal to 2, the stitching sequence is a first stitching sequence or a second stitching sequence, the first stitching sequence is a stitching sequence according to a pixel height direction, the second stitching sequence is a stitching sequence according to a pixel width direction, the position information of the subimages includes a starting pixel value and an end pixel value of the subimages in the stitched image corresponding to the subimages, and the pixel values are pixel height or pixel width.
Optionally, the determining, according to the splicing order, the pixel values of (N-1) source video stream data before the nth source video stream data is spliced, and the pixel value of the nth source video stream data, an nth start pixel value and an nth end pixel value of the sub-image corresponding to the nth source video stream data in the spliced image includes: determining (N-1) source video stream data before the N-th source video stream data splicing according to the splicing sequence; calculating the sum of pixel values in the resolution of (N-1) pieces of source video stream data to obtain an Nth initial pixel value; calculating the sum of the pixel value in the resolution of (N-1) pieces of source video stream data and the pixel value of the Nth piece of source video stream data to obtain the Nth end point pixel value; and when the splicing sequence is the first splicing sequence, the pixel value is the pixel height, and when the splicing sequence is the second splicing sequence, the pixel value is the pixel width.
Optionally, after the step of determining the position information of each sub-image in the stitched image of each frame according to at least the resolution of each source video and the stitching order of the source video stream data, the method further includes: and sending the position information of each sub-image in the spliced image of each frame to the client, so that the client determines the position relationship between the currently played source video stream data and the target source video stream data to be played, and the currently played source video stream data is switched into the target source video stream data according to the position relationship.
Optionally, the attribute information of the source video includes view information of each source video, and the method further includes: and sending the visual angle information of each source video to the client so as to display the identification corresponding to each visual angle information on a display interface of the client, wherein the visual angle information is the information of the corresponding shooting visual angle.
According to a second aspect of the embodiments of the present disclosure, there is provided a method for playing a video, including: receiving spliced video stream data, wherein the spliced video stream data is obtained by transversely splicing a plurality of source video stream data, a spliced image of one frame in the spliced video stream data comprises a plurality of sub-images, and the plurality of sub-images correspond to images of corresponding frames in the plurality of source video stream data; responding to a switching instruction, and switching the currently played source video stream data in the spliced video stream to target source video stream data, wherein the target source video stream data is the source video stream data corresponding to the switching instruction.
Optionally, before the step of switching the source video stream data currently played by the spliced video stream to the target source video stream data in response to a switching instruction, the method further includes: and receiving the position information of each sub-image in the spliced images of each frame corresponding to the spliced video, wherein the position information is determined at least according to the resolution of each source video and the splicing sequence of the stream data of the source videos.
Optionally, before the step of switching the source video stream data currently played by the spliced video stream to the target source video stream data in response to a switching instruction, the method further includes: receiving visual angle information of each source video, wherein the visual angle information is information of a corresponding shooting visual angle; and displaying the identifier corresponding to the visual angle information on a display interface.
Optionally, the step of switching the source video stream data currently played in the spliced video stream to a target source video stream data in response to a switching instruction includes: responding to the switching instruction, and determining the target source video stream data to be played; determining the position relation between the target source video stream data and the currently played source video stream data according to the position information of the sub-image corresponding to the target source video stream data and the sub-image corresponding to the currently played source video stream data; and switching the currently played source video stream data to the target source video stream data according to the position relation.
According to a third aspect of the embodiments of the present disclosure, there is provided a video playing apparatus, including: a first acquiring unit configured to perform acquisition of a plurality of source video stream data; the splicing unit is configured to perform horizontal splicing on a plurality of source video stream data to obtain spliced video stream data, wherein a spliced image of one frame in the spliced video stream data comprises a plurality of sub-images, and the plurality of sub-images correspond to images of corresponding frames in the plurality of source video stream data; a first sending unit configured to execute sending the spliced video stream data to a client so as to enable the client to switchably play a plurality of source video stream data in the spliced video stream data.
Optionally, the apparatus further comprises: a second obtaining unit, configured to obtain attribute information of each source video before the step of transversely splicing the plurality of source video stream data to obtain spliced video stream data, where the attribute information of each source video at least includes a resolution of each source video; and after the step of transversely splicing the plurality of source video stream data to obtain spliced video stream data is performed, determining position information of each sub-image in the spliced images of each frame according to at least the resolution of each source video and the splicing sequence of the plurality of source video stream data, and sending the position information to the client so that the client switchingly plays the plurality of source video stream data in the spliced video stream data according to the position information.
Optionally, the first determining unit includes: a first determining module configured to perform a determination that a first start pixel value of the sub-image corresponding to the first source video stream data in the stitched image is 0 and a first end pixel value is a pixel value in the resolution of the first source video stream data; a second determining module configured to perform determining an nth start pixel value and an nth end pixel value of the subimage corresponding to an nth source video stream data in the stitched image according to the stitching order, the pixel values of (N-1) source video stream data before the N source video stream data is stitched, N being a positive integer greater than or equal to 2, and the stitching order being the first stitching order or the second stitching order, wherein the first stitching sequence is a stitching sequence according to the pixel height direction, the second stitching sequence is a stitching sequence according to the pixel width direction, the position information of the sub-images comprises a starting pixel value and an end pixel value of the sub-images in the corresponding spliced image, and the pixel values are pixel heights or pixel widths.
Optionally, the second determining module includes: a determining submodule configured to perform determining (N-1) source video stream data before an nth source video stream data splicing according to the splicing order; a first calculation submodule configured to perform calculation of a sum of pixel values in resolutions of (N-1) pieces of the source video stream data, resulting in an nth starting pixel value; a second calculation submodule configured to perform a calculation of a sum of pixel values in a resolution of (N-1) pieces of the source video stream data and pixel values of the nth piece of the source video stream data, resulting in the nth end point pixel value; wherein the pixel value is the pixel height when the stitching order is the first stitching order, and the pixel value is the pixel width when the stitching order is the second stitching order.
Optionally, the apparatus further comprises: and a second sending unit, configured to send the position information of each sub-image in the stitched image of each frame to the client after the step of determining the position information of each sub-image in the stitched image of each frame according to at least the resolution of each source video and the stitching order of the plurality of source video stream data is executed, so that the client determines the position relationship between the currently played source video stream data and the target source video stream data to be played, and thus switches the currently played source video stream data into the target source video stream data according to the position relationship.
Optionally, the attribute information of the source video includes view angle information of each source video, and the apparatus further includes: and the third sending unit is configured to execute sending of the view angle information of each source video to the client, so that an identifier corresponding to each view angle information is displayed on a display interface of the client, and the view angle information is information of a corresponding shooting view angle.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a video playing apparatus, including: the first receiving unit is configured to execute receiving of spliced video stream data, wherein the spliced video stream data is obtained by transversely splicing a plurality of source video stream data, and a spliced image of one frame in the spliced video stream data comprises a plurality of sub-images, and the plurality of sub-images correspond to images of corresponding frames in the plurality of source video stream data; a responding unit, configured to execute, in response to a switching instruction, switching the source video stream data currently played in the spliced video stream to target source video stream data, where the target source video stream data is the source video stream data corresponding to the switching instruction.
Optionally, the apparatus further comprises: and a second receiving unit, configured to receive, before the step of switching the source video stream data currently played by the spliced video stream to the target source video stream data in response to the switching instruction, position information of each sub-image in the spliced images of each frame corresponding to the spliced video, where the position information is determined according to at least a resolution of each source video and a splicing order of the source video stream data.
Optionally, the apparatus comprises: a third receiving unit, configured to receive, in response to a switching instruction, view information of each source video before a step of switching the source video stream data currently played by the spliced video stream to a target source video stream data, where the view information is information of a corresponding shooting view; and the display unit is configured to display the identifier corresponding to the visual angle information on a display interface.
Optionally, the response unit includes: a response module configured to execute determining the target source video stream data to be played in response to the switching instruction; the second determining module is configured to determine the position relationship between the target source video stream data and the currently played source video stream data according to the position information of the sub-image corresponding to the target source video stream data and the sub-image corresponding to the currently played source video stream data; and the switching module is configured to switch the currently played source video stream data to the target source video stream data according to the position relationship.
According to a fifth aspect of the embodiments of the present disclosure, there is provided an electronic device, comprising a processor and a memory for storing instructions executable by the processor, wherein the processor is configured to execute the instructions to implement any one of the video playing methods.
According to a sixth aspect of the embodiments of the present disclosure, there is provided a system comprising a server and a client, wherein the server is configured to execute any one of the video playing methods; the client is in communication connection with the server, and the client is used for executing any one of the video playing methods.
Optionally, the system further includes a plurality of collecting terminals, the plurality of collecting terminals are respectively in communication connection with the server, and the plurality of collecting terminals are configured to collect a plurality of source video stream data and send the plurality of source video stream data to the server.
According to a seventh aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium, wherein instructions of the computer-readable storage medium, when executed by a processor of an electronic device, enable the electronic device to execute any one of the video playing methods or any one of the video playing methods.
According to an eighth aspect of embodiments of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements any one of the methods for playing back a video or any one of the methods for playing back a video.
In the video playing method of the application, first, a plurality of source video stream data are acquired; then, transversely splicing a plurality of time-synchronized source video stream data to obtain spliced video stream data; and finally, sending the spliced video stream data to a client, wherein the client can play a plurality of source video stream data in a switching way according to the spliced video stream data. According to the method, the source video stream data are transversely spliced to obtain the spliced video stream data, and then the spliced video stream data are sent to the client, so that the client only needs to pull one source video stream data without pulling multiple streams simultaneously, the client is prevented from pulling multiple video stream data simultaneously, the problem that the client cannot play synchronously due to time delay of different source video stream data when pulling multiple streams is avoided, synchronous playing of the source video stream data is guaranteed, the playing effect of the client is good, and the experience of the client is good.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
FIG. 1 is an architectural diagram illustrating one implementation environment in accordance with an exemplary embodiment.
Fig. 2 is a flow chart illustrating a method of playing a video according to an exemplary embodiment.
Fig. 3 is a diagram illustrating obtaining a stitched pixel height for source video stream data according to an example embodiment.
Fig. 4 is a flowchart illustrating a method of playing a video according to another exemplary embodiment.
Fig. 5 is a diagram illustrating switching of currently playing source video stream data to target source video stream data according to an exemplary embodiment.
Fig. 6 is a block diagram illustrating a playback apparatus according to an example embodiment.
Fig. 7 is a block diagram illustrating a playback apparatus according to another exemplary embodiment.
Wherein the drawings are described as follows:
01. an electronic device; 02. a server; 03. current source video stream data; 04. the video stream data of the previous source.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
As mentioned in the background, the playback of video data streams from different viewing angles is not synchronized due to the time delay in the process of streaming in the prior art.
Fig. 1 is an architecture diagram illustrating an implementation environment in which the following video playback method may be applied, as shown in fig. 1, according to an exemplary embodiment. The implementation environment includes an electronic device 01 and a server 02. Wherein, the electronic device 01 and the server 02 may be interconnected and communicate through a network.
The electronic device 01 may be a device that switchably plays a plurality of source video stream data. The electronic device 01 may be any electronic product that can interact with a user through one or more modes, such as a keyboard, a touch pad, a touch screen, a remote controller, a voice interaction device, or a handwriting device, for example, a mobile phone, a tablet Computer, a palm Computer, a Personal Computer (PC), a wearable device, a smart television, and the like.
The server 02 may be one server, a server cluster composed of a plurality of servers, or a cloud computing service center. The server 02 may include a processor, memory, and a network interface, among others.
It will be understood by those skilled in the art that the foregoing electronic devices and servers are merely exemplary and that other existing or future electronic devices or servers may be suitable for use with the present disclosure and are intended to be included within the scope of the present disclosure and are hereby incorporated by reference.
Based on this, embodiments of the present disclosure provide a video playing method, a playing apparatus, an electronic device, a system, and a computer-readable storage medium.
The execution subject of the video playing method provided in the embodiment of the present disclosure may be the electronic device or the server, or may also be a functional module and/or a functional entity capable of implementing the video playing method in the electronic device or the server, which may be determined specifically according to actual use requirements, and the embodiment of the present disclosure is not limited. The following takes an execution subject as an electronic device as an example, and exemplarily describes a video playing method provided by the embodiment of the present disclosure.
Fig. 2 is a flowchart illustrating a video playing method according to an exemplary embodiment, where the video playing method may be used in a server, as shown in fig. 2, and includes the following steps.
In step S11, a plurality of source video stream data are acquired;
in step S12, transversely splicing a plurality of the source video stream data to obtain spliced video stream data, where a spliced image of one frame in the spliced video stream data includes a plurality of sub-images, and the plurality of sub-images correspond to images of corresponding frames in the plurality of source video stream data;
in step S13, the spliced video stream data is transmitted to the client, so that the client can switchably play the source video stream data in the spliced video stream data.
In the video playing method of the present application, first, a plurality of source video stream data are obtained; then, transversely splicing a plurality of source video stream data to obtain spliced video stream data; and finally, sending the spliced video stream data to a client, wherein the client can play a plurality of source video stream data in a switching way according to the spliced video stream data. According to the method, the spliced video stream data is obtained by transversely splicing the source video stream data, and then the spliced video stream data is sent to the client, so that the client only needs to pull one path of source video stream data without pulling multiple paths of streams simultaneously, the client is prevented from pulling multiple paths of video data streams simultaneously, the problem that the playing of the client is not synchronous due to time delay of different source video stream data when the client pulls multiple paths of streams is avoided, the synchronous playing of the source video stream data is ensured, the playing effect of the client is better, and the experience of the client is better.
It should be noted that the above horizontal splicing is a splicing manner of splicing a predetermined number of source video stream data and making each frame in the spliced data have a predetermined number of sub-images, where the predetermined number of sub-images are formed by images of corresponding frames in the predetermined number of source video stream data, and the images of corresponding frames in the source video stream data correspond to the sub-images one to one.
In an actual application process, each of the sub-images corresponds to a frame of image in the source video stream data.
According to a specific embodiment of the present application, before the step of horizontally splicing a plurality of source video stream data to obtain spliced video stream data, the method further includes: obtaining attribute information of each source video, wherein the attribute information of each source video at least comprises a resolution of each source video, and after the step of transversely splicing a plurality of source video stream data to obtain spliced video stream data, the method further comprises the following steps: and determining position information of each sub-image in the spliced images of each frame according to at least the resolution of each source video and the splicing sequence of the source video stream data, and transmitting the position information to the client so that the client can play the source video stream data in the spliced video stream data in a switching manner according to the position information. According to the method, the attribute information of each source video is obtained, the attribute information of the source video at least comprises the resolution ratio of each source video, the subsequent splicing of a plurality of source video stream data is further facilitated, and the attribute information of the spliced video corresponding to the spliced video stream data can be determined simply and quickly through the attribute information of the plurality of videos.
Of course, the attribute information is not limited to the above-described obtaining method, and may be obtained by analyzing the corresponding source video stream data.
In another specific embodiment of the present application, the determining the position information of each sub-image in the merged image of each frame according to at least a resolution of each source video and a merging order of the plurality of source video stream data includes: determining a first start pixel value of the sub-image corresponding to the first source video stream data in the merged image to be 0, and a first end pixel value to be a pixel value in the resolution of the first source video stream data; and determining an nth start pixel value and an nth end pixel value of the sub-images corresponding to the nth source video stream data in the merged image according to the merging order, the pixel values of (N-1) pieces of the source video stream data before the nth source video stream data is merged, N being a positive integer greater than or equal to 2, and the merging order being a first merging order or a second merging order, wherein the first merging order is a pixel height direction merging order, the second merging order is a pixel width direction merging order, the position information of the sub-images includes a start pixel value and an end pixel value of the sub-images in the corresponding merged image, and the pixel values are pixel height or pixel width. Therefore, the position information of the sub-images in the spliced images of each frame is ensured to be determined simply and accurately, and the subsequent switching playing of a plurality of source video stream data according to the position information is further facilitated.
In an actual application process, the attribute information of the video may further include information such as brightness information, color information, size information, and pixel value information of the video. Of course, the attribute information may also include other information of the video.
According to another specific embodiment of the present application, the determining an nth start pixel value and an nth end pixel value of the sub-image corresponding to an nth source video stream data in the merged image according to the splicing order, the pixel values of (N-1) source video stream data before the nth source video stream data is spliced, and the pixel values of the nth source video stream data includes: determining (N-1) pieces of the source video stream data before the N-th splicing of the source video stream data, based on the splicing order; calculating the sum of pixel values in the resolution of (N-1) pieces of source video stream data to obtain an Nth initial pixel value; calculating the sum of the pixel value of the resolution of the (N-1) pieces of source video stream data and the pixel value of the Nth piece of source video stream data to obtain the Nth end point pixel value; the pixel value is the pixel height when the stitching order is the first stitching order, and the pixel value is the pixel width when the stitching order is the second stitching order. In the method, the Nth starting pixel value and the Nth end pixel value are calculated according to the splicing sequence, so that the high-efficiency and accurate acquisition of the acquired position information can be further ensured.
In a specific embodiment, as shown in fig. 3, it is assumed that the resolution of the current source video stream data 03 (the nth source video stream data) and the resolution of the previous source video stream data 04 (the (N-1) source video stream data before the N th source video stream data is spliced) are the same and are both 720P, and the number of pixels in the width direction of the current source video stream data 03 (the nth source video stream data) and the number of pixels in the width direction of the previous source video stream data 04 (the (N-1) source video stream data before the N th source video stream data is spliced) are 1920, the number of pixels in the height direction of the current source video stream data 03 (the nth source video stream data) is 1080, the number of pixels in the height direction of the previous source video stream data 04 (the (N-1) source video stream data before the N th source video stream data is spliced) is 2160, then, the first location information of the current source video stream data is 3240, and the second location information is 2160. Of course, the resolution and the number of pixels may be other values. The previous source video stream data is not limited to source video stream data obtained by splicing two source video stream data, and may be obtained by splicing a plurality of source video stream data.
In another specific embodiment of the application, after the step of determining the position information of each sub-image in the merged image of each frame according to at least the resolution of each source video and the merging order of the plurality of source video stream data, the method further includes: and sending the position information of each sub-image in the spliced images of each frame to the client, so that the client determines the position relationship between the currently played source video stream data and the target source video stream data to be played, and then switching the currently played source video stream data into the target source video stream data according to the position relationship. Therefore, the client can be further ensured to flexibly switch the played source video stream data according to the position information, the method can be flexibly adapted to the requirements of different clients, and meanwhile, the client can be further ensured to more accurately switch and play the source video stream data which the client wants to see according to the position information.
In another specific embodiment of the present application, the attribute information of the source video includes view angle information of each of the source videos, and the method further includes: and sending the view angle information of each source video to the client so as to display the identification corresponding to each view angle information on a display interface of the client, wherein the view angle information is the information of the corresponding shooting view angle. Therefore, the switching of the source videos with different visual angles can be more convenient for users.
In this case, in order to facilitate horizontal splicing of a plurality of source video stream data, in this embodiment, before the step of horizontally splicing a plurality of source video stream data to obtain spliced video stream data, the method further includes: determining whether the resolutions of videos corresponding to a plurality of source video stream data are all the same; when the resolutions of the videos corresponding to the source video stream data are not all the same, the resolution of the video corresponding to at least one source video stream data is adjusted so that the resolutions of the processed videos are the same. By adjusting the resolution of the video corresponding to at least one of the source video stream data, the resolution of the processed plurality of videos is the same, so that the subsequent horizontal splicing process of the plurality of source video stream data is further ensured to be simple, and the playing effect of the spliced source video stream data is ensured to be good.
According to another specific embodiment of the present application, the attribute information of the video at least includes a data format corresponding to each of the source video stream data, and in an actual application process, the data formats corresponding to a plurality of the source video stream data may be different, and in this case, in order to facilitate horizontal splicing of the plurality of source video stream data, in this embodiment, before the step of horizontally splicing the plurality of source video stream data to obtain the spliced video stream data, the method further includes: determining whether the data formats of a plurality of the source video stream data are the same; when the data formats of the plurality of source video stream data are not the same, the data format of at least one of the source video stream data is converted so that the data formats of the plurality of source video stream data after conversion are the same. The data formats corresponding to at least one source video stream data are adjusted, so that the data formats of the processed source video stream data are the same, and the subsequent horizontal splicing process of the source video stream data is further ensured to be simple.
In an actual application process, the step of acquiring data of a plurality of source video streams includes: and acquiring a plurality of source video stream data with the same resolution. Therefore, the process of adjusting the resolution when the resolutions of videos corresponding to a plurality of source video stream data are different can be avoided, and the splicing process of the source video stream data is further ensured to be simple and rapid.
In an actual application process, the step of acquiring data of a plurality of source video streams includes: and acquiring a plurality of source video stream data with the same data format. Therefore, the process of converting the data formats when the data formats corresponding to the source video stream data are different can be avoided, and the splicing process of the source video stream data is further ensured to be simple and rapid.
Of course, in order to further ensure that the implementation process of the method is simple, in an actual application process, a plurality of other source video stream data with the same attribute information may also be acquired.
Fig. 4 is a flowchart illustrating a method for playing a video according to another exemplary embodiment, and as shown in fig. 4, the method for playing a video in this embodiment may be applied to a client, and includes the following steps.
In step S21, receiving spliced video stream data, wherein the spliced video stream data is obtained by transversely splicing a plurality of source video stream data, and a spliced image of one frame in the spliced video stream data includes a plurality of sub-images corresponding to images of corresponding frames in the plurality of source video stream data;
in step S22, in response to a switch command, the source video stream data currently played in the spliced video stream is switched to target source video stream data, where the target source video stream data is the source video stream data corresponding to the switch command.
In the video playing method of the application, firstly, spliced video stream data obtained by transversely splicing a plurality of source video stream data is received; and then responding to a switching instruction, and switching the source video stream data currently played in the spliced video stream to target source video stream data. According to the method, the spliced video stream data is obtained by transversely splicing a plurality of source video stream data, and the source video stream data played currently in the spliced video stream can be switched to the target source video stream data in response to a switching instruction, so that the client only needs to pull one path of source video stream data without pulling multiple paths of streams simultaneously, the client is prevented from pulling multiple paths of video streams simultaneously, the problem that the playing of the multiple paths of video streams is not synchronous due to time delay of different source video stream data when the client pulls the multiple paths of streams is solved, the synchronous playing of the source video stream data is guaranteed, the playing effect of the client is good, and the experience of the client is good.
It should be noted that the above horizontal splicing is a splicing manner of splicing a predetermined number of source video stream data and making each frame in the spliced data have a predetermined number of sub-images, where the predetermined number of sub-images are formed by images of corresponding frames in the predetermined number of source video stream data, and the images of corresponding frames in the source video stream data correspond to the sub-images one to one.
In an actual application process, each of the sub-images corresponds to a frame of image in the source video stream data.
In a specific embodiment of the present application, the plurality of pieces of view angle information may be information of different view angles in the same space, or information of view angles in different spaces.
In another specific embodiment of the application, before the step of responding to a switching instruction and switching the source video stream data currently played by the spliced video stream to the target source video stream data, the method further includes: and receiving position information of each sub-image in the spliced images of each frame corresponding to the spliced video, wherein the position information is determined at least according to the resolution of each source video and the splicing sequence of the source video stream data. According to the method, the played source video stream data can be further ensured to be efficiently and accurately switched into the target source video stream data according to the position information.
In order to facilitate the switching of source videos with different viewing angles by a user, in an embodiment of the application, before the step of switching the source video stream data currently played by the spliced video stream to the target source video stream data in response to a switching instruction, the method further includes: receiving visual angle information of each source video, wherein the visual angle information is information of a corresponding shooting visual angle; and displaying the identifier corresponding to the visual angle information on a display interface.
According to a specific embodiment of the present application, the switching the source video stream data currently played in the spliced video stream to the target source video stream data in response to the switching instruction includes: responding to the switching instruction, and determining the target source video stream data to be played; determining the position relationship between the target source video stream data and the currently played source video stream data according to the position information of the subimage corresponding to the target source video stream data and the subimage corresponding to the currently played source video stream data; and switching the currently played source video stream data to the target source video stream data according to the position relation. According to the method, the source video stream data played currently in the spliced video stream can be efficiently and accurately switched to the target source video stream data according to the position relationship between the target source video stream data and the source video stream data played currently, and the flexibility and the accuracy of switching the source video stream data are ensured.
The position information of the sub-image corresponding to the target source video stream data and the position information of the sub-image corresponding to the currently played source video stream data may be determined according to a specific process of "determining the position information of the sub-image in the merged image of each frame" in the content, and specific content is not described again.
In an actual application process, the attribute information of the video may further include information such as brightness information, color information, size information, and pixel value information of the video. Of course, the attribute information may also include other information of the video.
According to another specific embodiment of the present application, the resolutions of the two videos corresponding to any two of the source video stream data are the same. Therefore, the process of splicing and forming the spliced video stream data is simple.
According to another specific embodiment of the present application, the data formats of any two of the source video stream data are the same. Therefore, the process of splicing and forming the spliced video stream data is further ensured to be simple.
In an actual application process, in order to further simplify the process of forming the spliced video stream data, other attribute information of any two source video stream data is the same.
Fig. 5 is a schematic diagram illustrating switching of source video stream data according to the above-described video playback method. As can be seen from fig. 5, the client can flexibly switch the source video stream data currently played in the spliced video stream to the target source video stream data.
Fig. 6 is a block diagram illustrating a playback apparatus according to an example embodiment. Referring to fig. 6, the apparatus includes a first acquisition unit 100, a splicing unit 101, and a first transmission unit 102.
The first acquiring unit 100 is configured to perform acquiring a plurality of source video stream data;
the splicing unit 101 is configured to perform horizontal splicing of a plurality of source video stream data to obtain spliced video stream data, where a spliced image of one frame in the spliced video stream data includes a plurality of sub-images, and the plurality of sub-images correspond to images of corresponding frames in the plurality of source video stream data;
the first sending unit 102 is configured to send the spliced video stream data to a client, so that the client can switchably play a plurality of source video stream data in the spliced video stream data.
In the playback apparatus of the present application, the first obtaining unit obtains a plurality of source video stream data; transversely splicing a plurality of source video stream data through the splicing unit to obtain spliced video stream data; the first sending unit sends the spliced video stream data to a client, and the client can play a plurality of source video stream data in a switching manner according to the spliced video stream data. According to the device, the spliced video stream data is obtained by transversely splicing the source video stream data, and then the spliced video stream data is sent to the client, so that the client only needs to pull one path of source video stream data without pulling multiple paths of streams simultaneously, the client is prevented from pulling multiple paths of video data streams simultaneously, the problem that the client possibly has time delay to cause asynchronous playing when pulling multiple paths of streams, synchronous playing of the source video stream data is guaranteed, the playing effect of the client is guaranteed to be good, and the experience of the client is guaranteed to be good.
It should be noted that the above horizontal splicing is a splicing manner of splicing a predetermined number of source video stream data and making each frame in the spliced data have a predetermined number of sub-images, where the predetermined number of sub-images are formed by images of corresponding frames in the predetermined number of source video stream data, and the images of corresponding frames in the source video stream data correspond to the sub-images one to one.
In an actual application process, each of the sub-images corresponds to a frame of image in the source video stream data.
According to a specific embodiment of the present application, the apparatus further includes a second obtaining unit, where the second obtaining unit is configured to obtain attribute information of each source video before the step of horizontally splicing a plurality of source video stream data to obtain spliced video stream data is performed, where the attribute information of each source video at least includes a resolution of each source video; a first determining unit configured to determine position information of each of the sub-images in the stitched image of each frame and transmit the position information to the client according to at least a resolution of each of the source videos and a stitching order of the source video stream data after the step of stitching the source video stream data in the horizontal direction to obtain stitched video stream data, so that the client switchingly plays the source video stream data in the stitched video stream data according to the position information. The device can further facilitate the splicing of a plurality of subsequent source video stream data by acquiring the attribute information of each source video, wherein the attribute information of the source video at least comprises the resolution ratio of each source video, and the attribute information of the spliced video corresponding to the spliced video stream data can be determined simply and quickly through the attribute information of the plurality of videos.
Of course, the attribute information is not limited to the above-described obtaining method, and may be obtained by analyzing the corresponding source video stream data.
In another specific embodiment of the present application, the first determining unit includes: a first determining module configured to perform a determination that a first start pixel value of the sub-image corresponding to the first source video stream data in the merged image is 0 and a first end pixel value is a pixel value in the resolution of the first source video stream data; a second determining module configured to determine an nth start pixel value and an nth end pixel value of the subimage corresponding to an nth source video stream data in the stitched image according to the stitching order, the pixel values of (N-1) source video stream data before the N-th source video stream data is stitched, N being a positive integer greater than or equal to 2, the stitching order being a first stitching order or a second stitching order, wherein the first stitching order is a stitching order in a pixel height direction, the second stitching order is a stitching order in a pixel width direction, the position information of the sub-image comprises a starting pixel value and an end pixel value of the sub-image in the corresponding spliced image, and the pixel value is the pixel height or the pixel width. Therefore, the position information of the sub-images in the spliced images of each frame is ensured to be determined simply and accurately, and the subsequent switching playing of a plurality of source video stream data according to the position information is further facilitated.
In an actual application process, the attribute information of the video may further include information such as brightness information, color information, size information, and pixel value information of the video. Of course, the attribute information may also include other information of the video.
According to another specific embodiment of the present application, the second determining module includes: a determining submodule configured to perform determination of (N-1) pieces of the source video stream data before an nth piece of the source video stream data is spliced, according to the splicing order; a first calculation sub-module configured to perform a calculation of a sum of pixel values in resolutions of (N-1) pieces of the source video stream data to obtain an nth start pixel value; a second calculation sub-module configured to perform a calculation of a sum of pixel values in a resolution of (N-1) pieces of the source video stream data and pixel values of the nth piece of the source video stream data to obtain the nth end point pixel value; wherein the pixel value is the pixel height when the stitching order is the first stitching order, and the pixel value is the pixel width when the stitching order is the second stitching order. In the device, the Nth starting pixel value and the Nth end pixel value are calculated according to the splicing sequence, so that the high-efficiency and accurate acquisition of the acquired position information can be further ensured.
In a specific embodiment, as shown in fig. 3, assuming that the resolution of the current source video stream data 03 and the resolution of the previous source video stream data 04 are the same and are both 720P, and the number of pixels in the width direction of the current source video stream data 03 and the number of pixels in the width direction of the previous source video stream data 04 are both 1920, the number of pixels in the height direction of the current source video stream data 03 is 1080, and the number of pixels in the height direction of the previous source video stream data 04 is 2160, then the first location information of the current source video stream data is 3240, and the second location information is 2160. Of course, the resolution and the number of pixels may be other values. The previous source video stream data is not limited to source video stream data obtained by splicing two source video stream data, and may be obtained by splicing a plurality of source video stream data.
In another specific embodiment of the present application, the apparatus further includes: a second sending unit configured to send the position information of each sub-image in the merged image of each frame to the client after the step of determining the position information of each sub-image in the merged image of each frame according to at least the resolution of each source video and the merging order of the plurality of source video stream data is executed, so that the client determines the position relationship between the source video stream data currently played and the target source video stream data to be played, thereby switching the source video stream data currently played to the target source video stream data according to the position relationship.
In another specific embodiment of the present application, the attribute information of the source video includes view angle information of each of the source videos, and the apparatus further includes: and a third sending unit configured to send the view angle information of each source video to the client, so that an identifier corresponding to each view angle information is displayed on a display interface of the client, where the view angle information is information of a corresponding shooting view angle. Therefore, the switching of the source videos with different visual angles can be more convenient for users.
In this case, in order to facilitate horizontal splicing of a plurality of source video stream data, the apparatus further includes a second determining unit and an adjusting unit, wherein the second determining unit is configured to perform the step of obtaining attribute information of each source video, and the attribute information of the source video at least includes the resolution of each source video, and after the step, before the step of horizontally splicing a plurality of source video stream data to obtain the spliced video stream data, it is determined whether the resolutions of the videos corresponding to a plurality of source video stream data are all the same; the adjusting unit is configured to adjust the resolution of the video corresponding to at least one of the source video stream data so that the resolutions of the processed videos are the same, in the case that the resolutions of the videos corresponding to the source video stream data are not all the same. By adjusting the resolution of the video corresponding to at least one of the source video stream data, the resolution of the processed plurality of videos is the same, so that the subsequent horizontal splicing process of the plurality of source video stream data is further ensured to be simple, and the playing effect of the spliced source video stream data is ensured to be good.
According to another specific embodiment of the present application, the attribute information of the video at least includes a data format corresponding to each of the source video stream data, and in an actual application process, the data formats corresponding to a plurality of the source video stream data may be different, in this case, in order to facilitate horizontal splicing of the plurality of source video stream data, in this embodiment, the apparatus further includes a third determining unit and a converting unit, wherein the third determining unit is configured to perform the step of obtaining the attribute information of each of the source videos, and the attribute information of the source video at least includes a resolution of each of the source videos, and after the step, determine whether the data formats of the plurality of the source video stream data are all the same before the step of horizontally splicing the plurality of the source video stream data to obtain the spliced video stream data; the conversion unit is configured to perform conversion of the data format of at least one of the source video stream data so that the converted source video stream data have the same data format, in a case where the source video stream data do not have the same data format. The data formats corresponding to at least one source video stream data are adjusted, so that the data formats of the processed source video stream data are the same, and the subsequent horizontal splicing process of the source video stream data is further ensured to be simple.
In an actual application process, the first obtaining unit includes a first obtaining module, and the first obtaining module is configured to perform obtaining of a plurality of source video stream data with the same resolution. Therefore, the process of adjusting the resolution when the resolutions of videos corresponding to a plurality of source video stream data are different can be avoided, and the splicing process of the source video stream data is further ensured to be simple and rapid.
In an actual application process, the first obtaining unit includes a second obtaining module, and the second obtaining module is configured to perform obtaining of a plurality of source video stream data with the same data format. Therefore, the process of converting the data formats when the data formats corresponding to the source video stream data are different can be avoided, and the splicing process of the source video stream data is further ensured to be simple and rapid.
Of course, in order to further ensure that the implementation process of the apparatus is simple, in an actual application process, a plurality of other source video stream data with the same attribute information may also be acquired.
Fig. 5 is a schematic diagram illustrating switching of source video stream data by the playing device according to the video. As can be seen from fig. 5, the client can flexibly switch the source video stream data currently played in the spliced video stream to the target source video stream data.
Fig. 7 is a block diagram illustrating a playback apparatus according to another exemplary embodiment. Referring to fig. 7, the apparatus includes a first receiving unit 200 and a responding unit 201.
The first receiving unit 200 is configured to perform receiving of spliced video stream data, wherein the spliced video stream data is obtained by horizontally splicing a plurality of source video stream data, and a spliced image of one frame in the spliced video stream data comprises a plurality of sub-images corresponding to images of corresponding frames in the plurality of source video stream data;
the responding unit 201 is configured to execute switching of the source video stream data currently played in the spliced video stream to target source video stream data in response to a switching instruction, where the target source video stream data is the source video stream data corresponding to the switching instruction.
In the playing apparatus of the present application, the first receiving unit receives spliced video stream data obtained by transversely splicing a plurality of source video stream data; and responding to a switching instruction through the corresponding unit, and switching the source video stream data currently played in the spliced video stream to target source video stream data. In the device, the spliced video stream data is obtained by transversely splicing a plurality of source video stream data, and the source video stream data played currently in the spliced video stream can be switched to the target source video stream data in response to a switching instruction, so that the client only needs to pull one path of source video stream data without pulling multiple paths of streams simultaneously, thereby avoiding the client pulling multiple paths of video streams simultaneously, further avoiding the problem that the playing of the client is not synchronous due to time delay of different source video stream data when the client pulls multiple paths of streams, ensuring that the source video stream data can be played synchronously, ensuring that the playing effect of the client is better, and ensuring that the experience of the client is better.
It should be noted that the above horizontal splicing is a splicing manner of splicing a predetermined number of source video stream data and making each frame in the spliced data have a predetermined number of sub-images, where the predetermined number of sub-images are formed by images of corresponding frames in the predetermined number of source video stream data, and the images of corresponding frames in the source video stream data correspond to the sub-images one to one.
In an actual application process, each of the sub-images corresponds to a frame of image in the source video stream data.
In a specific embodiment of the present application, the plurality of pieces of view angle information may be information of different view angles in the same space, or information of view angles in different spaces.
According to a specific embodiment of the present application, the apparatus further includes a second receiving unit, where the second receiving unit is configured to receive, before the step of switching the source video stream data currently played by the spliced video stream to the target source video stream data in response to the switching instruction, position information of each sub-image in the spliced images of each frame corresponding to the spliced video, where the position information is determined according to at least a resolution of each source video and a splicing order of the source video stream data. The device can further ensure that the played source video stream data can be switched into the target source video stream data efficiently and accurately according to the position information.
In another embodiment of the present application, the apparatus includes a third receiving unit, configured to receive, in response to a switching instruction, angle-of-view information of each of the source videos before a step of switching source video stream data currently played by the spliced video stream to target source video stream data, where the angle-of-view information is information of a corresponding shooting angle of view; and the display unit is configured to display the identifier corresponding to the visual angle information on a display interface. Therefore, the switching of the source videos with different visual angles can be more convenient for users.
The position information of the sub-image corresponding to the target source video stream data and the position information of the sub-image corresponding to the currently played source video stream data may be determined according to a specific process of "determining the position information of the sub-image in the merged image of each frame" in the content, and specific content is not described again.
In an actual application process, the attribute information of the video may further include information such as brightness information, color information, size information, and pixel value information of the video. Of course, the attribute information may also include other information of the video.
According to another specific embodiment of the present application, the response unit includes a response module, a second determining module, and a switching module, where the response module is configured to determine the target source video stream data to be played in response to the switching instruction; the second determining module is configured to determine a position relationship between the target source video stream data and the currently played source video stream data according to position information of the target source video stream data and position information of the currently played source video stream data; the switching module is configured to switch the currently played source video stream data to the target source video stream data according to the position relationship. Therefore, the client can be further ensured to simply and accurately switch the currently played source video stream data to the target source video stream data.
According to another specific embodiment of the present application, the resolutions of the two videos corresponding to any two of the source video stream data are the same. Therefore, the process of splicing and forming the spliced video stream data is simple.
According to another specific embodiment of the present application, the data formats of any two of the source video stream data are the same. Therefore, the process of splicing and forming the spliced video stream data is further ensured to be simple.
In an actual application process, in order to further simplify the process of forming the spliced video stream data, other attribute information of any two source video stream data is the same.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
In an exemplary embodiment, there is also provided an electronic device, including a processor and a memory for storing the processor-executable instructions, wherein the processor is configured to execute the instructions to implement any one of the above-mentioned video playing methods.
According to still another exemplary embodiment of the present application, there is also provided a system including a server and a client, wherein the server is configured to execute any one of the playing methods for the video in the server; the client is in communication connection with the server, and the client is used for executing any video playing method used in the client.
The system of the application comprises a server and a client, wherein the server is configured to execute any one of the video playing methods used in the server; the client is in communication connection with the server, and the client is used for executing any video playing method used in the client. In the system, the spliced video stream data is obtained by transversely splicing the source video stream data, and then the spliced video stream data is sent to the client, so that the client only needs to pull one path of source video stream data without pulling multiple paths of streams simultaneously, the client is prevented from pulling multiple paths of video data streams simultaneously, the problem that the playing of the client is not synchronous due to time delay of different source video stream data when the client pulls multiple paths of streams is avoided, the synchronous playing of the source video stream data is ensured, the playing effect of the client is better, and the experience of the client is better.
According to a specific embodiment of the present application, the system further includes a collection end, the collection end is in communication connection with the server, and the collection end is configured to collect a plurality of source video stream data and send the plurality of source video stream data to the server.
In an actual application process, the types of the plurality of collecting ends may be the same or different.
In an exemplary embodiment, there is also provided a computer-readable storage medium, wherein when the instructions of the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute any one of the above-mentioned video playing methods or any one of the above-mentioned video playing methods.
The computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, there is also provided a computer program product comprising a computer program which, when executed by a processor, implements any one of the above-described methods of playing a video or any one of the above-described methods of playing a video.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (24)

1. A method for playing a video, comprising:
acquiring a plurality of source video stream data;
transversely splicing a plurality of source video stream data to obtain spliced video stream data, wherein a spliced image of one frame in the spliced video stream data comprises a plurality of sub-images, and the plurality of sub-images correspond to images of corresponding frames in the plurality of source video stream data;
and sending the spliced video stream data to a client so that the client can switchably play a plurality of source video stream data in the spliced video stream data.
2. The method of claim 1,
before the step of horizontally splicing the plurality of source video stream data to obtain spliced video stream data, the method further includes: acquiring attribute information of each source video, wherein the attribute information of the source video at least comprises the resolution of each source video,
after the step of horizontally splicing the plurality of source video stream data to obtain spliced video stream data, the method further includes: and determining the position information of each sub-image in the spliced images of each frame and sending the position information to the client according to at least the resolution of each source video and the splicing sequence of the source video stream data, so that the client can play the source video stream data in the spliced video stream data in a switching manner according to the position information.
3. The method according to claim 2, wherein the step of determining the position information of each sub-image in the merged image of each frame according to at least the resolution of each source video and the splicing order of the source video stream data comprises:
determining that a first starting pixel value of the sub-image corresponding to the first source video stream data in the spliced image is 0, and a first end pixel value is a pixel value in the resolution of the first source video stream data;
determining an nth starting pixel value and an nth end pixel value of the subimages corresponding to the nth source video stream data in the stitched image according to the stitching sequence, the pixel values of (N-1) source video stream data before the nth source video stream data is stitched, wherein N is a positive integer greater than or equal to 2, the stitching sequence is a first stitching sequence or a second stitching sequence, the first stitching sequence is a stitching sequence according to a pixel height direction, the second stitching sequence is a stitching sequence according to a pixel width direction, the position information of the subimages includes a starting pixel value and an end pixel value of the subimages in the stitched image corresponding to the subimages, and the pixel values are pixel height or pixel width.
4. The method for playing back a video according to claim 3, wherein the step of determining an nth start pixel value and an nth end pixel value of the sub-image corresponding to the nth source video stream data in the merged image according to the stitching order, the pixel values of (N-1) source video stream data before the nth source video stream data is stitched, and the pixel value of the nth source video stream data comprises:
determining (N-1) source video stream data before the N-th source video stream data splicing according to the splicing sequence;
calculating the sum of pixel values in the resolution of (N-1) pieces of source video stream data to obtain an Nth initial pixel value;
calculating the sum of the pixel value in the resolution of (N-1) pieces of source video stream data and the pixel value of the Nth piece of source video stream data to obtain the Nth end point pixel value;
and when the splicing sequence is the first splicing sequence, the pixel value is the pixel height, and when the splicing sequence is the second splicing sequence, the pixel value is the pixel width.
5. The method for playing back video according to any one of claims 2 to 4, wherein after the step of determining the position information of each sub-image in the merged image of each frame according to at least the resolution of each source video and the splicing order of the source video stream data, the method further comprises:
and sending the position information of each sub-image in the spliced image of each frame to the client, so that the client determines the position relationship between the currently played source video stream data and the target source video stream data to be played, and the currently played source video stream data is switched into the target source video stream data according to the position relationship.
6. The method for playing back video according to any one of claims 2 to 4, wherein the attribute information of the source video includes view angle information of each source video, the method further comprising:
and sending the visual angle information of each source video to the client so as to display the identification corresponding to each visual angle information on a display interface of the client, wherein the visual angle information is the information of the corresponding shooting visual angle.
7. A method for playing a video, comprising:
receiving spliced video stream data, wherein the spliced video stream data is obtained by transversely splicing a plurality of source video stream data, a spliced image of one frame in the spliced video stream data comprises a plurality of sub-images, and the plurality of sub-images correspond to images of corresponding frames in the plurality of source video stream data;
responding to a switching instruction, and switching the currently played source video stream data in the spliced video stream to target source video stream data, wherein the target source video stream data is the source video stream data corresponding to the switching instruction.
8. The method for playing back a video according to claim 7, wherein the step of switching the source video stream data currently played back by the spliced video stream to the target source video stream data in response to the switching instruction further comprises:
and receiving the position information of each sub-image in the spliced images of each frame corresponding to the spliced video, wherein the position information is determined at least according to the resolution of each source video and the splicing sequence of the stream data of the source videos.
9. The method for playing back a video according to claim 7, wherein the step of switching the source video stream data currently played back by the spliced video stream to the target source video stream data in response to the switching instruction further comprises:
receiving visual angle information of each source video, wherein the visual angle information is information of a corresponding shooting visual angle;
and displaying the identifier corresponding to the visual angle information on a display interface.
10. The method for playing back a video according to claim 8, wherein the step of switching the source video stream data currently played back in the spliced video stream to a target source video stream data in response to a switching instruction comprises:
responding to the switching instruction, and determining the target source video stream data to be played;
determining the position relation between the target source video stream data and the currently played source video stream data according to the position information of the sub-image corresponding to the target source video stream data and the sub-image corresponding to the currently played source video stream data;
and switching the currently played source video stream data to the target source video stream data according to the position relation.
11. A video playback apparatus, comprising:
a first acquiring unit configured to perform acquisition of a plurality of source video stream data;
the splicing unit is configured to perform horizontal splicing on a plurality of source video stream data to obtain spliced video stream data, wherein a spliced image of one frame in the spliced video stream data comprises a plurality of sub-images, and the plurality of sub-images correspond to images of corresponding frames in the plurality of source video stream data;
a first sending unit configured to execute sending the spliced video stream data to a client so as to enable the client to switchably play a plurality of source video stream data in the spliced video stream data.
12. The playback apparatus according to claim 11, wherein the apparatus further comprises:
a second obtaining unit, configured to obtain attribute information of each source video before the step of transversely splicing the plurality of source video stream data to obtain spliced video stream data, where the attribute information of each source video at least includes a resolution of each source video;
and after the step of transversely splicing the plurality of source video stream data to obtain spliced video stream data is performed, determining position information of each sub-image in the spliced images of each frame according to at least the resolution of each source video and the splicing sequence of the plurality of source video stream data, and sending the position information to the client so that the client switchingly plays the plurality of source video stream data in the spliced video stream data according to the position information.
13. The playback apparatus according to claim 12, wherein the first determination unit includes:
a first determining module configured to perform a determination that a first start pixel value of the sub-image corresponding to the first source video stream data in the stitched image is 0 and a first end pixel value is a pixel value in the resolution of the first source video stream data;
a second determining module configured to perform determining an nth start pixel value and an nth end pixel value of the subimage corresponding to an nth source video stream data in the stitched image according to the stitching order, the pixel values of (N-1) source video stream data before the N source video stream data is stitched, N being a positive integer greater than or equal to 2, and the stitching order being the first stitching order or the second stitching order, wherein the first stitching sequence is a stitching sequence according to the pixel height direction, the second stitching sequence is a stitching sequence according to the pixel width direction, the position information of the sub-images comprises a starting pixel value and an end pixel value of the sub-images in the corresponding spliced image, and the pixel values are pixel heights or pixel widths.
14. The playback apparatus according to claim 13, wherein the second determining module comprises:
a determining submodule configured to perform determining (N-1) source video stream data before an nth source video stream data splicing according to the splicing order;
a first calculation submodule configured to perform calculation of a sum of pixel values in resolutions of (N-1) pieces of the source video stream data, resulting in an nth starting pixel value;
a second calculation submodule configured to perform a calculation of a sum of pixel values in a resolution of (N-1) pieces of the source video stream data and pixel values of the nth piece of the source video stream data, resulting in the nth end point pixel value;
wherein the pixel value is the pixel height when the stitching order is the first stitching order, and the pixel value is the pixel width when the stitching order is the second stitching order.
15. The playback apparatus according to any one of claims 12 to 14, wherein the apparatus further comprises:
and a second sending unit, configured to send the position information of each sub-image in the stitched image of each frame to the client after the step of determining the position information of each sub-image in the stitched image of each frame according to at least the resolution of each source video and the stitching order of the plurality of source video stream data is executed, so that the client determines the position relationship between the currently played source video stream data and the target source video stream data to be played, and thus switches the currently played source video stream data into the target source video stream data according to the position relationship.
16. The playback apparatus according to claim 11, wherein the attribute information of the source video includes view angle information of each of the source videos, the apparatus further comprising:
and the third sending unit is configured to execute sending of the view angle information of each source video to the client, so that an identifier corresponding to each view angle information is displayed on a display interface of the client, and the view angle information is information of a corresponding shooting view angle.
17. A video playback apparatus, comprising:
the first receiving unit is configured to execute receiving of spliced video stream data, wherein the spliced video stream data is obtained by transversely splicing a plurality of source video stream data, and a spliced image of one frame in the spliced video stream data comprises a plurality of sub-images, and the plurality of sub-images correspond to images of corresponding frames in the plurality of source video stream data;
a responding unit, configured to execute, in response to a switching instruction, switching the source video stream data currently played in the spliced video stream to target source video stream data, where the target source video stream data is the source video stream data corresponding to the switching instruction.
18. The playback device of claim 17, wherein the device further comprises:
and a second receiving unit, configured to receive, before the step of switching the source video stream data currently played by the spliced video stream to the target source video stream data in response to the switching instruction, position information of each sub-image in the spliced images of each frame corresponding to the spliced video, where the position information is determined according to at least a resolution of each source video and a splicing order of the source video stream data.
19. The playback apparatus as claimed in claim 18, wherein the apparatus comprises:
a third receiving unit, configured to receive, in response to a switching instruction, view information of each source video before a step of switching the source video stream data currently played by the spliced video stream to a target source video stream data, where the view information is information of a corresponding shooting view;
and the display unit is configured to display the identifier corresponding to the visual angle information on a display interface.
20. The playback apparatus according to claim 18, wherein the response unit includes:
a response module configured to execute determining the target source video stream data to be played in response to the switching instruction;
the second determining module is configured to determine the position relationship between the target source video stream data and the currently played source video stream data according to the position information of the sub-image corresponding to the target source video stream data and the sub-image corresponding to the currently played source video stream data;
and the switching module is configured to switch the currently played source video stream data to the target source video stream data according to the position relationship.
21. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the method of playing back a video of any one of claims 1 to 6 or the method of playing back a video of any one of claims 7 to 10.
22. A video playback system, comprising:
a server configured to execute the video playback method of any one of claims 1 to 6;
a client communicatively connected to the server, the client being configured to execute the video playing method according to any one of claims 7 to 10.
23. The system of claim 22, further comprising:
the acquisition ends are respectively in communication connection with the server, and the acquisition ends are used for acquiring a plurality of source video stream data and sending the source video stream data to the server.
24. A computer-readable storage medium, wherein instructions, when executed by a processor of an electronic device, enable the electronic device to perform the method of playing back a video of any one of claims 1 to 6 or the method of playing back a video of any one of claims 7 to 10.
CN202110760086.8A 2021-07-06 2021-07-06 Video playing method, video playing device, electronic equipment and video playing system Pending CN113259764A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110760086.8A CN113259764A (en) 2021-07-06 2021-07-06 Video playing method, video playing device, electronic equipment and video playing system
PCT/CN2022/086135 WO2023279793A1 (en) 2021-07-06 2022-04-11 Video playing method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110760086.8A CN113259764A (en) 2021-07-06 2021-07-06 Video playing method, video playing device, electronic equipment and video playing system

Publications (1)

Publication Number Publication Date
CN113259764A true CN113259764A (en) 2021-08-13

Family

ID=77190701

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110760086.8A Pending CN113259764A (en) 2021-07-06 2021-07-06 Video playing method, video playing device, electronic equipment and video playing system

Country Status (2)

Country Link
CN (1) CN113259764A (en)
WO (1) WO2023279793A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113727183A (en) * 2021-08-30 2021-11-30 北京百度网讯科技有限公司 Live streaming method, device, equipment, storage medium and computer program product
WO2023279793A1 (en) * 2021-07-06 2023-01-12 北京达佳互联信息技术有限公司 Video playing method and apparatus

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5331417A (en) * 1992-09-15 1994-07-19 Digital Pictures, Inc. System and method of displaying a plurality of digital video images
CN107948756A (en) * 2017-11-22 2018-04-20 广州华多网络科技有限公司 Video Composition control method, device and corresponding terminal
CN111866525A (en) * 2020-09-23 2020-10-30 腾讯科技(深圳)有限公司 Multi-view video playing control method and device, electronic equipment and storage medium
CN112929580A (en) * 2021-01-14 2021-06-08 北京奇艺世纪科技有限公司 Multi-view video playing method, device, system, server and client device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020089587A1 (en) * 2000-05-18 2002-07-11 Imove Inc. Intelligent buffering and reporting in a multiple camera data streaming video system
CN101977305A (en) * 2010-10-27 2011-02-16 北京中星微电子有限公司 Video processing method, device and system
CN104822070B (en) * 2015-04-13 2018-07-20 腾讯科技(北京)有限公司 Multi-path video stream playback method and device
CN113259764A (en) * 2021-07-06 2021-08-13 北京达佳互联信息技术有限公司 Video playing method, video playing device, electronic equipment and video playing system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5331417A (en) * 1992-09-15 1994-07-19 Digital Pictures, Inc. System and method of displaying a plurality of digital video images
CN107948756A (en) * 2017-11-22 2018-04-20 广州华多网络科技有限公司 Video Composition control method, device and corresponding terminal
CN111866525A (en) * 2020-09-23 2020-10-30 腾讯科技(深圳)有限公司 Multi-view video playing control method and device, electronic equipment and storage medium
CN112929580A (en) * 2021-01-14 2021-06-08 北京奇艺世纪科技有限公司 Multi-view video playing method, device, system, server and client device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023279793A1 (en) * 2021-07-06 2023-01-12 北京达佳互联信息技术有限公司 Video playing method and apparatus
CN113727183A (en) * 2021-08-30 2021-11-30 北京百度网讯科技有限公司 Live streaming method, device, equipment, storage medium and computer program product
CN113727183B (en) * 2021-08-30 2023-09-15 北京百度网讯科技有限公司 Live push method, apparatus, device, storage medium and computer program product

Also Published As

Publication number Publication date
WO2023279793A1 (en) 2023-01-12

Similar Documents

Publication Publication Date Title
CN108900857B (en) Multi-view video stream processing method and device
US11240403B2 (en) Compensation for delay in PTZ camera system
US6704042B2 (en) Video processing apparatus, control method therefor, and storage medium
CN107040794A (en) Video broadcasting method, server, virtual reality device and panoramic virtual reality play system
CN111263177A (en) Video interactive live broadcast method and system
CN111970524B (en) Control method, device, system, equipment and medium for interactive live broadcast and microphone connection
WO2023279793A1 (en) Video playing method and apparatus
KR101528863B1 (en) Method of synchronizing tiled image in a streaming service providing system of panoramic image
CN113115110B (en) Video synthesis method and device, storage medium and electronic equipment
CN113099245B (en) Panoramic video live broadcast method, system and computer readable storage medium
EP2938038B1 (en) Immersion communication client and server, and method for obtaining content view
CN112770050B (en) Video display method and device, computer readable medium and electronic equipment
CN110928509B (en) Display control method, display control device, storage medium, and communication terminal
CN113286190A (en) Cross-network and same-screen control method and device and cross-network and same-screen system
CN115639976A (en) Multi-mode and multi-angle synchronous display method and system for virtual reality content
CN106412617B (en) Remote debugging control method and device
CN113542896B (en) Video live broadcast method, equipment and medium of free view angle
CN113010135B (en) Data processing method and device, display terminal and storage medium
CN114449303A (en) Live broadcast picture generation method and device, storage medium and electronic device
KR20150073573A (en) Method and apparatus for displaying contents related in mirroring picture
US20220210486A1 (en) System for playing specific streaming selected from combined streamings and method therefore
CN115379277A (en) VR panoramic video playing method and system based on IPTV service
CN112019922A (en) Facial expression data processing method applied to virtual studio
CN113472999B (en) Intelligent device and control method thereof
CN115474073B (en) Method and device for intelligently switching picture layout

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