Video processing method and device, electronic equipment and storage medium

By loading the video preview map and using hardware information to select appropriate storage methods, hiding the preview map and loading the video frame map, the problem of black screen during live video waiting is solved, improving user experience and enhancing compatibility.

CN119211622APending Publication Date: 2024-12-27GUANGZHOU HUYA TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410927876.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-11
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

When watching live videos, users need to wait for a while before seeing the video content. A black screen may appear during the waiting period, affecting the user experience. It is difficult for the existing technology to effectively realize the transition animation of the video preview image, resulting in poor user experience.

Method used

Load the video preview image by obtaining video information, obtain playback stream information and process playback stream data, select appropriate storage methods (such as DX texture sharing or memory sharing) based on hardware information, and hide the preview image through transition effects, load the video frame image for Play to improve user experience.

Benefits of technology

By first displaying the video preview picture and transitioning to the actual video through transition effects, the user's viewing experience is improved, the black screen phenomenon during waiting is avoided, and compatibility is enhanced, and the problem of poor transition animation effect in the existing technology is solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119211622A_ABST
    Figure CN119211622A_ABST
Patent Text Reader

Abstract

The invention provides a video processing method and device, electronic equipment and a storage medium, and the method comprises the steps: loading and displaying a video preview according to the video information after the video information of a played video is obtained, and then obtaining the playing stream data of the played video according to the video information, and processing the playing stream data through hardware information of the current playing equipment, and finally hiding the video preview through a transition effect and rendering and playing the pre-stored playing stream data at the same time. Compared with the prior art, the method has the advantages that the video preview is firstly displayed, and the video preview is naturally transited to the played video through the transition effect while the played video is rendered and loaded, so that the watching experience of a user is improved; and meanwhile, the playing stream data is processed according to the hardware information of the current playing equipment, so that the compatibility of the method is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of video processing and rendering, and more specifically, to a video processing method, device, electronic equipment and storage medium. Background Art

[0002] With the continuous development of the live broadcast industry, more and more people choose to watch live videos as a form of entertainment in their daily lives. When watching live videos, when the user triggers the playback, a series of network interactions will be triggered. The stream address of the code stream is obtained according to the information of the live video, and the stream address of the corresponding code stream is linked according to the machine configuration. Then, according to the stream address, the P2P network is entered to obtain the source to obtain the corresponding streaming media data for rendering and playback. Therefore, after the playback starts, the user may need to wait for a while before watching the live video content. The waiting time may be long. If it is presented in a black screen, it may affect the user's viewing experience. Summary of the invention

[0003] The present invention aims to overcome at least one defect of the above-mentioned prior art and provide a video processing method, device, electronic device and storage medium, which are used to provide a more coherent live video processing method, device, electronic device and storage medium to enhance the user's viewing experience.

[0004] According to a first aspect of the present application, a video processing method is provided, the processing method comprising:

[0005] Obtain video information of the played video, and obtain and load a video preview image for display according to the video information;

[0006] Acquire the playback stream information of the playback video according to the video information, and acquire the playback stream data of the playback video according to the playback stream information;

[0007] Processing the playback stream data according to the hardware information of the current playback device;

[0008] Obtaining the processed playback stream data and rendering it into a corresponding video frame image;

[0009] The video preview image is hidden through a transition effect, and the video frame image is loaded to play the playback video.

[0010] In an optional implementation manner, storing the playback stream data according to the hardware information of the current playback device specifically includes:

[0011] Get the hardware information of the current playback device;

[0012] Determining a shared storage method of the playback stream data according to the hardware information;

[0013] The playback stream data is processed and then stored according to the determined shared storage method.

[0014] In an optional implementation manner, determining the shared storage mode of the playback stream data according to the hardware information specifically includes:

[0015] It is determined whether the current playback device supports DX texture sharing according to the hardware information. If so, the playback stream data is processed and stored using shared texture storage. Otherwise, the playback stream data is processed and stored using memory shared storage.

[0016] In an optional implementation manner, the adopting shared texture storage to store the playback stream data specifically includes:

[0017] The playback stream data is obtained, the playback stream data is rendered into corresponding texture data supporting cross-process rendering, and the rendered texture data is stored in a preset shared texture area in a video memory.

[0018] In an optional implementation manner, the adopting memory shared storage to store the playback stream data specifically includes:

[0019] A memory shared area is pre-set in the memory of the playback device, the playback stream data is obtained and rendered into corresponding bitmap data supporting cross-process rendering, and the rendered bitmap data is stored in the pre-set memory shared area in the memory.

[0020] In an optional implementation, the transition effect is achieved through a shader.

[0021] In an optional implementation, the processing of the playback stream data is performed by a sub-process.

[0022] According to a second aspect of the present application, a video processing device is provided, the device comprising:

[0023] An information loading module, used to obtain video information of the played video, and obtain and load a video preview image for display according to the video information;

[0024] A video acquisition module, used to acquire the playback stream information of the playback video according to the video information, and acquire the playback stream data of the playback video according to the playback stream information;

[0025] A video storage module, used for processing the playback stream data according to the hardware information of the current playback device;

[0026] A video rendering module, used to obtain the processed playback stream data and render it into a corresponding video frame image;

[0027] The video playing module is used to hide the video preview image through a transition effect and load the video frame image to play the playback video.

[0028] According to a third aspect of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores computer-readable instructions, and the processor executes the computer-readable instructions to implement a video processing method described in the first aspect above.

[0029] According to a fourth aspect of the present application, a computer storage medium is provided, on which a computer program is stored. When the computer program is executed, the video processing method described in the first aspect is implemented.

[0030] According to any one of the above aspects, the present embodiment provides a video processing method, device, electronic device and storage medium. After obtaining the video information of the playback video, first load and display the video preview image according to the video information, then obtain the playback stream data of the playback video according to the video information, store the playback stream data through the hardware information of the current playback device, and finally hide the video preview image through a transition effect while rendering and playing the pre-stored playback stream data. By first displaying the video preview image, and naturally transitioning from the video preview image to the playback video through a transition effect while rendering and loading the playback video, the user's viewing experience is improved.

[0031] Furthermore, the video processing method, device, electronic device and storage medium provided in the present embodiment store the playback stream data through DX texture sharing technology, and based on DX texture sharing, it is possible to well implement resource calling of the main process video playback, thereby avoiding various problems that may arise when the conventional main process loads stream data and renders the playback, thereby improving the compatibility of the present embodiment;

[0032] Furthermore, in order to further improve the compatibility, the video processing method, device, electronic device and storage medium provided by the present embodiment analyze the hardware information of the current playback device to determine whether the current playback device supports DX texture sharing. If not, a memory sharing area for storing the playback stream data is allocated through model texture sharing, so that the current playback device that does not support DX texture sharing can use a similar method to implement the processing and loading of the playback stream data, thereby improving the compatibility of the present embodiment; and the texture shared storage and memory shared storage are executed through a sub-process, and the sharing and rendering of the playback stream data can be implemented through cross-process between the main process that plays the video. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 A schematic diagram of an application scenario of the processing method provided in this embodiment.

[0034] Figure 2 A flowchart of the steps of the processing method provided in this embodiment.

[0035] Figure 3 This is a device structure diagram of the processing device provided in this embodiment.

[0036] Figure 4 This is a device structure diagram of the electronic device provided in this embodiment.

[0037] The accompanying drawings are marked with: server 100, terminal 200, information loading module 11, video acquisition module 12, video storage module 13, video rendering module 14, video playback module 15, memory 21, processor 22, bus 23, and communication interface 24. DETAILED DESCRIPTION

[0038] The drawings of the present invention are only for illustrative purposes and should not be construed as limiting the present invention. In order to better illustrate the following embodiments, some parts of the drawings may be omitted, enlarged or reduced, and do not represent the size of the actual product; it is understandable to those skilled in the art that some well-known structures and their descriptions in the drawings may be omitted.

[0039] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0040] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0041] With the continuous development of the live broadcast industry, more and more people choose to watch live videos as a form of entertainment in their daily lives. When people need to watch live broadcasts, they usually watch them on live video websites and applications. When users trigger playback, a series of network interactions will be triggered on the live video websites and applications. For example, the website needs to obtain various key information of the live video, such as the program list, live cover, and the stream address of the live video code stream, and then enter the P2P (peer-to-peer) network to obtain the corresponding streaming media data according to the corresponding stream address and render and play it in the playback window on the corresponding page. Therefore, after the playback starts, the user may need to wait for a while before being able to watch the content of the live video. If the user's bandwidth is low and the resolution of the live video being watched is high, such as a live video with a 4K code stream containing a high-definition video data stream with a 4K ultra-high-definition resolution (3840x2160 pixels), the waiting time will be longer. If the video is presented to the user as a black screen in the playback window during the user's waiting time, the user's viewing experience will be reduced.

[0042] In order to improve the user's viewing experience, the cover of the live video or the preview of the live video can be displayed before loading the live video. After loading the live video, the cover of the live video will be transitioned to the live video through a transition animation, so that the user can watch the live video smoothly. However, due to the limitations of the existing technology, the above constraint solution is very difficult to implement.

[0043] The existing live video playback method is to load the live video by calling DirectX at the playback window. DirectX is a set of multimedia programming interfaces, mainly used to handle tasks of games and multimedia applications. It includes a series of APIs specifically for multimedia related functions such as graphics, sound, input, network, etc. DirectX can support hardware acceleration, but it needs to occupy the entire window, resulting in the inability to use other plug-ins to achieve video or animation rendering. Since other plug-ins cannot be used for rendering, it is very difficult to achieve transition animation rendering based on itself. It is necessary to hide the playback window (sub-window), and then make additional transition animations separately to load, and then display the window. This will cause the transition animation to flicker and be fragmented, and the final presentation effect is not good, which greatly affects the user's viewing experience; and the technical solution for hiding the playback window (sub-window) involves cross-process control, which requires precise control of the time delay of window display, and the control is difficult.

[0044] This embodiment provides a technical solution that can solve the above-mentioned problem. The specific implementation methods of this application are described in detail below in conjunction with the accompanying drawings.

[0045] For example, a schematic diagram of an application scenario of a video processing method provided in an embodiment of the present application is provided. Figure 1 As shown, the application scenario includes at least a server 100 and a terminal 200 that can communicate with the server 100. The server 100 has an image processing function and can also have a data transmission function for video streams and audio streams; the terminal device 200 has a streaming media playback function and can also have an image processing function.

[0046] It is understandable that the server 100 can be an independent electronic device or a cluster of multiple electronic devices; the terminal 200 can be a smart phone terminal, a personal computer, a tablet computer, a car terminal, etc., but is not limited thereto.

[0047] In one practicable manner, the server 100 and the terminal 200 may respectively execute a video processing method provided in an embodiment of the present application, or, optionally, the video processing method provided in an embodiment of the present application is partially executed in the server 100 and partially executed in the terminal 200.

[0048] like Figure 2 As shown, this embodiment provides a video processing method, and the processing method includes:

[0049] S1: Obtain video information of the played video, and obtain and load a video preview image for display according to the video information;

[0050] In this embodiment, the played video may be a live video; the video information may include a corresponding video preview image, video name, video type and video introduction of the played video, as well as playback stream information of the played video, wherein the video preview image may be a key frame image in the played video or a preset video cover image; exemplarily, in this embodiment, if the played video is a live video, the video information may include a corresponding video preview image, live broadcast room name, live broadcast type and live broadcast introduction of the played video, as well as playback stream information of the live broadcast, wherein the video preview image may use the live broadcast room cover set by the anchor.

[0051] After obtaining the video information of the played video, the video preview image in the video information can be loaded and displayed in a playback window, so that the user can understand part of the information of the played video through the video preview image instead of directly seeing a black screen display, which can improve the user's viewing experience to a certain extent.

[0052] S2: acquiring playback stream information of the playback video according to the video information, and acquiring playback stream data of the playback video according to the playback stream information;

[0053] In this embodiment, the playback stream information includes the stream address of the playback video. The P2P data source of the playback video can be obtained through the stream address, and the playback stream data can be pulled from the P2P data source.

[0054] It should be noted that after obtaining the playback stream data, before storing the playback stream data, the playback stream data needs to be decoded.

[0055] S3: Processing the playback stream data according to the hardware information of the current playback device;

[0056] In this embodiment, step S3 may specifically include:

[0057] Acquire hardware information of the current playback device; the hardware information mainly includes graphics card information of the current playback device, which is used to determine whether the graphics card of the current playback device supports DX (DirectX) texture sharing technology according to the graphics card information;

[0058] Determining a shared storage method of the playback stream data according to the hardware information;

[0059] In this embodiment, as described above, the hardware information obtained is used to determine whether the current playback device supports DX texture sharing. If it supports DX texture sharing, shared texture storage is used to store the playback stream data. Otherwise, memory shared storage is used to store the playback stream data.

[0060] Among them, the DX texture sharing is simply to pre-demarcate a video memory area in the video memory as a shared texture area, store image and other resource data as texture data in the shared texture area, and allow the process to call the texture data stored in the shared texture area, thereby realizing the sharing of texture data; since it is an application video memory area, some older models and integrated graphics cards do not support the DX texture sharing, so it is necessary to analyze the hardware information of the current playback device to determine whether the current playback device supports the DX texture sharing, if it supports the DX texture sharing, the obtained playback stream data will be stored in the preset shared texture area in the video memory; through the DX texture sharing, cross-process rendering of the playback path data can be realized, and the playback stream data can be rendered into texture data that supports cross-process rendering, and then it can be shared to the main thread and well combined with other elements of the main thread.

[0061] For a graphics card that does not support the DX texture sharing, in order to improve compatibility and avoid DirectX compatibility issues, in this embodiment, a memory shared storage method is set to store the playback stream data. Specifically, the memory shared storage may include:

[0062] A memory sharing area is pre-set in the memory of the playback device, corresponding to the shared texture area. After the playback stream data is obtained, the playback stream data is rendered to corresponding bitmap data that supports cross-process rendering, and the bitmap data is stored in the memory sharing area; the memory shared storage method can be implemented by specific code to simulate the storage process of the shared texture storage. For graphics cards that do not support DX texture sharing technology, the obtained playback stream data is stored in the memory, which is different from the DX shared texture. At the same time, due to the incompatible texture sharing, the playback stream data is pre-rendered into corresponding bitmap data. When playback is actually needed, the bitmap data in the memory sharing area can be directly loaded for corresponding playback, thereby achieving an effect similar to DX texture sharing, and realizing cross-process rendering and sharing of the playback stream data.

[0063] S4: Obtain the processed playback stream data and render it into a corresponding video frame image;

[0064] The playback stream data processed in step S3 are all texture data or bitmap data that support cross-process rendering. When the playback stream data needs to be loaded to play the corresponding video, the playback stream data can be rendered into the corresponding video frame image through cross-process rendering and shared with the main process for playback.

[0065] S5: hiding the video preview image through a transition effect, and loading the video frame image to play the playback video.

[0066] In this embodiment, the transition effect can be set according to the video preview image to achieve the transition between the video preview image and the playback video. Exemplarily, the transition effect can be a blinds switching effect set according to the video preview image. The video preview image is hidden through the blinds switching effect, and the playback video is played during the hiding process; wherein the transition effect can be achieved through a shader, preferably, it can be achieved through HLSL (HighLevel Shader Language), and the use of HLSL shaders does not require the use of a CPU (Central Processing Unit); the transition effect is used to achieve smooth switching from the video preview image to the playback video, thereby improving the user's viewing experience.

[0067] In this embodiment, the processing of the playback stream data can be performed by a sub-process. Furthermore, the acquisition of the playback stream data and the decoding of the playback stream data can also be performed by a sub-process. Preferably, each operation of the playback stream data can be set to be performed in a rendering sub-process.

