WO2023279793A1 - 视频的播放方法及装置 - Google Patents

视频的播放方法及装置 Download PDF

Info

Publication number
WO2023279793A1
WO2023279793A1 PCT/CN2022/086135 CN2022086135W WO2023279793A1 WO 2023279793 A1 WO2023279793 A1 WO 2023279793A1 CN 2022086135 W CN2022086135 W CN 2022086135W WO 2023279793 A1 WO2023279793 A1 WO 2023279793A1
Authority
WO
WIPO (PCT)
Prior art keywords
video stream
stream data
source video
spliced
splicing
Prior art date
Application number
PCT/CN2022/086135
Other languages
English (en)
French (fr)
Inventor
杜海涛
Original Assignee
北京达佳互联信息技术有限公司
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 北京达佳互联信息技术有限公司 filed Critical 北京达佳互联信息技术有限公司
Publication of WO2023279793A1 publication Critical patent/WO2023279793A1/zh

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

Definitions

  • the present disclosure relates to the field of live broadcasting, and in particular to a video playing method, playing device, electronic equipment, system, computer-readable storage medium, and computer program product.
  • the client when it is necessary to switch live broadcast rooms during multi-view live broadcast, the client generally pulls multiple live video data streams at the same time, so that the client can switch and play video data streams from different viewpoints.
  • the present disclosure provides a video playing method, a playing device, electronic equipment, a system, a computer-readable storage medium, and a computer program product.
  • the disclosed technical scheme is as follows:
  • a video playing method including: acquiring multiple source video stream data; horizontally splicing multiple source video stream data to obtain spliced video stream data, the spliced video stream
  • the mosaic image of one frame includes a plurality of sub-images, and the plurality of sub-images correspond to the images of corresponding frames in the plurality of source video stream data; send the mosaic video stream data to the client, so that the client The end can switchably play a plurality of the source video stream data in the spliced video stream data.
  • the method before the step of horizontally splicing a plurality of source video stream data to obtain spliced video stream data, the method further includes: acquiring attribute information of each source video, and the attribute information of the source video is at least Including the resolution of each of the source videos, after the step of horizontally splicing a plurality of source video stream data to obtain the spliced video stream data, the method further includes: at least according to the resolution of each of the source videos and multiple The splicing sequence of the source video stream data, determine the position information of each sub-image in the spliced image of each frame and send it to the client, so that the client can switch locations according to the position information. Playing a plurality of the source video stream data in the spliced video stream data.
  • the step of determining the position information of the sub-image in the stitched image of each frame at least according to the resolution of each source video and the splicing sequence of multiple source video stream data includes : determine that the first start pixel value of the sub-image corresponding to the first source video stream data in the spliced image is 0, and the first end pixel value is that of the first source video stream data The pixel value of the resolution; according to the splicing sequence, the pixel value of the (N-1) source video stream data before the splicing of the Nth source video stream data and the Nth source video stream The pixel value of the data determines the Nth starting pixel value and the Nth ending pixel value of the sub-image corresponding to the Nth source video stream data in the spliced image, where N is a positive integer greater than or equal to 2,
  • the splicing order is the first splicing sequence or the second splicing sequence, wherein the first splicing sequence is the splicing sequence according to
  • the step of determining the Nth start pixel value and the Nth end pixel value of the sub-image corresponding to the Nth source video stream data in the spliced image includes: according to the splicing order , determine the (N-1) source video stream data before the splicing of the Nth source video stream data; calculate the sum of the pixel values in the resolution of the (N-1) source video stream data , to obtain the Nth starting pixel value; calculate the sum of the pixel value in the resolution of the (N-1) source video stream data and the pixel value of the Nth source video stream data, and obtain the The pixel value of the Nth end point; when the splicing sequence is the first splicing sequence, the pixel value is the pixel height; when the splicing sequence
  • the method further includes: sending the position information of each sub-image in the spliced image of each frame to the client, so that the client can determine the currently played source video stream data and the positional relationship between the target source video stream data to be played, so that the currently played source video stream data is switched to the target source video stream data according to the positional relationship.
  • the attribute information of the source video includes viewing angle information of each of the source videos
  • the method further includes: sending the viewing angle information of each of the source videos to the client, so that the client
  • the display interface of the terminal displays the identification corresponding to each of the angle of view information, and the angle of view information is the information of the corresponding shooting angle of view.
  • a video playback method including: receiving spliced video stream data, wherein the spliced video stream data is obtained by horizontal splicing of multiple source video stream data, and the spliced video stream data
  • a spliced image of one frame includes a plurality of sub-images, and the multiple sub-images correspond to images of corresponding frames in the plurality of source video stream data
  • the source video stream data is switched to target source video stream data, and the target source video stream data is the source video stream data corresponding to the switching instruction.
  • the method 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, the method further includes: receiving the spliced video corresponding Position information of each of the sub-images in the spliced image of each frame, the position information is determined at least according to the resolution of each of the source videos and the splicing order of multiple source video stream data.
  • the method 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, the method further includes: receiving each of the source video stream data
  • the angle of view information of the video is the information of the corresponding shooting angle of view; and the logo corresponding to the angle of view information is displayed on the display interface.
  • the step of 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: determining the source video stream data to be played in response to the switching instruction The target source video stream data; determine the target source video stream data according to 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 The positional relationship with the currently played source video stream data; according to the positional relationship, switch the currently played source video stream data to the target source video stream data.
  • a video playback device including: a first acquisition unit configured to acquire multiple source video stream data; a splicing unit configured to horizontally splice multiple sources of video stream data Source video stream data to obtain spliced video stream data, in the spliced video stream data, a frame of spliced images includes a plurality of sub-images, and the multiple sub-images correspond to images of corresponding frames in the plurality of source video stream data;
  • the first sending unit is configured to send the spliced video stream data to the client, so that the client can switchably play a plurality of the source video stream data in the spliced video stream data.
  • the device further includes: a second acquisition unit configured to acquire 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 , the attribute information of the source video includes at least the resolution of each of the source videos; the first determining unit is configured to perform the step of horizontally splicing a plurality of source video stream data to obtain spliced video stream data, At least according to the resolution of each source video and the splicing order of multiple source video stream data, determine the position information of each sub-image in the spliced image of each frame and send it to the client, so as to enabling the client to switchably play a plurality of the source video stream data in the spliced video stream data according to the location information.
  • a second acquisition unit configured to acquire 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 , the attribute information of the source video includes at least the resolution
  • the first determining unit includes: a first determining module configured to determine the first starting pixel of the sub-image corresponding to the first source video stream data in the spliced image The value is 0, and the pixel value of the first end point is the pixel value of the resolution of the first said source video stream data; the second determination module is configured to execute according to the mosaic sequence, the Nth said source video The pixel values of the (N-1) source video stream data and the pixel value of the Nth source video stream data before the stream data splicing are determined to determine the Nth source video stream data corresponding to The Nth starting pixel value and the Nth ending pixel value of the sub-image in the spliced image, N is a positive integer greater than or equal to 2, and the splicing sequence is the first splicing sequence or the second splicing sequence, wherein the The first splicing order is the splicing sequence according to the pixel height direction, the second splicing sequence is the splicing sequence according to the
  • the second determining module includes: a determining submodule configured to perform, according to the splicing order, determine (N-1) the splicing of the Nth source video stream data before Source video stream data; the first calculation submodule is configured to perform the calculation of (N-1) the sum of pixel values in the resolution of the source video stream data to obtain the Nth starting pixel value; the second calculation submodule A module configured to calculate the sum of the pixel values in the resolution of (N-1) source video stream data and the pixel value of the Nth source video stream data to obtain the Nth end point A pixel value; wherein, 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.
  • the device further includes: a second sending unit, configured to determine each frame at least according to the resolution of each source video and the splicing order of multiple source video stream data.
  • a second sending unit configured to determine each frame at least according to the resolution of each source video and the splicing order of multiple source video stream data.
  • the attribute information of the source video includes viewing angle information of each source video
  • the device further includes: a third sending unit configured to send the viewing angle information of each source video to the The client, so that the display interface of the client displays the identification corresponding to each of the angle of view information, and the angle of view information is the information of the corresponding shooting angle of view.
  • a video playback device including: a first receiving unit configured to receive spliced video stream data, wherein the spliced video stream data is a plurality of source video stream data Obtained by horizontal splicing, in the spliced video stream data, a spliced image of one frame includes multiple sub-images, and the multiple sub-images correspond to images of corresponding frames in the multiple source video stream data; the response unit is configured to Executing in response to a switching instruction, switching the currently played source video stream data 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
  • the device further includes: a second receiving unit configured to execute the response to the switching instruction, and switch the source video stream data currently played by the spliced video stream to the target source video stream.
  • a second receiving unit configured to execute the response to the switching instruction, and switch the source video stream data currently played by the spliced video stream to the target source video stream.
  • the device includes: a third receiving unit, configured to execute 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 , receiving angle of view information of each source video, where the angle of view information is information of a corresponding shooting angle of view; a display unit configured to display an identifier corresponding to the angle of view information on a display interface.
  • the responding unit includes: a responding module configured to determine the target source video stream data to be played in response to the switching instruction; a second determining module configured to execute according to the 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, determine the position information of the target source video stream data and the currently played source video stream data A positional relationship; a switching module configured to switch the currently played source video stream data to the target source video stream data according to the positional relationship.
  • an electronic device including 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 playing methods of the video.
  • a system including a server and a client, wherein the server is configured to execute any one of the video playback methods described above; the client and the server A communication connection, the client is used to execute any one of the video playing methods described above.
  • the system further includes a plurality of collection terminals, the plurality of collection terminals are respectively connected to the server in communication, and the plurality of collection terminals are used to collect a plurality of source video stream data, and multiple The source video stream data is sent to the server.
  • a computer-readable storage medium when the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device can execute any one of the The playing method of the video or any one of the playing methods of the video.
  • a computer program product including a computer program.
  • the computer program When the computer program is executed by a processor, any one of the video playback methods or any one of the video playback methods is implemented. Play method.
  • a plurality of source video stream data are obtained; then, multiple time-synchronized source video stream data are horizontally spliced to obtain spliced video stream data; finally, the The spliced video stream data is sent to the client, and the client can play a plurality of source video stream data switchably according to the spliced video stream data.
  • the spliced video stream data is obtained by horizontally splicing multiple 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 source video stream data , there is no need to pull multiple streams at the same time, which prevents the client from pulling multiple video data streams at the same time, thereby avoiding the problem of playback asynchrony caused by the time delay of different source video stream data when the client pulls multiple streams , ensuring that multiple source video stream data can be played synchronously, and ensuring a good playback effect on the client side.
  • Fig. 1 is a structural diagram showing an implementation environment according to an exemplary embodiment.
  • Fig. 2 is a flow chart showing a method for playing a video according to an exemplary embodiment.
  • Fig. 3 is a schematic diagram of obtaining the spliced pixel height of source video stream data according to an exemplary embodiment.
  • Fig. 4 is a flow chart showing a method for playing a video according to another exemplary embodiment.
  • Fig. 5 is a schematic diagram showing switching from currently played source video stream data to target source video stream data according to an exemplary embodiment.
  • Fig. 6 is a block diagram of a playback device according to an exemplary embodiment.
  • Fig. 7 is a block diagram of a playback device according to another exemplary embodiment.
  • Fig. 1 is a structural diagram showing an implementation environment according to an exemplary embodiment. As shown in Fig. 1 , the following video playing method may be applied in the implementation environment.
  • 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 the above-mentioned source video stream data.
  • the electronic device 01 can be any electronic product that can interact with the user in one or more ways such as keyboard, touchpad, touch screen, remote control, voice interaction or handwriting equipment, such as mobile phone, tablet computer, palmtop computer , personal computer (Personal Computer, PC), wearable devices, smart TV, etc.
  • the server 02 may be a single server, or a server cluster composed of multiple servers, or a cloud computing service center.
  • the server 02 may include a processor, a memory, a network interface, and the like.
  • the embodiments of the present disclosure provide a video playing method, a playing device, an electronic device, a system, a computer-readable storage medium, and a computer program product.
  • the execution subject of the video playing method provided by the embodiments of the present disclosure may be the above-mentioned electronic device or server, or may be a functional module and/or functional entity in the electronic device or server capable of implementing the video playing method, specifically, It is determined according to actual usage requirements, and is not limited by the embodiments of the present disclosure.
  • the video playing method provided by the embodiments of the present disclosure will be exemplarily described below by taking an electronic device as an example for execution.
  • Fig. 2 is a flow chart of a method for playing a video according to an exemplary embodiment. As shown in Fig. 2 , the method for playing a video may be used in a server, and includes the following steps S11 to S13.
  • step S11 a plurality of source video stream data are obtained
  • a plurality of the above-mentioned source video stream data are horizontally spliced to obtain spliced video stream data.
  • a spliced image of one frame includes a plurality of sub-images, and the above-mentioned multiple sub-images and the above-mentioned multiple source video stream data The image corresponding to the corresponding frame in ;
  • step S13 sending the spliced video stream data to the client, so that the client can switchably play a plurality of the source video stream data in the spliced video stream data.
  • the playback method of the above-mentioned video of the present application at first, a plurality of source video stream data are obtained; then, a plurality of the above-mentioned source video stream data are horizontally spliced to obtain the spliced video stream data; finally, the above-mentioned spliced video stream data is sent to The client, the client can switchably play a plurality of the above-mentioned source video stream data according to the above-mentioned spliced video stream data.
  • the above spliced video stream data is obtained by horizontally splicing multiple 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 source video stream data without Simultaneously pull multiple streams, which prevents the client from simultaneously pulling multiple video data streams, thereby avoiding the problem of playback asynchrony caused by the time delay of different source video stream data when the client pulls multiple streams, ensuring A plurality of the above-mentioned source video stream data can be played synchronously, which ensures a good playback effect of the client.
  • the above-mentioned horizontal splicing refers to splicing a predetermined amount of source video stream data so that each frame of the spliced data has a predetermined number of sub-images, wherein the predetermined number of sub-images It is composed of a predetermined number of images of corresponding frames in the source video stream data, and the images of the corresponding frames in the source video stream data are in one-to-one correspondence with the sub-images.
  • each sub-image corresponds to an image of a corresponding frame in the source video stream data.
  • the above method before the step of horizontally splicing multiple source video stream data to obtain spliced video stream data, the above method further includes: acquiring attribute information of each source video, the attribute information of the above source video at least includes each For the resolution of the above-mentioned source video, after the above-mentioned step of horizontally splicing a plurality of the above-mentioned source video stream data to obtain the spliced video stream data, the above-mentioned method further includes: Stitching sequence, determining the position information of each sub-image in the spliced image of each frame and sending it to the client, so that the client switches and plays multiple source videos in the spliced video stream data according to the position information streaming data.
  • the above method obtains the attribute information of each source video, and the attribute information of the above-mentioned source video includes at least the resolution of each of the above-mentioned source videos, which further facilitates the splicing of subsequent multiple above-mentioned source video stream data.
  • the attribute information of the spliced video corresponding to the above spliced video stream data can be determined relatively simply and quickly.
  • the above attribute information is not limited to the above obtaining manner, and it can also be obtained by parsing the corresponding above source video stream data.
  • the step of determining the position information of the sub-images in the spliced images of each frame at least according to the resolution of each of the above-mentioned source videos and the splicing order of multiple source video stream data includes: determining the first The first start pixel value of the sub-image corresponding to the above-mentioned source video stream data in the above-mentioned spliced image is 0, and the first end pixel value is the pixel value of the resolution of the first above-mentioned source video stream data; according to the above The splicing order, the pixel values of the (N-1) above-mentioned source video stream data before the splicing of the Nth above-mentioned source video stream data, and the pixel values of the above-mentioned Nth above-mentioned source video stream data, determine the Nth above-mentioned source video stream The N-th starting pixel value and the N-th ending pixel value of the above-mentioned
  • the attribute information of the above video may also include information such as brightness information, color information, size information, and pixel value information of the video.
  • the above attribute information may also include other information of the video.
  • the pixel values of the (N-1) pieces of the above-mentioned source video stream data before the splicing of the Nth source video stream data and the pixel values of the above-mentioned Nth above-mentioned source video stream data includes: according to the above-mentioned mosaic order, determine the Nth above-mentioned source The (N-1) above-mentioned source video stream data before video stream data splicing; Calculate the sum of the pixel values in the resolution of (N-1) above-mentioned source video stream data to obtain the Nth starting pixel value; calculate ( N-1) The sum of the pixel values in the resolution of the above-mentioned source video stream data and the pixel value
  • the current source video stream data 03 (the Nth above-mentioned source video stream data) and the previous source video stream data 04 (the Nth above-mentioned source video stream data before splicing ( N-1) the above-mentioned source video stream data) have the same resolution, all are 720P, and the current source video stream data 03 (the Nth above-mentioned source video stream data) and the previous source video stream data 04 (the Nth)
  • the number of pixels in the width direction of the (N-1) above-mentioned source video stream data before the above-mentioned source video stream data splicing is 1920, and the current source video stream data 03 (the Nth above-mentioned source video stream data) is in height
  • the number of pixels in the direction is 1080, and the number of pixels in the height direction of the former source video stream data 04 (the (N-1) above-mentioned source video stream data before the splicing of the Nth above-ment
  • the preceding source video stream data is not limited to source video stream data obtained by splicing two source video stream data, and may also be obtained by splicing multiple source video stream data.
  • the above method further includes: sending the position information of each sub-image in the above-mentioned spliced image of each frame to the above-mentioned client, so that the above-mentioned client determines the above-mentioned source video stream data currently played and the target source video stream data to be played The positional relationship between them, so that the currently played source video stream data is switched to the target source video stream data according to the positional relationship.
  • the attribute information of the above-mentioned source video includes the viewing angle information of each of the above-mentioned source videos
  • the above method further includes: sending the viewing angle information of each of the above-mentioned source videos to the above-mentioned client, so that the display interface of the above-mentioned client A sign corresponding to each of the angle of view information is displayed, and the angle of view information is information of a corresponding shooting angle of view. In this way, it is more convenient for the user to switch source videos of different viewing angles.
  • the attribute information of the above-mentioned video includes at least the resolution of the video corresponding to each of the above-mentioned source video stream data.
  • the resolution of the videos corresponding to the above-mentioned source video stream data may be different.
  • the above-mentioned method before the step of horizontally splicing a plurality of the above-mentioned source video stream data to obtain the spliced video stream data, the above-mentioned method further includes: determining a plurality of the above-mentioned source video stream data Whether the resolutions of the videos corresponding to the stream data are the same; if the resolutions of the videos corresponding to the multiple source video stream data are not all the same, the resolution of at least one video corresponding to the source video stream data is adjusted, The resolutions of the plurality of processed videos are made the same.
  • the resolutions of the processed multiple above-mentioned videos are the same, which further ensures that the subsequent horizontal splicing process of the multiple above-mentioned source video stream data is relatively simple, At the same time, it is ensured that the playback effect of the spliced source video stream data is better.
  • the attribute information of the above-mentioned video includes at least the data format corresponding to each of the above-mentioned source video stream data.
  • the data formats corresponding to the above-mentioned source video stream data may be different.
  • the above method before the step of horizontally splicing multiple source video stream data to obtain spliced video stream data, the above method further includes: determining multiple Whether the data formats of the above-mentioned source video stream data are all the same; in the case that the data formats of a plurality of the above-mentioned source video stream data are not all the same, the data format of at least one of the above-mentioned source video stream data is converted, so that the converted multiple data formats The data formats of the above source video stream data are the same.
  • the data format of the processed multiple above-mentioned source video stream data is the same, which further ensures that the subsequent horizontal splicing process of multiple above-mentioned source video stream data is relatively simple.
  • the above-mentioned step of acquiring multiple source video stream data includes: acquiring multiple above-mentioned source video stream data with the same resolution. This can avoid the process of adjusting the resolution when the video resolutions corresponding to multiple source video stream data are different, thereby further ensuring that the splicing process of multiple source video stream data is relatively simple and fast.
  • the above-mentioned step of acquiring multiple source video stream data includes: acquiring multiple above-mentioned source video stream data with the same data format. This can avoid the process of converting the data format when the corresponding data formats of multiple source video stream data are different, thereby further ensuring that the splicing process of multiple above-mentioned source video stream data is relatively simple and fast.
  • Fig. 4 is a flow chart of a method for playing a video according to another exemplary embodiment. As shown in Fig. 4 , the method for playing a video in an embodiment of the present disclosure may be applied to a client, and includes the following steps.
  • step S21 the spliced video stream data is received, wherein the spliced video stream data is obtained by horizontal splicing of a plurality of source video stream data, in the spliced video stream data, one frame of spliced image includes multiple sub-images, the multiple The image corresponds to the image of the corresponding frame in the above-mentioned plurality of source video stream data;
  • step S22 in response to the switching instruction, the source video stream data currently played in the spliced video stream is switched to target source video stream data, and the target source video stream data is the source video stream data corresponding to the switching instruction.
  • the mosaic video stream data obtained by horizontal splicing of a plurality of source video stream data is received; Target source video stream data.
  • the spliced video stream data is obtained by splicing multiple source video stream data horizontally, and in response to a switching instruction, the currently played source video stream data in the spliced video stream can be switched to the target source video stream data, so that The client only needs to pull one source video stream data, and does not need to pull multiple streams at the same time, thereby preventing the client from simultaneously pulling multiple video data streams, thereby avoiding the possibility of different source video stream data when the client pulls multiple streams
  • the problem of out-of-sync playback caused by time delay ensures that the above-mentioned source video stream data can be played synchronously and the playback effect of the client is better.
  • the above-mentioned horizontal splicing refers to splicing a predetermined amount of source video stream data so that each frame of the spliced data has a predetermined number of sub-images, wherein the predetermined number of sub-images It is composed of a predetermined number of images of corresponding frames in the source video stream data, and the images of the corresponding frames in the source video stream data are in one-to-one correspondence with the sub-images.
  • each sub-image corresponds to an image of a corresponding frame in the source video stream data.
  • the plurality of viewing angle information may be information of different viewing angles in the same space, or may be information of viewing angles in different spaces.
  • the above-mentioned source video stream data currently played by the above-mentioned spliced video stream is switched to before the step of the target source video stream data
  • the above-mentioned method further includes: receiving each frame corresponding to the spliced video
  • the location information of each of the sub-images in the above-mentioned spliced image, the above-mentioned location information is determined at least according to the resolution of each of the above-mentioned source videos and the splicing sequence of the multiple above-mentioned source video stream data. In this method, according to the location information, it can be further ensured that the played source video stream data is switched efficiently and accurately subsequently to the target source video stream data.
  • the above-mentioned step of switching the above-mentioned source video stream data currently played in the above-mentioned spliced video stream to the target source video stream data in response to the switching instruction includes: in response to the above-mentioned switching instruction, determining the above-mentioned target to be played Source video stream data; according to the above-mentioned sub-image corresponding to the above-mentioned target source video stream data and the position information of the above-mentioned sub-image corresponding to the above-mentioned source video stream data currently playing, determine the above-mentioned target source video stream data and the above-mentioned source video stream currently playing The positional relationship of the data; according to the positional relationship, the currently played source video stream data is switched to the target source video stream data.
  • the above method can efficiently and accurately switch the currently played source video stream data in the spliced video stream to the target source video stream data, ensuring The flexibility and accuracy of source video stream data switching.
  • the position information of the above-mentioned sub-image corresponding to the above-mentioned target source video stream data and the above-mentioned sub-image corresponding to the above-mentioned source video stream data currently playing can be determined according to the above-mentioned content in the above-mentioned sub-image in the above-mentioned mosaic image of each frame
  • the specific process of "location information" is determined, and the specific content will not be repeated.
  • the attribute information of the above video may also include information such as brightness information, color information, size information, and pixel value information of the video.
  • the above attribute information may also include other information of the video.
  • the resolutions of the two videos corresponding to any two source video stream data are the same. This ensures that the process of splicing and forming the spliced video stream data is relatively simple.
  • the data formats of any two source video stream data are the same. This further ensures that the process of splicing and forming the spliced video stream data is relatively simple.
  • FIG. 5 shows a schematic diagram of switching source video stream data according to the above video playing method. It can be seen from FIG. 5 that the client can flexibly switch the above-mentioned source video stream data currently played in the above-mentioned spliced video stream to target source video stream data.
  • Fig. 6 is a block diagram of a playback device according to an exemplary embodiment.
  • the device includes a first acquiring unit 100 , a splicing unit 101 and a first sending unit 102 .
  • the first obtaining unit 100 is configured to perform obtaining a plurality of source video stream data
  • the splicing unit 101 is configured to perform horizontal splicing of a plurality of the above-mentioned source video stream data to obtain spliced video stream data.
  • a spliced image of one frame includes multiple sub-images, and the multiple sub-images and the above-mentioned multiple sources The image corresponding to the corresponding frame in the video stream data;
  • the first sending unit 102 is configured to send the spliced video stream data to the client, so that the client can switchably play a plurality of the source video stream data in the spliced video stream data.
  • a plurality of source video stream data is obtained by the above-mentioned first acquisition unit; a plurality of the above-mentioned source video stream data are horizontally spliced by the above-mentioned splicing unit to obtain spliced video stream data; by the above-mentioned first sending unit
  • the above-mentioned spliced video stream data is sent to the client, and the client can switchably play a plurality of the above-mentioned source video stream data according to the above-mentioned spliced video stream data.
  • the above-mentioned spliced video stream data is obtained by horizontally splicing multiple 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 source video stream data without Simultaneously pull multiple streams, which prevents the client from simultaneously pulling multiple video data streams, thereby avoiding the problem of playback asynchrony caused by the time delay of different source video stream data when the client pulls multiple streams, ensuring A plurality of the above-mentioned source video stream data can be played synchronously, which ensures a good playback effect of the client.
  • the above-mentioned horizontal splicing refers to splicing a predetermined amount of source video stream data so that each frame of the spliced data has a predetermined number of sub-images, wherein the predetermined number of sub-images It is composed of a predetermined number of images of corresponding frames in the source video stream data, and the images of the corresponding frames in the source video stream data are in one-to-one correspondence with the sub-images.
  • each sub-image corresponds to an image of a corresponding frame in the source video stream data.
  • the above-mentioned device further includes a second acquisition unit, and the above-mentioned second acquisition unit is configured to acquire each source video before the step of horizontally splicing a plurality of the above-mentioned source video stream data to obtain the spliced video stream data.
  • the attribute information of the source video, the attribute information of the above-mentioned source video includes at least the resolution of each of the above-mentioned source videos; the first determination unit is configured to perform at least According to the resolution of each of the above-mentioned source videos and the splicing sequence of multiple above-mentioned source video stream data, determine the position information of each of the above-mentioned sub-images in the above-mentioned spliced image of each frame and send it to the above-mentioned client, so that the above-mentioned client can according to the above-mentioned
  • the location information switch ably plays a plurality of the above-mentioned source video stream data in the above-mentioned mosaic video stream data.
  • the above device obtains the attribute information of each source video, and the attribute information of the above source video includes at least the resolution of each of the above source videos, which further facilitates the splicing of subsequent multiple source video stream data, and through the attribute information of multiple above videos , the attribute information of the spliced video corresponding to the above spliced video stream data can be determined relatively simply and quickly.
  • the above attribute information is not limited to the above obtaining manner, and it can also be obtained by parsing the corresponding above source video stream data.
  • the above-mentioned first determining unit includes: a first determining module, configured to determine the first starting pixel value of the above-mentioned sub-image corresponding to the first one of the above-mentioned source video stream data in the above-mentioned mosaic image 0.
  • the pixel value of the first end point is the pixel value of the resolution of the first above-mentioned source video stream data; the second determination module is configured to perform ( N-1) the pixel values of the above-mentioned source video stream data and the pixel values of the above-mentioned Nth source video stream data, determine the N-th start of the above-mentioned sub-image corresponding to the N-th source video stream data in the above-mentioned mosaic image
  • the starting pixel value and the Nth end point pixel value, N is a positive integer greater than or equal to 2
  • the above-mentioned splicing sequence is the first splicing sequence or the second splicing sequence, wherein the above-mentioned first splicing sequence is the splicing sequence according to the pixel height direction, and the above-mentioned
  • the second splicing order is the splicing sequence according to the pixel width direction, the position information of the sub-images includes the starting pixel value
  • the attribute information of the above video may also include information such as brightness information, color information, size information, and pixel value information of the video.
  • the above attribute information may also include other information of the video.
  • the above-mentioned second determination module includes: a determination sub-module configured to perform the above-mentioned splicing order, and determine the (N-1) above-mentioned source videos before the splicing of the N-th above-mentioned source video stream data Stream data; the first calculation submodule is configured to perform calculation (N-1) The sum of the pixel values in the resolution of the above-mentioned source video stream data to obtain the Nth starting pixel value; the second calculation submodule is It is configured to calculate the sum of the pixel values in the resolution of (N-1) above-mentioned source video stream data and the pixel value of the above-mentioned Nth source video stream data to obtain the above-mentioned Nth end point pixel value; wherein, in the above-mentioned When the splicing sequence is the first splicing sequence, the pixel value is the pixel height, and when the splicing sequence is the second s
  • the current source video stream data 03 and the previous source video stream data 04 have the same resolution, both of which are 720P, and the current source video stream data 03 and the previous source video stream
  • the number of pixels in the width direction of the data 04 is 1920
  • the number of pixels in the height direction of the current source video stream data 03 is 1080
  • the number of pixels in the height direction of the previous source video stream data 04 is 2160
  • the current The first position information of the above source video stream data is 3240
  • the second position information is 2160.
  • the aforementioned resolution and the aforementioned number of pixels may also be other values.
  • the preceding source video stream data is not limited to source video stream data obtained by splicing two source video stream data, and may also be obtained by splicing multiple source video stream data.
  • the above-mentioned device further includes: a second sending unit configured to perform the above-mentioned at least according to the resolution of each of the above-mentioned source videos and the splicing sequence of multiple above-mentioned source video stream data, determine the above-mentioned After the step of position information of each of the sub-images in the spliced image, the position information of each of the sub-images in the spliced image of each frame is sent to the client, so that the client can determine the currently played source video stream data and the positional relationship between the target source video stream data to be played, so that the currently played source video stream data is switched to the target source video stream data according to the positional relationship.
  • the attribute information of the above-mentioned source video includes viewing angle information of each of the above-mentioned source videos
  • the above-mentioned device further includes: a third sending unit configured to send the viewing angle information of each of the above-mentioned source videos to the above-mentioned client , so that the display interface of the client terminal displays the identification corresponding to each of the angle of view information, and the angle of view information is the information of the corresponding shooting angle of view. In this way, it is more convenient for the user to switch source videos of different viewing angles.
  • the attribute information of the above-mentioned video includes at least the resolution of the video corresponding to each of the above-mentioned source video stream data.
  • the resolution of the videos corresponding to the above-mentioned source video stream data may be different.
  • the above device further includes a second determination unit and an adjustment unit, wherein the second determination unit is configured to perform Information, the attribute information of the above-mentioned source video includes at least the resolution of each of the above-mentioned source videos.
  • the adjustment unit is configured to perform at least one video corresponding to the source video stream data if the resolutions of the videos corresponding to the multiple source video stream data are not all the same. The resolution is adjusted so that the processed multiple videos have the same resolution.
  • the resolutions of the processed multiple above-mentioned videos are the same, which further ensures that the subsequent horizontal splicing process of the multiple above-mentioned source video stream data is relatively simple, At the same time, it is ensured that the playback effect of the spliced source video stream data is better.
  • the attribute information of the above-mentioned video includes at least the data format corresponding to each of the above-mentioned source video stream data.
  • the data formats corresponding to the above-mentioned source video stream data may be different.
  • the above-mentioned device further includes a third determining unit and a converting unit, wherein the above-mentioned third determining unit is configured to perform
  • the attribute information of the source video the attribute information of the above-mentioned source video includes at least the resolution of each of the above-mentioned source videos.
  • the conversion unit is configured to convert the data format of at least one source video stream data when the data formats of a plurality of the above source video stream data are not all the same, Make the data formats of the multiple converted source video stream data the same.
  • the data format of the processed multiple above-mentioned source video stream data is the same, which further ensures that the subsequent horizontal splicing process of multiple above-mentioned source video stream data is relatively simple.
  • the above-mentioned first obtaining unit includes a first obtaining module, and the above-mentioned first obtaining module is configured to perform obtaining a plurality of above-mentioned source video stream data with the same resolution. This can avoid the process of adjusting the resolution when the video resolutions corresponding to multiple source video stream data are different, thereby further ensuring that the splicing process of multiple source video stream data is relatively simple and fast.
  • the above-mentioned first obtaining unit includes a second obtaining module, and the above-mentioned second obtaining module is configured to perform obtaining a plurality of above-mentioned source video stream data having the same data format.
  • the process of converting the data format when multiple source video stream data correspond to different data formats can be avoided, thereby further ensuring that the splicing process of multiple source video stream data is relatively simple and fast.
  • FIG. 5 shows a schematic diagram of switching source video stream data according to the above video playback device. It can be seen from FIG. 5 that the client can flexibly switch the above-mentioned source video stream data currently played in the above-mentioned spliced video stream to target source video stream data.
  • Fig. 7 is a block diagram of a playback device according to another exemplary embodiment.
  • the device includes a first receiving unit 200 and a responding unit 201 .
  • the first receiving unit 200 is configured to receive spliced video stream data, wherein the spliced video stream data is horizontally spliced from a plurality of source video stream data, and in the spliced video stream data, one frame of spliced image includes multiple An image, wherein the plurality of sub-images correspond to images of corresponding frames in the plurality of source video stream data;
  • the response unit 201 is configured to execute in response to the switching instruction, switch the above-mentioned source video stream data currently played in the above-mentioned mosaic video stream to the target source video stream data, and the above-mentioned target source video stream data is the above-mentioned source video stream corresponding to the above-mentioned switching instruction stream data.
  • the spliced video stream data obtained by horizontal splicing of multiple source video stream data is received by the first receiving unit; the above-mentioned source currently played in the above-mentioned spliced video stream is The video stream data is switched to the target source video stream data.
  • the spliced video stream data is obtained by splicing multiple source video stream data horizontally, and in response to a switching instruction, the currently played source video stream data in the spliced video stream can be switched to the target source video stream data, so that
  • the client only needs to pull one source video stream data, and does not need to pull multiple streams at the same time, thereby preventing the client from simultaneously pulling multiple video data streams, thereby avoiding the possibility of different source video stream data when the client pulls multiple streams
  • the problem of out-of-sync playback caused by time delay ensures that the above-mentioned source video stream data can be played synchronously and the playback effect of the client is better.
  • the above-mentioned horizontal splicing refers to splicing a predetermined amount of source video stream data so that each frame of the spliced data has a predetermined number of sub-images, wherein the predetermined number of sub-images It is composed of a predetermined number of images of corresponding frames in the source video stream data, and the images of the corresponding frames in the source video stream data are in one-to-one correspondence with the sub-images.
  • each sub-image corresponds to an image of a corresponding frame in the source video stream data.
  • the plurality of viewing angle information may be information of different viewing angles in the same space, or may be information of viewing angles in different spaces.
  • the above-mentioned device further includes a second receiving unit configured to execute the above-mentioned response to the switching instruction, and switch the above-mentioned source video stream data currently played by the above-mentioned spliced video stream to the target source
  • a second receiving unit configured to execute the above-mentioned response to the switching instruction, and switch the above-mentioned source video stream data currently played by the above-mentioned spliced video stream to the target source
  • the position information of each of the above sub-images in the above-mentioned spliced images corresponding to each frame of the spliced video is received, and the above-mentioned position information is at least based on the resolution of each of the above-mentioned source videos and the splicing of a plurality of the above-mentioned source video stream data The order is determined.
  • the above device can further ensure that the played source video stream data is switched to the target source video stream data efficiently and accurately according to the
  • the above-mentioned device includes a third receiving unit, configured to perform the step of switching the above-mentioned source video stream data currently played by the above-mentioned spliced video stream to the target source video stream data in response to the switching instruction , receiving angle of view information of each source video, where the angle of view information is information of a corresponding shooting angle of view; and a display unit configured to display an identifier corresponding to the angle of view information on a display interface. In this way, it is more convenient for the user to switch source videos of different viewing angles.
  • the position information of the above-mentioned sub-image corresponding to the above-mentioned target source video stream data and the above-mentioned sub-image corresponding to the above-mentioned source video stream data currently playing can be determined according to the above-mentioned content in the above-mentioned sub-image in the above-mentioned mosaic image of each frame
  • the specific process of "location information" is determined, and the specific content will not be repeated.
  • the attribute information of the above video may also include information such as brightness information, color information, size information, and pixel value information of the video.
  • the above attribute information may also include other information of the video.
  • the above-mentioned response unit includes a response module, a second determination module, and a switching module, wherein the above-mentioned response module is configured to execute in response to the above-mentioned switching instruction, determine the above-mentioned target source video stream data to be played; the above-mentioned
  • the second determination module is configured to determine the positional relationship between the target source video stream data and the currently played source video stream data according to the position information of the target source video stream data and the 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 positional relationship. This further ensures that the client can simply and accurately switch the currently played source video stream data to the target source video stream data.
  • the resolutions of the two videos corresponding to any two source video stream data are the same. This ensures that the process of splicing and forming the spliced video stream data is relatively simple.
  • the data formats of any two source video stream data are the same. This further ensures that the process of splicing and forming the spliced video stream data is relatively simple.
  • an electronic device including a processor and a memory for storing the above-mentioned processor-executable instructions, wherein the above-mentioned processor is configured to execute the above-mentioned instructions, so as to realize any one of the above-mentioned How to play the video.
  • a system including a server and a client, wherein the above-mentioned server is configured to execute any method for playing the above-mentioned video in the above-mentioned server; the above-mentioned client The terminal is communicatively connected to the server, and the client is configured to execute any method for playing the video in the client.
  • the above-mentioned server is configured to execute any method for playing the above-mentioned video in the above-mentioned server;
  • the above-mentioned client is connected in communication with the above-mentioned server, and the above-mentioned client is used to execute any A method for playing the above-mentioned video in the above-mentioned client.
  • the above spliced video stream data is obtained by horizontally splicing multiple 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 source video stream data without Simultaneously pull multiple streams, which prevents the client from simultaneously pulling multiple video data streams, thereby avoiding the problem of playback asynchrony caused by the time delay of different source video stream data when the client pulls multiple streams, ensuring A plurality of the above-mentioned source video stream data can be played synchronously, which ensures a good playback effect of the client.
  • the above-mentioned system also includes a collection terminal, the above-mentioned collection terminal is connected to the above-mentioned server in communication, and the above-mentioned collection terminal is used to collect a plurality of source video stream data, and send a plurality of the above-mentioned source video stream data to the above-mentioned server .
  • the models of the multiple collection terminals mentioned above may be the same or different.
  • a computer-readable storage medium is also provided.
  • the electronic device can perform any one of the above-mentioned video playback method or any one of the above video playback methods.
  • the above-mentioned computer-readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.
  • a computer program product including a computer program.
  • the above computer program is executed by a processor, any one of the above video playing methods or any one of the above video playing methods is implemented.

Abstract

本公开关于一种视频的播放方法及装置,该视频的播放方法包括:获取多个源视频流数据;横向拼接多个源视频流数据,得到拼接视频流数据,拼接视频流数据中,一帧的拼接图像包括多个子图像,多个子图像与多个源视频流数据中对应帧的图像对应;发送拼接视频流数据至客户端,以使客户端可切换地播放拼接视频流数据中的多个源视频流数据。

Description

视频的播放方法及装置
交叉引用
本申请基于申请号为202110760086.8、申请日为2021年7月6日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
技术领域
本公开涉及直播领域,尤其涉及一种视频的播放方法、播放装置、电子设备、系统、计算机可读存储介质和计算机程序产品。
背景技术
相关技术中,在多视角直播时需要切换直播间时,一般为客户端同时拉多路直播视频数据流,以供客户端切换播放不同视角的视频数据流。
发明内容
本公开提供一种视频的播放方法、播放装置、电子设备、系统、计算机可读存储介质和计算机程序产品。本公开的技术方案如下:
根据本公开实施例的第一方面,提供一种视频的播放方法,包括:获取多个源视频流数据;横向拼接多个所述源视频流数据,得到拼接视频流数据,所述拼接视频流数据中,一帧的拼接图像包括多个子图像,所述多个子图像与所述多个源视频流数据中对应帧的图像对应;发送所述拼接视频流数据至客户端,以使所述客户端可切换地播放所述拼接视频流数据中的多个所述源视频流数据。
在一些实施例中,在所述横向拼接多个所述源视频流数据,得到拼接视频流数据步骤之前,所述方法还包括:获取各源视频的属性信息,所述源视频的属性信息至少包括各所述源视频的分辨率,在所述横向拼接多个所述源视频流数据,得到拼接视频流数据步骤之后,所述方法还包括:至少根据各所述源视频的分辨率以及多个所述源视频流数据的拼接顺序,确定各帧的所述拼接图像中的各所述子图像的位置信息并发送至所述客户端,以使得所述客户端根据所述位置信息切换地播放所述拼接视频流数据中的多个所述源视频流数据。
在一些实施例中,所述至少根据各所述源视频的分辨率以及多个所述源视频流数据的拼接顺序,确定各帧的所述拼接图像中的所述子图像的位置信息步骤包括:确定第一个所述源视频流数据对应的所述子图像在所述拼接图像中的第一起始像素值为0、第一终点像素值为所述第一个所述源视频流数据的分辨率的像素值;根据所述拼接顺序、第N个所述源视频流数据拼接之前的(N-1)个所述源视频流数据的像素值以及所述第N个所述源视频流数据的像素值,确定第N个所述源视频流数据对应的所述子图像在所述拼接图像中的第N起始像素值和第N终点像素值,N为大于等于2的正整数,所述拼接顺序为第一拼接顺序或者第二拼接顺序,其中,所述第一拼接顺序为按照像素高度方向拼接的顺序,所述第二拼接顺序为按照像素宽度方向拼接的顺序,所述子图像的位置信息包括所述子图像在对应的所述拼接图像中的起始像素值和终点像素值,所述像素值为像素高度或者像素宽度。
在一些实施例中,所述根据所述拼接顺序、第N个所述源视频流数据拼接之前的(N-1)个所述源视频流数据的像素值以及所述第N个所述源视频流数据的像素值,确定第N个所述源视频流数据对应的所述子图像在所述拼接图像中的第N起始像素值和第N终点像素值步骤包括:根据所述拼接顺序,确定在第N个所述源视频流数据拼接之前的(N-1)个所述源视频流数据;计算(N-1)个所述源视频流数据的分辨率中的像素值之 和,得到第N起始像素值;计算(N-1)个所述源视频流数据的分辨率中的像素值与所述第N个所述源视频流数据的像素值之和,得到所述第N终点像素值;在所述拼接顺序为所述第一拼接顺序时,所述像素值为所述像素高度,在所述拼接顺序为所述第二拼接顺序时,所述像素值为所述像素宽度。
在一些实施例中,在所述至少根据各所述源视频的分辨率以及多个所述源视频流数据的拼接顺序,确定各帧的所述拼接图像中的各所述子图像的位置信息步骤之后,所述方法还包括:将各帧的所述拼接图像中的各所述子图像的位置信息发送至所述客户端,以使得所述客户端确定当前播放的所述源视频流数据和待播放的目标源视频流数据之间的位置关系,从而根据所述位置关系将当前播放的所述源视频流数据切换为所述目标源视频流数据。
在一些实施例中,所述源视频的属性信息包括各所述源视频的视角信息,所述方法还包括:将各所述源视频的视角信息发送至所述客户端,以使得所述客户端的显示界面上展示各所述视角信息对应的标识,所述视角信息为对应的拍摄视角的信息。
根据本公开实施例的第二方面,提供一种视频的播放方法,包括:接收拼接视频流数据,其中,所述拼接视频流数据为多个源视频流数据横向拼接得到的,所述拼接视频流数据中,一帧的拼接图像包括多个子图像,所述多个子图像与所述多个源视频流数据中对应帧的图像对应;响应于切换指令,将所述拼接视频流中当前播放的所述源视频流数据切换至目标源视频流数据,所述目标源视频流数据为所述切换指令对应的所述源视频流数据。
在一些实施例中,所述响应于切换指令,将所述拼接视频流当前播放的所述源视频流数据切换至与目标源视频流数据步骤之前,所述方法还包括:接收拼接视频对应的各帧的所述拼接图像中的各所述子图像的位置信息,所述位置信息为至少根据各所述源视频的分辨率以及多个所述源视频流数据的拼接顺序确定的。
在一些实施例中,所述响应于切换指令,将所述拼接视频流当前播放的所述源视频流数据切换至与目标源视频流数据步骤之前,所述方法还包括:接收各所述源视频的视角信息,所述视角信息为对应的拍摄视角的信息;在显示界面上展示所述视角信息对应的标识。
在一些实施例中,所述响应于切换指令,将所述拼接视频流中当前播放的所述源视频流数据切换至目标源视频流数据步骤包括:响应于所述切换指令,确定待播放的所述目标源视频流数据;根据所述目标源视频流数据对应的所述子图像和当前播放的所述源视频流数据对应的所述子图像的位置信息,确定所述目标源视频流数据和当前播放的所述源视频流数据的位置关系;根据所述位置关系,将当前播放的所述源视频流数据切换至所述目标源视频流数据。
根据本公开实施例的第三方面,提供一种视频的播放装置,包括:第一获取单元,被配置为执行获取多个源视频流数据;拼接单元,被配置为执行横向拼接多个所述源视频流数据,得到拼接视频流数据,所述拼接视频流数据中,一帧的拼接图像包括多个子图像,所述多个子图像与所述多个源视频流数据中对应帧的图像对应;第一发送单元,被配置为执行发送所述拼接视频流数据至客户端,以使所述客户端可切换地播放所述拼接视频流数据中的多个所述源视频流数据。
在一些实施例中,所述装置还包括:第二获取单元,被配置为执行在所述横向拼接多个所述源视频流数据,得到拼接视频流数据步骤之前,获取各源视频的属性信息,所述源视频的属性信息至少包括各所述源视频的分辨率;第一确定单元,被配置为执行在所述横向拼接多个所述源视频流数据,得到拼接视频流数据步骤之后,至少根据各所述源视频的分辨率以及多个所述源视频流数据的拼接顺序,确定各帧的所述拼接图像中的各所述子图像的位置信息并发送至所述客户端,以使得所述客户端根据所述位置信息切换地播放所述拼接视频流数据中的多个所述源视频流数据。
在一些实施例中,所述第一确定单元包括:第一确定模块,被配置为执行确定第一个所述源视频流数据对应的所述子图像在所述拼接图像中的第一起始像素值为0、第一终点像素值为所述第一个所述源视频流数据的分辨率的像素值;第二确定模块,被配置为执行根据所述拼接顺序、第N个所述源视频流数据拼接之前的(N-1)个所述源视频流数据的像素值以及所述第N个所述源视频流数据的像素值,确定第N个所述源视频流数据对应的所述子图像在所述拼接图像中的第N起始像素值和第N终点像素值,N为大于等于2的正整数,所述拼接顺序为第一拼接顺序或者第二拼接顺序,其中,所述第一拼接顺序为按照像素高度方向拼接的顺序,所述第二拼接顺序为按照像素宽度方向拼接的顺序,所述子图像的位置信息包括所述子图像在对应的所述拼接图像中的起始像素值和终点像素值,所述像素值为像素高度或者像素宽度。
在一些实施例中,所述第二确定模块包括:确定子模块,被配置为执行根据所述拼接顺序,确定在第N个所述源视频流数据拼接之前的(N-1)个所述源视频流数据;第一计算子模块,被配置为执行计算(N-1)个所述源视频流数据的分辨率中的像素值之和,得到第N起始像素值;第二计算子模块,被配置为执行计算(N-1)个所述源视频流数据的分辨率中的像素值与所述第N个所述源视频流数据的像素值之和,得到所述第N终点像素值;其中,在所述拼接顺序为所述第一拼接顺序时,所述像素值为所述像素高度,在所述拼接顺序为所述第二拼接顺序时,所述像素值为所述像素宽度。
在一些实施例中,所述装置还包括:第二发送单元,被配置为执行在所述至少根据各所述源视频的分辨率以及多个所述源视频流数据的拼接顺序,确定各帧的所述拼接图像中的各所述子图像的位置信息步骤之后,将各帧的所述拼接图像中的各所述子图像的位置信息发送至所述客户端,以使得所述客户端确定当前播放的所述源视频流数据和待播放的目标源视频流数据之间的位置关系,从而根据所述位置关系将当前播放的所述源视频流数据切换为所述目标源视频流数据。
在一些实施例中,所述源视频的属性信息包括各所述源视频的视角信息,所述装置还包括:第三发送单元,被配置为执行将各所述源视频的视角信息发送至所述客户端,以使得所述客户端的显示界面上展示各所述视角信息对应的标识,所述视角信息为对应的拍摄视角的信息。
根据本公开实施例的第四方面,提供一种视频的播放装置,包括:第一接收单元,被配置为执行接收拼接视频流数据,其中,所述拼接视频流数据为多个源视频流数据横向拼接得到的,所述拼接视频流数据中,一帧的拼接图像包括多个子图像,所述多个子图像与所述多个源视频流数据中对应帧的图像对应;响应单元,被配置为执行响应于切换指令,将所述拼接视频流中当前播放的所述源视频流数据切换至目标源视频流数据,所述目标源视频流数据为所述切换指令对应的所述源视频流数据
在一些实施例中,所述装置还包括:第二接收单元,被配置为执行所述响应于切换指令,将所述拼接视频流当前播放的所述源视频流数据切换至与目标源视频流数据步骤之前,接收拼接视频对应的各帧的所述拼接图像中的各所述子图像的位置信息,所述位置信息为至少根据各所述源视频的分辨率以及多个所述源视频流数据的拼接顺序确定的。
在一些实施例中,所述装置包括:第三接收单元,被配置为执行响应于切换指令,将所述拼接视频流当前播放的所述源视频流数据切换至与目标源视频流数据步骤之前,接收各所述源视频的视角信息,所述视角信息为对应的拍摄视角的信息;展示单元,被配置为执行在显示界面上展示所述视角信息对应的标识。
在一些实施例中,所述响应单元包括:响应模块,被配置为执行响应于所述切换指令,确定待播放的所述目标源视频流数据;第二确定模块,被配置为执行根据所述目标源视频流数据对应的所述子图像和当前播放的所述源视频流数据对应的所述子图像的位置信息, 确定所述目标源视频流数据和当前播放的所述源视频流数据的位置关系;切换模块,被配置为执行根据所述位置关系,将当前播放的所述源视频流数据切换至所述目标源视频流数据。
根据本公开实施例的第五方面,提供了一种电子设备,包括处理器和用于存储所述处理器可执行指令的存储器,其中,所述处理器被配置为执行所述指令,以实现任一种所述的视频的播放方法。
根据本公开实施例的第六方面,提供了一种系统,包括服务器和客户端,其中,所述服务器被配置为执行任一种所述的视频的播放方法;所述客户端与所述服务器通信连接,所述客户端用于执行任一种所述的视频的播放方法。
在一些实施例中,所述系统还包括多个采集端,多个所述采集端分别与所述服务器通信连接,多个所述采集端用于采集多个源视频流数据,并将多个所述源视频流数据发送至所述服务器。
根据本公开实施例的第七方面,提供了一种计算机可读存储介质,当所述计算机可读存储介质中的指令由电子设备的处理器执行时,使得电子设备能够执行任一种所述的视频的播放方法或者任一种所述的视频的播放方法。
根据本公开实施例的第八方面,提供一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现任一种所述的视频的播放方法或者任一种所述的视频的播放方法。
本申请的所述视频的播放方法中,首先,获取多个源视频流数据;然后,对多个时间同步的所述源视频流数据进行横向拼接,得到拼接视频流数据;最后,将所述拼接视频流数据发送至客户端,客户端可以根据所述拼接视频流数据,切换地播放多个所述源视频流数据。所述方法中,通过将多个源视频流数据进行横向拼接,得到所述拼接视频流数据,之后,再将拼接视频流数据发送给客户端,这样使得客户端只需拉一路源视频流数据,无需同时拉多路流,这样避免了客户端同时拉多路视频数据流,进而避免了客户端在拉多路流时不同的源视频流数据可能有时间延迟而导致的播放不同步的问题,保证了多个所述源视频流数据可以同步播放,保证了客户端的播放效果较好。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理,并不构成对本公开的不当限定。
图1是根据一示例性实施例示出的一种实施环境的架构图。
图2是根据一示例性实施例示出的一种视频的播放方法的流程图。
图3是根据一示例性实施例示出的得到源视频流数据的拼接后的像素高度的示意图。
图4是根据另一示例性实施例示出的一种视频的播放方法的流程图。
图5是根据一示例性实施例示出的将当前播放的源视频流数据切换至目标源视频流数据的示意图。
图6是根据一示例性实施例示出的一种播放装置的框图。
图7是根据另一示例性实施例示出的一种播放装置的框图。
其中,附图说明如下:
01、电子设备;02、服务器;03、当前的源视频流数据;04、在前源视频流数据。
具体实施方式
为了使本领域普通人员更好地理解本公开的技术方案,下面将结合附图,对本公开实 施例中的技术方案进行清楚、完整地描述。
需要说明的是,本公开的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本公开的实施例能够以除了在这里图示或描述的那些以外的顺序实施。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。
正如背景技术所说,现有技术中不同视角的视频数据流在拉流时的时间延迟导致的播放不同步。
图1是根据一示例性实施例示出的一种实施环境的架构图,如图1所示,下述视频的播放方法可以应用于该实施环境中。该实施环境包括电子设备01和服务器02。其中,电子设备01和服务器02可以通过网络互连并通信。
其中,电子设备01可以为可切换地播放多个上述源视频流数据的设备。电子设备01可以是任何一种可与用户通过键盘、触摸板、触摸屏、遥控器、语音交互或手写设备等一种或多种方式进行人机交互的电子产品,例如手机、平板电脑、掌上电脑、个人计算机(Personal Computer,PC)、可穿戴设备、智能电视等。
服务器02可以是一台服务器,也可以是由多台服务器组成的服务器集群,或者是一个云计算服务中心。服务器02可以包括处理器、存储器以及网络接口等。
本领域技术人员应能理解上述电子设备和服务器仅为举例,其他现有的或今后可能出现的电子设备或服务器如可适用于本公开,也应包含在本公开保护范围以内,并在此以引用方式包含于此。
基于此,本公开的实施例提供了一种视频的播放方法、播放装置、电子设备、系统、计算机可读存储介质和计算机程序产品。
本公开实施例提供的视频的播放方法的执行主体可以为上述的电子设备或者服务器,也可以为该电子设备或者服务器中能够实现该视频的播放方法的功能模块和/或功能实体,具体的可以根据实际使用需求确定,本公开实施例不作限定。下面以执行主体为电子设备为例,对本公开实施例提供的视频的播放方法进行示例性的说明。
图2是根据一示例性实施例示出的一种视频的播放方法的流程图,如图2所示,该视频的播放方法可以用于服务器中,包括以下步骤S11至S13。
在步骤S11中,获取多个源视频流数据;
在步骤S12中,横向拼接多个上述源视频流数据,得到拼接视频流数据,上述拼接视频流数据中,一帧的拼接图像包括多个子图像,上述多个子图像与上述多个源视频流数据中对应帧的图像对应;
在步骤S13中,发送上述拼接视频流数据至客户端,以使上述客户端可切换地播放上述拼接视频流数据中的多个上述源视频流数据。
本申请的上述视频的播放方法中,首先,获取多个源视频流数据;然后,对多个上述源视频流数据进行横向拼接,得到拼接视频流数据;最后,将上述拼接视频流数据发送至客户端,客户端可以根据上述拼接视频流数据,切换地播放多个上述源视频流数据。上述方法中,通过将多个源视频流数据进行横向拼接,得到上述拼接视频流数据,之后,再将拼接视频流数据发送给客户端,这样使得客户端只需拉一路源视频流数据,无需同时拉多路流,这样避免了客户端同时拉多路视频数据流,进而避免了客户端在拉多路流时不同的源视频流数据可能有时间延迟而导致的播放不同步的问题,保证了多个上述源视频流数据可以同步播放,保证了客户端的播放效果较好。
需要说明的是,上述横向拼接就是指对预定数量的源视频流数据进行拼接,且使得拼 接后的数据中的每一帧中有预定数量的子图像的拼接方式,其中,预定数量的子图像由预定数量的源视频流数据中对应帧的图像构成,且源视频流数据中对应帧的图像和子图像一一对应。
在实际的应用过程中,每个上述子图像均对应一个上述源视频流数据中对应帧的图像。
根据本申请的一些实施例,在上述横向拼接多个上述源视频流数据,得到拼接视频流数据步骤之前,上述方法还包括:获取各源视频的属性信息,上述源视频的属性信息至少包括各上述源视频的分辨率,在上述横向拼接多个上述源视频流数据,得到拼接视频流数据步骤之后,上述方法还包括:至少根据各上述源视频的分辨率以及多个上述源视频流数据的拼接顺序,确定各帧的上述拼接图像中的各上述子图像的位置信息并发送至上述客户端,以使得上述客户端根据上述位置信息切换地播放上述拼接视频流数据中的多个上述源视频流数据。上述方法通过获取各源视频的属性信息,上述源视频的属性信息至少包括各上述源视频的分辨率,进一步地方便了后续多个上述源视频流数据的拼接,通过多个上述视频的属性信息,可以较为简单快捷地确定上述拼接视频流数据对应的拼接视频的属性信息。
当然,上述属性信息并不限于上述的获得方式,其还可以通过解析对应的上述源视频流数据来得到。
本申请的一些实施例中,上述至少根据各上述源视频的分辨率以及多个上述源视频流数据的拼接顺序,确定各帧的上述拼接图像中的上述子图像的位置信息步骤包括:确定第一个上述源视频流数据对应的上述子图像在上述拼接图像中的第一起始像素值为0、第一终点像素值为上述第一个上述源视频流数据的分辨率的像素值;根据上述拼接顺序、第N个上述源视频流数据拼接之前的(N-1)个上述源视频流数据的像素值以及上述第N个上述源视频流数据的像素值,确定第N个上述源视频流数据对应的上述子图像在上述拼接图像中的第N起始像素值和第N终点像素值,N为大于等于2的正整数,上述拼接顺序为第一拼接顺序或者第二拼接顺序,其中,上述第一拼接顺序为按照像素高度方向拼接的顺序,上述第二拼接顺序为按照像素宽度方向拼接的顺序,上述子图像的位置信息包括上述子图像在对应的上述拼接图像中的起始像素值和终点像素值,上述像素值为像素高度或者像素宽度。这样保证了较为简单且准确地确定各帧的上述拼接图像中的上述子图像的位置信息,并且,这样进一步地方便了后续根据上述位置信息切换地播放多个上述源视频流数据。
在实际的应用过程中,上述视频的属性信息还可以包括视频的亮度信息、颜色信息、大小信息以及像素值信息等信息。当然上述属性信息还可以包括视频其他的信息。
根据本申请的一些实施例,上述根据上述拼接顺序、第N个上述源视频流数据拼接之前的(N-1)个上述源视频流数据的像素值以及上述第N个上述源视频流数据的像素值,确定第N个上述源视频流数据对应的上述子图像在上述拼接图像中的第N起始像素值和第N终点像素值步骤包括:根据上述拼接顺序,确定在第N个上述源视频流数据拼接之前的(N-1)个上述源视频流数据;计算(N-1)个上述源视频流数据的分辨率中的像素值之和,得到第N起始像素值;计算(N-1)个上述源视频流数据的分辨率中的像素值与上述第N个上述源视频流数据的像素值之和,得到上述第N终点像素值;在上述拼接顺序为上述第一拼接顺序时,上述像素值为上述像素高度,在上述拼接顺序为上述第二拼接顺序时,上述像素值为上述像素宽度。上述方法中,根据拼接顺序,计算第N起始像素值和第N终点像素值,这样可以进一步地保证获取位置信息的高效且准确地获取。
一些实施例中,如图3所示,假设当前的源视频流数据03(第N个上述源视频流数据)和在前源视频流数据04(第N个上述源视频流数据拼接之前的(N-1)个上述源视 频流数据)的分辨率相同,均为720P,且当前的源视频流数据03(第N个上述源视频流数据)和在前源视频流数据04(第N个上述源视频流数据拼接之前的(N-1)个上述源视频流数据)在宽度方向上的像素数量均为1920,当前的源视频流数据03(第N个上述源视频流数据)在高度方向上的像素数量为1080,在前源视频流数据04(第N个上述源视频流数据拼接之前的(N-1)个上述源视频流数据)在高度方向上的像素数量为2160,那么,当前的上述源视频流数据的第一位置信息为3240,第二位置信息为2160。当然,上述分辨率以及上述像素数量还可以为其他的值。上述在前源视频流数据也不限于由两个源视频流数据拼接得到的源视频流数据,其还可以为由多个源视频流数据拼接得到的。
本申请的一些实施例中,在上述至少根据各上述源视频的分辨率以及多个上述源视频流数据的拼接顺序,确定各帧的上述拼接图像中的各上述子图像的位置信息步骤之后,上述方法还包括:将各帧的上述拼接图像中的各上述子图像的位置信息发送至上述客户端,以使得上述客户端确定当前播放的上述源视频流数据和待播放的目标源视频流数据之间的位置关系,从而根据上述位置关系将当前播放的上述源视频流数据切换为上述目标源视频流数据。这样进一步地保证了客户端可以根据上述位置信息灵活切换播放的源视频流数据,保证了该方法可以灵活适应不同客户端的需求,同时根据上述位置信息,可以进一步地保证客户端较为准确地切换播放想看的源视频流数据。
本申请的一些实施例中,上述源视频的属性信息包括各上述源视频的视角信息,上述方法还包括:将各上述源视频的视角信息发送至上述客户端,以使得上述客户端的显示界面上展示各上述视角信息对应的标识,上述视角信息为对应的拍摄视角的信息。这样可以更加方便用户进行不同视角的源视频的切换。
上述视频的属性信息至少包括各上述源视频流数据对应的视频的分辨率,在实际的应用过程中,多个上述源视频流数据对应的视频的分辨率可能不同,在这种情况下,为了便于对多个源视频流数据的横向拼接,本公开的实施例中,在上述横向拼接多个上述源视频流数据,得到拼接视频流数据步骤之前,上述方法还包括:确定多个上述源视频流数据对应的视频的分辨率是否都相同;在多个上述源视频流数据对应的视频的分辨率不都相同的情况下,对至少一个上述源视频流数据对应的视频的分辨率进行调整,使得处理后的多个上述视频的分辨率相同。通过调整至少一个上述源视频流数据对应的视频的分辨率,使得处理后的多个上述视频的分辨率相同,这样进一步地保证了后续对多个上述源视频流数据的横向拼接过程较为简单,同时保证了拼接后的源视频流数据的播放效果较好。
根据本申请的一些实施例,上述视频的属性信息至少包括各上述源视频流数据对应的数据格式,在实际的应用过程中,多个上述源视频流数据对应的数据格式可能不同,在这种情况下,为了便于对多个源视频流数据的横向拼接,本公开的实施例中,在上述横向拼接多个上述源视频流数据,得到拼接视频流数据步骤之前,上述方法还包括:确定多个上述源视频流数据的数据格式是否都相同;在多个上述源视频流数据的数据格式不都相同的情况下,对至少一个上述源视频流数据的数据格式进行转换,使得转换后的多个上述源视频流数据的数据格式相同。通过调整至少一个上述源视频流数据对应的数据格式,使得处理后的多个上述源视频流数据的数据格式相同,这样进一步地保证了后续对多个上述源视频流数据的横向拼接过程较为简单。
在实际的应用过程中,上述获取多个源视频流数据步骤包括:获取多个分辨率相同的上述源视频流数据。这样可以避免多个源视频流数据对应的视频的分辨率不同时,对分辨率进行调整的过程,从而进一步地保证了多个上述源视频流数据的拼接过程较为简单快捷。
在实际的应用过程中,上述获取多个源视频流数据步骤包括:获取多个数据格式相同的上述源视频流数据。这样可以避免多个源视频流数据对应的数据格式不同时,对数据格 式进行转换的过程,从而进一步地保证了多个上述源视频流数据的拼接过程较为简单快捷。
当然,为了进一步地保证了上述方法的实现过程较为简单,在实际的应用过程中,还可以获取多个其他的属性信息相同的上述源视频流数据。
图4是根据另一示例性实施例示出的一种视频的播放方法的流程图,如图4所示,本公开的实施例中的视频的播放方法可以用于客户端,包括以下步骤。
在步骤S21中,接收拼接视频流数据,其中,上述拼接视频流数据为多个源视频流数据横向拼接得到的,上述拼接视频流数据中,一帧的拼接图像包括多个子图像,上述多个子图像与上述多个源视频流数据中对应帧的图像对应;
在步骤S22中,响应于切换指令,将上述拼接视频流中当前播放的上述源视频流数据切换至目标源视频流数据,上述目标源视频流数据为上述切换指令对应的上述源视频流数据。
本申请的上述视频的播放方法中,首先,接收多个源视频流数据横向拼接得到的拼接视频流数据;然后响应于切换指令,将上述拼接视频流中当前播放的上述源视频流数据切换至目标源视频流数据。上述方法中,上述拼接视频流数据为多个源视频流数据横向拼接得到的,且响应于切换指令,可以将上述拼接视频流中当前播放的源视频流数据切换至目标源视频流数据,这样使得客户端只需拉一路源视频流数据,无需同时拉多路流,从而避免了客户端同时拉多路视频数据流,进而避免了客户端在拉多路流时不同的源视频流数据可能有时间延迟而导致的播放不同步的问题,保证了多个上述源视频流数据可以同步播放,保证了客户端的播放效果较好。
需要说明的是,上述横向拼接就是指对预定数量的源视频流数据进行拼接,且使得拼接后的数据中的每一帧中有预定数量的子图像的拼接方式,其中,预定数量的子图像由预定数量的源视频流数据中对应帧的图像构成,且源视频流数据中对应帧的图像和子图像一一对应。
在实际的应用过程中,每个上述子图像均对应一个上述源视频流数据中对应帧的图像。
本申请的一些实施例,多个上述视角信息可以同一个空间的不同视角的信息,也可以为不同空间的视角的信息。
本申请的一些实施例中,上述响应于切换指令,将上述拼接视频流当前播放的上述源视频流数据切换至与目标源视频流数据步骤之前,上述方法还包括:接收拼接视频对应的各帧的上述拼接图像中的各上述子图像的位置信息,上述位置信息为至少根据各上述源视频的分辨率以及多个上述源视频流数据的拼接顺序确定的。该方法中,根据位置信息可以进一步保证后续高效准确地将播放的源视频流数据切换为目标源视频流数据。
为了更加方便用户进行不同视角的源视频的切换,本申请的一种实施例中,上述响应于切换指令,将上述拼接视频流当前播放的上述源视频流数据切换至与目标源视频流数据步骤之前,上述方法还包括:接收各上述源视频的视角信息,上述视角信息为对应的拍摄视角的信息;在显示界面上展示上述视角信息对应的标识。
根据本申请的一些实施例,上述响应于切换指令,将上述拼接视频流中当前播放的上述源视频流数据切换至目标源视频流数据步骤包括:响应于上述切换指令,确定待播放的上述目标源视频流数据;根据上述目标源视频流数据对应的上述子图像和当前播放的上述源视频流数据对应的上述子图像的位置信息,确定上述目标源视频流数据和当前播放的上述源视频流数据的位置关系;根据上述位置关系,将当前播放的上述源视频流数据切换至上述目标源视频流数据。上述方法根据上述目标源视频流数据和当前播放的上述源视频流数据的位置关系,可以高效准确地将上述拼接视频流中当前播放的上述源视频流数据切换 至目标源视频流数据,保证了源视频流数据切换的灵活性以及准确性。
上述的上述目标源视频流数据对应的上述子图像和当前播放的上述源视频流数据对应的上述子图像的位置信息,可以根据上述内容中的“确定各帧的上述拼接图像中的上述子图像的位置信息”的具体过程来确定,具体内容不再赘述。
在实际的应用过程中,上述视频的属性信息还可以包括视频的亮度信息、颜色信息、大小信息以及像素值信息等信息。当然上述属性信息还可以包括视频其他的信息。
根据本申请的一些实施例,任意两个上述源视频流数据对应的两个视频的分辨率相同。这样保证了拼接形成上述拼接视频流数据的过程较为简单。
根据本申请的一些实施例,任意两个上述源视频流数据的数据格式相同。这样进一步地保证了拼接形成上述拼接视频流数据的过程较为简单。
在实际的应用过程中,为了进一步地简化上述拼接视频流数据的形成过程,任意两个上述源视频流数据的其他的属性信息相同。
图5示出了根据上述视频的播放方法进行源视频流数据切换的示意图。由图5可见,客户端可灵活地将上述拼接视频流中当前播放的上述源视频流数据切换至目标源视频流数据。
图6是根据一示例性实施例示出的一种播放装置框图。参照图6,该装置包括第一获取单元100、拼接单元101和第一发送单元102。
该第一获取单元100被配置为执行获取多个源视频流数据;
该拼接单元101被配置为执行横向拼接多个上述源视频流数据,得到拼接视频流数据,上述拼接视频流数据中,一帧的拼接图像包括多个子图像,上述多个子图像与上述多个源视频流数据中对应帧的图像对应;
该第一发送单元102被配置为执行发送上述拼接视频流数据至客户端,以使上述客户端可切换地播放上述拼接视频流数据中的多个上述源视频流数据。
本申请的上述播放装置中,通过上述第一获取单元获取多个源视频流数据;通过上述拼接单元对多个上述源视频流数据进行横向拼接,得到拼接视频流数据;通过上述第一发送单元将上述拼接视频流数据发送至客户端,客户端可以根据上述拼接视频流数据,切换地播放多个上述源视频流数据。上述装置中,通过将多个源视频流数据进行横向拼接,得到上述拼接视频流数据,之后,再将拼接视频流数据发送给客户端,这样使得客户端只需拉一路源视频流数据,无需同时拉多路流,这样避免了客户端同时拉多路视频数据流,进而避免了客户端在拉多路流时不同的源视频流数据可能有时间延迟而导致的播放不同步的问题,保证了多个上述源视频流数据可以同步播放,保证了客户端的播放效果较好。
需要说明的是,上述横向拼接就是指对预定数量的源视频流数据进行拼接,且使得拼接后的数据中的每一帧中有预定数量的子图像的拼接方式,其中,预定数量的子图像由预定数量的源视频流数据中对应帧的图像构成,且源视频流数据中对应帧的图像和子图像一一对应。
在实际的应用过程中,每个上述子图像均对应一个上述源视频流数据中对应帧的图像。
根据本申请的一些实施例,上述装置还包括第二获取单元,上述第二获取单元被配置为执行在上述横向拼接多个上述源视频流数据,得到拼接视频流数据步骤之前,获取各源视频的属性信息,上述源视频的属性信息至少包括各上述源视频的分辨率;第一确定单元,被配置为执行在上述横向拼接多个上述源视频流数据,得到拼接视频流数据步骤之后,至少根据各上述源视频的分辨率以及多个上述源视频流数据的拼接顺序,确定各帧的上述拼接图像中的各上述子图像的位置信息并发送至上述客户端,以使得上述客户端根据上述位置信息切换地播放上述拼接视频流数据中的多个上述源视频流数据。上述装置通过获取各 源视频的属性信息,上述源视频的属性信息至少包括各上述源视频的分辨率,进一步地方便了后续多个上述源视频流数据的拼接,通过多个上述视频的属性信息,可以较为简单快捷地确定上述拼接视频流数据对应的拼接视频的属性信息。
当然,上述属性信息并不限于上述的获得方式,其还可以通过解析对应的上述源视频流数据来得到。
本申请的一些实施例中,上述第一确定单元包括:第一确定模块,被配置为执行确定第一个上述源视频流数据对应的上述子图像在上述拼接图像中的第一起始像素值为0、第一终点像素值为上述第一个上述源视频流数据的分辨率的像素值;第二确定模块,被配置为执行根据上述拼接顺序、第N个上述源视频流数据拼接之前的(N-1)个上述源视频流数据的像素值以及上述第N个上述源视频流数据的像素值,确定第N个上述源视频流数据对应的上述子图像在上述拼接图像中的第N起始像素值和第N终点像素值,N为大于等于2的正整数,上述拼接顺序为第一拼接顺序或者第二拼接顺序,其中,上述第一拼接顺序为按照像素高度方向拼接的顺序,上述第二拼接顺序为按照像素宽度方向拼接的顺序,上述子图像的位置信息包括上述子图像在对应的上述拼接图像中的起始像素值和终点像素值,上述像素值为像素高度或者像素宽度。这样保证了较为简单且准确地确定各帧的上述拼接图像中的上述子图像的位置信息,并且,这样进一步地方便了后续根据上述位置信息切换地播放多个上述源视频流数据。
在实际的应用过程中,上述视频的属性信息还可以包括视频的亮度信息、颜色信息、大小信息以及像素值信息等信息。当然上述属性信息还可以包括视频其他的信息。
根据本申请的一些实施例,上述第二确定模块包括:确定子模块,被配置为执行根据上述拼接顺序,确定在第N个上述源视频流数据拼接之前的(N-1)个上述源视频流数据;第一计算子模块,被配置为执行计算(N-1)个上述源视频流数据的分辨率中的像素值之和,得到第N起始像素值;第二计算子模块,被配置为执行计算(N-1)个上述源视频流数据的分辨率中的像素值与上述第N个上述源视频流数据的像素值之和,得到上述第N终点像素值;其中,在上述拼接顺序为上述第一拼接顺序时,上述像素值为上述像素高度,在上述拼接顺序为上述第二拼接顺序时,上述像素值为上述像素宽度。上述装置中,根据拼接顺序,计算第N起始像素值和第N终点像素值,这样可以进一步地保证获取位置信息的高效且准确地获取。
一些实施例中,如图3所示,假设当前的源视频流数据03和在前源视频流数据04的分辨率相同,均为720P,且当前的源视频流数据03和在前源视频流数据04在宽度方向上的像素数量均为1920,当前的源视频流数据03在高度方向上的像素数量为1080,在前源视频流数据04在高度方向上的像素数量为2160,那么,当前的上述源视频流数据的第一位置信息为3240,第二位置信息为2160。当然,上述分辨率以及上述像素数量还可以为其他的值。上述在前源视频流数据也不限于由两个源视频流数据拼接得到的源视频流数据,其还可以为由多个源视频流数据拼接得到的。
本申请的一些实施例中,上述装置还包括:第二发送单元,被配置为执行在上述至少根据各上述源视频的分辨率以及多个上述源视频流数据的拼接顺序,确定各帧的上述拼接图像中的各上述子图像的位置信息步骤之后,将各帧的上述拼接图像中的各上述子图像的位置信息发送至上述客户端,以使得上述客户端确定当前播放的上述源视频流数据和待播放的目标源视频流数据之间的位置关系,从而根据上述位置关系将当前播放的上述源视频流数据切换为上述目标源视频流数据。
本申请的一些实施例中,上述源视频的属性信息包括各上述源视频的视角信息,上述装置还包括:第三发送单元,被配置为执行将各上述源视频的视角信息发送至上述客户端,以使得上述客户端的显示界面上展示各上述视角信息对应的标识,上述视角信息为对应的 拍摄视角的信息。这样可以更加方便用户进行不同视角的源视频的切换。
上述视频的属性信息至少包括各上述源视频流数据对应的视频的分辨率,在实际的应用过程中,多个上述源视频流数据对应的视频的分辨率可能不同,在这种情况下,为了便于对多个源视频流数据的横向拼接,本公开的实施例中,上述装置还包括第二确定单元和调整单元,其中,上述第二确定单元被配置为执行在上述获取各源视频的属性信息,上述源视频的属性信息至少包括各上述源视频的分辨率,步骤之后,在上述横向拼接多个上述源视频流数据,得到包括拼接视频流数据步骤之前,确定多个上述源视频流数据对应的视频的分辨率是否都相同;上述调整单元被配置为执行在多个上述源视频流数据对应的视频的分辨率不都相同的情况下,对至少一个上述源视频流数据对应的视频的分辨率进行调整,使得处理后的多个上述视频的分辨率相同。通过调整至少一个上述源视频流数据对应的视频的分辨率,使得处理后的多个上述视频的分辨率相同,这样进一步地保证了后续对多个上述源视频流数据的横向拼接过程较为简单,同时保证了拼接后的源视频流数据的播放效果较好。
根据本申请的一些实施例,上述视频的属性信息至少包括各上述源视频流数据对应的数据格式,在实际的应用过程中,多个上述源视频流数据对应的数据格式可能不同,在这种情况下,为了便于对多个源视频流数据的横向拼接,本公开的实施例中,上述装置还包括第三确定单元和转换单元,其中,上述第三确定单元被配置为执行在上述获取各源视频的属性信息,上述源视频的属性信息至少包括各上述源视频的分辨率,步骤之后,在上述横向拼接多个上述源视频流数据,得到包括拼接视频流数据步骤之前,确定多个上述源视频流数据的数据格式是否都相同;上述转换单元被配置为执行在多个上述源视频流数据的数据格式不都相同的情况下,对至少一个上述源视频流数据的数据格式进行转换,使得转换后的多个上述源视频流数据的数据格式相同。通过调整至少一个上述源视频流数据对应的数据格式,使得处理后的多个上述源视频流数据的数据格式相同,这样进一步地保证了后续对多个上述源视频流数据的横向拼接过程较为简单。
在实际的应用过程中,上述第一获取单元包括第一获取模块,上述第一获取模块被配置为执行获取多个分辨率相同的上述源视频流数据。这样可以避免多个源视频流数据对应的视频的分辨率不同时,对分辨率进行调整的过程,从而进一步地保证了多个上述源视频流数据的拼接过程较为简单快捷。
在实际的应用过程中,上述第一获取单元包括第二获取模块,上述第二获取模块被配置为执行获取多个数据格式相同的上述源视频流数据。这样可以避免多个源视频流数据对应的数据格式不同时,对数据格式进行转换的过程,从而进一步地保证了多个上述源视频流数据的拼接过程较为简单快捷。
当然,为了进一步地保证了上述装置的实现过程较为简单,在实际的应用过程中,还可以获取多个其他的属性信息相同的上述源视频流数据。
图5示出了根据上述视频的播放装置进行源视频流数据切换的示意图。由图5可见,客户端可灵活地将上述拼接视频流中当前播放的上述源视频流数据切换至目标源视频流数据。
图7是根据另一示例性实施例示出的一种播放装置框图。参照图7,该装置包括第一接收单元200和响应单元201。
该第一接收单元200被配置为执行接收拼接视频流数据,其中,上述拼接视频流数据为多个源视频流数据横向拼接得到的,上述拼接视频流数据中,一帧的拼接图像包括多个子图像,上述多个子图像与上述多个源视频流数据中对应帧的图像对应;
该响应单元201被配置为执行响应于切换指令,将上述拼接视频流中当前播放的上述源视频流数据切换至目标源视频流数据,上述目标源视频流数据为上述切换指令对应的上 述源视频流数据。
本申请的上述播放装置中,通过上述第一接收单元接收多个源视频流数据横向拼接得到的拼接视频流数据;通过上述相应单元响应于切换指令,将上述拼接视频流中当前播放的上述源视频流数据切换至目标源视频流数据。上述装置中,上述拼接视频流数据为多个源视频流数据横向拼接得到的,且响应于切换指令,可以将上述拼接视频流中当前播放的源视频流数据切换至目标源视频流数据,这样使得客户端只需拉一路源视频流数据,无需同时拉多路流,从而避免了客户端同时拉多路视频数据流,进而避免了客户端在拉多路流时不同的源视频流数据可能有时间延迟而导致的播放不同步的问题,保证了多个上述源视频流数据可以同步播放,保证了客户端的播放效果较好。
需要说明的是,上述横向拼接就是指对预定数量的源视频流数据进行拼接,且使得拼接后的数据中的每一帧中有预定数量的子图像的拼接方式,其中,预定数量的子图像由预定数量的源视频流数据中对应帧的图像构成,且源视频流数据中对应帧的图像和子图像一一对应。
在实际的应用过程中,每个上述子图像均对应一个上述源视频流数据中对应帧的图像。
本申请的一些实施例,多个上述视角信息可以同一个空间的不同视角的信息,也可以为不同空间的视角的信息。
根据本申请的一些实施例,上述装置还包括第二接收单元,上述第二接收单元被配置为执行上述响应于切换指令,将上述拼接视频流当前播放的上述源视频流数据切换至与目标源视频流数据步骤之前,接收拼接视频对应的各帧的上述拼接图像中的各上述子图像的位置信息,上述位置信息为至少根据各上述源视频的分辨率以及多个上述源视频流数据的拼接顺序确定的。上述装置,根据位置信息可以进一步保证后续高效准确地将播放的源视频流数据切换为目标源视频流数据。
本申请的另一种实施例中,上述装置包括第三接收单元,被配置为执行响应于切换指令,将上述拼接视频流当前播放的上述源视频流数据切换至与目标源视频流数据步骤之前,接收各上述源视频的视角信息,上述视角信息为对应的拍摄视角的信息;展示单元,被配置为执行在显示界面上展示上述视角信息对应的标识。这样可以更加方便用户进行不同视角的源视频的切换。
上述的上述目标源视频流数据对应的上述子图像和当前播放的上述源视频流数据对应的上述子图像的位置信息,可以根据上述内容中的“确定各帧的上述拼接图像中的上述子图像的位置信息”的具体过程来确定,具体内容不再赘述。
在实际的应用过程中,上述视频的属性信息还可以包括视频的亮度信息、颜色信息、大小信息以及像素值信息等信息。当然上述属性信息还可以包括视频其他的信息。
根据本申请的一些实施例,上述响应单元包括响应模块、第二确定模块和切换模块,其中,上述响应模块被配置为执行响应于上述切换指令,确定待播放的上述目标源视频流数据;上述第二确定模块被配置为执行根据上述目标源视频流数据的位置信息和当前播放的上述源视频流数据的位置信息,确定上述目标源视频流数据和当前播放的上述源视频流数据的位置关系;上述切换模块被配置为执行根据上述位置关系,将当前播放的上述源视频流数据切换至上述目标源视频流数据。这样进一步地保证了客户端可以简单且准确地将当前播放的上述源视频流数据切换至上述目标源视频流数据。
根据本申请的一些实施例,任意两个上述源视频流数据对应的两个视频的分辨率相同。这样保证了拼接形成上述拼接视频流数据的过程较为简单。
根据本申请的一些实施例,任意两个上述源视频流数据的数据格式相同。这样进一步地保证了拼接形成上述拼接视频流数据的过程较为简单。
在实际的应用过程中,为了进一步地简化上述拼接视频流数据的形成过程,任意两个上述源视频流数据的其他的属性信息相同。
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。
在示例性实施例中,还提供了一种电子设备,包括处理器和用于存储上述处理器可执行指令的存储器,其中,上述处理器被配置为执行上述指令,以实现任一种上述的视频的播放方法。
根据本申请的又一种示例性实施例,还提供了一种系统,包括服务器和客户端,其中,上述服务器被配置为执行任一种用于上述服务器中的上述视频的播放方法;上述客户端与上述服务器通信连接,上述客户端用于执行任一种用于上述客户端中的上述视频的播放方法。
本申请的上述系统中,包括服务器和客户端,上述服务器被配置为执行任一种用于上述服务器中的上述视频的播放方法;上述客户端与上述服务器通信连接,上述客户端用于执行任一种用于上述客户端中的上述视频的播放方法。上述系统中,通过将多个源视频流数据进行横向拼接,得到上述拼接视频流数据,之后,再将拼接视频流数据发送给客户端,这样使得客户端只需拉一路源视频流数据,无需同时拉多路流,这样避免了客户端同时拉多路视频数据流,进而避免了客户端在拉多路流时不同的源视频流数据可能有时间延迟而导致的播放不同步的问题,保证了多个上述源视频流数据可以同步播放,保证了客户端的播放效果较好。
根据本申请的一些实施例,上述系统还包括采集端,上述采集端与上述服务器通信连接,上述采集端用于采集多个源视频流数据,并将多个上述源视频流数据发送至上述服务器。
在实际的应用过程中,多个上述采集端的型号可以相同,也可以不同。
在示例性实施例中,还提供了一种计算机可读存储介质,当上述计算机可读存储介质中的指令由电子设备的处理器执行时,使得电子设备能够执行任一种上述的视频的播放方法或者任一种上述的视频的播放方法。
上述计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。
在示例性实施例中,还提供一种计算机程序产品,包括计算机程序,上述计算机程序被处理器执行时实现任一种上述的视频的播放方法或者任一种上述的视频的播放方法。
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其它实施方案。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。
本公开所有实施例均可以单独被执行,也可以与其他实施例相结合被执行,均视为本公开要求的保护范围。

Claims (43)

  1. 一种视频的播放方法,包括:
    获取多个源视频流数据;
    横向拼接多个所述源视频流数据,得到拼接视频流数据,所述拼接视频流数据中,一帧的拼接图像包括多个子图像,所述多个子图像与所述多个源视频流数据中对应帧的图像对应;
    发送所述拼接视频流数据至客户端,以使所述客户端可切换地播放所述拼接视频流数据中的多个所述源视频流数据。
  2. 根据权利要求1所述的视频的播放方法,其中,所述方法还包括:
    获取各源视频的属性信息,所述源视频的属性信息至少包括各所述源视频的分辨率;
    根据各所述源视频的分辨率以及多个所述源视频流数据的拼接顺序,确定各帧的所述拼接图像中的各所述子图像的位置信息并发送至所述客户端,以使得所述客户端根据所述位置信息切换地播放所述拼接视频流数据中的多个所述源视频流数据。
  3. 根据权利要求2所述的视频的播放方法,其中,所述根据各所述源视频的分辨率以及多个所述源视频流数据的拼接顺序,确定各帧的所述拼接图像中的所述子图像的位置信息步骤包括:
    确定第一个所述源视频流数据对应的所述子图像在所述拼接图像中的第一起始像素值为0、第一终点像素值为所述第一个所述源视频流数据的分辨率的像素值;
    根据所述拼接顺序、第N个所述源视频流数据拼接之前的(N-1)个所述源视频流数据的像素值以及所述第N个所述源视频流数据的像素值,确定第N个所述源视频流数据对应的所述子图像在所述拼接图像中的第N起始像素值和第N终点像素值,N为大于等于2的正整数,所述拼接顺序为第一拼接顺序或者第二拼接顺序,其中,所述第一拼接顺序为按照像素高度方向拼接的顺序,所述第二拼接顺序为按照像素宽度方向拼接的顺序,所述子图像的位置信息包括所述子图像在对应的所述拼接图像中的起始像素值和终点像素值,所述像素值包括像素高度或者像素宽度。
  4. 根据权利要求3所述的视频的播放方法,其中,所述根据所述拼接顺序、第N个所述源视频流数据拼接之前的(N-1)个所述源视频流数据的像素值以及所述第N个所述源视频流数据的像素值,确定第N个所述源视频流数据对应的所述子图像在所述拼接图像中的第N起始像素值和第N终点像素值步骤包括:
    根据所述拼接顺序,确定在第N个所述源视频流数据拼接之前的(N-1)个所述源视频流数据;
    计算(N-1)个所述源视频流数据的分辨率中的像素值之和,得到第N起始像素值;
    计算(N-1)个所述源视频流数据的分辨率中的像素值与所述第N个所述源视频流数据的像素值之和,得到所述第N终点像素值;
    基于所述拼接顺序为所述第一拼接顺序,所述像素值为所述像素高度,基于所述拼接顺序为所述第二拼接顺序,所述像素值为所述像素宽度。
  5. 根据权利要求2至4中任一项所述的视频的播放方法,其中,所述方法还包括:
    将各帧的所述拼接图像中的各所述子图像的位置信息发送至所述客户端,以使得所述客户端确定当前播放的所述源视频流数据和待播放的目标源视频流数据之间的位置关系,从而根据所述位置关系将当前播放的所述源视频流数据切换为所述目标源视频流数据。
  6. 根据权利要求2至4中任一项所述的视频的播放方法,其中,所述源视频的属性信息包括各所述源视频的视角信息,所述方法还包括:
    将各所述源视频的视角信息发送至所述客户端,以使得所述客户端的显示界面上展示 各所述视角信息对应的标识,所述视角信息包括对应的拍摄视角的信息。
  7. 一种视频的播放方法,包括:
    接收拼接视频流数据,其中,所述拼接视频流数据为多个源视频流数据横向拼接得到的,所述拼接视频流数据中,一帧的拼接图像包括多个子图像,所述多个子图像与所述多个源视频流数据中对应帧的图像对应;
    响应于切换指令,将所述拼接视频流中当前播放的所述源视频流数据切换至目标源视频流数据,所述目标源视频流数据为所述切换指令对应的所述源视频流数据。
  8. 根据权利要求7所述的视频的播放方法,其中,所述方法还包括:
    接收拼接视频对应的各帧的所述拼接图像中的各所述子图像的位置信息,所述位置信息为根据各所述源视频的分辨率以及多个所述源视频流数据的拼接顺序确定的。
  9. 根据权利要求7所述的视频的播放方法,其中,所述方法还包括:
    接收各所述源视频的视角信息,所述视角信息包括对应的拍摄视角的信息;
    在显示界面上展示所述视角信息对应的标识。
  10. 根据权利要求8所述的视频的播放方法,其中,所述响应于切换指令,将所述拼接视频流中当前播放的所述源视频流数据切换至目标源视频流数据步骤包括:
    响应于所述切换指令,确定待播放的所述目标源视频流数据;
    根据所述目标源视频流数据对应的所述子图像和当前播放的所述源视频流数据对应的所述子图像的位置信息,确定所述目标源视频流数据和当前播放的所述源视频流数据的位置关系;
    根据所述位置关系,将当前播放的所述源视频流数据切换至所述目标源视频流数据。
  11. 一种视频的播放装置,包括:
    第一获取单元,被配置为获取多个源视频流数据;
    拼接单元,被配置为横向拼接多个所述源视频流数据,得到拼接视频流数据,所述拼接视频流数据中,一帧的拼接图像包括多个子图像,所述多个子图像与所述多个源视频流数据中对应帧的图像对应;
    第一发送单元,被配置为发送所述拼接视频流数据至客户端,以使所述客户端可切换地播放所述拼接视频流数据中的多个所述源视频流数据。
  12. 根据权利要求11所示的播放装置,其中,所述装置还包括:
    第二获取单元,被配置为获取各源视频的属性信息,所述源视频的属性信息至少包括各所述源视频的分辨率;
    第一确定单元,被配置为根据各所述源视频的分辨率以及多个所述源视频流数据的拼接顺序,确定各帧的所述拼接图像中的各所述子图像的位置信息并发送至所述客户端,以使得所述客户端根据所述位置信息切换地播放所述拼接视频流数据中的多个所述源视频流数据。
  13. 根据权利要求12所示的播放装置,其中,所述第一确定单元包括:
    第一确定模块,被配置为确定第一个所述源视频流数据对应的所述子图像在所述拼接图像中的第一起始像素值为0、第一终点像素值为所述第一个所述源视频流数据的分辨率的像素值;
    第二确定模块,被配置为根据所述拼接顺序、第N个所述源视频流数据拼接之前的(N-1)个所述源视频流数据的像素值以及所述第N个所述源视频流数据的像素值,确定第N个所述源视频流数据对应的所述子图像在所述拼接图像中的第N起始像素值和第N终点像素值,N为大于等于2的正整数,所述拼接顺序为第一拼接顺序或者第二拼接顺序,其中,所述第一拼接顺序为按照像素高度方向拼接的顺序,所述第二拼接顺序为按照像素宽度方向拼接的顺序,所述子图像的位置信息包括所述子图像在对应的所述拼接图像中的 起始像素值和终点像素值,所述像素值包括像素高度或者像素宽度。
  14. 根据权利要求13所示的播放装置,其中,所述第二确定模块包括:
    确定子模块,被配置为根据所述拼接顺序,确定在第N个所述源视频流数据拼接之前的(N-1)个所述源视频流数据;
    第一计算子模块,被配置为计算(N-1)个所述源视频流数据的分辨率中的像素值之和,得到第N起始像素值;
    第二计算子模块,被配置为计算(N-1)个所述源视频流数据的分辨率中的像素值与所述第N个所述源视频流数据的像素值之和,得到所述第N终点像素值;
    其中,基于所述拼接顺序为所述第一拼接顺序,所述像素值为所述像素高度,基于所述拼接顺序为所述第二拼接顺序,所述像素值为所述像素宽度。
  15. 根据权利要求12至14中任一项所述的播放装置,其中,所述装置还包括:
    第二发送单元,被配置为将各帧的所述拼接图像中的各所述子图像的位置信息发送至所述客户端,以使得所述客户端确定当前播放的所述源视频流数据和待播放的目标源视频流数据之间的位置关系,从而根据所述位置关系将当前播放的所述源视频流数据切换为所述目标源视频流数据。
  16. 根据权利要求11所述的播放装置,其中,所述源视频的属性信息包括各所述源视频的视角信息,所述装置还包括:
    第三发送单元,被配置为将各所述源视频的视角信息发送至所述客户端,以使得所述客户端的显示界面上展示各所述视角信息对应的标识,所述视角信息包括对应的拍摄视角的信息。
  17. 一种视频的播放装置,包括:
    第一接收单元,被配置为接收拼接视频流数据,其中,所述拼接视频流数据为多个源视频流数据横向拼接得到的,所述拼接视频流数据中,一帧的拼接图像包括多个子图像,所述多个子图像与所述多个源视频流数据中对应帧的图像对应;
    响应单元,被配置为响应于切换指令,将所述拼接视频流中当前播放的所述源视频流数据切换至目标源视频流数据,所述目标源视频流数据为所述切换指令对应的所述源视频流数据。
  18. 根据权利要求17所述的播放装置,其中,所述装置还包括:
    第二接收单元,被配置为接收拼接视频对应的各帧的所述拼接图像中的各所述子图像的位置信息,所述位置信息为根据各所述源视频的分辨率以及多个所述源视频流数据的拼接顺序确定的。
  19. 根据权利要求18所述的播放装置,其中,所述装置包括:
    第三接收单元,被配置为接收各所述源视频的视角信息,所述视角信息包括对应的拍摄视角的信息;
    展示单元,被配置为在显示界面上展示所述视角信息对应的标识。
  20. 根据权利要求18所述的播放装置,其中,所述响应单元包括:
    响应模块,被配置为响应于所述切换指令,确定待播放的所述目标源视频流数据;
    第二确定模块,被配置为根据所述目标源视频流数据对应的所述子图像和当前播放的所述源视频流数据对应的所述子图像的位置信息,确定所述目标源视频流数据和当前播放的所述源视频流数据的位置关系;
    切换模块,被配置为根据所述位置关系,将当前播放的所述源视频流数据切换至所述目标源视频流数据。
  21. 一种电子设备,包括:
    处理器;
    用于存储所述处理器可执行指令的存储器;
    其中,所述处理器被配置为执行所述指令,以实现以下步骤:
    获取多个源视频流数据;
    横向拼接多个所述源视频流数据,得到拼接视频流数据,所述拼接视频流数据中,一帧的拼接图像包括多个子图像,所述多个子图像与所述多个源视频流数据中对应帧的图像对应;
    发送所述拼接视频流数据至客户端,以使所述客户端可切换地播放所述拼接视频流数据中的多个所述源视频流数据。
  22. 根据权利要求21所述的电子设备,其中,所述处理器被配置执行可执行指令,实现以下步骤:
    获取各源视频的属性信息,所述源视频的属性信息至少包括各所述源视频的分辨率;
    根据各所述源视频的分辨率以及多个所述源视频流数据的拼接顺序,确定各帧的所述拼接图像中的各所述子图像的位置信息并发送至所述客户端,以使得所述客户端根据所述位置信息切换地播放所述拼接视频流数据中的多个所述源视频流数据。
  23. 根据权利要求22所述的电子设备,其中,所述根据各所述源视频的分辨率以及多个所述源视频流数据的拼接顺序,确定各帧的所述拼接图像中的所述子图像的位置信息步骤包括:
    确定第一个所述源视频流数据对应的所述子图像在所述拼接图像中的第一起始像素值为0、第一终点像素值为所述第一个所述源视频流数据的分辨率的像素值;
    根据所述拼接顺序、第N个所述源视频流数据拼接之前的(N-1)个所述源视频流数据的像素值以及所述第N个所述源视频流数据的像素值,确定第N个所述源视频流数据对应的所述子图像在所述拼接图像中的第N起始像素值和第N终点像素值,N为大于等于2的正整数,所述拼接顺序为第一拼接顺序或者第二拼接顺序,其中,所述第一拼接顺序为按照像素高度方向拼接的顺序,所述第二拼接顺序为按照像素宽度方向拼接的顺序,所述子图像的位置信息包括所述子图像在对应的所述拼接图像中的起始像素值和终点像素值,所述像素值包括像素高度或者像素宽度。
  24. 根据权利要求23所述的电子设备,其中,所述根据所述拼接顺序、第N个所述源视频流数据拼接之前的(N-1)个所述源视频流数据的像素值以及所述第N个所述源视频流数据的像素值,确定第N个所述源视频流数据对应的所述子图像在所述拼接图像中的第N起始像素值和第N终点像素值步骤包括:
    根据所述拼接顺序,确定在第N个所述源视频流数据拼接之前的(N-1)个所述源视频流数据;
    计算(N-1)个所述源视频流数据的分辨率中的像素值之和,得到第N起始像素值;
    计算(N-1)个所述源视频流数据的分辨率中的像素值与所述第N个所述源视频流数据的像素值之和,得到所述第N终点像素值;
    基于所述拼接顺序为所述第一拼接顺序,所述像素值为所述像素高度,基于所述拼接顺序为所述第二拼接顺序,所述像素值为所述像素宽度。
  25. 根据权利要求22至24中任一项所述的电子设备,其中,所述处理器被配置执行可执行指令,实现以下步骤:
    将各帧的所述拼接图像中的各所述子图像的位置信息发送至所述客户端,以使得所述客户端确定当前播放的所述源视频流数据和待播放的目标源视频流数据之间的位置关系,从而根据所述位置关系将当前播放的所述源视频流数据切换为所述目标源视频流数据。
  26. 根据权利要求22至24中任一项所述的电子设备,其中,所述源视频的属性信息包括各所述源视频的视角信息,所述处理器被配置执行可执行指令,实现以下步骤:
    将各所述源视频的视角信息发送至所述客户端,以使得所述客户端的显示界面上展示各所述视角信息对应的标识,所述视角信息包括对应的拍摄视角的信息。
  27. 一种电子设备,包括:
    处理器;
    用于存储所述处理器可执行指令的存储器;
    其中,所述处理器被配置为执行所述指令,以实现以下步骤:
    接收拼接视频流数据,其中,所述拼接视频流数据为多个源视频流数据横向拼接得到的,所述拼接视频流数据中,一帧的拼接图像包括多个子图像,所述多个子图像与所述多个源视频流数据中对应帧的图像对应;
    响应于切换指令,将所述拼接视频流中当前播放的所述源视频流数据切换至目标源视频流数据,所述目标源视频流数据为所述切换指令对应的所述源视频流数据。
  28. 根据权利要求27所述的电子设备,其中,所述处理器被配置执行可执行指令,实现以下步骤:
    接收拼接视频对应的各帧的所述拼接图像中的各所述子图像的位置信息,所述位置信息为根据各所述源视频的分辨率以及多个所述源视频流数据的拼接顺序确定的。
  29. 根据权利要求27所述的电子设备,其中,所述处理器被配置执行可执行指令,实现以下步骤:
    接收各所述源视频的视角信息,所述视角信息包括对应的拍摄视角的信息;
    在显示界面上展示所述视角信息对应的标识。
  30. 根据权利要求28所述的电子设备,其中,所述响应于切换指令,将所述拼接视频流中当前播放的所述源视频流数据切换至目标源视频流数据步骤包括:
    响应于所述切换指令,确定待播放的所述目标源视频流数据;
    根据所述目标源视频流数据对应的所述子图像和当前播放的所述源视频流数据对应的所述子图像的位置信息,确定所述目标源视频流数据和当前播放的所述源视频流数据的位置关系;
    根据所述位置关系,将当前播放的所述源视频流数据切换至所述目标源视频流数据。
  31. 一种视频播放系统,包括服务器和与所述服务器通信连接的客户端,
    其中,服务器包括:
    服务器处理器;
    用于存储所述服务器处理器可执行的第一指令的服务器存储器;
    所述服务器处理器被配置为执行所述第一指令,以实现以下步骤:
    获取多个源视频流数据;
    横向拼接多个所述源视频流数据,得到拼接视频流数据,所述拼接视频流数据中,一帧的拼接图像包括多个子图像,所述多个子图像与所述多个源视频流数据中对应帧的图像对应;
    发送所述拼接视频流数据至客户端,以使所述客户端可切换地播放所述拼接视频流数据中的多个所述源视频流数据,
    其中,客户端包括:
    客户端处理器;
    用于存储所述客户端处理器可执行的第二指令的客户端存储器;
    其中,所述客户端处理器被配置为执行所述第二指令,以实现以下步骤:
    接收拼接视频流数据;
    响应于切换指令,将所述拼接视频流中当前播放的所述源视频流数据切换至目标源视频流数据,所述目标源视频流数据为所述切换指令对应的所述源视频流数据。
  32. 根据权利要求31所述的系统,其中,所述系统还包括:
    多个采集端,多个所述采集端分别与所述服务器通信连接,多个所述采集端用于采集多个源视频流数据,并将多个所述源视频流数据发送至所述服务器。
  33. 根据权利要求31或32所述的系统,其中,所述服务器处理器被配置执行第一指令,实现以下步骤:
    获取各源视频的属性信息,所述源视频的属性信息至少包括各所述源视频的分辨率;
    根据各所述源视频的分辨率以及多个所述源视频流数据的拼接顺序,确定各帧的所述拼接图像中的各所述子图像的位置信息并发送至所述客户端,以使得所述客户端根据所述位置信息切换地播放所述拼接视频流数据中的多个所述源视频流数据。
  34. 根据权利要求33所述的系统,其中,所述根据各所述源视频的分辨率以及多个所述源视频流数据的拼接顺序,确定各帧的所述拼接图像中的所述子图像的位置信息步骤包括:
    确定第一个所述源视频流数据对应的所述子图像在所述拼接图像中的第一起始像素值为0、第一终点像素值为所述第一个所述源视频流数据的分辨率的像素值;
    根据所述拼接顺序、第N个所述源视频流数据拼接之前的(N-1)个所述源视频流数据的像素值以及所述第N个所述源视频流数据的像素值,确定第N个所述源视频流数据对应的所述子图像在所述拼接图像中的第N起始像素值和第N终点像素值,N为大于等于2的正整数,所述拼接顺序为第一拼接顺序或者第二拼接顺序,其中,所述第一拼接顺序为按照像素高度方向拼接的顺序,所述第二拼接顺序为按照像素宽度方向拼接的顺序,所述子图像的位置信息包括所述子图像在对应的所述拼接图像中的起始像素值和终点像素值,所述像素值包括像素高度或者像素宽度。
  35. 根据权利要求34所述的系统,其中,所述根据所述拼接顺序、第N个所述源视频流数据拼接之前的(N-1)个所述源视频流数据的像素值以及所述第N个所述源视频流数据的像素值,确定第N个所述源视频流数据对应的所述子图像在所述拼接图像中的第N起始像素值和第N终点像素值步骤包括:
    根据所述拼接顺序,确定在第N个所述源视频流数据拼接之前的(N-1)个所述源视频流数据;
    计算(N-1)个所述源视频流数据的分辨率中的像素值之和,得到第N起始像素值;
    计算(N-1)个所述源视频流数据的分辨率中的像素值与所述第N个所述源视频流数据的像素值之和,得到所述第N终点像素值;
    基于所述拼接顺序为所述第一拼接顺序,所述像素值为所述像素高度,基于所述拼接顺序为所述第二拼接顺序,所述像素值为所述像素宽度。
  36. 根据权利要求31至35中任一项所述的系统,其中,所述服务器处理器被配置执行第一指令,实现以下步骤:
    将各帧的所述拼接图像中的各所述子图像的位置信息发送至所述客户端,以使得所述客户端确定当前播放的所述源视频流数据和待播放的目标源视频流数据之间的位置关系,从而根据所述位置关系将当前播放的所述源视频流数据切换为所述目标源视频流数据。
  37. 根据权利要求31至35中任一项所述的系统,其中,所述源视频的属性信息包括各所述源视频的视角信息,所述服务器处理器被配置执行第一指令,实现以下步骤:
    将各所述源视频的视角信息发送至所述客户端,以使得所述客户端的显示界面上展示各所述视角信息对应的标识,所述视角信息包括对应的拍摄视角的信息。
  38. 根据权利要求31或32所述的系统,其中,所述客户端处理器被配置执行第二指令,实现以下步骤:
    接收拼接视频对应的各帧的所述拼接图像中的各所述子图像的位置信息,所述位置信 息为根据各所述源视频的分辨率以及多个所述源视频流数据的拼接顺序确定的。
  39. 根据权利要求31或32所述的系统,其中,所述客户端处理器被配置执行第二指令,实现以下步骤:
    接收各所述源视频的视角信息,所述视角信息包括对应的拍摄视角的信息;
    在显示界面上展示所述视角信息对应的标识。
  40. 根据权利要求38所述的系统,其中,所述响应于切换指令,将所述拼接视频流中当前播放的所述源视频流数据切换至目标源视频流数据步骤包括:
    响应于所述切换指令,确定待播放的所述目标源视频流数据;
    根据所述目标源视频流数据对应的所述子图像和当前播放的所述源视频流数据对应的所述子图像的位置信息,确定所述目标源视频流数据和当前播放的所述源视频流数据的位置关系;
    根据所述位置关系,将当前播放的所述源视频流数据切换至所述目标源视频流数据。
  41. 一种计算机可读存储介质,当所述计算机可读存储介质中的指令由电子设备的处理器执行时,使得电子设备能够实现以下步骤:
    获取多个源视频流数据;
    横向拼接多个所述源视频流数据,得到拼接视频流数据,所述拼接视频流数据中,一帧的拼接图像包括多个子图像,所述多个子图像与所述多个源视频流数据中对应帧的图像对应;
    发送所述拼接视频流数据至客户端,以使所述客户端可切换地播放所述拼接视频流数据中的多个所述源视频流数据。
  42. 一种计算机可读存储介质,当所述计算机可读存储介质中的指令由电子设备的处理器执行时,使得电子设备能够实现以下步骤:
    接收拼接视频流数据,其中,所述拼接视频流数据为多个源视频流数据横向拼接得到的,所述拼接视频流数据中,一帧的拼接图像包括多个子图像,所述多个子图像与所述多个源视频流数据中对应帧的图像对应;
    响应于切换指令,将所述拼接视频流中当前播放的所述源视频流数据切换至目标源视频流数据,所述目标源视频流数据为所述切换指令对应的所述源视频流数据。
  43. 一种计算机程序产品,包括计算机程序,其中,所述计算机程序被处理器执行时实现权利要求1至6中任一项所述的视频的播放方法或者权利要求7至10中任一项所述的视频的播放方法。
PCT/CN2022/086135 2021-07-06 2022-04-11 视频的播放方法及装置 WO2023279793A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110760086.8A CN113259764A (zh) 2021-07-06 2021-07-06 视频的播放方法、播放装置、电子设备及系统
CN202110760086.8 2021-07-06

Publications (1)

Publication Number Publication Date
WO2023279793A1 true WO2023279793A1 (zh) 2023-01-12

Family

ID=77190701

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/086135 WO2023279793A1 (zh) 2021-07-06 2022-04-11 视频的播放方法及装置

Country Status (2)

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

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113259764A (zh) * 2021-07-06 2021-08-13 北京达佳互联信息技术有限公司 视频的播放方法、播放装置、电子设备及系统
CN113727183B (zh) * 2021-08-30 2023-09-15 北京百度网讯科技有限公司 直播推流方法、装置、设备、存储介质及计算机程序产品

Citations (5)

* 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 (zh) * 2010-10-27 2011-02-16 北京中星微电子有限公司 一种视频处理方法及装置和系统
CN104822070A (zh) * 2015-04-13 2015-08-05 腾讯科技(北京)有限公司 多路视频流播放方法及装置
CN112929580A (zh) * 2021-01-14 2021-06-08 北京奇艺世纪科技有限公司 多视角视频播放方法、装置、系统、服务器和客户端设备
CN113259764A (zh) * 2021-07-06 2021-08-13 北京达佳互联信息技术有限公司 视频的播放方法、播放装置、电子设备及系统

Family Cites Families (3)

* 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
CN107948756B (zh) * 2017-11-22 2020-07-24 广州华多网络科技有限公司 视频合成控制方法、装置及相应的终端
CN111866525A (zh) * 2020-09-23 2020-10-30 腾讯科技(深圳)有限公司 多视点视频的播放控制方法及装置、电子设备、存储介质

Patent Citations (5)

* 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 (zh) * 2010-10-27 2011-02-16 北京中星微电子有限公司 一种视频处理方法及装置和系统
CN104822070A (zh) * 2015-04-13 2015-08-05 腾讯科技(北京)有限公司 多路视频流播放方法及装置
CN112929580A (zh) * 2021-01-14 2021-06-08 北京奇艺世纪科技有限公司 多视角视频播放方法、装置、系统、服务器和客户端设备
CN113259764A (zh) * 2021-07-06 2021-08-13 北京达佳互联信息技术有限公司 视频的播放方法、播放装置、电子设备及系统

Also Published As

Publication number Publication date
CN113259764A (zh) 2021-08-13

Similar Documents

Publication Publication Date Title
WO2023279793A1 (zh) 视频的播放方法及装置
US20170374410A1 (en) Information processing apparatus, information processing method, and program
WO2017181599A1 (zh) 一种显示视频的方法及装置
JP2020519094A (ja) ビデオ再生方法、デバイス、およびシステム
CN108900857B (zh) 一种多视角视频流处理方法和装置
US20110229106A1 (en) System for playback of ultra high resolution video using multiple displays
KR101528863B1 (ko) 파노라마 영상의 스트리밍 서비스 제공 시스템에서 타일링 영상 동기화 방법
US11128894B2 (en) Method and mobile terminal for processing data
KR101841313B1 (ko) 멀티미디어 흐름 처리 방법 및 대응하는 장치
CN113115110B (zh) 视频合成方法、装置、存储介质与电子设备
WO2014190655A1 (zh) 应用同步方法、应用服务器及终端
CN110928509B (zh) 显示控制方法、显示控制装置、存储介质、通信终端
KR20130135278A (ko) 3d 이미지 데이터의 전송
US10462500B2 (en) Location agnostic media control room/broadcast facility
US20200213631A1 (en) Transmission system for multi-channel image, control method therefor, and multi-channel image playback method and apparatus
US8599240B2 (en) Super-resolution from 3D (3D to 2D conversion) for high quality 2D playback
CN111835988B (zh) 字幕的生成方法、服务器、终端设备及系统
CN110198457B (zh) 视频播放方法及其设备、系统、存储介质、终端、服务器
GB2526618A (en) Method for generating a screenshot of an image to be displayed by a multi-display system
JP2019033362A (ja) 配信装置、受信装置及びプログラム
CN113938617A (zh) 一种多路视频显示方法、设备、网络摄像机及存储介质
CN112019922A (zh) 应用于虚拟演播室的面部表情数据处理方法
CN116708867B (zh) 一种直播数据处理方法、装置、设备及存储介质
EP3160156A1 (en) System, device and method to enhance audio-video content using application images
US11930207B2 (en) Display device, signal processing device, and signal processing method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22836552

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE