Ultra-high-definition multimedia playing method and device, computer device and storage medium
By adding playback plugins and optimizing buffering and rendering processes in multimedia playback devices, the problem of unclear multimedia video quality was solved, achieving efficient video decoding and playback.
Patent Information
- Application Number
- CN202310851284.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-11
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2043-07-11
AI Technical Summary
Existing multimedia video decoding methods result in unclear video quality and low decoding efficiency, failing to meet users' demands for high definition and low latency.
Playback plugins are added by pre-setting loading rules, initial decoding and buffering are performed, buffer paths are optimized using GPU and CPU buffer identifiers, and rendering is performed by combining three-layer texture objects and shader modules, with rendering and buffering resources allocated reasonably.
It improves the clarity and playback quality of video files, reduces latency and jitter, and enhances the user's viewing experience.
Smart Images

Figure CN116847150B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of Internet technology, and in particular to an ultra-high-definition multimedia playback method, device, computer equipment, and storage medium. Background Technology
[0002] With the rapid development of computer technology, multimedia technology based on computer technology has been widely applied and permeated into all aspects of social life. People have developed decoding methods for multimedia video playback. At the same time, people have increasingly higher requirements for the quality of current video playback effects. Current video playback methods, after decoding and rendering the target video, will have various problems such as blurry playback, delay, and jitter, which will greatly reduce the viewing experience for users. Moreover, the decoding time efficiency is too low and cannot meet the daily playback needs of users. For multimedia playback, improving the overall clarity and frame rate of the video has become an urgent need for users. Existing multimedia video decoding methods have a high probability of low clarity and playback delay, and they basically use multiple decoding modules or decoding elements to decode the video, resulting in low decoding efficiency and low video rendering level. Therefore, existing technologies for decoding multimedia videos still have the problem of unclear video quality after playback. Summary of the Invention
[0003] This invention provides an ultra-high-definition multimedia playback method, apparatus, computer device, and storage medium, aiming to solve the problem of unclear video quality after decoding multimedia videos in the prior art.
[0004] In a first aspect, embodiments of the present invention provide an ultra-high-definition multimedia playback method, the method being applied to a multimedia playback device, the method comprising:
[0005] Receive playback instructions input by the user and obtain the video file corresponding to the playback instructions;
[0006] According to the preset loading rules, add a playback plugin corresponding to the file type of the video file to the video file to obtain the file to be cached;
[0007] The file to be cached is initially decoded according to the preset decoding rules and the file type of the file to be cached, so as to obtain the file to be cached with the decoding identifier;
[0008] The buffered video file is obtained by buffering the file to be buffered according to the buffering rules corresponding to the playback plugin in the file to be buffered.
[0009] Record the generation time of the buffered video file and render it according to the file type of the buffered video file to obtain the rendered video decoded file;
[0010] The rendered video decoded file is played according to the generation time.
[0011] The ultra-high-definition multimedia playback method, wherein adding a playback plugin corresponding to the file type of the video file according to a preset loading rule to obtain a file to be cached includes:
[0012] The file type of the video file is determined according to preset loading rules;
[0013] The corresponding playback plugin is assigned according to the determined file type and added to the video file to obtain the file to be cached.
[0014] The ultra-high-definition multimedia playback method, wherein after determining the file type of the video file according to preset loading rules, further includes:
[0015] Determine whether a playback plugin corresponding to the determined file type exists in the video file;
[0016] If the video file does not have a corresponding playback plugin, perform the step of allocating the corresponding playback plugin according to the determined file type and adding it to the video file;
[0017] If a corresponding playback plugin exists in the video file, the video file will be used as a file to be cached.
[0018] The ultra-high-definition multimedia playback method, wherein the initial decoding of the file to be buffered according to preset decoding rules and the file type of the file to be buffered to obtain a file to be buffered with a decoding identifier, includes:
[0019] Generate a corresponding decoding identifier for the current file to be buffered based on the preset decoding rules and the file itself;
[0020] The file to be buffered is decoded according to the decoding identifier to obtain a file to be buffered with the decoding identifier.
[0021] The ultra-high-definition multimedia playback method, wherein the buffering process is performed on the file to be buffered according to the buffering rules corresponding to the playback plugin in the file to be buffered, to obtain a corresponding buffered video file, includes:
[0022] The buffer path of the file to be buffered is determined according to the buffering rule corresponding to the playback plugin. The buffer path includes a GPU buffer identifier and a separate CPU buffer identifier.
[0023] Determine whether the file to be buffered recognizes the GPU buffer identifier in the buffer path;
[0024] If the file to be buffered recognizes the GPU buffer identifier, then a buffered video file is obtained by buffering it through the first buffer threshold corresponding to the GPU buffer identifier;
[0025] If the file to be buffered does not recognize the GPU buffer threshold, then a buffered video file is obtained by buffering it using the second buffer threshold corresponding to the CPU buffer identifier.
[0026] The ultra-high-definition multimedia playback method, wherein recording the generation time of the buffered video file and rendering it according to the file type of the buffered video file to obtain the rendered video decoded file includes:
[0027] Obtain the target texture object that matches the file type of the buffered video file from the three-layer texture object set in the decoding rules;
[0028] The generation time of the target texture object is determined based on the generation time of the buffered video file;
[0029] The target texture object is combined with the buffered video file to obtain a buffered video file containing the target texture object;
[0030] The buffered video file containing the target texture object is rendered to obtain the rendered video decoded file.
[0031] The ultra-high-definition multimedia playback method, wherein rendering the buffered video file containing the target texture object to obtain the rendered video decoded file includes:
[0032] Obtain the shader module corresponding to the file type of the buffered video file;
[0033] The shader module is used to accelerate the rendering of the buffered video file, resulting in a rendered video decoded file.
[0034] Secondly, embodiments of this application also disclose an ultra-high-definition multimedia playback device, wherein the device is configured in a multimedia playback device, and the device includes:
[0035] An information acquisition unit is used to receive a playback command input by the user and acquire a video file corresponding to the playback command;
[0036] The playback plugin unit is used to add a playback plugin corresponding to the file type of the video file according to a preset loading rule, so as to obtain a file to be cached.
[0037] The video decoding unit is used to perform initial decoding on the file to be buffered according to the preset decoding rules and the file type of the file to be buffered, so as to obtain the file to be buffered with a decoding identifier;
[0038] The video buffer unit is used to buffer the file to be buffered according to the buffering rules corresponding to the playback plugin in the file to be buffered, so as to obtain the corresponding buffered video file.
[0039] The rendering unit is used to record the generation time of the buffered video file and render it according to the file type of the buffered video file to obtain the rendered video decoded file.
[0040] The video playback unit plays the rendered video decoded file according to the generation time.
[0041] Thirdly, a computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the ultra-high-definition multimedia playback method described in the first aspect.
[0042] Fourthly, a computer-readable storage medium stores a computer program that, when executed by a processor, implements the ultra-high-definition multimedia playback method described in the first aspect.
[0043] Compared with the prior art, the present invention has the following advantages:
[0044] This invention provides an ultra-high-definition multimedia playback method, apparatus, computer device, and storage medium. By adding playback plugins to video files with user playback instructions using preset loading rules, a cacheable file is obtained. Each playback plugin corresponds to a file type. The cacheable file with the corresponding playback plugin is initially decoded to obtain a decoding identifier. Then, the cacheable file with the decoding identifier is buffered to obtain the corresponding buffered video file. By rationally allocating playback plugins and decoding identifiers to video files and performing initial buffering for different file types, lossless decoding of each video file is ensured, eliminating the need for repeated decoding and saving video file decoding and loading time, thus improving the clarity of the video file.
[0045] In addition, the buffering process is performed on the file to be buffered according to the buffering rules corresponding to the playback plugin in the file to be buffered, to obtain the corresponding buffered video file. The generation time of the buffered video file is recorded and rendered according to the file type of the buffered video file to obtain the rendered video decoded file. The rendered video decoded file is played according to the generation time. This setting method reasonably allocates rendering and buffering channels according to the generation time of the buffered video file, reduces the rendering and buffering time, and thus improves the overall playback quality of the video file. Attached Figure Description
[0046] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0047] Figure 1 This is a flowchart of the steps in the ultra-high-definition multimedia playback method provided in an embodiment of the present invention;
[0048] Figure 2 The flowchart shows the sub-steps of the ultra-high-definition multimedia playback method provided in the embodiments of the present invention.
[0049] Figure 3 This is an overall judgment and execution flowchart for an ultra-high-definition multimedia playback method provided in an embodiment of the present invention;
[0050] Figure 4 This is a flowchart illustrating the buffering and rendering execution process of an ultra-high-definition multimedia playback method provided in an embodiment of the present invention.
[0051] Figure 5 This is a schematic block diagram of an ultra-high-definition multimedia playback device provided in an embodiment of the present invention;
[0052] Figure 6 A schematic block diagram of a computer device provided in an embodiment of the present invention;
[0053] Figure 7 Image quality comparison diagrams for an ultra-high-definition multimedia playback device provided in an embodiment of the present invention;
[0054] Figure 8 A comparison diagram of multimedia formats for an ultra-high-definition multimedia playback device provided in an embodiment of the present invention. Detailed Implementation
[0055] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0056] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0057] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0058] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0059] Please see Figure 1 As shown in the figure, this method for ultra-high-definition multimedia playback is applied to a multimedia playback device. The method is executed by application software installed on the multimedia playback device, which can be a multimedia playback terminal or a computer server. The multimedia playback device is used to execute the ultra-high-definition multimedia playback method to decode, buffer, and render the target video file. The first embodiment of this invention provides an ultra-high-definition multimedia playback method as follows: Figure 1 As shown, the method includes steps S110 to S160.
[0060] S110. Receive the playback command input by the user and obtain the video file corresponding to the playback command.
[0061] In this embodiment, the video file to be opened is determined based on the user's input playback command. The specific types of video files include NDV, MKV, MP4, and other video formats. The video file corresponding to the user's input playback command is then opened.
[0062] S120. Add a playback plugin corresponding to the file type of the video file to the video file according to the preset loading rules to obtain the file to be cached.
[0063] The system determines and detects the video file corresponding to the current user playback command. If a specified plugin is detected in the video file, the specified plugin is used for loading. If the specified plugin does not exist, the plugin recommended by the playback system is used for playback. In one embodiment, if the video file is specified to be loaded via the Xunlei playback plugin, that plugin is used; otherwise, the playback plugin built into the computer system is used for loading.
[0064] In one embodiment, step S120 further includes the following steps: determining the file type of the video file according to preset loading rules; allocating a corresponding playback plugin according to the determined file type and adding it to the video file to obtain a file to be cached.
[0065] Specifically, the file type of the video file is detected according to a preset loading rule to obtain the file type of the current video file. In one embodiment, the loading rule is a computer detection software. While the file is being detected, the user can observe the file type of the current video file in real time on the computer's monitor.
[0066] Specifically, a corresponding playback plugin is assigned based on the determined file type, the playback plugin is added to the video file, and the currently recommended playback plugin is called to adapt to the current video file.
[0067] In one specific embodiment, after determining the file type of the video file according to the preset loading rules, the method further includes: determining whether there is a playback plugin in the video file that corresponds to the determined file type; if there is no corresponding playback plugin in the video file, performing the step of allocating the corresponding playback plugin according to the determined file type and adding it to the video file.
[0068] Specifically, the computer determines whether a playback plugin corresponding to the file type exists in the current video file. If not, the corresponding playback plugin is reassigned and added to the corresponding video file (repeating the above-described plugin assignment steps). In this embodiment, the above steps are essentially for detecting the current file type.
[0069] If a corresponding playback plugin exists in the video file, the video file will be used as a file to be cached.
[0070] Specifically, the computer determines whether the video file has a corresponding playback plugin, and then uses the video file as a file to be buffered. In one embodiment, this step is used to determine the file type that needs to be buffered and send the file to the video buffering unit for buffering.
[0071] S130. Perform initial decoding on the file to be cached according to the preset decoding rules and the file type of the file to be cached, so as to obtain the file to be cached with a decoding identifier.
[0072] The file to be buffered is initially decoded according to preset decoding rules and the file type of the file to be buffered, to obtain a file to be buffered with a decoding identifier. In one embodiment, the file type is specifically a video format that a computer can decode or encapsulate, including: MPEG format, AVI format, MOV format, WMV format, 3GP format, RMVB format, FLV format, H264 format, and H265 format. The specific meaning and initial decoding process include: registering the video decoding component, and then sequentially opening the target video file, obtaining video file information, finding the current video decoder and opening the decoder, inputting the file and reading each frame of compressed data, decoding each frame of compressed data, closing the decoder, and closing the target video file. The specific purpose of the decoding identifier is to identify the file to be buffered, facilitating the initial decoding according to the decoding rules.
[0073] Step S130 also includes the following related steps:
[0074] Based on the preset decoding rules and the file, a corresponding decoding identifier is generated for the current file to be buffered.
[0075] Specifically, a decoding identifier is generated based on preset decoding rules and the file. Each decoding identifier corresponds to the file type of the buffer file, and the decoding identifier for each file to be buffered is different. Generating a specific file identifier facilitates subsequent decoding of the buffer file.
[0076] The file to be buffered is decoded according to the decoding identifier to obtain a file to be buffered with the decoding identifier.
[0077] Specifically, the user uses the computer's pre-installed decoding software to decode the buffered file with the decoding identifier. The decoding software is configured with decoding rules, prioritizing the use of D3D objects (Direct3D programs) and the computer's built-in GPU objects (computer's built-in graphics card) to decode the buffered file with the decoding identifier. If the buffered file supports hardware acceleration, the GPU object (computer's built-in graphics card) is used to decode the file. If the buffered file does not support GPU decoding, the computer's CPU (Central Processing Unit) is used to decode it separately, thus obtaining the buffered file with the decoding identifier.
[0078] S140. Buffer the file to be buffered according to the buffering rules corresponding to the playback plugin in the file to be buffered, and obtain the corresponding buffered video file.
[0079] The buffering process is performed on the file to be buffered according to the buffering rules corresponding to the playback plugin in the file to be buffered, to obtain the corresponding buffered video file. In one embodiment, the buffering rule is an execution rule for buffering video, and the specific implementation process is an execution process of adding all video frames preloaded from the video data to the memory reserved area (or buffer). The buffering process includes: buffering the video file.
[0080] This step also includes the following related steps:
[0081] The buffer path of the file to be buffered is determined according to the buffering rule corresponding to the playback plugin. The buffer path includes a GPU buffer identifier and a separate CPU buffer identifier.
[0082] Specifically, if the buffering path of the current file to be buffered is determined according to the buffering rules corresponding to the playback plugin of the current video file, and the buffering path contains a GPU buffer identifier and a CPU buffer identifier, the computer uses the buffering rules to determine the path that the file to be buffered needs to traverse, and uses either a GPU (computer's built-in graphics card) or a CPU (computer's central processing unit) to buffer the current file.
[0083] Determine whether the file to be buffered recognizes the GPU buffer identifier in the buffer path.
[0084] If the file to be buffered recognizes the GPU buffer identifier, then a buffered video file is obtained by buffering it through the first buffer threshold corresponding to the GPU buffer identifier;
[0085] Specifically, the computer determines whether the buffered file has a GPU buffer identifier for the buffer path based on buffering rules. If a GPU buffer identifier exists, the file to be cached with the GPU buffer identifier is buffered according to the first buffer threshold to obtain a buffered video file. In this setting, the computer uses either a GPU buffer path or a CPU buffer path with an identifier during the buffering process to perform bidirectional buffering operations on the file to be cached simultaneously, without taking up extra time from the user, making full use of the computer's hardware resources, and thus further improving the efficiency of the computer in buffering the entire file to be cached.
[0086] If the file to be buffered does not recognize the GPU buffer threshold, then a buffered video file is obtained by buffering it using the second buffer threshold corresponding to the CPU buffer identifier.
[0087] Specifically, the computer determines whether the file to be buffered recognizes the GPU buffer identifier of the buffer path based on buffering rules. If no GPU buffer identifier exists, the file to be buffered with the GPU buffer identifier is buffered according to the first buffer threshold, resulting in a buffered video file. This setup allows the computer to perform bidirectional buffering operations on the file to be buffered simultaneously using either a GPU buffer path or a CPU buffer path with an identifier during the buffering process. This avoids consuming unnecessary user time, fully utilizes the computer's hardware resources, and further improves the overall efficiency of buffering the file to be buffered.
[0088] For further details, please refer to Figure 3 As shown in the figure, in one embodiment, after recognizing the user's action of opening a target file, the system begins to detect the file type. Based on the file type of the target file opened by the user, it determines whether a configuration source needs to be configured. If a file source is configured, the target file with the file source is loaded. If the system determines that the target file does not have a configuration source, it returns to the previous step and reconfigures a file source. If a video file with a file source exists, it proceeds to the next step to determine whether the target file is loaded successfully. If the target file is loaded successfully, a decoder adapted to the target file type is configured, and a preset decoder is loaded. If the video file does not have a decoder configured, it returns to the previous step and reconfigures a decoder. The video file with the decoder is initialized and decoded, and then buffering, rendering, and other operations are performed in sequence to finally obtain the rendered video file. This setting method improves the overall smoothness of the user's video playback and enhances the overall image quality and clarity of the video file.
[0089] S150. Record the generation time of the buffered video file and render it according to the file type of the buffered video file to obtain the rendered video decoded file.
[0090] The generation time of the buffered video file is recorded, and the video file is rendered according to its file type to obtain the rendered video decoded file.
[0091] This step also includes the following steps S151-S154.
[0092] S151. Obtain the target texture object that matches the file type of the buffered video file from the three-layer texture object set in the decoding rules.
[0093] Specifically, the computer obtains a target texture object matching the file type of the buffered video file from the three-layer texture objects of the decoding rules. In one embodiment, the texture object includes an RGB packing method, where the RGB packing format is a single texture buffer mode, using a single texture object for texture rendering; NV12 is a planar texture packing format, which can use two texture objects for texture rendering; and YUV420 is another planar texture packing format, which can use three texture objects for texture rendering. This setting method obtains a target texture object matching the file type of the buffered video file from the three-layer texture objects, and performs texture rendering on multiple file types simultaneously, improving the layer rendering efficiency of texture rendering. It can perform texture rendering on multiple videos of different file types simultaneously, improving the overall rendering efficiency of the buffered video. It fully utilizes the preset decoding rules to render the current video file, thereby improving the overall playback resolution of the video and reducing playback problems caused by unclear video quality.
[0094] S152. Determine the generation time of the target texture object based on the generation time of the buffered video file.
[0095] Specifically, the computer determines the generation time of the current target texture object by the generation time of the buffered video. In one embodiment, the generation time of the current target texture object is the end time of the current buffered video. When the buffered video finishes buffering, the buffered file generated after buffering is rendered. The buffering duration of this process is the target texture generation time node. The specific time node is used to determine whether the buffered video file has finished buffering.
[0096] S153. Combine the target texture object with the buffered video file to obtain a buffered video file containing the target texture object.
[0097] Specifically, the target texture object is combined with the buffered video file to obtain a buffered video file containing the target texture object. In one embodiment, the target texture object is integrated into a buffered video file of a corresponding type. Please refer to [link to relevant documentation]. Figure 3As shown in the figure, the video file is rendered by setting the renderer. For example, if a single-layer texture buffer is used, a buffered video file with RGB texture format is generated; if a two-layer texture buffer is used, a buffered video file with NV12 texture format is generated; and if a three-layer texture buffer is used, a buffered video file with YUV42 texture format is generated. This method generates buffered video files corresponding to the texture formats. By obtaining the target texture object matching the file type of the buffered video file from the three-layer texture object, and simultaneously performing texture rendering on multiple file types, the layer rendering efficiency of texture rendering is improved. This allows for texture rendering of multiple videos of different file types simultaneously, improving the overall rendering efficiency of the buffered video. It also fully utilizes preset decoding rules to render the current video file, thereby improving the overall playback resolution of the video and reducing playback problems caused by unclear image quality.
[0098] S154. Render the buffered video file containing the target texture object to obtain the rendered video decoded file.
[0099] In one embodiment, a buffered video file containing a target texture object is rendered to obtain a rendered video decoded file. The rendered video file is then rendered by a pre-installed rendering module on the computer, which in turn renders the buffered video file containing the target texture object to obtain a corresponding video decoded file for the texture object. For example, if a single-layer texture buffer is used, a buffered video file with RGB texture format is generated; if a two-layer texture buffer is used, a buffered video file with NV12 texture format is generated; and if a three-layer texture buffer is used, a buffered video file with YUV42 texture format is generated. This method generates buffered video files corresponding to the texture formats. By obtaining a target texture object matching the file type of the buffered video file from the three-layer texture object, and simultaneously performing texture rendering on multiple file types, the layer rendering efficiency of texture rendering is improved. This allows for simultaneous texture rendering of multiple videos with different file types, improving the overall rendering efficiency of the buffered video. By fully utilizing the pre-installed decoding rules to render the current video file, the overall playback resolution of the video is improved, reducing playback problems caused by unclear video quality.
[0100] Step S154 specifically includes the following steps: obtaining a shader module corresponding to the file type of the buffered video file; accelerating the rendering of the buffered video file according to the shader module to obtain the rendered video decoded file.
[0101] In one embodiment, a pre-installed shader module on the computer accelerates the rendering of the buffered video file to obtain a rendered video decoded file. For example, when using a D3D object (Direct3D program) to accelerate the rendering of the current buffered video object, and using the same video display format as an RGB texture object, the shader module performs conversion to obtain a video file with the RGB texture object as the target color. This setting can accelerate rendering. The video and the display device have the same frame rate, and graphics card rendering is generally aligned using vertical synchronization. Determining the start point of the video by obtaining the graphics card synchronization time can maximize the use of CPU (Central Processing Unit) resources, resulting in smoother video effects and improved overall video playback quality, thereby enhancing the user's overall viewing experience.
[0102] S160. Play the rendered video decoded file according to the generation time.
[0103] Specifically, the computer determines the generation time of the current target texture object by the generation time of the buffered video. In one embodiment, the generation time of the current target texture object is the end time of the current buffered video. When the buffered video finishes buffering, the buffered file generated after buffering is rendered. The buffering duration of this process is the target texture generation time node. The time node can be used to determine whether the buffered video file has finished buffering, thereby further determining the generation time to play the rendered video decoded file. At this time, the overall playback process of the video file is completed. This setting method distinguishes the generation time nodes after each video rendering, thereby enabling efficient playback of different format files in real time. After a series of processes including loading, initial decoding, buffering, and rendering, the rendered video decoded file is finally generated.
[0104] Specifically, uneven display of frames during video playback leads to poor viewing experience. Video jitter is divided into two types: one is image shaking and tearing; the other is time jitter, which manifests as a momentary fluctuation in frame rate. This refers to the operation of each frame's display cycle. The starting point for presenting the first frame is crucial. The frame rate of the display and the video must be in a multiple relationship, with each frame displaying one or more display refresh cycles. For example, if the display is 60 frames per second, then after the first frame is buffered, the starting point must be at least two refresh cycles later and aligned with the refresh cycle. The video file is rendered simultaneously using both the CPU and GPU at full capacity. If either the CPU or GPU becomes idle, the mode is switched, rendering the video with the corresponding CPU or GPU identifier. This method effectively solves the problems of resolution and clarity issues in multimedia playback, preventing image jitter and clarity jitter, thus effectively addressing issues such as unclear image quality and jitter during current multimedia playback.
[0105] Furthermore, such as Figure 4 As shown, buffering and rendering are performed by multiple modules. By reasonably allocating the CPU and GPU's running memory space, and through the collaborative work of multiple modules, the final video file is obtained. In one embodiment, when performing a buffering decoding task, the Readpacket module starts running first, and the buffering process begins, in sequence: Shader conversion module, FillBuffer buffer module, and finally output rendered video file. If the video file to be back-rendered has not been rendered, it is reallocated to the WaitFrame module. At this time, the WaitFrame module performs the rendering task, and sequentially performs rendering from the UpdateText update module and the Draw rendering module to obtain the final rendered video file. When the computer detects the video file rendered from Draw through a preset video detection device, if it detects that the buffered video file has not been rendered, it is sent to the WaitFrame module for re-rendering until the buffered file is successfully rendered.
[0106] This invention also provides an ultra-high-definition multimedia playback device, which can be configured in a server. The server simultaneously establishes network connections with both the user and the server to achieve data transmission. This ultra-high-definition multimedia playback device is used to execute any embodiment of the ultra-high-definition multimedia playback method. Specifically, please refer to... Figure 5 , Figure 5 This is a schematic block diagram of an ultra-high-definition multimedia playback device provided in an embodiment of the present invention. The ultra-high-definition multimedia playback device 100 is configured in a multimedia playback device and includes:
[0107] The information acquisition unit 110 is used to receive a playback command input by the user and acquire the video file corresponding to the playback command;
[0108] The playback plugin unit 120 is used to add a playback plugin corresponding to the file type of the video file to the video file according to the preset loading rules, so as to obtain the file to be cached.
[0109] The video decoding unit 130 is used to perform initial decoding on the file to be buffered according to the preset decoding rules and the file type of the file to be buffered, so as to obtain the file to be buffered with a decoding identifier;
[0110] The video buffer unit 140 is used to buffer the file to be buffered according to the buffering rules corresponding to the playback plugin in the file to be buffered, so as to obtain the corresponding buffered video file.
[0111] The rendering unit 150 is used to record the generation time of the buffered video file and render it according to the file type of the buffered video file to obtain the rendered video decoded file.
[0112] The video playback unit 160 plays the rendered video decoded file according to the generation time.
[0113] Specifically, the ultra-high-definition multimedia playback device provided in this embodiment of the invention is applied to the aforementioned ultra-high-definition multimedia playback method. The method includes: first, receiving a playback command input by a user and obtaining a video file corresponding to the playback command; second, adding a playback plugin corresponding to the file type of the video file according to a preset loading rule to generate a file to be cached; third, performing initial decoding on the file to be cached according to a preset decoding rule and the file type of the file to be cached to obtain a file to be cached with a decoding identifier; fourth, performing buffering processing on the file to be cached according to the buffering rule corresponding to the playback plugin in the file to be cached to obtain a corresponding buffered video file; fifth, recording the generation time of the buffered video file and rendering it according to the file type of the buffered video file to obtain a rendered video decoded file; and sixth, playing the rendered video decoded file according to the generation time. The video decoded file obtained through the above method is sent to the user's display device and opened simultaneously for smooth playback, improving the overall smoothness of the user's movie playback, enhancing the overall image quality of the video file, and further improving the user's viewing experience.
[0114] Furthermore, when detecting file types, an appropriate file loading method is selected. To accelerate video buffering, a separate d3d object and a GPU object are used for decoding and buffering. If the target video supports hardware acceleration, GPU decoding is used; otherwise, CPU decoding is used. By comparing the parameters used in video compression with those in software, it was found that from the perspectives of bitrate, video quality, and latency, [see [link to relevant documentation]]. Figure 7 as well as Figure 8 As shown in the image, the dot plot comparing image quality and the bar chart comparing multimedia formats demonstrate that the H.265 video encoding format is the best choice for the graphics card. Selecting the flip mode in D3D reduces memory copying, optimizing performance and minimizing latency caused by potential computer performance fluctuations. Then, using another D3D object, the video display format is unified to RGB texture format. This is converted to the target color space via the shader module. Different texture objects are configured for different types of video files to accelerate rendering. The player's state is maintained by switching frames back and forth according to the timeline, and the image is synchronized to prevent screen jitter.
[0115] The aforementioned ultra-high-definition multimedia playback method can be implemented as a computer program, and the ultra-high-definition multimedia playback method can be implemented as a computer device. This computer program can be used in various applications such as... Figure 6 The computer device shown runs on the computer. The computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor; when the computer device executes the computer program, it implements the ultra-high-definition multimedia playback method as described in the above embodiments.
[0116] See Figure 6 The computer device 500 includes a processor 502, a memory, and a network interface 505 connected via a system bus 501. The memory may include a storage medium 503 and internal memory 504.
[0117] The storage medium 503 may store an operating system 5031 and a computer program 5032. When the computer program 5032 is executed, it enables the processor 502 to execute an ultra-high-definition multimedia playback method. The storage medium 503 may be a volatile storage medium or a non-volatile storage medium.
[0118] The processor 502 provides computing and control capabilities to support the operation of the entire computer device 500.
[0119] The internal memory 504 provides an environment for the computer program 5032 in the storage medium 503 to run. When the computer program 5032 is executed by the processor 502, the processor 502 can execute the ultra-high-definition multimedia playback method.
[0120] This network interface 505 is used for network communication, such as providing data transmission. Those skilled in the art will understand that... Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present invention and does not constitute a limitation on the computer device 500 to which the present invention is applied. The specific computer device 500 may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0121] The processor 502 is used to run the computer program 5032 stored in the memory to implement the corresponding functions in the ultra-high-definition multimedia playback method described above.
[0122] Those skilled in the art will understand that Figure 6 The embodiments of the computer device shown do not constitute a limitation on the specific configuration of the computer device. In other embodiments, the computer device may include more or fewer components than illustrated, or combine certain components, or have different component arrangements. For example, in some embodiments, the computer device may include only memory and a processor. In such embodiments, the structure and function of the memory and processor are different from those shown. Figure 6 The embodiments shown are consistent and will not be described again here.
[0123] It should be understood that, in this embodiment of the invention, the processor 502 may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0124] In the embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Units with the same function may be grouped into one unit. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices, or units, or it may be an electrical, mechanical, or other form of connection.
[0125] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments of the present invention, depending on actual needs.
[0126] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0127] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a computer-readable storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned computer-readable storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), magnetic disks, or optical disks.
[0128] This invention provides an ultra-high-definition multimedia playback method, apparatus, computer device, and storage medium. By adding playback plugins to video files with user playback instructions using preset loading rules, a cacheable file is obtained. Each playback plugin corresponds to a file type. The cacheable file with the corresponding playback plugin is initially decoded to obtain a decoding identifier. Then, the cacheable file with the decoding identifier is buffered to obtain the corresponding buffered video file. By rationally allocating playback plugins and decoding identifiers to video files and performing initial buffering for different file types, lossless decoding of each video file is ensured, eliminating the need for repeated decoding and saving video file decoding and loading time, thus improving the clarity of the video file.
[0129] In addition, the buffering process is performed on the file to be buffered according to the buffering rules corresponding to the playback plugin in the file to be buffered, to obtain the corresponding buffered video file. The generation time of the buffered video file is recorded and rendered according to the file type of the buffered video file to obtain the rendered video decoded file. The rendered video decoded file is played according to the generation time. This setting method reasonably allocates rendering and buffering channels according to the generation time of the buffered video file, reduces the rendering and buffering time, and thus improves the overall playback quality of the video file.
[0130] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for playing ultra-high-definition multimedia, characterized in that, The method is applied to a multimedia playback device, and the method includes: Receive playback instructions input by the user and obtain the video file corresponding to the playback instructions; According to the preset loading rules, add a playback plugin corresponding to the file type of the video file to the video file to obtain the file to be cached; The file to be cached is initially decoded according to the preset decoding rules and the file type of the file to be cached, so as to obtain the file to be cached with the decoding identifier; The buffered video file is obtained by buffering the file to be buffered according to the buffering rules corresponding to the playback plugin in the file to be buffered. Record the generation time of the buffered video file and render it according to the file type of the buffered video file to obtain the rendered video decoded file; Play the rendered video decoded file according to the generation time; The buffer file is buffered according to the buffering rules corresponding to the playback plugin in the file to be buffered, resulting in a corresponding buffered video file, including: The buffer path of the file to be buffered is determined according to the buffering rule corresponding to the playback plugin. The buffer path includes a GPU buffer identifier and a separate CPU buffer identifier. Determine whether the file to be buffered recognizes the GPU buffer identifier in the buffer path; If the file to be buffered recognizes the GPU buffer identifier, then a buffered video file is obtained by buffering it through the first buffer threshold corresponding to the GPU buffer identifier; If the file to be buffered does not recognize the GPU buffer threshold, then a buffered video file is obtained by buffering it using the second buffer threshold corresponding to the CPU buffer identifier; The process of recording the generation time of the buffered video file and rendering it according to its file type to obtain a rendered video decoded file includes: The target texture object matching the file type of the buffered video file is obtained from the three-layer texture object set in the decoding rules; the three-layer texture object includes RGB packing format and two planar texture packing formats. The RGB packing format is a single texture buffer mode, which uses a single texture object for texture rendering; one planar texture packing format uses two texture objects for texture rendering, and the other planar texture packing format uses three texture objects for texture rendering. The generation time of the target texture object is determined based on the generation time of the buffered video file; The target texture object is combined with the buffered video file to obtain a buffered video file containing the target texture object; Render the buffered video file containing the target texture object to obtain the rendered video decoded file; The step of rendering the buffered video file containing the target texture object to obtain the rendered video decoded file includes: Obtain the shader module corresponding to the file type of the buffered video file; The shader module is used to accelerate the rendering of the buffered video file, resulting in a rendered video decoded file.
2. The ultra-high-definition multimedia playback method according to claim 1, characterized in that, The step of adding a playback plugin corresponding to the file type of the video file according to a preset loading rule to obtain a file to be cached includes: The file type of the video file is determined according to preset loading rules; The corresponding playback plugin is assigned according to the determined file type and added to the video file to obtain the file to be cached.
3. The ultra-high-definition multimedia playback method according to claim 2, characterized in that, After determining the file type of the video file according to preset loading rules, the method further includes: Determine whether a playback plugin corresponding to the determined file type exists in the video file; If the video file does not have a corresponding playback plugin, perform the step of allocating the corresponding playback plugin according to the determined file type and adding it to the video file; If a corresponding playback plugin exists in the video file, the video file will be used as a file to be cached.
4. The ultra-high-definition multimedia playback method according to claim 1, characterized in that, The initial decoding of the file to be cached according to preset decoding rules and the file type of the file to be cached, to obtain a file to be cached with a decoding identifier, includes: Generate a corresponding decoding identifier for the current file to be buffered based on the preset decoding rules and the file itself; The file to be buffered is decoded according to the decoding identifier to obtain a file to be buffered with the decoding identifier.
5. An ultra-high-definition multimedia playback device, wherein the ultra-high-definition multimedia playback device is used to perform the ultra-high-definition multimedia playback method as described in any one of claims 1-4, characterized in that, The device is configured in a multimedia playback device, and the device includes: An information acquisition unit is used to receive a playback command input by the user and acquire a video file corresponding to the playback command; The playback plugin unit is used to add a playback plugin corresponding to the file type of the video file to the video file according to the preset loading rules, so as to obtain the file to be cached. The video decoding unit is used to perform initial decoding on the file to be buffered according to the preset decoding rules and the file type of the file to be buffered, so as to obtain the file to be buffered with a decoding identifier; The video buffer unit is used to buffer the file to be buffered according to the buffering rules corresponding to the playback plugin in the file to be buffered, so as to obtain the corresponding buffered video file. The rendering unit is used to record the generation time of the buffered video file and render it according to the file type of the buffered video file to obtain the rendered video decoded file. The video playback unit plays the rendered video decoded file according to the generation time.
6. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the ultra-high-definition multimedia playback method as described in any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the ultra-high-definition multimedia playback method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
System for supporting self-adaption of decoding audio and video and method thereof
CN101567206A
Video display acceleration method in virtual desktop presentation device
CN106210036A