[0068] Exemplarily, in a specific implementation of this embodiment, a main process constructs a playback display page, in which information of multiple playback videos can be displayed for user selection, and a playback window can also be opened in the playback display page for playing recommended playback videos with high popularity; the main process obtains the program list of the playback display page and the recommended programs with high popularity in advance, obtains the video information of the corresponding playback video according to the program list and the programs with high popularity, obtains the hardware information of the current playback device, and determines whether the current playback device supports DX texture sharing technology according to the hardware information. If DX texture sharing is supported, the main process creates a texture sharing control, and if not, creates a memory sharing control, and the texture sharing control and the memory sharing control are used to control the specific implementation of texture sharing and memory sharing, and then creates a communication channel for sharing; at the same time, the main process loads the corresponding video preview image in each corresponding part of the playback display page according to the video information of each playback video, and loads the video preview image of the playback video with high popularity in the playback window;

[0069] Then, a rendering subprocess is created and initialized, the rendering subprocess obtains the corresponding playback stream information of the playback video according to the video information, obtains the P2P data source of the playback video according to the code stream address of the playback stream information, pulls the playback stream data of the playback video from the P2P data source, and decodes the playback stream data;

[0070] The rendering subprocess selects a rendering method for the decoded playback stream data according to the hardware information of the current playback device. If DX texture sharing is supported, the playback stream data is rendered as texture data supporting cross-process rendering, and the texture data is stored in a preset shared texture area in the video memory; if DX texture sharing is not supported, the playback stream data is rendered as bitmap data supporting cross-process rendering, and the bitmap data is stored in a preset memory shared area in the memory;

[0071] The rendering sub-process shares the texture data or the bitmap data with the main process through cross-process rendering. After the main process receives the data shared by the rendering sub-process, it draws the shared data onto the playback window according to the corresponding texture sharing control or memory sharing control. During the drawing process, the video preview image of the playback window is hidden through a shader to achieve the playback of the corresponding playback video.

[0072] In this embodiment, the content contribution of the sub-process is transferred to the main process through cross-process rendering, which can be well combined with various elements in the main process for rendering, thereby solving various compatibility issues caused by the main process constructing a sub-window for loading and rendering, and can well draw transition effects through shaders that do not occupy the CPU, thereby smoothly realizing the transition of the playing video and improving the user's viewing experience.

[0073] Based on the same inventive concept, this embodiment further provides a video processing device, the processing device comprising:

[0074] The information loading module 11 is used to obtain the video information of the played video, and obtain and load the video preview image for display according to the video information;

[0075] In this embodiment, the information loading module 11 can be used to execute Figure 2 As shown in step S1, for the detailed description of the information loading module 11, reference may be made to the description of step S1.

[0076] The video acquisition module 12 is used to acquire the playback stream information of the playback video according to the video information, and acquire the playback stream data of the playback video according to the playback stream information;

[0077] In this embodiment, the video acquisition module 12 can be used to perform Figure 2 As shown in step S2, for the specific description of the video acquisition module 12, reference may be made to the description of step S2.

[0078] The video storage module 13 is used to process the playback stream data according to the hardware information of the current playback device;

[0079] In this embodiment, the video storage module 13 can be used to execute Figure 2 As shown in step S3, for the specific description of the video storage module 13, reference may be made to the description of step S3.

[0080] A video rendering module 14 is used to obtain the processed playback stream data and render it into a corresponding video frame image;

[0081] In this embodiment, the video rendering module 14 can be used to perform Figure 2As shown in step S4, for the specific description of the video storage module 14, reference may be made to the description of step S4.

[0082] The video playing module 15 is used to hide the video preview image through a transition effect, and load the video frame image to play the playback video.

[0083] In this embodiment, the video playback module 15 can be used to perform Figure 2 As shown in step S5, for the specific description of the video playing module 15, reference may be made to the description of step S5.

[0084] Based on the same inventive concept, this embodiment also provides an electronic device, Figure 4 The structure diagram of the electronic device of this embodiment is shown, which includes a memory 21 and a processor 22. The memory 21 stores computer-readable instructions, and the processor 22 executes the computer-readable instructions to implement the video processing method of this embodiment.

[0085] Preferably, the electronic device further includes a bus 23 and a communication interface 24 , and the processor 22 , the communication interface 24 and the memory 21 are connected via the bus 23 .

[0086] The memory 21 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 24 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 23 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus 23 may be divided into an address bus, a data bus, a control bus, etc. (not fully drawn in the figure).

