CN114390343A - Multi-video playing method and related equipment - Google Patents

Multi-video playing method and related equipment Download PDF

Info

Publication number
CN114390343A
CN114390343A CN202111661392.2A CN202111661392A CN114390343A CN 114390343 A CN114390343 A CN 114390343A CN 202111661392 A CN202111661392 A CN 202111661392A CN 114390343 A CN114390343 A CN 114390343A
Authority
CN
China
Prior art keywords
image
decoding
video
nth
played
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111661392.2A
Other languages
Chinese (zh)
Other versions
CN114390343B (en
Inventor
司宝钻
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Big Head Brothers Technology Co Ltd
Original Assignee
Shenzhen Big Head Brothers Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Big Head Brothers Technology Co Ltd filed Critical Shenzhen Big Head Brothers Technology Co Ltd
Priority to CN202111661392.2A priority Critical patent/CN114390343B/en
Publication of CN114390343A publication Critical patent/CN114390343A/en
Application granted granted Critical
Publication of CN114390343B publication Critical patent/CN114390343B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/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 or rendering scenes according to encoded video stream scene graphs
    • H04N21/44008Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving operations for analysing video streams, e.g. detecting features or characteristics in the video stream
    • 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 or rendering scenes according to encoded video stream scene graphs
    • H04N21/44012Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving rendering scenes according to scene graphs, e.g. MPEG-4 scene graphs

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention discloses a multi-video playing method, which comprises the steps of obtaining a plurality of videos to be played; sequentially decoding the videos to be played to obtain an atlas to be displayed, wherein the atlas to be displayed comprises a plurality of images to be displayed corresponding to each video to be played, and the video decoding process comprises the following steps: aiming at each video to be played, calculating a time threshold corresponding to the video to be played according to the video frame rate of the video to be played; decoding the Nth initial image of the video to be played according to the time threshold to obtain the corresponding Nth image to be displayed; and rendering and displaying the to-be-displayed atlas according to a preset rendering frame rate. The rendering and the decoding are two different threads, the decoding can be carried out according to the video frame rates of different videos, and the rendering is carried out only according to the rendering frame rate, so that the two steps are carried out asynchronously without interference, and a plurality of videos can be played smoothly.

Description

Multi-video playing method and related equipment
Technical Field
The invention relates to the technical field of video playing, in particular to a multi-video playing method and related equipment.
Background
The video playing mainly adopts constant frame rate playing, and when the video is played, a screen is refreshed by adopting a fixed frame rate. For example, the frame rate of the played video is 30fps, and the screen can be refreshed by adopting the frequency of refreshing 30 frames in 1 second. And the frame rate can be adjusted according to the performance of the display, so as to achieve better playing effect.
However, when a display plays a plurality of video pictures simultaneously, for example, in the case of a monitor, a user searches for a material when editing a video, and performs video comparison, the frame rates of the videos may be different, and at this time, a contradiction between screen refreshing during playing and a contradiction between fixed frame rate refreshing are likely to occur, so that a situation that playing is not smooth is likely to occur.
Disclosure of Invention
The technical problem to be solved by the invention is that the current display screen is easy to cause pause when videos with different frame rates are played simultaneously, and the multi-video playing method is provided aiming at the defects of the prior art.
In order to solve the technical problems, the technical scheme adopted by the invention is as follows:
a method of playing multiple videos, the method comprising:
acquiring a plurality of videos to be played;
sequentially decoding the videos to be played to obtain an atlas to be displayed, wherein the atlas to be displayed comprises a plurality of images to be displayed corresponding to each video to be played, and the video decoding process comprises the following steps:
aiming at each video to be played, calculating a time threshold corresponding to the video to be played according to the video frame rate of the video to be played;
decoding the Nth initial image of the video to be played according to the time threshold to obtain the corresponding Nth image to be displayed, wherein N is a positive integer less than or equal to the total frame rate M of the video to be played, and N is 1 when the video is decoded for the first time;
and rendering and displaying the to-be-displayed atlas according to a preset rendering frame rate.
The method for playing multiple videos includes, according to the time threshold, decoding an nth initial image of the video to be played to obtain an nth image to be displayed, where the decoding includes:
decoding the Nth initial image, and starting decoding timing to obtain decoding time;
when the decoding time is equal to the time threshold and the decoding of the Nth initial image is not completed, determining a decoded image corresponding to the Nth initial image as a discarded image;
and when the decoding of the Nth initial image is finished and the decoding time is less than the time threshold, generating an image to be displayed according to the decoded image corresponding to the Nth initial image.
The multi-video playing method includes that, when the decoding of the nth initial image is completed and the decoding time is less than the time threshold, generating an image to be displayed according to a decoded image corresponding to the nth initial image includes:
when the decoding of the Nth initial image is finished and the decoding time is less than the time threshold, taking the image obtained after the decoding of the Nth initial image as an Nth intermediate image;
calculating the difference between the decoding time corresponding to the Nth intermediate image and the time threshold value aiming at the Nth intermediate image to obtain waiting time;
and screening the Nth intermediate image according to the rendering frequency and the waiting time to obtain an Nth image to be displayed.
The multi-video playing method, wherein the screening the nth intermediate image according to the rendering frequency and the waiting time to obtain an nth image to be displayed comprises:
calculating corresponding refreshing time according to the rendering frequency;
judging whether the waiting time is greater than or equal to the refreshing time or not;
if the waiting time is greater than or equal to the refreshing time, generating a corresponding Nth image to be displayed according to the Nth intermediate image;
and if the waiting time is less than the refreshing time, discarding the Nth initial image.
The method for playing multiple videos further includes, before the sequentially decoding the videos to be played to obtain an atlas to be displayed of the atlas, the steps of:
and when each video to be played is detected, creating a texture image for each video to be played according to preset texture parameters.
The multi-video playing method, wherein if the waiting time is greater than or equal to the refreshing time, generating a corresponding nth image to be displayed according to the nth intermediate image includes:
and if the waiting time is greater than or equal to the refreshing time, performing texture updating on the texture image corresponding to the video to be played according to the Nth image to obtain the Nth image to be displayed.
A multi-video playback apparatus includes:
the acquisition module acquires a plurality of videos to be played;
a decoding module, configured to sequentially decode the videos to be played to obtain an atlas to be displayed, where the atlas to be displayed includes a plurality of images to be displayed corresponding to each video to be played, and the decoding module includes:
the computing submodule is used for computing a time threshold corresponding to each video to be played according to the video frame rate of the video to be played;
the decoding submodule is used for decoding the Nth initial image of the video to be played according to the time threshold to obtain the corresponding Nth image to be displayed, wherein N is a positive integer less than or equal to the total frame rate M of the video to be played, and N is 1 when the video is decoded for the first time;
and the rendering module is used for rendering and displaying the to-be-displayed atlas according to a preset rendering frame rate.
Wherein the decoding sub-module includes:
the first decoding unit is used for decoding the Nth initial image and starting decoding timing to obtain decoding time;
a stopping unit, configured to determine, when the decoding time is equal to the time threshold and the decoding of the nth initial image is not completed, a decoded image corresponding to the nth initial image as a discarded image;
and the second decoding unit is used for generating an image to be displayed according to the decoded image corresponding to the Nth initial image when the decoding of the Nth initial image is finished and the decoding time is less than the time threshold.
A computer readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the steps in the multi-video playing method as described in any above.
A terminal device, comprising: a processor, a memory, and a communication bus; the memory has stored thereon a computer readable program executable by the processor;
the communication bus realizes connection communication between the processor and the memory;
the processor, when executing the computer readable program, implements the steps in the multi-video playing method as described in any one of the above.
Has the advantages that: when a plurality of videos need to be played simultaneously, the videos to be played are obtained. For each video to be played, calculating the time threshold of the video to be played according to the video frame rate of the video. And then, decoding the Nth initial image according to a time threshold value and a step-by-step increasing sequence to obtain an Nth image to be displayed. Since the video frame rate is the frame rate that the video is expected to display, decoding is performed according to the time threshold, so that the rate of the image to be displayed can be ensured to meet the real condition of the video as much as possible. Presetting a rendering frame rate, wherein the rendering frame rate is the frequency of rendering and refreshing of a display, then determining images to be displayed in the images to be displayed corresponding to all videos to be played according to the rendering frame rate, and rendering and displaying the images to be displayed. The step can lead all video playing rhythms to be consistent with the refreshing rhythm, thereby ensuring the smooth display effect of all videos. According to the scheme, video decoding and image rendering are separated into different threads, the threads are independently operated, an asynchronous mode is adopted when the video is played, the video is decoded circularly to obtain the image to be displayed, and the renderer continuously refreshes the displayed video, so that the videos with different frame rates are not blocked when being played.
Drawings
Fig. 1 is a flowchart of a multi-video playing method provided by the present invention.
Fig. 2 is a schematic diagram of acquiring a video to be played by the multi-video playing method provided by the present invention.
Fig. 3 is a schematic diagram of a player in the multi-video playing method provided by the present invention.
Fig. 4 is a schematic diagram of the operation of a renderer in the multi-video playing method provided by the present invention.
Fig. 5 is a schematic structural diagram of a multi-video playing apparatus provided in the present invention.
Fig. 6 is a schematic structural diagram of a terminal device according to the present invention.
Detailed Description
The present invention provides a multi-video playing method and related devices, and in order to make the objects, technical solutions, and effects of the present invention clearer and clearer, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
As shown in fig. 1, this embodiment provides a multi-video playing method, for convenience of description, a common server is used as an execution subject to be described, where the server may be replaced by a tablet, a computer, and other devices with a data processing function, as shown in fig. 2, in this embodiment, the number of videos to be played is 3, which are respectively a video a, a video B, and a video C, and frame rates of the three videos are different, and the multi-video playing method includes the following steps:
and S10, acquiring a plurality of videos to be played.
Specifically, in the scheme, the server firstly obtains a plurality of videos to be played in modes of reading and the like. Because the video decoding and the display playing are performed according to different rhythms in the scheme, the server can be provided with two core components, one is a Renderer (render) and the other is a player (MediaPlayer), the player is used for decoding the video to obtain the image to be displayed, and the Renderer is used for rendering and playing the image to be displayed. As shown in fig. 2, there are as many players as there are videos to be played, and the player a, the player B, and the player C correspond to the video a, the video B, and the video C, respectively.
And S20, sequentially decoding the video to be played to obtain an atlas to be displayed.
Specifically, after each player obtains a video to be played, video decoding is performed on the video to be played, so that a plurality of images to be displayed corresponding to each video to be played are obtained. For the sake of clear description of the decoding process, as shown in fig. 3, a single player is used as an object for description, and the process is as follows:
and S21, calculating a time threshold corresponding to each video to be played according to the video frame rate of the video to be played.
Specifically, the video frame rates of the videos to be played are not completely the same, and if the video frame rates of all the videos to be played are the same, the situation that the playing is not smooth is low, so this embodiment only describes the situation that the video frame rates of the videos to be played are different.
The video frame rate of the video A to be played is set to be 25FPS, the video frame rate of the video B to be played is set to be 30FPS, and the video frame rate of the video C to be played is set to be 60 FPS. The video frame rate here is the frame rate of the video to be detected, and is irrelevant to other equipment parameters, namely under normal conditions, within one second, the video playing of 25FPS can flash over 25 frame images.
Therefore, according to the video frame rate, it is possible to calculate how long the next frame image needs to be played after playing one frame image, that is, the time threshold for the next frame image to be decoded and output. Taking the video a to be played as an example, the time threshold is 1000 ms/25-40 ms.
And S22, according to the time threshold, circularly decoding the initial image of the video to be played to obtain a corresponding image to be displayed.
Specifically, in order to distinguish the frame image forming the video to be played from the played frame image, the former is named as an initial image, and therefore, the nth frame image is an nth initial image, where N is a positive integer less than or equal to the total frame rate M of the video to be played. When decoding is performed, decoding is performed from N equal to 1 until N equal to M, that is, from the first initial image, the second initial image, and the third initial image … …. In the decoding process, because a plurality of players exist, in order to ensure the fluency of video playing, decoding is carried out according to the time threshold, the time for obtaining each image to be displayed is within the time threshold, and the influence on playing is reduced. Through the cyclic video decoding, the player A can decode the video A to be played to obtain a plurality of images to be displayed corresponding to the video A to be played. For example, the images to be displayed corresponding to the video a to be played are the image to be displayed 21, the image to be displayed 22, and the image to be displayed 23.
Similarly, the player B decodes the video B to be played to obtain a plurality of corresponding images to be displayed, such as the image 31 to be displayed, the image 32 to be displayed, and the image 33 to be displayed; the player C decodes and plays the video C to be played to obtain a plurality of images to be displayed corresponding to the video C, such as an image 41 to be displayed, an image 42 to be displayed, and an image 43 to be displayed.
Further, the decoding process for each video to be played may be as follows:
and A10, sequentially decoding the Nth initial image, and starting decoding timing to obtain decoding time.
Specifically, for the nth initial image, the nth initial image is decoded, and the specific decoding manner may be determined according to the format of the video to be played, the hardware condition, and the like. At the same time as the start of decoding, the decoding timing is started. The decoding timing can adopt a starting point of decoding starting time to obtain the current time in real time so as to obtain the decoding time, or a timer is arranged, the timer is started after the decoding is started, or a fixed period with the time same as the time threshold is set according to the time threshold, and when the decoding is started, the fixed period enters countdown so as to obtain the decoding time.
And A20, when the decoding time is equal to the time threshold and the decoding of the Nth initial image is not completed, determining the decoded image corresponding to the Nth initial image as a discarded image.
Specifically, in the decoding process, the magnitude relationship between the decoding time and the time threshold is monitored. Taking the video a to be played as an example, the corresponding time threshold is 40ms, the nth initial image currently decoded is set to be F1, and the decoding time of F1 needs 50ms, when the decoding time is equal to 40ms, F1 is not yet decoded, and if the decoding of F1 is continued to be completed and the rendering display is performed, the video is obviously stuck, which affects the subsequent video playing. Therefore, when the condition that the decoding time is equal to the time threshold and the decoding of the nth initial image is not completed is satisfied, the decoded image after the decoding of the nth initial image cannot be used for playing, and therefore, the decoded image is determined as a discarded image, and no texture, rendering output and other operations are subsequently created on the discarded image.
And A30, obtaining the Nth image to be displayed when the decoding of the Nth initial image is completed and the decoding time is less than or equal to the time threshold.
Specifically, still taking the video a to be played as an example, let the current decoded nth initial image be F2, and the time required for decoding F2 be 20ms, so when the decoding of F2 is completed, the decoding time is less than the time threshold of 40ms, and the decoding of F2 does not affect the decoding of the subsequent video, so that the nth image to be displayed can be obtained.
Because the threads of the renderer and the player are independent, the renderer has own rendering frame rate, and after the to-be-displayed atlas is obtained, the renderer determines a target image in the to-be-displayed image according to the rendering frame rate. For example, the rendering frame rate is low, while the video frame rate is high, and there must be some images discarded. In order to save rendering resources, in the process of obtaining the nth image to be displayed:
and A31, when the decoding of the Nth initial image is finished and the decoding time is less than the time threshold, taking the image after the decoding of the Nth initial image as an Nth intermediate image.
Specifically, when the decoding of the nth initial image is completed and the decoding time is less than the time threshold, that is, the first condition of being the image to be displayed is satisfied, the image obtained after decoding is used as the nth intermediate image.
A32, for the nth intermediate picture, calculating the difference between the decoding time corresponding to the nth intermediate picture and the time threshold value to obtain the waiting time.
Specifically, after the decoding is completed, the obtained nth image to be displayed is not necessarily pushed to the renderer immediately. For example, the image F2 is decoded with a time threshold of 20ms, and therefore 20ms is not pushed to the renderer for display. And calculating the waiting time corresponding to the Nth intermediate image according to the decoding time and the time threshold. For example, the image F1 has a waiting time of 40ms to 20ms, which is 20 ms.
And A33, screening the Nth intermediate image according to the rendering frequency and the waiting time to obtain an Nth image to be displayed.
The rendering frame rate is the frequency of rendering by the renderer, that is, the frequency of refreshing the display screen, and the rendering frequency represents how long the renderer renders and displays the image to be displayed.
Assuming a rendering frequency of 60FPS, the screen refresh frame image should be 1000/60ms (16 ms is used subsequently for the sake of illustration in this example). If the waiting time is short, the renderer cannot meet the requirement of video playing, so in this embodiment, the corresponding refresh time is calculated according to the rendering frequency, which is, for example, 60FPS, and the refresh time is 16 ms.
As shown in fig. 3, the nth intermediate image is set as the third image, and the corresponding waiting time is 20ms, which is greater than the refresh time, so that the renderer can normally display according to its own rendering frequency, and thus the third intermediate image is determined as the third image to be displayed.
For another example, the waiting time corresponding to the fourth intermediate image is 16ms, which is equal to the refresh time, and the renderer can also normally display according to the rendering frequency, so that the fourth intermediate image is also determined to be the fourth image to be displayed.
For another example, the waiting time corresponding to the fifth intermediate image is 10ms, which is less than the refresh time, and if the renderer acquires the image according to the rendering frequency and performs the refresh, a display delay occurs, so that the fifth intermediate image is discarded, and the decoding display of the sixth initial image is started.
Further, in the above-described generation of the corresponding nth to-be-displayed image according to the nth intermediate image, the nth intermediate image is directly used as the nth to-be-displayed image, in another embodiment, in order to improve the texture of the picture and bring better picture experience, after the to-be-displayed video is obtained, before decoding, when each to-be-played video is detected, a texture image is created for each to-be-played video according to a preset texture parameter. The texture parameter can be set according to the type of the video, the nature of the video and the selection of the user. And for each Nth image to be displayed, carrying out texture updating on the corresponding texture image according to the Nth intermediate image to obtain the Nth image to be displayed. The image to be displayed rendered by the subsequent renderer as shown in fig. 3 is a textured video image.
And S30, rendering and displaying the to-be-displayed atlas according to a preset rendering frame rate.
Specifically, as shown in fig. 4, the player a, the player B, and the player C play the decoded to-be-displayed atlas in the generated order, and send one to-be-displayed image to the renderer. After the renderer obtains the to-be-displayed image set, the renderer is irrelevant to the video frame rate corresponding to each to-be-displayed image, and only the renderer renders and outputs the to-be-displayed image set according to the rendering frequency of the renderer. And finally, displaying a plurality of videos which are uniformly played according to the rendering frequency on a screen.
Therefore, in the scheme, the video decoding and the image rendering are completely separated into different threads, the threads are independently operated, the video playing is carried out in a complete asynchronous mode, the frame rate of the video does not need to be considered by a renderer, and the video can be smoothly played without continuously refreshing a screen in a waiting mode.
Based on the above playing method of multiple videos, as shown in fig. 5, the present invention further provides a playing apparatus 100 for multiple videos, where the playing apparatus 100 for multiple videos includes:
the obtaining module 110 obtains a plurality of videos to be played;
a decoding module 120, configured to sequentially decode the videos to be played to obtain an atlas to be displayed, where the atlas to be displayed includes a plurality of images to be displayed corresponding to each video to be played, and the decoding module 120 includes:
the computing submodule is used for computing a time threshold corresponding to each video to be played according to the video frame rate of the video to be played;
the decoding submodule is used for decoding the Nth initial image of the video to be played according to the time threshold to obtain the corresponding Nth image to be displayed, wherein N is a positive integer less than or equal to the total frame rate M of the video to be played, and N is 1 when the video is decoded for the first time;
and the rendering module 130 is configured to render and display the to-be-displayed atlas according to a preset rendering frame rate.
Wherein the decoding sub-module includes:
the first decoding unit is used for decoding the Nth initial image and starting decoding timing to obtain decoding time;
a stopping unit, configured to determine, when the decoding time is equal to the time threshold and the decoding of the nth initial image is not completed, a decoded image corresponding to the nth initial image as a discarded image;
and the second decoding unit is used for generating an image to be displayed according to the decoded image corresponding to the Nth initial image when the decoding of the Nth initial image is finished and the decoding time is less than the time threshold.
Wherein the second decoding unit includes:
a determining subunit, configured to, when the decoding of the nth initial image is completed and the decoding time is less than the time threshold, take the image obtained by decoding the nth initial image as an nth intermediate image;
a calculating subunit, configured to calculate, for the nth intermediate image, a difference between a decoding time corresponding to the nth intermediate image and the time threshold to obtain a waiting time;
and the screening subunit is used for screening the Nth intermediate image according to the rendering frequency and the waiting time to obtain an Nth image to be displayed.
Wherein, the screening subunit is specifically configured to:
calculating corresponding refreshing time according to the rendering frequency;
judging whether the waiting time is greater than or equal to the refreshing time or not;
if the waiting time is greater than or equal to the refreshing time, generating a corresponding Nth image to be displayed according to the Nth intermediate image;
and if the waiting time is less than the refreshing time, discarding the Nth initial image.
Wherein, the multi-video playing device further comprises a texture module, and the texture module is used for:
and when each video to be played is detected, creating a texture image for each video to be played according to preset texture parameters.
Wherein, the screening subunit is further specifically configured to:
calculating corresponding refreshing time according to the rendering frequency;
judging whether the waiting time is greater than or equal to the refreshing time or not;
if the waiting time is greater than or equal to the refreshing time, texture updating is carried out on the texture image corresponding to the video to be played according to the Nth image, and the Nth image to be displayed is obtained;
and if the waiting time is less than the refreshing time, discarding the Nth initial image.
Based on the above playing method of multiple videos, the present invention further provides a terminal device, as shown in fig. 6, which includes at least one processor (processor) 20; a display screen 21; and a memory (memory)22, and may further include a communication Interface (Communications Interface)23 and a bus 24. The processor 20, the display 21, the memory 22 and the communication interface 23 can communicate with each other through the bus 24. The display screen 21 is configured to display a user guidance interface preset in the initial setting mode. The communication interface 23 may transmit information. The processor 20 may call logical commands in the memory 22 to perform the methods in the above embodiments.
In addition, the logic commands in the memory 22 can be implemented in the form of software functional units and stored in a computer readable storage medium when sold or used as a stand-alone product.
The memory 22, which is a computer-readable storage medium, may be configured to store a software program, a computer-executable program, such as program commands or modules corresponding to the methods in the embodiments of the present disclosure. The processor 20 executes functional applications and data processing by executing software programs, commands or modules stored in the memory 22, i.e. implements the method in the above-described embodiments.
The memory 22 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal device, and the like. Further, the memory 22 may include a high speed random access memory and may also include a non-volatile memory. For example, a variety of media that can store program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk, may also be used as the transient computer readable storage medium.
In addition, the specific processes loaded and executed by the computer readable storage medium and the plurality of command processors in the terminal device are described in detail in the method, and are not stated herein.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for playing multiple videos, the method comprising:
acquiring a plurality of videos to be played;
sequentially decoding the videos to be played to obtain an atlas to be displayed, wherein the atlas to be displayed comprises a plurality of images to be displayed corresponding to each video to be played, and the video decoding process comprises the following steps:
aiming at each video to be played, calculating a time threshold corresponding to the video to be played according to the video frame rate of the video to be played;
decoding the Nth initial image of the video to be played according to the time threshold to obtain the corresponding Nth image to be displayed, wherein N is a positive integer less than or equal to the total frame rate M of the video to be played, and N is 1 when the video is decoded for the first time;
and rendering and displaying the to-be-displayed atlas according to a preset rendering frame rate.
2. The method for playing multiple videos according to claim 1, wherein the decoding the nth initial image of the video to be played according to the time threshold to obtain the corresponding nth image to be displayed comprises:
sequentially decoding the Nth initial image, and starting decoding timing to obtain decoding time;
when the decoding time is equal to the time threshold and the decoding of the Nth initial image is not completed, determining a decoded image corresponding to the Nth initial image as a discarded image;
and when the decoding of the Nth initial image is finished and the decoding time is less than the time threshold, generating an image to be displayed according to the decoded image corresponding to the Nth initial image.
3. The method for playing multiple videos according to claim 2, wherein when the decoding of the nth initial image is completed and the decoding time is less than the time threshold, generating the image to be displayed according to the decoded image corresponding to the nth initial image comprises:
when the decoding of the Nth initial image is finished and the decoding time is less than the time threshold, taking the image obtained after the decoding of the Nth initial image as an Nth intermediate image;
calculating the difference between the decoding time corresponding to the Nth intermediate image and the time threshold value aiming at the Nth intermediate image to obtain waiting time;
and screening the Nth intermediate image according to the rendering frequency and the waiting time to obtain an Nth image to be displayed.
4. The method for playing multiple videos according to claim 3, wherein the screening the nth intermediate image according to the rendering frequency and the waiting time to obtain an nth image to be displayed comprises:
calculating corresponding refreshing time according to the rendering frequency;
judging whether the waiting time is greater than or equal to the refreshing time or not;
if the waiting time is greater than or equal to the refreshing time, generating a corresponding Nth image to be displayed according to the Nth intermediate image;
and if the waiting time is less than the refreshing time, discarding the Nth initial image.
5. The method for playing multiple videos according to claim 4, further comprising, before the sequentially decoding the videos to be played to obtain an album to be displayed, the steps of:
and when each video to be played is detected, creating a texture image for each video to be played according to preset texture parameters.
6. The method for playing multiple videos according to claim 5, wherein if the waiting time is greater than or equal to the refresh time, generating a corresponding nth to-be-displayed image according to the nth intermediate image includes:
and if the waiting time is greater than or equal to the refreshing time, performing texture updating on the texture image corresponding to the video to be played according to the Nth image to obtain the Nth image to be displayed.
7. A multi-video playback apparatus, comprising:
the acquisition module acquires a plurality of videos to be played;
a decoding module, configured to sequentially decode the videos to be played to obtain an atlas to be displayed, where the atlas to be displayed includes a plurality of images to be displayed corresponding to each video to be played, and the decoding module includes:
the computing submodule is used for computing a time threshold corresponding to each video to be played according to the video frame rate of the video to be played;
the decoding submodule is used for decoding the Nth initial image of the video to be played according to the time threshold to obtain the corresponding Nth image to be displayed, wherein N is a positive integer less than or equal to the total frame rate M of the video to be played, and N is 1 when the video is decoded for the first time;
and the rendering module is used for rendering and displaying the to-be-displayed atlas according to a preset rendering frame rate.
8. The apparatus for playing multiple videos as claimed in claim 7, wherein the decoding sub-module comprises:
the first decoding unit is used for decoding the Nth initial image and starting decoding timing to obtain decoding time;
a stopping unit, configured to determine, when the decoding time is equal to the time threshold and the decoding of the nth initial image is not completed, a decoded image corresponding to the nth initial image as a discarded image;
and the second decoding unit is used for generating an image to be displayed according to the decoded image corresponding to the Nth initial image when the decoding of the Nth initial image is finished and the decoding time is less than the time threshold.
9. A computer-readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the steps in the multi-video playing method according to any one of claims 1 to 6.
10. A terminal device, comprising: a processor, a memory, and a communication bus; the memory has stored thereon a computer readable program executable by the processor;
the communication bus realizes connection communication between the processor and the memory;
the processor, when executing the computer readable program, implements the steps in the multi-video playing method according to any one of claims 1 to 6.
CN202111661392.2A 2021-12-31 2021-12-31 Multi-video playing method and related equipment Active CN114390343B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111661392.2A CN114390343B (en) 2021-12-31 2021-12-31 Multi-video playing method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111661392.2A CN114390343B (en) 2021-12-31 2021-12-31 Multi-video playing method and related equipment

Publications (2)

Publication Number Publication Date
CN114390343A true CN114390343A (en) 2022-04-22
CN114390343B CN114390343B (en) 2024-06-14

Family

ID=81199866

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111661392.2A Active CN114390343B (en) 2021-12-31 2021-12-31 Multi-video playing method and related equipment

Country Status (1)

Country Link
CN (1) CN114390343B (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR980004675A (en) * 1996-06-19 1998-03-30 김주용 How to Play STEP on Video CD Player
JP2004153853A (en) * 2003-12-24 2004-05-27 Mitsubishi Electric Corp Video signal encoding/decoding apparatus and encoding/decoding method
US20100199311A1 (en) * 2009-02-05 2010-08-05 Purplecomm Inc. Meta channel caching and instant viewing related technology
CN103139636A (en) * 2011-12-05 2013-06-05 优视科技有限公司 Streaming media data processing method and device and streaming media data reproduction equipment
CN103544977A (en) * 2012-07-16 2014-01-29 三星电子(中国)研发中心 Device and method for locating videos on basis of touch control
CN104410807A (en) * 2014-11-24 2015-03-11 深圳市华宝电子科技有限公司 Method and device for synchronously replaying multi-channel video
CN104717509A (en) * 2015-03-31 2015-06-17 北京奇艺世纪科技有限公司 Method and device for decoding video
US20170318323A1 (en) * 2016-04-29 2017-11-02 Mediatek Singapore Pte. Ltd. Video playback method and control terminal thereof
US9984653B1 (en) * 2015-02-11 2018-05-29 Synaptics Incorporated Method and device for reducing video latency
CN111372117A (en) * 2018-12-25 2020-07-03 浙江大华技术股份有限公司 Video playing method and device, electronic equipment and storage medium
CN112019880A (en) * 2020-10-30 2020-12-01 南斗六星系统集成有限公司 Video file splicing method with any frame rate
CN113038222A (en) * 2021-03-08 2021-06-25 Oppo广东移动通信有限公司 Video processing method and device, electronic equipment and storage medium
CN113395592A (en) * 2020-11-18 2021-09-14 腾讯科技(北京)有限公司 Video playing control method, device, equipment and computer storage medium

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR980004675A (en) * 1996-06-19 1998-03-30 김주용 How to Play STEP on Video CD Player
JP2004153853A (en) * 2003-12-24 2004-05-27 Mitsubishi Electric Corp Video signal encoding/decoding apparatus and encoding/decoding method
US20100199311A1 (en) * 2009-02-05 2010-08-05 Purplecomm Inc. Meta channel caching and instant viewing related technology
CN103139636A (en) * 2011-12-05 2013-06-05 优视科技有限公司 Streaming media data processing method and device and streaming media data reproduction equipment
CN103544977A (en) * 2012-07-16 2014-01-29 三星电子(中国)研发中心 Device and method for locating videos on basis of touch control
CN104410807A (en) * 2014-11-24 2015-03-11 深圳市华宝电子科技有限公司 Method and device for synchronously replaying multi-channel video
US9984653B1 (en) * 2015-02-11 2018-05-29 Synaptics Incorporated Method and device for reducing video latency
CN104717509A (en) * 2015-03-31 2015-06-17 北京奇艺世纪科技有限公司 Method and device for decoding video
US20170318323A1 (en) * 2016-04-29 2017-11-02 Mediatek Singapore Pte. Ltd. Video playback method and control terminal thereof
CN111372117A (en) * 2018-12-25 2020-07-03 浙江大华技术股份有限公司 Video playing method and device, electronic equipment and storage medium
CN112019880A (en) * 2020-10-30 2020-12-01 南斗六星系统集成有限公司 Video file splicing method with any frame rate
CN113395592A (en) * 2020-11-18 2021-09-14 腾讯科技(北京)有限公司 Video playing control method, device, equipment and computer storage medium
CN113038222A (en) * 2021-03-08 2021-06-25 Oppo广东移动通信有限公司 Video processing method and device, electronic equipment and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
CHIE DOU ET AL.: "Performance Comparisons of Frame Dropping Algorithms for DVS in Battery-Aware Low-Power Video Decoding", 《2012 SPRING CONGRESS ON ENGINEERING AND TECHNOLOGY》, pages 1 - 6 *
武其达等: "结合帧率变换与HEVC标准的新型视频压缩编码算法", 《自动化学报》, no. 9, pages 1626 - 1636 *
荆晶: "无线视频监控中的帧率控制设计与实现", 《中国优秀硕士学位论文全文数据库 (信息科技辑)》, no. 5 *

Also Published As

Publication number Publication date
CN114390343B (en) 2024-06-14

Similar Documents

Publication Publication Date Title
CN107018370B (en) Display method and system for video wall
US11889132B2 (en) Method and apparatus for implementing multi-person video live-streaming service, and computer device
US8259123B2 (en) Image processing apparatus
JP2020507244A (en) Image smoothness improving method and apparatus
US20220188357A1 (en) Video generating method and device
CN106331877A (en) Bullet screen playing method and device
US20140092109A1 (en) Computer system and method for gpu driver-generated interpolated frames
CN105007532B (en) A kind of method and apparatus of animation play
US10878530B2 (en) Display method and display device
US8837912B2 (en) Information processing apparatus, information processing method and program
US10484690B2 (en) Adaptive batch encoding for slow motion video recording
WO2013182011A1 (en) Method and system of playing real time online video at variable speed
CN113225619A (en) Frame rate self-adaption method, device, equipment and readable storage medium
US20150301585A1 (en) Data processing method, data processing apparatus, and storage medium
CN112804410A (en) Multi-display-screen synchronous display method and device, video processing equipment and storage medium
US9380189B2 (en) Method of providing information configuration function in video play device and video play device
CN106940722A (en) A kind of image display method and device
CN111314777B (en) Video generation method and device, computer storage medium and electronic equipment
CN114390343B (en) Multi-video playing method and related equipment
CN112118473B (en) Video bullet screen display method and device, computer equipment and readable storage medium
US20230353700A1 (en) Processing method for board-writing display and related apparatus
CN110719493A (en) Barrage display method and device, electronic equipment and readable storage medium
CN112860214B (en) Animation display method, device, storage medium and equipment based on voice session
CN113316022B (en) Video playing method, device, equipment, system and storage medium
CN112511887A (en) Video playing control method and corresponding device, equipment, system and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 518000 Building 1901, 1902, 1903, Qianhai Kexing Science Park, Labor Community, Xixiang Street, Bao'an District, Shenzhen, Guangdong Province

Applicant after: Shenzhen Flash Scissor Intelligent Technology Co.,Ltd.

Address before: 518000 Unit 9ABCDE, Building 2, Haihong Industrial Plant Phase II, Haihong Industrial Plant, West Side of Xixiang Avenue, Labor Community, Xixiang Street, Bao'an District, Shenzhen, Guangdong

Applicant before: Shenzhen big brother Technology Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant