CN116847150A - Ultrahigh-definition multimedia playing method and device, computer equipment and storage medium - Google Patents
Ultrahigh-definition multimedia playing method and device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN116847150A CN116847150A CN202310851284.4A CN202310851284A CN116847150A CN 116847150 A CN116847150 A CN 116847150A CN 202310851284 A CN202310851284 A CN 202310851284A CN 116847150 A CN116847150 A CN 116847150A
- Authority
- CN
- China
- Prior art keywords
- file
- video
- buffered
- decoding
- playing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 64
- 230000003139 buffering effect Effects 0.000 claims abstract description 66
- 238000009877 rendering Methods 0.000 claims abstract description 56
- 238000004590 computer program Methods 0.000 claims description 14
- 238000012545 processing Methods 0.000 description 10
- 230000008569 process Effects 0.000 description 9
- 239000010410 layer Substances 0.000 description 8
- 238000010586 diagram Methods 0.000 description 6
- 230000000694 effects Effects 0.000 description 5
- 230000006870 function Effects 0.000 description 5
- 238000012856 packing Methods 0.000 description 4
- 230000001133 acceleration Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 239000002356 single layer Substances 0.000 description 2
- 206010017577 Gait disturbance Diseases 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 235000019800 disodium phosphate Nutrition 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/44—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
- H04N21/44012—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving rendering scenes according to scene graphs, e.g. MPEG-4 scene graphs
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/41—Structure of client; Structure of client peripherals
- H04N21/426—Internal components of the client ; Characteristics thereof
- H04N21/42607—Internal components of the client ; Characteristics thereof for processing the incoming bitstream
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/44—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
- H04N21/44004—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving video buffer management, e.g. video decoder buffer or video display buffer
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/44—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
- H04N21/4402—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/47—End-user applications
- H04N21/472—End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
- H04N21/47202—End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for requesting content on demand, e.g. video on demand
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Human Computer Interaction (AREA)
- Television Signal Processing For Recording (AREA)
Abstract
The invention discloses a method, a device, computer equipment and a storage medium for playing ultra-high definition multimedia, wherein playing plug-ins are added to video files with user playing instructions through preset loading rules to obtain files to be cached, each playing plug-in corresponds to a file type, the files to be cached with the playing plug-ins of the type are initially decoded to obtain decoding identifications, the files to be cached with the decoding identifications are then buffered to obtain buffered video files, the playing plug-ins and the decoding identifications are reasonably distributed to the video files, and the files of different types are initially buffered and decoded, so that lossless decoding of the video files is guaranteed, video file decoding and loading time is saved, and definition of the video files is improved. In addition, the video file is buffered and rendered, rendering and a buffering channel are reasonably distributed according to the generation time of the buffered video file, and the time length of rendering and buffering is reduced, so that the overall playing quality of the video file is improved.
Description
Technical Field
The invention relates to the technical field of Internet, in particular to an ultrahigh-definition multimedia playing method, an ultrahigh-definition multimedia playing device, computer equipment and a storage medium.
Background
With the rapid development of computer technology, the multimedia technology based on the computer technology is widely applied and permeated into various aspects of social life, a decoding method for playing video is developed for multimedia video playing, meanwhile, the quality requirement of the current video playing effect is higher and higher, various problems such as playing blurring, delay and jitter can occur when the current video playing method decodes and renders target video, the viewing effect of a user is greatly reduced when the user views video, the time efficiency of decoding is too low, the daily playing requirement of the user cannot be met, the playing requirement of the multimedia is required to be improved, the overall definition of the video and the video frame rate become urgent viewing requirement of the user, the low definition and the playing delay occurrence probability of the existing multimedia video decoding method are higher, the video is basically decoded by using a plurality of decoding modules or decoding elements, the decoding efficiency is lower, and the video rendering degree is lower, so that the problem of unclear playing video quality exists after the multimedia video is decoded in the prior art.
Disclosure of Invention
The embodiment of the invention provides an ultrahigh-definition multimedia playing method, an ultrahigh-definition multimedia playing device, computer equipment and a storage medium, and aims to solve the problem that the image quality of a playing video is unclear after the multimedia video is decoded in the prior art.
In a first aspect, an embodiment of the present invention provides an ultra-high definition multimedia playing method, where the method is applied to a multimedia playing device, and the method includes:
receiving a play instruction input by a user, and acquiring a video file corresponding to the play instruction;
adding a play plug-in corresponding to the file type of the video file to the video file according to a preset loading rule to obtain a file to be cached;
according to a preset decoding rule and the file type of the file to be buffered, initially decoding the file to be buffered to obtain the file to be buffered with a decoding identifier;
buffering the file to be buffered according to a buffering rule corresponding to a playing plug-in the file to be buffered to obtain a corresponding buffered video file;
recording the generation time of the buffer video file and rendering according to the file type of the buffer video file to obtain a rendered video decoding file;
And playing the rendered video decoding file according to the generation time.
According to the ultra-high definition multimedia playing method, a playing plug-in corresponding to the file type of the video file is added to the video file according to a preset loading rule to obtain a file to be cached, and the method comprises the following steps:
determining the file type of the video file according to a preset loading rule;
and distributing the corresponding playing plug-in according to the determined file type and adding the corresponding playing plug-in into the video file to obtain the file to be cached.
The method for playing ultra-high definition multimedia, wherein after determining the file type of the video file according to a preset loading rule, further comprises:
judging whether a play plug-in corresponding to the determined file type exists in the video file or not;
if the video file does not have the corresponding playing plug-in, executing the step of distributing the corresponding playing plug-in according to the determined file type and adding the corresponding playing plug-in into the video file;
and if the corresponding playing plug-in exists in the video file, taking the video file as a file to be cached.
The method for playing ultra-high definition multimedia, wherein the initial decoding of the file to be buffered according to a preset decoding rule and a file type of the file to be buffered to obtain the file to be buffered with a decoding identifier, comprises the following steps:
Generating a corresponding decoding identifier for the current file to be buffered according to a preset decoding rule and the file;
and decoding the file to be buffered according to the decoding identifier to obtain the file to be buffered with the decoding identifier.
The method for playing the ultra-high definition multimedia, wherein the buffer processing is carried out on the file to be buffered according to the buffer rule corresponding to the playing plug-in the file to be buffered, so as to obtain the corresponding buffered video file, comprises the following steps:
determining a buffer path of the file to be buffered according to a buffer rule corresponding to the play plug-in, wherein the buffer path comprises a GPU buffer identifier and an independent CPU buffer identifier;
judging whether the file to be buffered identifies GPU buffer identification in the buffer path or not;
if the file to be buffered identifies the GPU buffering identifier, buffering through a first buffering threshold corresponding to the GPU buffering identifier to obtain a buffered video file;
and if the file to be buffered does not identify the GPU buffer threshold, buffering through a second buffer threshold corresponding to the CPU buffer identifier to obtain a buffered video file.
The method for playing ultra-high definition multimedia, wherein the recording the generation time of the buffer video file and rendering according to the file type of the buffer video file, to obtain a rendered video decoding file, comprises the following steps:
Acquiring a target texture object matched with the file type of the buffer video file from the three-layer texture objects set in the decoding rule;
determining the generation time of the target texture object according to the generation time of the buffer video file;
combining the target texture object with the buffer video file to obtain a buffer video file containing the target texture object;
and rendering the buffer video file containing the target texture object to obtain a rendered video decoding file.
The method for playing ultra-high definition multimedia, wherein the rendering the buffered video file containing the target texture object to obtain a rendered video decoding file comprises the following steps:
acquiring a loader module corresponding to the file type of the buffered video file;
and performing accelerated rendering on the buffered video file according to the loader module to obtain a rendered video decoding file.
In a second aspect, an embodiment of the present application further discloses an ultra-high definition multimedia playing device, where the device is configured in a multimedia playing apparatus, and the device includes:
the information acquisition unit is used for receiving a play instruction input by a user and acquiring a video file corresponding to the play instruction;
The playing plug-in unit is used for adding a playing plug-in corresponding to the file type of the video file to the video file according to a preset loading rule to obtain a file to be cached;
the video decoding unit is used for initially decoding the file to be buffered according to a preset decoding rule 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 for buffering the file to be buffered according to a buffer rule corresponding to the playing plug-in the file to be buffered to obtain a corresponding buffered video file;
the rendering unit is used for recording the generation time of the buffer video file and rendering according to the file type of the buffer video file to obtain a rendered video decoding file;
and the video playing unit plays the rendered video decoding file according to the generation time.
In a third aspect, a computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the method for ultra-high definition multimedia playing according to the first aspect when executing the computer program.
In a fourth aspect, a computer readable storage medium stores a computer program, which when executed by a processor implements the ultra-high definition multimedia playing method according to the first aspect.
Compared with the prior art, the invention has the following advantages:
the embodiment of the invention provides a method, a device, computer equipment and a storage medium for playing ultra-high definition multimedia, which are characterized in that playing plug-ins are added to video files with user playing instructions through preset loading rules to obtain files to be cached, each playing plug-in corresponds to a file type, the files to be cached with the playing plug-ins of the type are initially decoded to obtain a decoded identifier, the files to be cached with the decoded identifier are then buffered to obtain corresponding buffered video files, the playing plug-ins and the decoded identifier are reasonably distributed to the video files, and the files of different types are initially buffered, so that each video file is guaranteed to be decoded in a lossless manner, repeated decoding of the video files is not needed, the decoding and loading time of the video files is saved, and the definition of the video files is improved.
In addition, the file to be buffered is buffered according to a buffer rule corresponding to a play plug-in the file to be buffered, a corresponding buffered video file is obtained, the generation time of the buffered video file is recorded, and rendering is carried out according to the file type of the buffered video file, so that a rendered video decoding file is obtained; and playing the rendered video decoding file according to the generation time, wherein the setting mode reasonably distributes the rendering and the buffering channel according to the generation time of the buffered video file, reduces the time length of rendering and buffering, and thus improves the overall playing quality of the video file.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of steps of a method for ultra-high definition multimedia playing according to an embodiment of the present invention;
fig. 2 is a flowchart of sub-steps of a method for ultra-high definition multimedia playing according to an embodiment of the present invention;
Fig. 3 is a flowchart of overall judgment execution for an ultra-high definition multimedia playing method according to an embodiment of the present invention;
FIG. 4 is a flow chart of buffering and rendering execution for the ultra-high definition multimedia playing method according to the embodiment of the present invention;
fig. 5 is a schematic block diagram of an ultra-high definition multimedia playing device according to an embodiment of the present invention;
FIG. 6 is a schematic block diagram of a computer device provided by an embodiment of the present invention;
fig. 7 is a diagram showing image quality contrast for an ultra-high definition multimedia playing device according to an embodiment of the present invention;
fig. 8 is a comparison diagram of multimedia formats for an ultra-high definition multimedia playing device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be understood that the terms "comprises" and "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of 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 as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
Referring to fig. 1, as shown in the drawing, the method for ultra-high definition multimedia playing is applied to a multimedia playing device, the multimedia playing device may be a multimedia playing terminal or a computer server, and the multimedia playing device may be used to perform the ultra-high definition multimedia playing method to decode, buffer and render a target video file, and the method for ultra-high definition multimedia playing provided by the first embodiment of the present invention is shown in fig. 1, and the method includes S110 to S160.
S110, receiving a play instruction input by a user, and acquiring a video file corresponding to the play instruction.
In this embodiment, the current video file to be opened is confirmed according to the play command input by the user, and the specific types of the video file include NDV type, MKV type, MP4 type and other video formats, and the video file corresponding to the play command input by the user is opened.
And S120, adding a play plug-in corresponding to the file type of the video file to the video file according to a preset loading rule to obtain a file to be cached.
Determining a video file corresponding to a current user playing instruction, detecting the video file, loading the video file by using a designated plug-in if the video file is detected to have the designated plug-in, playing the video file by using a plug-in recommended by a playing system if the video file is detected to have the designated plug-in, and in one embodiment, loading the video file by using the plug-in if the video file is designated to be loaded by using the quick-lightning playing plug-in, and loading the video file by using the playing plug-in of the computer system if the video file is not detected to have the designated plug-in.
In one embodiment, step S120 further includes the steps of: determining the file type of the video file according to a preset loading rule; and distributing the corresponding playing plug-in according to the determined file type and adding the corresponding playing plug-in into the video file to obtain the file to be cached.
Specifically, the file type of the video file is detected according to a preset loading rule, so that the file type of the current video file is obtained, and in one embodiment, the loading rule is detection software of a computer, and a user can observe the file type of the current video file from a display of the computer in real time while detecting the file.
Specifically, a corresponding playing plug-in is allocated according to the determined file type, the playing plug-in is added to the video file, and the current system recommended playing plug-in is called for adapting to the current video file.
In a specific embodiment, after determining the file type of the video file according to a preset loading rule, the method further includes: judging whether a play plug-in corresponding to the determined file type exists in the video file or not; and if the corresponding playing plug-in does not exist in the video file, executing the step of distributing the corresponding playing plug-in according to the determined file type and adding the corresponding playing plug-in into the video file.
Specifically, the computer judges whether a playing plug-in corresponding to the file type exists in the current video file, if not, the corresponding playing plug-in is allocated again and added to the corresponding video file (the relevant steps of allocating the plug-in are repeated), and in the embodiment of the scheme, the whole steps are that the current file type is detected.
And if the corresponding playing plug-in exists in the video file, taking the video file as a file to be cached.
Specifically, the computer determines whether the video file has a corresponding play plug-in, so that the video file is used as a file to be buffered, and in one embodiment, the step is used for determining the file type to be buffered, and sending the file to the video buffer unit for buffering.
S130, carrying out initial decoding on the file to be buffered according to a preset decoding rule and the file type of the file to be buffered so as to obtain the file to be buffered with the decoding identifier.
And carrying out initial decoding on the file to be buffered according to a preset decoding rule and the file type of the file to be buffered so as to obtain the file to be buffered with the decoding identification. In one embodiment, the file type is embodied in a computer-decodable or encapsulated video format, comprising: MPEG format, AVI format, MOV format, WMV format, 3GP format, RMVB format, FLV format, H264 format, H265 format, specific meaning, specific flow of initial decoding includes: registering a video decoding component, and also sequentially opening a target video file, acquiring video file information, searching a current video decoder, opening the decoder, inputting the file, reading compressed data of each frame, decoding the compressed data of each frame, closing the decoder, closing the target video file, wherein the specific application of decoding identification is as follows: and identifying the file to be buffered, and facilitating initial decoding by a decoding rule.
Step S130 further includes the following related steps:
and generating a corresponding decoding identifier for the current file to be buffered according to a preset decoding rule and the file.
Specifically, a decoding identifier is generated through a preset decoding rule and the file, each decoding identifier corresponds to the file type of the buffer file, the decoding identifiers of each file to be buffered are different, and the specific file identifier is generated so as to facilitate the subsequent decoding of the buffer file.
And decoding the file to be buffered according to the decoding identifier to obtain the file to be buffered with the decoding identifier.
Specifically, a user decodes a file to be buffered with a decoding identifier through decoding software preset by a computer, the decoding software is configured with decoding rules, a D3D object (Direct 3D program) and a built-in GPU object (built-in display card) of the computer are preferentially used for decoding the file to be buffered with the decoding identifier, if the buffer file supports a hardware acceleration function, the GPU object (built-in display card) is used for decoding the file, and if the buffer file does not support GPU decoding, a CPU (central processing unit) of the computer is used for independently decoding, so that the file to be buffered with the decoding identifier is obtained.
And S140, buffering the file to be buffered according to a buffering rule corresponding to the playing plug-in the file to be buffered, and obtaining a corresponding buffered video file.
And buffering the file to be buffered according to a buffering rule corresponding to the playing plug-in the file to be buffered, so as to obtain a 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 with video data to a memory reserved area (or called a buffer area), and the processing process of the buffering process includes: and buffering the video file.
This step also includes the following related steps:
determining a buffer path of the file to be buffered according to a buffer rule corresponding to the play plug-in, wherein the buffer path comprises a GPU buffer identifier and an independent CPU buffer identifier;
specifically, if the buffer path of the current file to be buffered is determined according to the buffer rule corresponding to the play plug-in of the current video file, the buffer path includes a GPU buffer identifier and a CPU buffer identifier, the computer judges the path that the file to be buffered needs to pass through according to the buffer rule, and the current file with buffer is buffered by a GPU (built-in display card) or a CPU (central processing unit) of the computer,
And judging whether the file to be buffered identifies the GPU buffering identification in the buffering path.
If the file to be buffered identifies the GPU buffering identifier, buffering through a first buffering threshold corresponding to the GPU buffering identifier to obtain a buffered video file;
specifically, the computer judges whether the buffered file identifies the GPU buffer identifier of the buffer path through the buffer rule, if the GPU buffer identifier exists, the buffered video file is obtained by buffering the file to be buffered with the GPU buffer identifier corresponding to the first buffer threshold.
And if the file to be buffered does not identify the GPU buffer threshold, buffering through a second buffer threshold corresponding to the CPU buffer identifier to obtain a buffered video file.
Specifically, the computer judges whether the file to be buffered identifies the GPU buffering identifier of the buffering path through the buffering rule, and if the GPU buffering identifier does not exist, the computer performs buffering processing on the file to be buffered with the GPU buffering identifier corresponding to the first buffering threshold to obtain the buffered video file. In the setting mode, in the process of executing buffering, the computer uses one GPU buffering path or one CPU buffering path with the mark to simultaneously buffer the file to be buffered, so that unnecessary time of a user is not occupied, the hardware resource of the computer is fully utilized, and the efficiency of the computer for buffering the whole file to be buffered is further improved.
Further, referring to fig. 3, in an embodiment, after the execution action of opening the target file by the user is identified, the type of the file is detected, whether the file source needs to be configured is determined according to the type of the target file opened by the user, after the file source is configured, the target file with the file source is loaded, if the system determines that the target file does not configure the file source, the system returns to the previous step and reconfigures the file source, if the video file with the file source exists, the next step is performed to determine whether the loading of the target file is successful, if the loading of the target file is successful, a decoder matched with the type of the target file is configured, a preset decoder is loaded at the same time, if the video file does not configure the decoder, the system returns to the previous step and reconfigures a decoder again, the video file with the decoder is subjected to initial decoding, and then operations such as buffering and rendering are sequentially performed, and finally the video file after rendering is obtained.
And S150, recording the generation time of the buffer video file, and rendering according to the file type of the buffer video file to obtain a rendered video decoding file.
Recording the generation time of the buffer video file and rendering according to the file type of the buffer video file to obtain a rendered video decoding file.
This step also includes the following steps S151-S154.
S151, acquiring a target texture object matched with the file type of the buffer video file from the three-layer texture objects set in the decoding rule.
Specifically, the computer obtains a target texture object matching the file type of the buffered video file from three layers of texture objects in a decoding rule, in one embodiment, the texture object includes an RGB packing mode, the RGB packing format is a single texture buffer mode, the single texture object is used for texture rendering, NV12 is a flat texture packing format, two texture objects can be used for texture rendering, and YUV420 is another flat texture packing format, and three texture objects can be used for texture rendering. According to the setting mode, the target texture objects matched with the file types of the buffer video files are obtained from the three-layer texture objects, texture rendering is carried out on a plurality of file types, the hierarchical rendering efficiency of the texture rendering is improved, the texture rendering is carried out on videos of a plurality of different file types at the same time, the overall rendering efficiency of the buffer video is improved, the preset decoding rules are fully utilized to render the current video files, the overall playing resolution of the video is improved, and the playing problem of the video due to unclear image quality is reduced.
S152, determining the generation time of the target texture object according to the generation time of the buffer video file.
Specifically, the computer determines the generation time of the current target texture object through the generation time of the buffered video, in one embodiment, the generation time of the current target texture object is the buffering ending time point of the current buffered video, when the buffering of the buffered video is ended, the buffered file generated after buffering is rendered, the buffering time length of the process is the target texture generation time node, and whether the buffering process of the buffered video file is ended is judged through the specific time node.
And S153, combining the target texture object with the buffer video file to obtain the buffer video file containing the target texture object.
Specifically, the target texture object is combined with the buffered video file to obtain the buffered video file containing the target texture object, in one embodiment, the target texture object is integrated into the buffered video file of the corresponding type, please refer to fig. 3, as shown in the drawing, the video file is rendered by setting a renderer, for example, if a single-layer texture buffer is used, the buffered video file with an RGB texture format is generated, if a double-layer texture buffer is used, the buffered video file with an NV12 texture format is generated, if a three-layer texture buffer is used, the buffered video file with a YUV42 texture format is generated, and the buffered video file corresponding to the texture format is generated.
And S154, rendering the buffer video file containing the target texture object to obtain a rendered video decoding file.
In one embodiment, a buffer video file of a target texture object is rendered, so as to obtain a rendered video decoding file, the rendered video file is rendered by a rendering module preset in a computer to obtain a video decoding file corresponding to the corresponding texture object, for example, if a single-layer texture buffer is used, a buffer video file with an RGB texture format is generated, if a double-layer texture buffer is used, a buffer video file with an NV12 texture format is generated, if a three-layer texture buffer is used, a buffer video file with a YUV42 texture format is generated, and a buffer video file corresponding to the texture format is generated.
The step S154 specifically includes the following steps: acquiring a loader module corresponding to the file type of the buffered video file; and performing accelerated rendering on the buffered video file according to the loader module to obtain a rendered video decoding file.
In one embodiment, the buffer video file is accelerated to be rendered by a loader module preset by a computer to obtain a rendered video decoding file, for example, when a D3D object (Direct 3D program) is used to accelerate the rendering of the current buffer video object and the same video display format is used as an RGB texture object, the buffer module is used to convert the current buffer video object to obtain a video file with the RGB texture object as a target color, so that the setting can accelerate the rendering. Video and display device frame rates are the same, and graphics card rendering is typically aligned by vertical synchronization. The starting point of the film can be determined by acquiring the video card synchronization time, so that the CPU (central processing chip) resource can be used extremely, the video effect is smoother, the overall video playing quality is improved, and the overall film watching experience of a user is improved.
And S160, playing the rendered video decoding file according to the generation time.
Specifically, the computer determines the generation time of the current target texture object through the generation time of the buffered video, in one embodiment, the generation time of the current target texture object is the buffer end time point of the current buffered video, when the buffering of the buffered video is ended, the buffered file generated after buffering is rendered, the buffer time length of the process is the target texture generation time node, whether the buffered video file is ended or not can be judged by the time node, so that the generation time is further determined to play the rendered video decoding file, and the whole playing flow of the video file is completed at the moment.
Specifically, when the video is played, once each frame of picture is displayed unevenly, the watching effect is poor. Video jitter is divided into two types: one is dithering and tearing of the picture; the other is time jitter of the picture, which is manifested by instant frame rate stumbling. This is the case for the display period of each frame, where the time start of the presentation of the first frame is critical, and where the frame rates of the display and film are multiple, each frame displaying one or more display refresh periods. For example, the display screen is 60 frames/s, after the first frame is cached, the starting point must be at least after two refresh cycles and aligned with the refresh cycles, the video file is rendered by using the CPU and the GPU at the same time, if one of the CPU and the GPU element is idle, the mode is switched at the moment, and the video with the corresponding CPU identifier or GPU identifier is rendered.
Further, as shown in fig. 4, buffering and rendering are performed according to a plurality of modules, by reasonably allocating running memory spaces of the CPU and the GPU, and according to the cooperative work of the plurality of modules, a final video file is obtained, in an embodiment, when a buffering decoding task is performed, the Readpacket module starts to operate first, a buffering process is started at this time, and is sequentially performed by the buffer conversion module, the filebuffer module, and finally, a rendered video file is output, if the video file to be flushed is not rendered, the buffer module is redistributed 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 performs rendering to obtain the final rendered video file, and when a computer detects that the video file rendered from the Draw is detected by a preset video detection device, if the buffered video file is not rendered, the buffer file is sent to the WaitFrame module for re-rendering until the buffer file is successful.
The embodiment of the invention also provides an ultra-high-definition multimedia playing device which can be configured in a server, wherein the server is simultaneously connected with a user and the server in a network manner to realize the transmission of data information, and the ultra-high-definition multimedia playing device is used for executing any embodiment of the ultra-high-definition multimedia playing method. Specifically, referring to fig. 5, fig. 5 is a schematic block diagram of an ultra-high definition multimedia playing device according to an embodiment of the present invention. The ultra-high definition multimedia playing device 100, wherein the device is configured in a multimedia playing apparatus, the device comprises:
An information obtaining unit 110, configured to receive a play instruction input by a user, and obtain a video file corresponding to the play instruction;
the playing plug-in unit 120 is configured to add a playing plug-in corresponding to a file type of the video file to the video file according to a preset loading rule, so as to obtain a file to be cached;
the video decoding unit 130 is configured to perform initial decoding on the file to be buffered according to a preset decoding rule and a 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 140 is configured to buffer the file to be buffered according to a buffer rule corresponding to the play plug-in the file to be buffered, so as to obtain a corresponding buffered video file;
a rendering unit 150, configured to record a generation time of the buffered video file and perform rendering according to a file type of the buffered video file, so as to obtain a rendered video decoding file;
and a video playing unit 160 for playing the video decoding file after rendering according to the generation time.
Specifically, the ultra-high-definition multimedia playing device provided in the embodiment of the invention is applied to the above ultra-high-definition multimedia playing method, and the method includes: the method comprises the steps of firstly executing a play instruction input by a user to obtain a video file corresponding to the play instruction, secondly executing a play plug-in corresponding to the file type of the video file to be added to the video file according to a preset loading rule to generate a file to be cached, thirdly executing initial decoding of the file to be cached according to a preset decoding rule and the file type of the file to be cached to obtain the file to be cached with a decoding identifier, fourthly executing buffer processing of the file to be cached according to a buffer rule corresponding to the play plug-in of the file to be cached to obtain a corresponding buffer video file, and fifthly executing generation time of recording the buffer video file and rendering according to the file type of the buffer video file to obtain a video decoding file after rendering, and sixthly executing playing the video decoding file after rendering according to the generation time. The video decoding file is obtained through the method, is sent to the display equipment of the user, is synchronously opened, and is smoothly played, so that the overall smoothness of the film played by the user is improved, the definition of the overall image quality of the video file is improved, and the viewing experience of the user is further improved.
Further, a proper file loading mode is selected when the file type is detected, in order to accelerate the buffering of the video, a d3d object and a GPU object are independently used for decoding and buffering, if the target video supports hardware acceleration, the GPU is used for decoding, and if the target video does not support hardware acceleration, the CPU is used for decoding. By comparing the parameters and software differences when compressing video, it is found that from the viewpoints of code rate, video quality and delay, please refer to fig. 7 and 8, as shown in the figure, the image quality contrast dot pattern and multimedia format contrast histogram can be seen: the video card selects the video coding format h265 to achieve the best effect. The flip mode in d3d can be selected to reduce the memory copy number, so that the performance is optimal, and the delay caused by possible performance fluctuation of the computer is reduced. And then using another d3d object, converting the display format of the unified video into an RGB texture format, converting the RGB texture format into a target color space through a loader module, and performing rendering operation by configuring different texture objects for different types of video files, so that the rendering can be accelerated. And switching frames back and forth according to the time line to maintain the state of the player, and synchronizing the pictures to prevent the picture jitter.
The above-described ultra-high definition multimedia playing method may be implemented in the form of a computer program, and the ultra-high definition multimedia playing method may be implemented as a computer device, which may be run on the computer device as shown in fig. 6. The computer device includes a memory, a processor, and a computer program stored on the memory and executable on the processor; the ultra-high definition multimedia playing method described in the above embodiment is implemented when the computer program is executed by the computer device.
With reference to FIG. 6, the computer device 500 includes a processor 502, a memory, and a network interface 505, connected by a system bus 501, where the memory may include a storage medium 503 and an internal memory 504.
The storage medium 503 may store an operating system 5031 and a computer program 5032. The computer program 5032, when executed, may cause the processor 502 to perform an ultra-high definition multimedia playing method, wherein the storage medium 503 may be a volatile storage medium or a non-volatile storage medium.
The processor 502 is used to provide computing and control capabilities to support the operation of the overall computer device 500.
The internal memory 504 provides an environment for the execution of a computer program 5032 in the storage medium 503, which computer program 5032, when executed by the processor 502, causes the processor 502 to perform the ultra-high definition multimedia playing method.
The network interface 505 is used for network communication, such as providing for transmission of data information, etc. It will be appreciated by those skilled in the art that the architecture shown in fig. 6 is merely a block diagram of some of the architecture relevant to the present inventive arrangements and is not limiting of the computer device 500 to which the present inventive arrangements may be implemented, as a particular computer device 500 may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
The processor 502 is configured to execute a computer program 5032 stored in a memory, so as to implement the corresponding functions in the above-mentioned ultra-high definition multimedia playing method.
Those skilled in the art will appreciate that the embodiment of the computer device shown in fig. 6 is not limiting of the specific construction of the computer device, and in other embodiments, the computer device may include more or less components than those shown, or certain components may be combined, or a different arrangement of components. For example, in some embodiments, the computer device may include only a memory and a processor, and in such embodiments, the structure and function of the memory and the processor are consistent with the embodiment shown in fig. 6, and will not be described again.
It should be appreciated that in an embodiment of the invention, the processor 502 may be a central processing unit (Central Processing Unit, CPU), the processor 502 may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSPs), application specific integrated circuits (Application Specific Integrated Circuit, ASICs), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. Wherein the general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
In the several embodiments provided by the present invention, it should be understood that the disclosed apparatus, device and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, and for example, the division of the units is merely a logical function division, there may be another division manner in actual implementation, or units having the same function may be integrated into one unit, for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. In addition, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices, or elements, or may be an electrical, mechanical, or other form of connection.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiment of the present invention.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention is essentially or part of what contributes to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a computer-readable storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned computer-readable storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, an optical disk, or other various media capable of storing program codes.
The embodiment of the invention provides a method, a device, computer equipment and a storage medium for playing ultra-high definition multimedia, which are characterized in that playing plug-ins are added to video files with user playing instructions through preset loading rules to obtain files to be cached, each playing plug-in corresponds to a file type, the files to be cached with the playing plug-ins of the type are initially decoded to obtain a decoded identifier, the files to be cached with the decoded identifier are then buffered to obtain corresponding buffered video files, the playing plug-ins and the decoded identifier are reasonably distributed to the video files, and the files of different types are initially buffered, so that each video file is guaranteed to be decoded in a lossless manner, repeated decoding of the video files is not needed, the decoding and loading time of the video files is saved, and the definition of the video files is improved.
In addition, the file to be buffered is buffered according to a buffer rule corresponding to a play plug-in the file to be buffered, a corresponding buffered video file is obtained, the generation time of the buffered video file is recorded, and rendering is carried out according to the file type of the buffered video file, so that a rendered video decoding file is obtained; and playing the rendered video decoding file according to the generation time, wherein the setting mode reasonably distributes the rendering and the buffering channel according to the generation time of the buffered video file, reduces the time length of rendering and buffering, and thus improves the overall playing quality of the video file.
While the invention has been described with reference to certain preferred embodiments, it will be understood by those skilled in the art that various changes and substitutions of equivalents may be made and equivalents will be apparent to those skilled in the art without departing from the scope of the invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.
Claims (10)
1. An ultra-high definition multimedia playing method, characterized in that the method is applied to a multimedia playing device, the method comprising:
receiving a play instruction input by a user, and acquiring a video file corresponding to the play instruction;
adding a play plug-in corresponding to the file type of the video file to the video file according to a preset loading rule to obtain a file to be cached;
according to a preset decoding rule and the file type of the file to be buffered, initially decoding the file to be buffered to obtain the file to be buffered with a decoding identifier;
buffering the file to be buffered according to a buffering rule corresponding to a playing plug-in the file to be buffered to obtain a corresponding buffered video file;
Recording the generation time of the buffer video file and rendering according to the file type of the buffer video file to obtain a rendered video decoding file;
and playing the rendered video decoding file according to the generation time.
2. The method for playing ultra-high definition multimedia according to claim 1, wherein adding a playing plug-in corresponding to a file type of the video file to the video file according to a preset loading rule to obtain a file to be cached comprises:
determining the file type of the video file according to a preset loading rule;
and distributing the corresponding playing plug-in according to the determined file type and adding the corresponding playing plug-in into the video file to obtain the file to be cached.
3. The ultra-high definition multimedia playing method according to claim 2, wherein after determining the file type of the video file according to a preset loading rule, further comprising:
judging whether a play plug-in corresponding to the determined file type exists in the video file or not;
if the video file does not have the corresponding playing plug-in, executing the step of distributing the corresponding playing plug-in according to the determined file type and adding the corresponding playing plug-in into the video file;
And if the corresponding playing plug-in exists in the video file, taking the video file as a file to be cached.
4. The method for playing ultra-high definition multimedia according to claim 1, wherein the initial decoding of the file to be buffered according to a preset decoding rule and a file type of the file to be buffered to obtain the file to be buffered with a decoding identifier comprises:
generating a corresponding decoding identifier for the current file to be buffered according to a preset decoding rule and the file;
and decoding the file to be buffered according to the decoding identifier to obtain the file to be buffered with the decoding identifier.
5. The method for playing ultra-high definition multimedia according to claim 1, wherein the step of buffering the file to be buffered according to a buffering rule corresponding to a playing plug-in the file to be buffered to obtain a corresponding buffered video file comprises:
determining a buffer path of the file to be buffered according to a buffer rule corresponding to the play plug-in, wherein the buffer path comprises a GPU buffer identifier and an independent CPU buffer identifier;
judging whether the file to be buffered identifies GPU buffer identification in the buffer path or not;
If the file to be buffered identifies the GPU buffering identifier, buffering through a first buffering threshold corresponding to the GPU buffering identifier to obtain a buffered video file;
and if the file to be buffered does not identify the GPU buffer threshold, buffering through a second buffer threshold corresponding to the CPU buffer identifier to obtain a buffered video file.
6. The method for ultra-high definition multimedia playing according to claim 4, wherein recording the generation time of the buffered video file and rendering according to the file type of the buffered video file to obtain a rendered video decoding file comprises:
acquiring a target texture object matched with the file type of the buffer video file from the three-layer texture objects set in the decoding rule;
determining the generation time of the target texture object according to the generation time of the buffer video file;
combining the target texture object with the buffer video file to obtain a buffer video file containing the target texture object;
and rendering the buffer video file containing the target texture object to obtain a rendered video decoding file.
7. The method of claim 6, wherein rendering the buffered video file containing the target texture object results in a rendered video decoding file, comprising:
Acquiring a loader module corresponding to the file type of the buffered video file;
and performing accelerated rendering on the buffered video file according to the loader module to obtain a rendered video decoding file.
8. The ultra-high definition multimedia playing apparatus of claim 1, wherein the apparatus is configured to a multimedia playing device, the apparatus comprising:
the information acquisition unit is used for receiving a play instruction input by a user and acquiring a video file corresponding to the play instruction;
the playing plug-in unit is used for adding a playing plug-in corresponding to the file type of the video file to the video file according to a preset loading rule to obtain a file to be cached;
the video decoding unit is used for initially decoding the file to be buffered according to a preset decoding rule 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 for buffering the file to be buffered according to a buffer rule corresponding to the playing plug-in the file to be buffered to obtain a corresponding buffered video file;
the rendering unit is used for recording the generation time of the buffer video file and rendering according to the file type of the buffer video file to obtain a rendered video decoding file;
And the video playing unit plays the rendered video decoding file according to the generation time.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the ultra high definition multimedia playing method according to any one of claims 1 to 7 when executing the computer program.
10. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program which, when executed by a processor, implements the ultra high definition multimedia playing method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310851284.4A CN116847150A (en) | 2023-07-11 | 2023-07-11 | Ultrahigh-definition multimedia playing method and device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310851284.4A CN116847150A (en) | 2023-07-11 | 2023-07-11 | Ultrahigh-definition multimedia playing method and device, computer equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116847150A true CN116847150A (en) | 2023-10-03 |
Family
ID=88164937
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310851284.4A Pending CN116847150A (en) | 2023-07-11 | 2023-07-11 | Ultrahigh-definition multimedia playing method and device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116847150A (en) |
-
2023
- 2023-07-11 CN CN202310851284.4A patent/CN116847150A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9940898B2 (en) | Variable refresh rate video capture and playback | |
US20090103630A1 (en) | Image processing device | |
US11528538B2 (en) | Streaming volumetric and non-volumetric video | |
CN111899322A (en) | Video processing method, animation rendering SDK, device and computer storage medium | |
KR102702392B1 (en) | Method and device for processing content | |
CN112055254B (en) | Video playing method, device, terminal and storage medium | |
CN113457160A (en) | Data processing method and device, electronic equipment and computer readable storage medium | |
US11356739B2 (en) | Video playback method, terminal apparatus, and storage medium | |
US9210422B1 (en) | Method and system for staggered parallelized video decoding | |
US8391688B2 (en) | Smooth rewind media playback | |
US11678019B2 (en) | User interface (UI) engine for cloud UI rendering | |
CN105379281B (en) | Picture reference control for video decoding using a graphics processor | |
CN113490047A (en) | Android audio and video playing method | |
CN116450149B (en) | Hardware decoding method, device and storage medium | |
JP6483850B2 (en) | Data processing method and apparatus | |
CN109379630B (en) | Video processing method and device, electronic equipment and storage medium | |
CN116847150A (en) | Ultrahigh-definition multimedia playing method and device, computer equipment and storage medium | |
CN116939233A (en) | Live video processing method, apparatus, device, storage medium and computer program | |
CN116700943A (en) | Video playing system and method and electronic equipment | |
TWI439137B (en) | A method and apparatus for restructuring a group of pictures to provide for random access into the group of pictures | |
CN108235144B (en) | Playing content obtaining method and device and computing equipment | |
CN115361579B (en) | Video transmission and display method and device, electronic equipment and storage medium | |
US11799943B2 (en) | Method and apparatus for supporting preroll and midroll during media streaming and playback | |
US11588870B2 (en) | W3C media extensions for processing DASH and CMAF inband events along with media using process@append and process@play mode | |
US11973820B2 (en) | Method and apparatus for mpeg dash to support preroll and midroll content during media playback |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |