CN106792066A - The method and system that the video decoding of optimization is played - Google Patents
The method and system that the video decoding of optimization is played Download PDFInfo
- Publication number
- CN106792066A CN106792066A CN201611187970.2A CN201611187970A CN106792066A CN 106792066 A CN106792066 A CN 106792066A CN 201611187970 A CN201611187970 A CN 201611187970A CN 106792066 A CN106792066 A CN 106792066A
- Authority
- CN
- China
- Prior art keywords
- decoding
- video
- software
- hardware
- decoder
- 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 description 50
- 238000005457 optimization Methods 0.000 title 1
- 238000004364 calculation method Methods 0.000 description 5
- 230000002159 abnormal effect Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 2
- 238000004590 computer program Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 230000002349 favourable effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000006835 compression Effects 0.000 description 1
- 238000007906 compression Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000002699 waste material Substances 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/41—Structure of client; Structure of client peripherals
- H04N21/426—Internal components of the client ; Characteristics thereof
-
- 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/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/81—Monomedia components thereof
- H04N21/8166—Monomedia components thereof involving executable data, e.g. software
- H04N21/8193—Monomedia components thereof involving executable data, e.g. software dedicated tools, e.g. video decoder software or IPMP tool
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The present invention discloses the form that analysis playing request obtains video, and the decoding request of video is generated according to the form of video;The version of the hardware decoder of equipment where player is obtained, and the video format that the version of the form of video and hardware decoder is supported is contrasted;When the version of hardware decoder supports the decoding of video, decoding request call hardware decoder decoding video data according to video are simultaneously played;When the version of hardware decoder does not support that the video of the form is decoded, decoding request call software decoder decoding video data according to video are simultaneously played;When the version of hardware decoder supports the decoding of video, the hardware decoding occupancy of hardware decoder and the software decoding occupancy of software decoder are detected;When the difference that hardware decodes occupancy and software decoding occupancy is more than or equal to predetermined threshold, decoding request call software decoder decoding video data according to video are simultaneously played.The present invention improves the decoding efficiency of video.
Description
Technical Field
The present invention relates to the technical field of video decoding and playing, and more particularly, to an optimized video decoding and playing method and system.
Background
Watching video is now a necessary entertainment and recreation means for people's daily life, and the transmission and playing of video requires the processes of encoding and decoding. Video decoding is the process of using a specific method to restore digitally encoded video data to the video content it represents or to convert electrical pulse signals to the video information, data, etc. it represents, and only the decoded video can be presented to the user in a player.
The current video decoding method includes: the hardware decoding and the software decoding, wherein the hardware decoding is completed by a hardware decoding chip (such as a GPU), and the hardware decoding has the advantages of high decoding efficiency, low power consumption and low heat power consumption, and has the disadvantages of lacking of powerful support (including a filter, a subtitle and the like), poor compatibility, larger limitation (for example, the energy-saving function of a computer fails after the hardware decoding is opened), and more complex setting. The soft decoding is a decoding mode of directly calling CPU resources to perform calculation decoding, and the soft decoding has the advantages that: the cost is low, and secondary investment is hardly needed; the compatibility is good, and decoding of various formats can be supported; the decoded video has good picture quality; the player does not need to be set, and the subtitle and the like are well supported; the disadvantages are that: low decoding efficiency, high power consumption and high heat power consumption.
The resolution of the video, especially the resolution of the high-definition video, is much higher than that of the video with a general format, so that the code rate of the high-definition video is very high, the compression rate of video encoding is very high, the calculation amount of decoding calculation is very large, the calculation capability of the CPU can be greatly consumed by directly using the CPU for decoding (namely, the frequently-called 'soft solution'), and even the decoding calculation cannot be performed on some old versions of the CPU.
For a user who does not use hard decoding often, it is certainly a waste if too much expenditure is dedicated to rarely used functions; on the premise of ensuring normal soft decoding, the problem of play failure or play unsmooth can be avoided when occasionally using hard decoding.
Therefore, it is an urgent problem in the art to provide a decoding scheme that can support decoding in multiple formats according to the actual situation of a user, and can improve decoding efficiency and reduce decoding power consumption for a file to be decoded.
Disclosure of Invention
In view of this, the present invention provides an optimized video decoding and playing method and system, which solve the technical problem that in the prior art, a video decoding mode cannot be automatically selected according to the user requirement to realize video decoding, and at the same time, user resources are not wasted.
In order to solve the above technical problem, the present invention provides an optimized video decoding and playing method, including:
the video decoding method comprises the steps of setting in a player, calling a hardware decoder or a software decoder to decode a video according to a decoding request of the video;
receiving a video playing request, analyzing the playing request to obtain the format of the video, and generating a video decoding request according to the format of the video; acquiring the version of a hardware decoder of equipment where the player is located, and comparing the format of the video with the video format supported by the version of the hardware decoder;
when the version of the hardware decoder supports the decoding of the video, calling the hardware decoder to decode the video data according to the decoding request of the video and playing the video data;
when the version of the hardware decoder does not support the video decoding of the format, calling the software decoder to decode the video data according to the decoding request of the video and playing the video data; further, the method comprises, among others,
detecting a hardware decoding occupancy rate of the hardware decoder and a software decoding occupancy rate of the software decoder when the version of the hardware decoder supports decoding of the video;
when the difference value between the hardware decoding occupancy rate and the software decoding occupancy rate is greater than or equal to a preset threshold value, calling the software decoder to decode the video data according to the decoding request of the video and playing the video data;
wherein the method further comprises: acquiring the version of a software decoder of equipment where the player is located, and acquiring the software decoding occupancy rate corresponding to each video format under the version of the software decoder from a database;
comparing the format of the video with the software decoding occupancy rate corresponding to each video format to obtain the software decoding occupancy rate required by the video for software decoding;
and detecting the current software decoding occupancy rate of the software decoder, and calling the software decoder to decode the video data and play the video data according to the decoding request of the video when the sum of the software decoding occupancy rate and the required software decoding occupancy rate is less than or equal to the software decoding occupancy rate threshold value of the software decoding.
Further, when the version of the hardware decoder supports decoding of the video, invoking the hardware decoder to decode the video data and play the video data according to the decoding request of the video, the steps are:
when the version of the hardware decoder supports the video decoding of the format, detecting the hardware decoding occupancy rate of the hardware decoder;
when the hardware decoding occupancy rate reaches or exceeds a hardware decoding occupancy rate threshold value, calling the software decoder to decode the video data according to the decoding request of the video and playing the video data;
and when the hardware decoding occupancy rate is smaller than the hardware decoding occupancy rate threshold value, calling the hardware decoder to decode the video data and play the video data according to the decoding request of the video.
Further, the hardware decoding occupancy threshold is 10% -70%.
Further, the software decoding occupancy threshold of the software decoding is 0-90%.
In another aspect, the present invention further provides an optimized video decoding and playing system, including: the device comprises a setting module, a hardware decoding judgment module, a hardware decoding playing module and a software decoding playing module; wherein,
the setting module is used for setting in a player and calling a hardware decoder or a software decoder to decode the video according to a decoding request of the video;
the hardware decoding judgment module is used for receiving a video playing request, analyzing the playing request to obtain the format of the video, and generating a video decoding request according to the format of the video; acquiring the version of a hardware decoder of equipment where the player is located, and comparing the format of the video with the video format supported by the version of the hardware decoder;
the hardware decoding playing module is used for calling the hardware decoder to decode the video data and play the video data according to the decoding request of the video when the version of the hardware decoder supports the decoding of the video;
the software decoding playing module is used for calling the software decoder to decode the video data and play the video data according to the decoding request of the video when the version of the hardware decoder does not support the video decoding of the format;
wherein the software decoding playing module is further configured to:
detecting a hardware decoding occupancy rate of the hardware decoder and a software decoding occupancy rate of the software decoder when the version of the hardware decoder supports decoding of the video;
when the difference value between the hardware decoding occupancy rate and the software decoding occupancy rate is greater than or equal to a preset threshold value, calling the software decoder to decode the video data according to the decoding request of the video and playing the video data;
wherein the system further comprises: a software decoding preselection module to:
acquiring the version of a software decoder of equipment where the player is located, and acquiring the software decoding occupancy rate corresponding to each video format under the version of the software decoder from a database;
comparing the format of the video with the software decoding occupancy rate corresponding to each video format to obtain the software decoding occupancy rate required by the video for software decoding;
and detecting the current software decoding occupancy rate of the software decoder, and calling the software decoder to decode the video data and play the video data according to the decoding request of the video when the sum of the software decoding occupancy rate and the required software decoding occupancy rate is less than or equal to the software decoding occupancy rate threshold value of the software decoding.
Further, the hardware decoding playing module is configured to:
when the version of the hardware decoder supports the video decoding of the format, detecting the hardware decoding occupancy rate of the hardware decoder;
when the hardware decoding occupancy rate reaches or exceeds a hardware decoding occupancy rate threshold value, calling the software decoder to decode the video data according to the decoding request of the video and playing the video data;
and when the hardware decoding occupancy rate is smaller than the hardware decoding occupancy rate threshold value, calling the hardware decoder to decode the video data and play the video data according to the decoding request of the video.
Further, the hardware decoding occupancy threshold is 10% -70%.
Further, the software decoding occupancy threshold of the software decoding is 0-90%.
Compared with the prior art, the optimized video decoding and playing method and system of the invention have the advantages that:
(1) the optimized video decoding playing method and system automatically identify the characteristics of the video to be decoded, perform hardware decoding on the video which needs to be decoded by using hardware, and perform software decoding on the video which can be realized based on software decoding, thereby solving the problems that the prior art can not support all format video files by performing simple hardware decoding on the video and the setting is complicated; and the problems of high power consumption and low decoding efficiency in the video decoding process caused by pure soft decoding are solved, so that the user resources are not wasted while the video decoding is realized, and the video decoding efficiency is improved.
(2) The optimized video decoding playing method and system of the invention use the built-in decoder to accelerate through the hardware decoding port, and can support the decoding of more video formats. The mode that hardware is used as the main part and software is used as the auxiliary part is adopted, the decoding of the video with most formats can be realized, and the video decoding range is expanded.
(3) The optimized video decoding playing method and system provided by the invention automatically select the decoding mode which is suitable for the video to be decoded and has the lowest consumption rate based on the characteristics of the video to be decoded and the support condition of the decoding equipment, thereby improving the decoding efficiency and reducing the consumption in the video decoding process.
Of course, it is not necessary for any product in which the present invention is practiced to achieve all of the above-described technical effects simultaneously.
Other features of the present invention and advantages thereof will become apparent from the following detailed description of exemplary embodiments thereof, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description, serve to explain the principles of the invention.
Fig. 1 is a schematic flowchart of a method for optimized video decoding and playing according to embodiment 1 of the present invention;
fig. 2 is a flowchart illustrating a method for optimized video decoding and playing according to embodiment 2 of the present invention;
fig. 3 is a schematic structural diagram of a system for optimized video decoding and playing according to embodiment 3 of the present invention.
Detailed Description
Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
In all examples shown and discussed herein, any particular value should be construed as merely illustrative, and not limiting. Thus, other examples of the exemplary embodiments may have different values.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
Example 1
As shown in fig. 1, the method of this embodiment is a flowchart of the optimized video decoding and playing method described in this embodiment, and the method described in this embodiment solves the technical problem that in the prior art, a video decoding mode cannot be automatically selected according to a user's need to implement video decoding, and at the same time, user resources are not wasted. The optimized video decoding playing method in the embodiment includes the following steps:
step 101, setting in a player, and calling a hardware decoder or a software decoder to decode the video according to a decoding request of the video.
In the prior art, video data is transmitted and stored in the form of encoded compressed files, so as to reduce the pressure of the video in the transmission and storage processes. Therefore, when playing video data, the video data needs to be decoded first to render and play. In the prior art, decoding and playing of certain video data can only be performed through a preset hardware decoder or a preset software decoder, and a decoder of a proper type cannot be automatically selected for decoding and playing according to the actual situation of a user. In this embodiment, the decoding request of the video is analyzed, and a corresponding hardware decoder or software decoder is called to perform decoding playing according to the analysis result.
Step 102, a user sends a video playing request, wherein the video playing request comprises the format of the video.
103, the player receives the playing request of the video, analyzes the playing request to obtain the format of the video, and generates a decoding request of the video according to the format of the video; and acquiring the version of a hardware decoder of the equipment where the player is positioned, and comparing the format of the video with the video format supported by the version of the hardware decoder.
Based on the fixed types of the video format and the version of the hardware decoder, the corresponding relation between the version of the hardware decoder and whether each video format is supported or not is created in advance. And when the updated video format or hardware decoder version exists, updating the corresponding relation between the version of the hardware decoder and the support of each video format in time. Therefore, when a hardware decoder is used each time, whether the version of the decoder can support the decoding of the video can be detected in advance through the corresponding relation, and the problem of abnormal decoding process caused by the fact that the decoding of the video in the format is not supported is solved.
And step 104, when the version of the hardware decoder supports the decoding of the video, calling the hardware decoder to decode the video data and playing the video data by the player.
The hardware decoder has the advantages of high decoding efficiency, low power consumption, low heat power consumption and the like, so when the hardware decoder supports the format of the video to be decoded, the hardware decoder is preferentially selected to decode and play the video.
And 105, when the version of the hardware decoder does not support the video decoding of the format, calling the software decoder to decode the video data according to the decoding request of the video and playing the video data.
Although the hardware decoder has the advantages of high decoding efficiency, low power consumption and low heat power consumption, the hardware decoder has poor compatibility, large limitation and complicated arrangement, the software decoder has better compatibility and can support the video decoding of various formats, and the decoded video has better picture quality. Therefore, under the condition that hardware decoding is not supported, the problem that video decoding cannot be continued can be avoided by selecting software decoding, and the use experience of a user is improved.
Step 106, when the version of the hardware decoder supports the decoding of the video, detecting the hardware decoding occupancy rate of the hardware decoder and the software decoding occupancy rate of the software decoder;
and when the difference value between the hardware decoding occupancy rate and the software decoding occupancy rate is greater than or equal to a preset threshold value, calling the software decoder to decode the video data according to the decoding request of the video and playing the video data. Preferably, the predetermined threshold is 30% -60%.
When the video decoding supported by the hardware decoder and the software decoder is carried out, the resource occupancy rates of the hardware decoding and the software decoding are compared based on the consideration most favorable for user equipment, and when the occupancy rates of the hardware decoding and the software decoding are greatly different, the decoding mode with less occupied resources is selected for carrying out the video decoding, so that the method is favorable for saving resources, can improve the video decoding efficiency by utilizing better resources, and reduces the risk of abnormal decoding.
And step 107, acquiring a corresponding display interface from the database according to the version of the hardware decoder and the version of the software decoder, and adjusting and displaying the display interface in the display area according to the selected display interface so as to adapt to the current system and equipment model.
Step 108, setting the priority suitable for being called by a decoder in the player, wherein the first priority is the optimized video decoding mode in the invention; the second priority is a video decoding mode which independently adopts hardware decoding; the third priority is a video decoding mode which solely adopts software decoding.
The optimized video decoding playing method of the embodiment automatically identifies the characteristics of the video to be decoded, performs hardware decoding on the video which must be decoded by using hardware, and performs software decoding on the video which can be realized based on software decoding, thereby solving the problems that the video file with all formats cannot be supported by performing pure hardware decoding on the video and the setting is complicated in the prior art; and the problems of high power consumption and low decoding efficiency in the video decoding process caused by pure soft decoding are solved, so that the user resources are not wasted while the video decoding is realized, and the video decoding efficiency is improved.
Example 2
As shown in fig. 2, which is a schematic flow chart of the method for decoding and playing an optimized video according to this embodiment, this embodiment describes, based on embodiment 1, selecting specific content of a video decoder based on an actual situation of a user. The optimized video decoding playing method in the embodiment includes the following steps:
step 201, setting in a player, and calling a hardware decoder or a software decoder to decode the video according to a decoding request of the video.
Step 202, receiving a playing request of the video, analyzing the playing request to obtain a format of the video, and generating a decoding request of the video according to the format of the video; and acquiring the version of a hardware decoder of the equipment where the player is positioned, and comparing the format of the video with the video format supported by the version of the hardware decoder.
Step 203, when the version of the hardware decoder supports the video decoding of the format, detecting the hardware decoding occupancy rate of the hardware decoder.
Step 204, when the hardware decoding occupancy rate reaches or exceeds a hardware decoding occupancy rate threshold value, calling the software decoder to decode the video data according to the decoding request of the video and playing the video data; and when the hardware decoding occupancy rate is smaller than the hardware decoding occupancy rate threshold value, calling the hardware decoder to decode the video data and play the video data according to the decoding request of the video. Preferably, the hardware decoding occupancy threshold is 10% -70%.
And step 205, when the version of the hardware decoder does not support the video decoding of the format, calling the software decoder to decode the video data according to the decoding request of the video and playing the video data.
Step 206, when the version of the hardware decoder supports the decoding of the video, detecting the hardware decoding occupancy rate of the hardware decoder and the software decoding occupancy rate of the software decoder;
and when the difference value between the hardware decoding occupancy rate and the software decoding occupancy rate is greater than or equal to a preset threshold value, calling the software decoder to decode the video data according to the decoding request of the video and playing the video data.
Step 207, acquiring the version of the software decoder of the device where the player is located, and acquiring the software decoding occupancy rate corresponding to each video format under the version of the software decoder from a database; and comparing the format of the video with the software decoding occupancy rate corresponding to each video format to obtain the software decoding occupancy rate required by the video for software decoding.
Under the condition that the versions of the software decoders are stored in the database, the software decoding occupancy rate corresponding to each video format can be predicted through the software decoding occupancy rate, the software decoding occupancy rate which needs to be occupied when the video is subjected to software decoding can be predicted, the software decoding occupancy rate which is large can be converted into hardware decoding, the software decoding occupancy rate which is in the receiving range of a user can be converted into hardware decoding, and the software decoding occupancy rate can be continuously used for decoding and playing the video.
And 208, detecting the current software decoding occupancy rate of the software decoder, and calling the software decoder to decode the video data and play the video data according to the decoding request of the video when the sum of the software decoding occupancy rate and the required software decoding occupancy rate is less than or equal to the software decoding occupancy rate threshold value of the software decoding. Preferably, the software decoding occupancy threshold of the software decoding is 0-90%.
The optimized video decoding and playing method described in this embodiment uses a built-in decoder to accelerate through a hardware decoding port, and can support decoding of more video formats. The mode that hardware is used as the main part and software is used as the auxiliary part is adopted, the decoding of the video with most formats can be realized, and the video decoding range is expanded.
Example 3
As shown in fig. 3, which is a schematic structural diagram of the system for decoding and playing an optimized video according to this embodiment, the system according to this embodiment is used to implement the method for decoding and playing an optimized video according to the foregoing embodiment. The system for optimized video decoding and playing in this embodiment includes: a setting module 301, a hardware decoding judgment module 302, a hardware decoding playing module 303 and a software decoding playing module 304.
The setting module 301 is coupled to the hardware decoding determining module 302, and configured to be set in a player, and invoke a hardware decoder or a software decoder to decode a video according to a video decoding request.
The hardware decoding judgment module 302 is coupled to the setting module 301, the hardware decoding playing module 303, and the software decoding playing module 304, and is configured to receive the playing request of the video, analyze the playing request to obtain the format of the video, and generate the decoding request of the video according to the format of the video; and acquiring the version of a hardware decoder of the equipment where the player is positioned, and comparing the format of the video with the video format supported by the version of the hardware decoder.
The hardware decoding playing module 303 is coupled to the hardware decoding determining module 302, and configured to invoke the hardware decoder to decode and play the video data according to the decoding request of the video when the version of the hardware decoder supports the decoding of the video.
The software decoding playing module 304 is coupled to the hardware decoding determining module 302, and is configured to invoke the software decoder to decode and play the video data according to the decoding request of the video when the version of the hardware decoder does not support the video decoding in the format; further, the method comprises, among others,
detecting a hardware decoding occupancy rate of the hardware decoder and a software decoding occupancy rate of the software decoder when the version of the hardware decoder supports decoding of the video;
and when the difference value between the hardware decoding occupancy rate and the software decoding occupancy rate is greater than or equal to a preset threshold value, calling the software decoder to decode the video data according to the decoding request of the video and playing the video data.
Further, the hardware decoding playing module 303 is further configured to:
when the version of the hardware decoder supports the video decoding of the format, detecting the hardware decoding occupancy rate of the hardware decoder;
when the hardware decoding occupancy rate reaches or exceeds a hardware decoding occupancy rate threshold value, calling the software decoder to decode the video data according to the decoding request of the video and playing the video data;
and when the hardware decoding occupancy rate is smaller than the hardware decoding occupancy rate threshold value, calling the hardware decoder to decode the video data and play the video data according to the decoding request of the video. Preferably, the hardware decoding occupancy threshold is 10% -70%.
Further, wherein the software decodes preselection module 304 to:
acquiring the version of a software decoder of equipment where the player is located, and acquiring the software decoding occupancy rate corresponding to each video format under the version of the software decoder from a database;
comparing the format of the video with the software decoding occupancy rate corresponding to each video format to obtain the software decoding occupancy rate required by the video for software decoding;
and detecting the current software decoding occupancy rate of the software decoder, and calling the software decoder to decode the video data and play the video data according to the decoding request of the video when the sum of the software decoding occupancy rate and the required software decoding occupancy rate is less than or equal to the software decoding occupancy rate threshold value of the software decoding. Preferably, the software decoding occupancy threshold of the software decoding is 0-90%.
By the above embodiments, it can be known that the optimized video decoding and playing method and system of the present invention have the following beneficial effects:
(1) the optimized video decoding playing method and system automatically identify the characteristics of the video to be decoded, perform hardware decoding on the video which needs to be decoded by using hardware, and perform software decoding on the video which can be realized based on software decoding, thereby solving the problems that the prior art can not support all format video files by performing simple hardware decoding on the video and the setting is complicated; and the problems of high power consumption and low decoding efficiency in the video decoding process caused by pure soft decoding are solved, so that the user resources are not wasted while the video decoding is realized, and the video decoding efficiency is improved.
(2) The optimized video decoding playing method and system of the invention use the built-in decoder to accelerate through the hardware decoding port, and can support the decoding of more video formats. The mode that hardware is used as the main part and software is used as the auxiliary part is adopted, the decoding of the video with most formats can be realized, and the video decoding range is expanded.
(3) The optimized video decoding playing method and system provided by the invention automatically select the decoding mode which is suitable for the video to be decoded and has the lowest consumption rate based on the characteristics of the video to be decoded and the support condition of the decoding equipment, thereby improving the decoding efficiency and reducing the consumption in the video decoding process.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Although some specific embodiments of the present invention have been described in detail by way of examples, it should be understood by those skilled in the art that the above examples are for illustrative purposes only and are not intended to limit the scope of the present invention. It will be appreciated by those skilled in the art that modifications may be made to the above embodiments without departing from the scope and spirit of the invention. The scope of the invention is defined by the appended claims.
Claims (8)
1. A method for optimized video decoding and playing, comprising:
the video decoding method comprises the steps of setting in a player, calling a hardware decoder or a software decoder to decode a video according to a decoding request of the video;
receiving a video playing request, analyzing the playing request to obtain the format of the video, and generating a video decoding request according to the format of the video; acquiring the version of a hardware decoder of equipment where the player is located, and comparing the format of the video with the video format supported by the version of the hardware decoder;
when the version of the hardware decoder supports the decoding of the video, calling the hardware decoder to decode the video data according to the decoding request of the video and playing the video data;
when the version of the hardware decoder does not support the video decoding of the format, calling the software decoder to decode the video data according to the decoding request of the video and playing the video data; further, the method comprises, among others,
detecting a hardware decoding occupancy rate of the hardware decoder and a software decoding occupancy rate of the software decoder when the version of the hardware decoder supports decoding of the video;
when the difference value between the hardware decoding occupancy rate and the software decoding occupancy rate is greater than or equal to a preset threshold value, calling the software decoder to decode the video data according to the decoding request of the video and playing the video data;
wherein the method further comprises: acquiring the version of a software decoder of equipment where the player is located, and acquiring the software decoding occupancy rate corresponding to each video format under the version of the software decoder from a database;
comparing the format of the video with the software decoding occupancy rate corresponding to each video format to obtain the software decoding occupancy rate required by the video for software decoding;
and detecting the current software decoding occupancy rate of the software decoder, and calling the software decoder to decode the video data and play the video data according to the decoding request of the video when the sum of the software decoding occupancy rate and the required software decoding occupancy rate is less than or equal to the software decoding occupancy rate threshold value of the software decoding.
2. The method for optimized video decoding and playing of claim 1, wherein when the version of the hardware decoder supports the decoding of the video, the hardware decoder is invoked to decode the video data and play according to the decoding request of the video, further comprising:
when the version of the hardware decoder supports the video decoding of the format, detecting the hardware decoding occupancy rate of the hardware decoder;
when the hardware decoding occupancy rate reaches or exceeds a hardware decoding occupancy rate threshold value, calling the software decoder to decode the video data according to the decoding request of the video and playing the video data;
and when the hardware decoding occupancy rate is smaller than the hardware decoding occupancy rate threshold value, calling the hardware decoder to decode the video data and play the video data according to the decoding request of the video.
3. The method for optimized video decoding and playing of claim 2, wherein the hardware decoding occupancy threshold is 10% -70%.
4. The method for optimized video decoding and playing of claim 1, wherein the software decoding occupancy threshold of the software decoding is 0-90%.
5. A system for optimized video decoding and playback, comprising: the device comprises a setting module, a hardware decoding judgment module, a hardware decoding playing module and a software decoding playing module; wherein,
the setting module is used for setting in a player and calling a hardware decoder or a software decoder to decode the video according to a decoding request of the video;
the hardware decoding judgment module is used for receiving a video playing request, analyzing the playing request to obtain the format of the video, and generating a video decoding request according to the format of the video; acquiring the version of a hardware decoder of equipment where the player is located, and comparing the format of the video with the video format supported by the version of the hardware decoder;
the hardware decoding playing module is used for calling the hardware decoder to decode the video data and play the video data according to the decoding request of the video when the version of the hardware decoder supports the decoding of the video;
the software decoding playing module is used for calling the software decoder to decode the video data and play the video data according to the decoding request of the video when the version of the hardware decoder does not support the video decoding of the format;
wherein the software decoding playing module is further configured to:
detecting a hardware decoding occupancy rate of the hardware decoder and a software decoding occupancy rate of the software decoder when the version of the hardware decoder supports decoding of the video;
when the difference value between the hardware decoding occupancy rate and the software decoding occupancy rate is greater than or equal to a preset threshold value, calling the software decoder to decode the video data according to the decoding request of the video and playing the video data;
wherein the system further comprises: a software decoding preselection module to:
acquiring the version of a software decoder of equipment where the player is located, and acquiring the software decoding occupancy rate corresponding to each video format under the version of the software decoder from a database;
comparing the format of the video with the software decoding occupancy rate corresponding to each video format to obtain the software decoding occupancy rate required by the video for software decoding;
and detecting the current software decoding occupancy rate of the software decoder, and calling the software decoder to decode the video data and play the video data according to the decoding request of the video when the sum of the software decoding occupancy rate and the required software decoding occupancy rate is less than or equal to the software decoding occupancy rate threshold value of the software decoding.
6. The system for optimized video decoding and playback of claim 5, wherein the hardware decoding and playback module is further configured to:
when the version of the hardware decoder supports the video decoding of the format, detecting the hardware decoding occupancy rate of the hardware decoder;
when the hardware decoding occupancy rate reaches or exceeds a hardware decoding occupancy rate threshold value, calling the software decoder to decode the video data according to the decoding request of the video and playing the video data;
and when the hardware decoding occupancy rate is smaller than the hardware decoding occupancy rate threshold value, calling the hardware decoder to decode the video data and play the video data according to the decoding request of the video.
7. The system for optimized video decoding and playing of claim 6, wherein the hardware decoding occupancy threshold is 10% -70%.
8. The system for optimized video decoding and playing of claim 5, wherein the software decoding occupancy threshold of the software decoding is 0-90%.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611187970.2A CN106792066A (en) | 2016-12-20 | 2016-12-20 | The method and system that the video decoding of optimization is played |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611187970.2A CN106792066A (en) | 2016-12-20 | 2016-12-20 | The method and system that the video decoding of optimization is played |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106792066A true CN106792066A (en) | 2017-05-31 |
Family
ID=58896680
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611187970.2A Pending CN106792066A (en) | 2016-12-20 | 2016-12-20 | The method and system that the video decoding of optimization is played |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106792066A (en) |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108737893A (en) * | 2018-06-05 | 2018-11-02 | 上海哔哩哔哩科技有限公司 | Realize that quick first frame goes out the video broadcasting method, device and medium of figure based on hybrid decoding |
CN109120988A (en) * | 2018-08-23 | 2019-01-01 | Oppo广东移动通信有限公司 | Coding/decoding method, device, electronic equipment and storage medium |
CN109151574A (en) * | 2018-10-15 | 2019-01-04 | Oppo广东移动通信有限公司 | Method for processing video frequency, device, electronic equipment and storage medium |
CN109309879A (en) * | 2017-07-27 | 2019-02-05 | 飞狐信息技术(天津)有限公司 | A kind of coding/decoding method, device and equipment |
CN109391843A (en) * | 2017-08-03 | 2019-02-26 | 腾讯科技(深圳)有限公司 | Online Video speed playback method, device, medium and intelligent terminal |
CN109672893A (en) * | 2018-11-30 | 2019-04-23 | 广州市百果园信息技术有限公司 | A kind of video encoding/decoding method, device, equipment and storage medium |
CN110868615A (en) * | 2019-11-25 | 2020-03-06 | 腾讯科技(深圳)有限公司 | Video processing method and device, electronic equipment and storage medium |
WO2020107972A1 (en) * | 2018-11-27 | 2020-06-04 | Oppo广东移动通信有限公司 | Video decoding control method and apparatus, electronic device, and storage medium |
CN112399252A (en) * | 2019-08-14 | 2021-02-23 | 浙江宇视科技有限公司 | Soft and hard decoding control method and device and electronic equipment |
CN112492379A (en) * | 2019-09-12 | 2021-03-12 | 曙光信息产业(北京)有限公司 | Audio and video multi-path concurrent decoding method and device and computer equipment |
CN113055744A (en) * | 2020-08-31 | 2021-06-29 | 惠州华阳通用电子有限公司 | Video decoding method and device |
CN114339257A (en) * | 2022-01-26 | 2022-04-12 | 稿定(厦门)科技有限公司 | Method and apparatus for decoding video file |
CN115065824A (en) * | 2022-08-18 | 2022-09-16 | 荣耀终端有限公司 | Decoder determination method, device, chip, electronic equipment and medium |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101123723A (en) * | 2006-08-11 | 2008-02-13 | 北京大学 | Digital video decoding method based on image processor |
CN103096163A (en) * | 2011-11-01 | 2013-05-08 | 中国移动通信集团公司 | Media player and play method of media file |
CN104780378A (en) * | 2015-04-16 | 2015-07-15 | 腾讯科技(北京)有限公司 | Method, device and player for decoding video |
CN104866381A (en) * | 2014-02-20 | 2015-08-26 | 联想(北京)有限公司 | Information processing method and first electronic equipment |
CN104980788A (en) * | 2015-02-11 | 2015-10-14 | 腾讯科技(深圳)有限公司 | Video decoding method and device |
CN105678681A (en) * | 2015-12-30 | 2016-06-15 | 广东威创视讯科技股份有限公司 | GPU data processing method, GPU, PC architecture processor and GPU data processing system |
CN105992056A (en) * | 2015-01-30 | 2016-10-05 | 腾讯科技(深圳)有限公司 | Video decoding method and device |
CN106131319A (en) * | 2016-06-29 | 2016-11-16 | 努比亚技术有限公司 | A kind of information processing method and device, terminal |
CN106210726A (en) * | 2016-08-08 | 2016-12-07 | 成都佳发安泰科技股份有限公司 | The method that utilization rate according to CPU Yu GPU carries out adaptive decoding to video data |
-
2016
- 2016-12-20 CN CN201611187970.2A patent/CN106792066A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101123723A (en) * | 2006-08-11 | 2008-02-13 | 北京大学 | Digital video decoding method based on image processor |
CN103096163A (en) * | 2011-11-01 | 2013-05-08 | 中国移动通信集团公司 | Media player and play method of media file |
CN104866381A (en) * | 2014-02-20 | 2015-08-26 | 联想(北京)有限公司 | Information processing method and first electronic equipment |
CN105992056A (en) * | 2015-01-30 | 2016-10-05 | 腾讯科技(深圳)有限公司 | Video decoding method and device |
CN104980788A (en) * | 2015-02-11 | 2015-10-14 | 腾讯科技(深圳)有限公司 | Video decoding method and device |
CN104780378A (en) * | 2015-04-16 | 2015-07-15 | 腾讯科技(北京)有限公司 | Method, device and player for decoding video |
CN105678681A (en) * | 2015-12-30 | 2016-06-15 | 广东威创视讯科技股份有限公司 | GPU data processing method, GPU, PC architecture processor and GPU data processing system |
CN106131319A (en) * | 2016-06-29 | 2016-11-16 | 努比亚技术有限公司 | A kind of information processing method and device, terminal |
CN106210726A (en) * | 2016-08-08 | 2016-12-07 | 成都佳发安泰科技股份有限公司 | The method that utilization rate according to CPU Yu GPU carries out adaptive decoding to video data |
Cited By (27)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109309879A (en) * | 2017-07-27 | 2019-02-05 | 飞狐信息技术(天津)有限公司 | A kind of coding/decoding method, device and equipment |
CN109391843B (en) * | 2017-08-03 | 2022-02-25 | 腾讯科技(深圳)有限公司 | Online video speed doubling playing method, device, medium and intelligent terminal |
CN109391843A (en) * | 2017-08-03 | 2019-02-26 | 腾讯科技(深圳)有限公司 | Online Video speed playback method, device, medium and intelligent terminal |
CN108737893B (en) * | 2018-06-05 | 2021-04-30 | 上海哔哩哔哩科技有限公司 | Video playing method, device and medium for realizing fast first frame map based on hybrid decoding |
US11128879B2 (en) | 2018-06-05 | 2021-09-21 | Shanghai Bilibili Technology Co., Ltd. | Hybrid decoding |
CN108737893A (en) * | 2018-06-05 | 2018-11-02 | 上海哔哩哔哩科技有限公司 | Realize that quick first frame goes out the video broadcasting method, device and medium of figure based on hybrid decoding |
CN109120988B (en) * | 2018-08-23 | 2020-07-24 | Oppo广东移动通信有限公司 | Decoding method, decoding device, electronic device and storage medium |
CN109120988A (en) * | 2018-08-23 | 2019-01-01 | Oppo广东移动通信有限公司 | Coding/decoding method, device, electronic equipment and storage medium |
WO2020078130A1 (en) * | 2018-10-15 | 2020-04-23 | Oppo广东移动通信有限公司 | Video processing method and apparatus, electronic device, and storage medium |
CN109151574A (en) * | 2018-10-15 | 2019-01-04 | Oppo广东移动通信有限公司 | Method for processing video frequency, device, electronic equipment and storage medium |
US11562772B2 (en) | 2018-10-15 | 2023-01-24 | Guangdong Oppo Mobile Telecommunications Corp., Ltd. | Video processing method, electronic device, and storage medium |
WO2020107972A1 (en) * | 2018-11-27 | 2020-06-04 | Oppo广东移动通信有限公司 | Video decoding control method and apparatus, electronic device, and storage medium |
US11456013B2 (en) | 2018-11-27 | 2022-09-27 | Guangdong Oppo Mobile Telecommunications Corp., Ltd. | Video decoding control method, electronic device, and storage medium |
CN109672893A (en) * | 2018-11-30 | 2019-04-23 | 广州市百果园信息技术有限公司 | A kind of video encoding/decoding method, device, equipment and storage medium |
CN109672893B (en) * | 2018-11-30 | 2022-01-14 | 广州市百果园信息技术有限公司 | Video decoding method, device, equipment and storage medium |
CN112399252A (en) * | 2019-08-14 | 2021-02-23 | 浙江宇视科技有限公司 | Soft and hard decoding control method and device and electronic equipment |
CN112399252B (en) * | 2019-08-14 | 2023-03-14 | 浙江宇视科技有限公司 | Soft and hard decoding control method and device and electronic equipment |
CN112492379B (en) * | 2019-09-12 | 2023-02-28 | 曙光信息产业(北京)有限公司 | Audio and video multi-path concurrent decoding method and device and computer equipment |
CN112492379A (en) * | 2019-09-12 | 2021-03-12 | 曙光信息产业(北京)有限公司 | Audio and video multi-path concurrent decoding method and device and computer equipment |
CN110868615A (en) * | 2019-11-25 | 2020-03-06 | 腾讯科技(深圳)有限公司 | Video processing method and device, electronic equipment and storage medium |
CN110868615B (en) * | 2019-11-25 | 2021-05-28 | 腾讯科技(深圳)有限公司 | Video processing method and device, electronic equipment and storage medium |
CN113055744A (en) * | 2020-08-31 | 2021-06-29 | 惠州华阳通用电子有限公司 | Video decoding method and device |
CN113055744B (en) * | 2020-08-31 | 2023-07-07 | 惠州华阳通用电子有限公司 | Video decoding method and device |
CN114339257A (en) * | 2022-01-26 | 2022-04-12 | 稿定(厦门)科技有限公司 | Method and apparatus for decoding video file |
CN114339257B (en) * | 2022-01-26 | 2023-11-28 | 稿定(厦门)科技有限公司 | Method and apparatus for decoding video file |
CN115065824A (en) * | 2022-08-18 | 2022-09-16 | 荣耀终端有限公司 | Decoder determination method, device, chip, electronic equipment and medium |
CN115065824B (en) * | 2022-08-18 | 2023-02-24 | 荣耀终端有限公司 | Decoder determination method, device, chip, electronic equipment and medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106792066A (en) | The method and system that the video decoding of optimization is played | |
CN109168078B (en) | Video definition switching method and device | |
JP5004309B2 (en) | Movie output method and movie output device | |
CN102074257A (en) | Software and hardware-decoding general multi-media playing equipment and playing method thereof | |
US9917876B2 (en) | Video information playing system and method | |
CN101577110A (en) | Method for playing videos and video player | |
CN105979355A (en) | Method and device for playing video | |
CN101277381A (en) | Method and apparatus for processing video image | |
CN109120988B (en) | Decoding method, decoding device, electronic device and storage medium | |
CN105551512A (en) | Audio format conversion method and apparatus | |
CN105872755A (en) | Video playing method and device | |
KR20140145584A (en) | Method and system of playing online video at a speed variable in real time | |
CN103841451B (en) | Multi-medium play method, device and terminal | |
CN106060628A (en) | DirectShow-based method and system supporting variable coding | |
CN102802021A (en) | Method and device for editing multi-media data | |
CN106878290B (en) | Audio and video playing method and device | |
CN101150729A (en) | Audio and video synchronization playing method | |
CN105323593A (en) | Multimedia transcoding scheduling method and multimedia transcoding scheduling device | |
CN110868610B (en) | Streaming media transmission method, device, server and storage medium | |
US20150271441A1 (en) | Method and Device for Extracting Subtitles | |
CN113055744A (en) | Video decoding method and device | |
CN105338371A (en) | Multimedia transcoding scheduling method and apparatus | |
US8947597B2 (en) | Video reproducing device, controlling method of video reproducing device, and control program product | |
CN101489052B (en) | Subtitle data processing method and apparatus | |
CN100546389C (en) | Information processor and information processing method |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170531 |