[0087] The processor 22 may be an integrated circuit chip with signal processing capability. In the specific implementation process, each step in the above method embodiment may be completed by the hardware integrated logic circuit or software instructions in the processor 22. The above processor 22 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, which may implement or execute the methods, steps, and logic diagrams disclosed in the embodiments of the present invention. The general-purpose processor may be a microprocessor or the processor 22 may also be any conventional processor 22, etc. The steps of the method disclosed in conjunction with the embodiments of the present invention may be directly embodied as being executed by a hardware decoding processor, or may be executed by a combination of hardware and software modules in a decoding processor. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 21, and the processor 22 reads the information in the memory 21 and completes the steps of the method of the above embodiment in combination with its hardware.

[0088] An embodiment of the present invention further provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by the processor 22, the computer-executable instructions prompt the processor 22 to implement a video processing method described above. The specific implementation can be found in the embodiment, which will not be repeated here.

[0089] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.

[0090] In a specific implementation of this embodiment, information of multiple playback videos is usually displayed in a playback display page for users to choose from, and a playback window can also be opened in the playback display page to play recommended playback videos with higher popularity; therefore, before step S1, it is necessary to obtain the program list of the playback display page and the recommended videos with higher popularity in advance.

[0091] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the technical solution of the present invention, and are not intended to limit the specific implementation methods of the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the claims of the present invention shall be included in the protection scope of the claims of the present invention.

Claims

1. A video processing method, characterized in that: The processing method comprises: Obtain video information of the played video, and obtain and load a video preview image for display according to the video information; Acquire the playback stream information of the playback video according to the video information, and acquire the playback stream data of the playback video according to the playback stream information; Processing the playback stream data according to the hardware information of the current playback device; Obtaining the processed playback stream data and rendering it into a corresponding video frame image; The video preview image is hidden through a transition effect, and the video frame image is loaded to play the playback video.

2. A video processing method according to claim 1, characterized in that: The processing of the playback stream data according to the hardware information of the current playback device specifically includes: Get the hardware information of the current playback device; Determining a shared storage method of the playback stream data according to the hardware information; The playback stream data is processed and then stored according to the determined shared storage method.

3. A video processing method according to claim 2, characterized in that: The determining the shared storage mode of the playback stream data according to the hardware information specifically includes: It is determined whether the current playback device supports DX texture sharing according to the hardware information. If so, the playback stream data is processed and stored using shared texture storage. Otherwise, the playback stream data is processed and stored using memory shared storage.

4. A video processing method according to claim 3, characterized in that: The adopting shared texture storage to process and store the playback stream data specifically includes: The playback stream data is obtained, the playback stream data is rendered into corresponding texture data that supports cross-process rendering, and the rendered texture data is stored in a preset shared texture area in a video memory.

5. A video processing method according to claim 3, characterized in that: The adopting memory shared storage to store the playback stream data specifically includes: A memory sharing area is pre-set in the memory of the playback device, the playback stream data is obtained and rendered into corresponding bitmap data supporting cross-process sharing, and the rendered bitmap data is stored in the pre-set memory sharing area in the memory.

6. A video processing method according to any one of claims 1 to 5, characterized in that: The transition effect is achieved through a shader.

7. A video processing method according to any one of claims 1 to 5, characterized in that: The processing of the playback stream data is performed by a sub-process.

8. A video processing device, characterized in that: The device comprises: An information loading module, used to obtain video information of the played video, and obtain and load a video preview image for display according to the video information; A video acquisition module, used to acquire the playback stream information of the playback video according to the video information, and acquire the playback stream data of the playback video according to the playback stream information; A video storage module, used for processing the playback stream data according to the hardware information of the current playback device; A video rendering module, used to obtain the processed playback stream data and render it into a corresponding video frame image; The video playing module is used to hide the video preview image through a transition effect and load the video frame image to play the playback video.

9. An electronic device, comprising a memory and a processor, characterized in that: The memory stores computer-readable instructions, and the processor executes the computer-readable instructions to implement a video processing method as described in any one of claims 1 to 7.

10. A computer storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed, a video processing method as described in any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Game event live broadcast data processing method and device, storage medium and computer equipment

    CN121397255A