Video encoding method, video decoding method, and related devices
By obtaining matching encoding parameters based on the device characteristics of the target device, the problem of low utilization of device encoding performance is solved, and efficient encoding and transmission of video data is achieved.
Patent Information
- Application Number
- CN202211255345.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-13
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2042-10-13
AI Technical Summary
In video communication scenarios, the device uses default encoding parameters to encode the video data, resulting in different encoding performances of different devices, failing to fully utilize the encoding performance of the device, and having a low effective utilization rate.
By determining the device characteristics of the target device, obtaining the matching target encoding parameters, and controlling the encoder to encode the video data according to the target encoding parameters.
It improves the effective utilization of device encoding performance and ensures efficient encoding and transmission of video data.
Smart Images

Figure CN115589485B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of encoding and decoding, and more particularly, to video encoding methods, video decoding methods, and related devices. Background Art
[0002] This section aims to provide background or context for embodiments of the present disclosure. The description herein is not admitted to be prior art merely because it is included in this section.
[0003] In the communication scenario of video, for the sake of real-time performance and power consumption, a device needs to encode video data so as to reduce the amount of data transmitted by the device.
[0004] In exemplary technologies, a device encodes video data using default encoding parameters. However, the encoding performances of different devices are different, and the encoding operation of video data using default encoding parameters does not fully utilize the encoding performance of the encoder of the device, and the effective utilization rate of the device encoding performance is relatively low. Summary of the Invention
[0005] The present disclosure provides a video encoding method, a video decoding method, and related devices to solve the problem of relatively low effective utilization rate of device encoding performance.
[0006] In a first aspect of the embodiments of the present disclosure, a video encoding method is provided, including: determining device characteristics of a target device; obtaining target encoding parameters matching the target device according to the device characteristics; controlling an encoder to perform an encoding operation on video data according to the target encoding parameters.
[0007] In an embodiment of the present disclosure, the obtaining target encoding parameters matching the target device according to the device characteristics includes: obtaining a first configuration file according to the device characteristics; in response to the first configuration file including encoding parameters corresponding to the device characteristics, obtaining target encoding parameters matching the target device according to the first configuration file; in response to the first configuration file not including encoding parameters corresponding to the device characteristics, obtaining target encoding parameters matching the target device according to default encoding parameters.
[0008] In another embodiment of the present disclosure, the obtaining target encoding parameters matching the target device according to the first configuration file includes: obtaining a first whitelist and a first blacklist from the first configuration file, where the first blacklist includes disabled first encoding parameters, and the first whitelist includes enabled second encoding parameters; determining target encoding parameters according to the first blacklist and / or the first whitelist, where the target encoding parameters are the enabled second encoding parameters.
[0009] In another embodiment of the present disclosure, the first configuration file is stored in the server and / or the target device.
[0010] In another embodiment of the present disclosure, the control encoder encodes the video data according to the target encoding parameters, including: obtaining a data source of the video data; in response to the data source being a first preset data source, controlling a hardware encoder to encode the video data according to the target encoding parameters; in response to the data source being a second preset data source, controlling a software encoder to encode the video data according to the target encoding parameters.
[0011] In another embodiment of the present disclosure, the control encoder encodes the video data according to the target encoding parameters, including: in response to a resolution of an image in the video data being greater than a preset resolution, controlling a hardware encoder to encode the video data according to the target encoding parameters; in response to the resolution of the image in the video data being less than or equal to the preset resolution, controlling a software encoder to encode the video data according to the target encoding parameters.
[0012] In another embodiment of the present disclosure, after the control hardware encoder encodes the video data according to the target encoding parameters, it further includes: obtaining a first number of frames of an image input to the hardware encoder in a previous time period, a second number of frames of an image output by the hardware encoder, and a first frame loss rate of the hardware encoder in the previous time period, where the video data includes multiple images; determining a first influence weight of the first frame loss rate on encoding of the hardware encoder in the current time period, and determining a first predicted frame loss rate of the hardware encoder in the current time period according to the first number of frames, the second number of frames, the first frame loss rate, and the first influence weight;
[0013] When the first predicted frame loss rate is greater than a first preset value, controlling a software encoder to encode the video data according to the target encoding parameters.
[0014] In another embodiment of the present disclosure, the target encoding parameters are used for the hardware encoder to encode the video data. The control hardware encoder encodes the video data according to the target encoding parameters, and further includes: obtaining encoding capability parameters of a target device, and verifying the target encoding parameters according to the encoding capability parameters; in response to the target encoding parameters passing the verification, controlling the hardware encoder to encode the video data according to the target encoding parameters.
[0015] In another embodiment of the present disclosure, it further includes: obtaining the target frame rate, target encoding bit rate, actual total data volume of the encoded images, and actual number of frames of the encoded images of the encoder within the current time period, where the video data includes multiple images; determining the average data volume of each of the encoded images according to the target encoding bit rate and the target frame rate; determining a bit rate correction ratio according to the average data volume, the actual total data volume, and the actual number of frames; and adjusting the target encoding bit rate of the encoder in the next time period according to the bit rate correction ratio.
[0016] In another embodiment of the present disclosure, the controlling the encoder to encode the video data according to the target encoding parameters includes: in response to the format of the images in the video data not matching the encoding format supported by the encoder, converting the format of the images in the video data into the encoding format supported by the encoder, and controlling the encoder to encode the video data with the converted format according to the target encoding parameters.
[0017] In another embodiment of the present disclosure, the device features include the model of the target device and / or the model of the components in the target device.
[0018] In a second aspect of the embodiment of the present disclosure, a video decoding method is further provided, including: determining the device features of the target device; obtaining the target decoding parameters matching the target device according to the device features; and controlling the decoder to decode the video data according to the target decoding parameters.
[0019] In an embodiment of the present disclosure, the obtaining the target decoding parameters matching the target device according to the device features includes: obtaining a second configuration file according to the device features; and when the second configuration file includes the decoding parameters corresponding to the device features, obtaining the target decoding parameters matching the target device according to the second configuration file.
[0020] When the second configuration file does not include the decoding parameters corresponding to the device features, obtaining the target decoding parameters matching the target device according to the default decoding parameters.
[0021] In another embodiment of the present disclosure, the obtaining the target decoding parameters matching the target device according to the second configuration file includes: obtaining a second whitelist and a second blacklist from the second configuration file, where the second blacklist includes disabled first decoding parameters, and the second whitelist includes enabled second decoding parameters; and determining the target decoding parameters according to the second blacklist and / or the second whitelist, where the target decoding parameters are the enabled second decoding parameters.
[0022] In another embodiment of the present disclosure, the second configuration file is stored in the server and / or the target device.
[0023] In another embodiment of the present disclosure, the control decoder decodes the video data according to the target decoding parameters, including:
[0024] Obtain the data source of the video data;
[0025] In response to the data source being the first preset data source, control the hardware decoder to decode the video data according to the target decoding parameters;
[0026] In response to the data source being the second preset data source, control the software decoder to decode the video data according to the target decoding parameters.
[0027] In another embodiment of the present disclosure, the control decoder decodes the video data according to the target decoding parameters, including:
[0028] The resolution of the image in the video data;
[0029] In response to the resolution of the image in the video data being greater than the preset resolution, control the hardware decoder to decode the video data according to the target decoding parameters;
[0030] In response to the resolution of the image in the video data being less than or equal to the preset resolution, control the software decoder to decode the video data according to the target decoding parameters.
[0031] In another embodiment of the present disclosure, after the control hardware decoder decodes the video data according to the target decoding parameters, it further includes:
[0032] Obtain the third number of frames of the images input into the hardware decoder, the fourth number of frames of the images output by the hardware decoder, and the second frame drop rate of the hardware decoder in the previous time period, where the video data includes multiple images;
[0033] Determine the second influence weight of the second frame drop rate on the decoding of the hardware decoder in the current time period, and determine the second predicted frame drop rate of the hardware decoder in the current time period according to the third number of frames, the fourth number of frames, the second influence weight, and the second frame drop rate;
[0034] When the second predicted frame drop rate is greater than the second preset value, control the software decoder to decode the video data according to the target decoding parameters.
[0035] In another embodiment of the present disclosure, the target decoding parameter is used by the hardware decoder to decode the video data. Controlling the hardware decoder to perform a decoding operation on the video data according to the target decoding parameter further includes:
[0036] Obtaining the decoding capability parameter of the target device and verifying the target decoding parameter according to the decoding capability parameter;
[0037] In response to the target decoding parameter passing the verification, controlling the hardware decoder to perform a decoding operation on the video data according to the target decoding parameter.
[0038] In another embodiment of the present disclosure, after controlling the decoder to perform a decoding operation on the video data according to the target decoding parameter, it includes: determining the format of the decoded data, where the decoded data is the data after the video data is decoded; in response to the decoded data being data to be transmitted, converting the format of the decoded data into a playback format supported by an external device, where the external device is a device that receives the decoded data; in response to the decoded data being data to be played, converting the format of the decoded data into a playback format supported by the target device.
[0039] In another embodiment of the present disclosure, the device feature includes the model of the target device and / or the model of the components in the target device.
[0040] In a third aspect of the embodiments of the present disclosure, there is also provided a video encoding device, including: a first determination module, configured to determine the device feature of the target device; a first acquisition module, configured to acquire a target encoding parameter according to the device feature; a first control module, configured to control an encoder to perform an encoding operation on video data according to the target encoding parameter.
[0041] In an embodiment of the present disclosure, the first acquisition module includes: a first acquisition unit, configured to acquire a first configuration file according to the device feature; the first acquisition unit is further configured to, in response to the first configuration file including the encoding parameter corresponding to the device feature, acquire the target encoding parameter matching the target device according to the first configuration file; the first acquisition unit is further configured to, in response to the first configuration file not including the encoding parameter corresponding to the device feature, acquire the target encoding parameter matching the target device according to the default encoding parameter.
[0042] In another embodiment of the present disclosure, the first acquisition unit includes: a first acquisition subunit, configured to acquire a first whitelist and a first blacklist from the first configuration file, the first blacklist including disabled first encoding parameters, and the first whitelist including enabled second encoding parameters; a first determination subunit, configured to determine target encoding parameters according to the first blacklist and / or the first whitelist, the target encoding parameters being the enabled second encoding parameters.
[0043] In another embodiment of the present disclosure, the first configuration file is stored in a server and / or the target device.
[0044] In another embodiment of the present disclosure, the first control module includes: a second acquisition unit, configured to acquire a data source of the video data; a first control unit, configured to, in response to the data source being a first preset data source, control a hardware encoder to perform an encoding operation on the video data according to the target encoding parameters; the first control unit is further configured to, in response to the data source being a second preset data source, control a software encoder to perform an encoding operation on the video data according to the target encoding parameters.
[0045] In another embodiment of the present disclosure, the first control module includes: a second control unit, configured to, in response to a resolution of an image in the video data being greater than a preset resolution, control a hardware encoder to perform an encoding operation on the video data according to the target encoding parameters; the second control unit is further configured to, in response to the resolution of the image in the video data being less than or equal to the preset resolution, control a software encoder to perform an encoding operation on the video data according to the target encoding parameters.
[0046] In another embodiment of the present disclosure, the first control module further includes: a third acquisition unit, configured to acquire a first number of frames of an image input into the hardware encoder, a second number of frames of an image output by the hardware encoder, and a first frame loss rate of the hardware encoder in a previous time period, the video data including multiple images; a second determination unit, configured to determine a first influence weight of the first frame loss rate on encoding of the hardware encoder in a current time period, and determine a first predicted frame loss rate of the hardware encoder in the current time period according to the first number of frames, the second number of frames, the first frame loss rate, and the first influence weight; the second control unit is further configured to, when the first predicted frame loss rate is greater than a first preset value, control a software encoder to perform an encoding operation on the video data according to the target encoding parameters.
[0047] In another embodiment of the present disclosure, it further includes: the first acquisition module is further configured to acquire the encoding capability parameter of the target device, and verify the target encoding parameter according to the encoding capability parameter; the first control module is further configured to, in response to the target encoding parameter passing the verification, control the hardware encoder to perform an encoding operation on the video data according to the target encoding parameter.
[0048] In another embodiment of the present disclosure, it further includes: the first acquisition module is further configured to acquire the target frame rate, target encoding bit rate, actual total data volume of the encoded images, and actual number of frames of the encoded images of the encoder in the current time period, where the video data includes multiple images; the first determination module is further configured to determine the average data volume of each of the encoded images according to the target encoding bit rate and the target frame rate; the first determination module is further configured to determine a bit rate correction ratio according to the average data volume, the actual total data volume, and the actual number of frames; the adjustment module is configured to adjust the target encoding bit rate of the encoder in the next time period according to the bit rate correction ratio.
[0049] In another embodiment of the present disclosure, the first control module includes: a conversion unit, configured to, in response to the format of the images in the video data not matching the encoding format supported by the encoder, convert the format of the images in the video data into the encoding format supported by the encoder, and control the encoder to perform an encoding operation on the video data after the format conversion according to the target encoding parameter.
[0050] In another embodiment of the present disclosure, the device feature includes the model of the target device and / or the model of the components in the target device.
[0051] In the fourth aspect of the implementation manner of the present disclosure, a video decoding device is further provided, including: a second determination module, configured to determine the device feature of the target device; a second acquisition module, configured to acquire a target decoding parameter according to the device feature; a second control module, configured to control the decoder to perform a decoding operation on the video data according to the target decoding parameter.
[0052] In an embodiment of the present disclosure, the second acquisition module includes: a fourth acquisition unit, configured to acquire a second configuration file according to the device feature; the fourth acquisition unit is further configured to, in response to the second configuration file including the decoding parameter corresponding to the device feature, acquire the target decoding parameter matching the target device according to the second configuration file; the fourth acquisition unit is further configured to, in response to the second configuration file not including the decoding parameter corresponding to the device feature, acquire the target decoding parameter matching the target device according to the default decoding parameter.
[0053] In another embodiment of the present disclosure, the fourth acquisition unit includes: a second acquisition subunit, configured to acquire a second whitelist and a second blacklist from the second configuration file, the second blacklist including disabled first decoding parameters, and the second whitelist including enabled second decoding parameters; a second determination subunit, configured to determine target decoding parameters according to the second blacklist and / or the second whitelist, the target decoding parameters being the enabled second decoding parameters.
[0054] In another embodiment of the present disclosure, the second configuration file is stored in a server and / or the target device.
[0055] In another embodiment of the present disclosure, the second control module includes: a fifth acquisition unit, configured to acquire a data source of the video data; a third control unit, configured to control a hardware decoder to perform a decoding operation on the video data according to the target decoding parameters in response to the data source being a first preset data source; the third control unit is further configured to control a software decoder to perform a decoding operation on the video data according to the target decoding parameters in response to the data source being a second preset data source.
[0056] In another embodiment of the present disclosure, the second control module includes: a sixth acquisition unit, configured to acquire a resolution of an image in the video data; a fourth control unit, configured to control a hardware decoder to perform a decoding operation on the video data according to the target decoding parameters in response to the resolution of the image in the video data being greater than a preset resolution; the fourth control unit is further configured to control a software decoder to perform a decoding operation on the video data according to the target decoding parameters in response to the resolution of the image in the video data being less than or equal to the preset resolution.
[0057] In another embodiment of the present disclosure, the second control module further includes: a sixth acquisition unit, configured to acquire a third number of frames of an image input into the hardware decoder, a fourth number of frames of an image output by the hardware decoder, and a second frame drop rate of the hardware decoder in a previous time period, the video data including multiple images; a fourth determination unit, configured to determine a second influence weight of the second frame drop rate on decoding of the hardware decoder in a current time period, and determine a second predicted frame drop rate of the hardware decoder in the current time period according to the third number of frames, the fourth number of frames, the second influence weight, and the second frame drop rate; the sixth acquisition unit is further configured to control a software decoder to perform a decoding operation on the video data according to the target decoding parameters when the second predicted frame drop rate is greater than a second preset value.
[0058] In another embodiment of the present disclosure, it further includes: the second acquisition module is further configured to acquire the decoding capability parameter of the target device, and verify the target decoding parameter according to the decoding capability parameter; the second control module is further configured to, in response to the target decoding parameter passing the verification, control the hardware decoder to perform a decoding operation on the video data according to the target decoding parameter.
[0059] In another embodiment of the present disclosure, it further includes: the second determination module is further configured to determine the format of the decoded data, where the decoded data is the data after the video data is decoded; the conversion module is configured to, in response to the decoded data being data to be transmitted, convert the format of the decoded data into a playback format supported by an external device, where the external device is a device that receives the decoded data; the conversion module is configured to, in response to the decoded data being data to be played, convert the format of the decoded data into a playback format supported by the target device.
[0060] In another embodiment of the present disclosure, the device feature includes the model of the target device and / or the model of the components in the target device.
[0061] In the fifth aspect of the implementation manner of the present disclosure, a medium is further provided, including: computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the video encoding method or the video decoding method as described above.
[0062] In the sixth aspect of the implementation manner of the present disclosure, a computing device is further provided, including:
[0063] a memory and a processor;
[0064] the memory stores computer-executable instructions;
[0065] the processor executes the computer-executable instructions stored in the memory, so that the processor executes the video encoding method or the video decoding method as described above.
[0066] In the implementation manner of the present disclosure, by acquiring the encoding parameters matched by the device through the device features of the device, the device encodes the video data based on its own encoding performance, improving the effective utilization rate of the device encoding performance. Description of the Drawings
[0067] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features, and advantages of the exemplary embodiments of the present disclosure will become readily understandable. In the drawings, several embodiments of the present disclosure are shown in an exemplary rather than restrictive manner, where:
[0068] Figure 1Schematically shows a schematic diagram of an application scenario of a video encoding method / video decoding method according to an embodiment of the present disclosure;
[0069] Figure 2 Schematically shows a schematic flowchart of an embodiment of a video encoding method according to the present disclosure;
[0070] Figure 3 Schematically shows a schematic flowchart of another embodiment of a video encoding method according to the present disclosure;
[0071] Figure 4 Schematically shows a schematic flowchart of still another embodiment of a video encoding method according to the present disclosure;
[0072] Figure 5 Schematically shows a schematic flowchart of yet another embodiment of a video encoding method according to the present disclosure;
[0073] Figure 6 Schematically shows a schematic flowchart of still another embodiment of a video encoding method according to the present disclosure;
[0074] Figure 7 Schematically shows a schematic flowchart of another embodiment of a video encoding method according to the present disclosure;
[0075] Figure 8 Schematically shows a schematic flowchart of a video encoding method according to the present disclosure;
[0076] Figure 9 Schematically shows a schematic flowchart of an embodiment of a video decoding method according to the present disclosure;
[0077] Figure 10 Schematically shows a schematic flowchart of another embodiment of a video decoding method according to the present disclosure;
[0078] Figure 11 Schematically shows a schematic flowchart of still another embodiment of a video decoding method according to the present disclosure;
[0079] Figure 12 Schematically shows a schematic flowchart of yet another embodiment of a video decoding method according to the present disclosure;
[0080] Figure 13 Schematically shows a schematic flowchart of still another embodiment of a video decoding method according to the present disclosure;
[0081] Figure 14 Schematically shows a schematic flowchart of a video decoding method according to the present disclosure;
[0082] Figure 15 Schematically shows a schematic diagram of a program product provided according to an embodiment of the present disclosure;
[0083] Figure 16 Schematically shows a schematic structural diagram of a video encoding device provided according to an embodiment of the present disclosure;
[0084] Figure 17 Schematically shows a schematic structural diagram of a video decoding device provided according to an embodiment of the present disclosure;
[0085] Figure 18 Schematically shows a schematic structural diagram of a computing device provided according to an embodiment of the present disclosure.
[0086] In the drawings, the same or corresponding reference numerals denote the same or corresponding parts. Detailed implementation manners
[0087] The principles and spirit of the present disclosure will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are given only to enable those skilled in the art to better understand and thus implement the present disclosure, rather than limiting the scope of the present disclosure in any way. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to be able to convey the scope of the present disclosure fully to those skilled in the art.
[0088] Those skilled in the art know that the embodiments of the present disclosure can be implemented as a system, device, equipment, method, or computer program product. Therefore, the present disclosure can be specifically implemented in the following forms, namely: completely hardware, completely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.
[0089] According to an embodiment of the present disclosure, a video encoding method, a decoding method, and related devices are provided.
[0090] In addition, the number of any elements in the drawings is for illustration rather than limitation, and any naming is only for distinction and does not have any limiting meaning.
[0091] In addition, the data involved in the present disclosure can be data authorized by users or fully authorized by all parties. The collection, dissemination, use, etc. of the data all comply with the requirements of relevant national laws and regulations, and the embodiments / embodiments of the present disclosure can be combined with each other.
[0092] Below, with reference to several representative embodiments of the present disclosure, the principles and spirit of the present disclosure will be elaborated in detail. Summary of the Invention
[0094] In a video communication scenario, in a video communication scenario, considering real-time performance and power consumption, the device needs to encode and decode video data so as to reduce the amount of data transmitted by the device.
[0095] The inventor found that the device encodes and decodes video data using default encoding and decoding parameters. However, the encoding and decoding performance of different devices varies, and using the default encoding and decoding parameters for video data encoding and decoding operations does not fully utilize the encoding performance of the device's codec, resulting in a low effective utilization rate of the device's encoding and decoding performance.
[0096] Therefore, the inventor came up with the idea of obtaining the optimal encoding and decoding parameters matching the device through the device characteristics of the device, enabling the device to encode and decode video data based on its own encoding and decoding performance, thereby improving the effective utilization rate of the device's encoding performance.
[0097] Overview of Application Scenarios
[0098] First, refer to Figure 1 , Figure 1 which is a schematic diagram of the application scenario of the video encoding method according to the embodiments of the present disclosure. The video encoding device 100 is communicatively connected to the receiving end 200. The video encoding device 100 and the receiving end 200 can conduct video communication. The video encoding device 100 acquires the collected video data, obtains its own device characteristics, acquires the target encoding parameters matching the video encoding device 100 based on its own device characteristics, controls the encoder to perform encoding operations on the video data according to the target encoding parameters, and then the video encoding device 100 sends the encoded video data to the receiving end 200.
[0099] Exemplary Method
[0100] Next, in combination with Figure 1 the application scenario, refer to Figures 2 - 7 to describe the video encoding method according to the exemplary embodiments of the present disclosure. It should be noted that the above application scenario is only shown for the convenience of understanding the spirit and principle of the present disclosure, and the embodiments of the present disclosure are not restricted in this regard. On the contrary, the embodiments of the present disclosure can be applied to any applicable scenario.
[0101] Refer to Figure 2 , Figure 2 which exemplarily shows a schematic flowchart of an embodiment of the video encoding method provided according to an embodiment of the present disclosure. The video encoding method includes:
[0102] Step S201, determining the device characteristics of the target device.
[0103] In this embodiment, the execution subject is the video encoding device. Exemplarily, the video encoding device in this embodiment can be any device with video communication capabilities. For example, the video encoding device can be a mobile phone, a computer, a tablet, etc. For the convenience of description, the encoding device is hereinafter used to refer to the video encoding device.
[0104] The encoding device obtains the device characteristics of the target device, which is used to encode video data. The device characteristics include the model of the target device and / or the models of the components in the target device. For example, the model of the component in the target device is the model of the encoder, and it can also be the model of the processor, etc. The model of the target device is, for example, the device identifier of the target device.
[0105] It should be noted that when the encoding device collects video data and needs to send the video data to the receiving end, the video device determines the device characteristics of the target device. Or, when the encoding device runs the video communication function, the encoding device determines the device characteristics of the target device.
[0106] Step S202, obtain the target encoding parameters matching the target device according to the device characteristics.
[0107] In this embodiment, the encoding device can store encoding parameters by itself, and each stored encoding parameter is all the encoding parameters that may be used for encoding video. In addition, a mapping table may also be stored in the encoding device, and the mapping table stores the mapping relationship between the encoding parameters and the device characteristics. After obtaining the device characteristics, the encoding device can obtain the encoding parameters matching the device characteristics through the mapping table as the target encoding parameters.
[0108] Step S203, control the encoder to perform an encoding operation on the video data according to the target encoding parameters.
[0109] An encoder is provided in the encoding device. After obtaining the target encoding parameters, the encoding device then controls the encoder to encode the video data according to the target encoding parameters to obtain the encoded video data, and then sends the encoded video data to the receiving end. The video data can be collected by the encoding device or transmitted by an external device.
[0110] In this embodiment, by obtaining the encoding parameters matching the device according to the device characteristics of the device, the device encodes the video data based on its own encoding performance, improving the effective utilization rate of the device encoding performance.
[0111] Refer to Figure 3 , Figure 3 schematically shows a flowchart of another embodiment of the video encoding method provided according to an embodiment of the present disclosure. Based on Figure 2 the embodiment shown, step S202 includes:
[0112] Step S301, obtain the first configuration file according to the device characteristics.
[0113] In this embodiment, the encoding device obtains the first configuration file based on the device characteristics.
[0114] In one example, all the encoding parameters used for encoding video data are stored in an encoding device, and the encoding device sets the status of the encoding parameters based on different device characteristics. Different device characteristics correspond to encoding parameters in different states, and the encoding parameters in each different state are configured as a first configuration file corresponding to the device characteristics, that is, each device characteristic stored in the encoding device corresponds to a first configuration file. The status includes an enabled status and a disabled status. The encoding device can use the encoding parameters in the enabled status to encode data, but the encoding device cannot use the encoding parameters in the disabled status for encoding. The encoding device obtains the corresponding first configuration file based on its own device characteristics. In addition, the encoding device can add the encoding parameters available for the target device to a file to obtain the first configuration file, and associate and store the first configuration file with the device characteristics of the target device. The encoding device can obtain the first configuration file through the device characteristics of the target device.
[0115] In another example, all the encoding parameters used for encoding video data are stored in a server, and the server sets the status of the encoding parameters based on different device characteristics. Different device characteristics correspond to encoding parameters in different states, and the encoding parameters in each different state are configured as a first configuration file corresponding to the device characteristics, that is, each device characteristic stored in the server corresponds to a first configuration file. After obtaining the device characteristics, the encoding device generates a request to obtain the encoding parameters based on the device characteristics. The encoding device sends the request to the server. The server obtains the device characteristics of the encoding device based on the request, and then sends the first configuration file matching the device configuration to the encoding device. In addition, the server can add the encoding parameters available for the target device to a file to obtain the first configuration file, and associate and store the first configuration file with the device characteristics of the target device. The server obtains the first configuration file based on the device characteristics of the target device sent by the encoding device, and feeds back the first configuration location to the encoding device.
[0116] It can be understood that the first configuration file is stored in the server and / or the target device.
[0117] Step S302, in response to the first configuration file including the encoding parameters corresponding to the device characteristics, obtain the target encoding parameters matching the target device according to the first configuration file.
[0118] In this embodiment, the encoding device can perform software encoding or hardware encoding on video data. However, the target device cannot use some encoding parameters for hardware encoding or software encoding, and the first configuration file will indicate the encoding parameters that the target device cannot use. Exemplarily, the encoding parameters included in the first configuration file and the corresponding status can be represented by fields. For example, the encoding parameters correspond to field A, and the status corresponds to field B. The combination of field A - field B is the encoding parameters and the corresponding status.
[0119] After obtaining the first configuration file corresponding to the device characteristics, the encoding device first determines the target method for encoding video data by itself, and the target method is hardware encoding or software encoding. If the encoding parameters in the first configuration file indicate that the target device supports encoding using the target method, it can be determined that the first configuration file includes the encoding parameters corresponding to the device characteristics, and then the target encoding parameters matching the target device can be obtained from the first configuration file.
[0120] In addition, the first configuration file includes a first whitelist and a first blacklist. The first blacklist includes the disabled first encoding parameters, and the first whitelist includes the enabled second encoding parameters. The device obtains the first whitelist and the first blacklist from the first configuration file, and then determines the target encoding parameters according to the first blacklist and / or the first whitelist. The target encoding parameters are the enabled second encoding parameters. Each enabled second encoding parameter forms a table, that is, the first whitelist is stored in the configuration file in the form of a table. Each disabled first encoding parameter forms a table, that is, the first blacklist is stored in the configuration file in the form of a table.
[0121] In one example, the encoding device can determine all the first encoding parameters in the first whitelist as the target encoding parameters.
[0122] In another example, all the encoding parameters in the first configuration file have corresponding statuses, that is, all the encoding parameters are divided into two sets. One set is the first whitelist, and the other set is the first blacklist. The encoding device can determine the encoding parameters in the first configuration file except the first blacklist as the target encoding parameters, that is, the encoding device can determine each target encoding parameter from the first configuration file according to the first blacklist.
[0123] In yet another example, some of the encoding parameters in the first configuration file have corresponding statuses, that is, all the encoding parameters are divided into three sets. One set is the first whitelist, one set is the first blacklist, and the last set includes the encoding parameters with unset statuses. The encoding device can determine the encoding parameters with unset statuses from the first configuration file through the first blacklist and the first whitelist, and display each encoding parameter with an unset status for the user to set the status. The encoding device determines the encoding parameters with the enabled status and the first encoding parameters in the first whitelist as the target encoding parameters, that is, the encoding device can determine the target encoding parameters through the first blacklist and the first whitelist.
[0124] It should be noted that the first coding parameter in the first whitelist is determined based on different data source scenarios. The data source scenarios are, for example, screen sharing document scenarios, screen sharing game scenarios, camera capture scenarios, video file input scenarios, etc. Different data source scenarios can adopt different coding parameters, that is, a data source scenario and device characteristics correspond to a first configuration file, and the coding device obtains the corresponding first configuration file through the device characteristics and the current data source scenario.
[0125] In addition, each first coding parameter in the first whitelist is obtained through coding tests. For example, the coding parameters originally used by the coding device for video coding are A, B, C, and D, that is, the first whitelist includes A, B, C, and D. Then, the coding parameter E unique to other devices is used, so that the coding device uses A, B, C, D, and E for video coding. If the coding device can encode video data with better quality, E is added to the first whitelist. The coding device encodes video by using the coding parameters of other devices and its own original coding parameters. If successful, the first coding parameter in the first whitelist can be extended. If failed, the first coding parameter in the first blacklist can be extended. It can be understood that in this embodiment, the coding parameters included in the first configuration file are more than the original configuration parameters of the coding device, so that the coding ability of the coding device can be better utilized based on the first configuration file, that is, the effective utilization rate of the coding performance of the coding device is relatively high.
[0126] Step S303, in response to the first configuration file not including the coding parameter corresponding to the device characteristics, obtain the target coding parameter matching the target device according to the default coding parameter.
[0127] If it is indicated in the first configuration file that the coding parameter does not support the target device to adopt the target method, it can be determined that the first configuration file does not include the coding parameter corresponding to the device characteristics. The coding device then uses the default coding parameter to obtain the target coding parameter matching the target device, that is, determines the stored default coding parameter as the target coding parameter.
[0128] It should be noted that the default encoding parameters include the externally input encoding parameters and the system encoding parameters stored in the encoding device itself. The externally input encoding parameters can be the encoding parameters input by an external device or the encoding parameters carried by an application in the encoding device. The application can be an application that requests to obtain the first configuration file from the server. When the encoding parameters corresponding to the special features are not included in the first configuration file, the encoding device obtains the externally input encoding parameters and verifies the externally input encoding parameters. If the verification is passed, the externally input encoding parameters are used as the default encoding parameters; if the verification fails, the system encoding parameters are determined as the default encoding parameters. The verification method can be to verify whether the encoding ability of the encoder supports the externally input encoding parameters. If it supports, the externally input encoding parameters pass the verification; if it does not support, the externally input encoding parameters fail the verification. In particular, when performing hardware encoding, it is necessary to verify the externally input encoding parameters.
[0129] In this embodiment, the encoding parameters used for data encoding by different devices are different. By setting the device features of the device and the encoding parameters that the device can adopt as the first configuration file, that is, the encoding parameters that the device can adopt are centralized, which is convenient for centralized maintenance of the encoding parameters and reduces the maintenance cost.
[0130] Refer to Figure 4 , Figure 4 schematically shows a flowchart of another embodiment of the video encoding method provided according to an embodiment of the present disclosure. Based on Figures 2 to 3 any of the embodiments shown in
[0131] Step S401, obtain the data source of the video data.
[0132] In this embodiment, the ways for the encoding device to encode the video data include hardware encoding and software encoding. Different data sources of the video data result in different encoding methods. The data source scenarios include screen sharing document scenarios, screen sharing game scenarios, camera capture scenarios, video file input scenarios, etc. The encoding device obtains the data source of the video data, that is, determines the source of the video data.
[0133] Data source scenarios with higher requirements for video quality are suitable for software encoding, while data source scenarios with lower requirements for video quality are suitable for hardware encoding. In this embodiment, the data source with low requirements for video quality is determined as the first preset data source, and the data source with high requirements for video quality is determined as the second preset data source.
[0134] Step S402, in response to the data source being the first preset data source, control the hardware encoder to perform an encoding operation on the video data according to the target encoding parameters.
[0135] When the data source is the first preset data source, the hardware encoder can be controlled to encode the video data according to the target encoding parameters. For example, the quality requirement for the video in the camera capture scenario is relatively low. If the data source of the video data is the camera capture scenario, it can be determined that the data source is the first preset data source.
[0136] Step S403, in response to the data source being the second preset data source, control the software encoder to perform an encoding operation on the video data according to the target encoding parameters.
[0137] When the data source is the second preset data source, the software encoder can be controlled to encode the video data according to the target encoding parameters. For example, the quality requirement for the video in the screen sharing document scenario is high, and the frame rate requirement is low. It is more suitable to use software encoding for video software because software encoding can adjust the encoding algorithm to achieve encoding higher quality video with a lower bit rate. If the data source is the screen sharing file scenario, it can be determined that the data source is the second preset data source.
[0138] In addition, whether to perform hardware encoding or software encoding on the video data is related to the resolution of the images in the video data. Specifically, if the resolution of the images is relatively low, the difference in latency and power consumption between software encoding and hardware encoding is not significant, but the hardware encoder has a limit on the number of images in the video data for hardware encoding. The more the number, the more hardware resources consumed by the hardware encoder. To save hardware resources, if the resolution of the images in the video data is low, software encoding is adopted; if the resolution of the images in the video data is high, hardware encoding can be adopted. In this regard, in response to the resolution of the images in the video data being greater than the preset resolution, the encoding device controls the hardware encoder to encode the video data according to the target encoding parameters; in response to the resolution of the images in the video data being less than or equal to the preset resolution, the encoding device controls the software encoder to encode the video data according to the target encoding parameters.
[0139] In this embodiment, the encoding device selects the most suitable encoding method for the current video data through the data source of the video data, that is, determines the encoding method that matches the encoding quality of the video data.
[0140] Refer to Figure 5 , Figure 5 which schematically shows a flowchart of another embodiment of the video encoding method provided according to an embodiment of the present disclosure. Based on Figure 4 the embodiment shown, after step S402, it further includes:
[0141] Step S501, obtain the first number of frames of the images input into the hardware encoder, the second number of frames of the images output by the hardware encoder, and the first frame drop rate of the hardware encoder in the previous time period. The video data includes multiple images.
[0142] In this embodiment, during the operation of the hardware encoder, the state of the hardware may be unstable, which may cause an increase in encoding delay or encoding return errors, affecting the video quality of real-time communication. To this end, the encoding device needs to determine the state of the hardware encoder.
[0143] Specifically, the encoding device obtains the first number of frames of the images input into the hardware encoder, the second number of frames of the images output by the hardware encoder in the previous time period, and the first frame drop rate of the hardware encoder in the previous time period. For example, the encoding device records the OutputFrames (the second number of frames), InputFrames (the first number of frames), and lastDroprate (the first frame drop rate) within 2 seconds, and the previous 2 seconds is the previous time period. In this embodiment, the first frame drop rate refers to the ratio of the number of frames of the images not encoded by the encoder in the previous time period to the number of frames of the images input into the encoder in the previous time period. The reason for the encoder not encoding the images is that the state of the encoder is unstable, resulting in encoding delay of the encoder.
[0144] Step S502, determine the first influence weight of the first frame drop rate on the encoding of the hardware encoder in the current time period, and determine the first predicted frame drop rate of the hardware encoder in the current time period according to the first number of frames, the second number of frames, the first frame drop rate, and the first influence weight.
[0145] The frame drop rate in the previous time period affects the state of the hardware encoder. Therefore, the influence weight of the frame drop rate in the previous time period on the hardware encoder can be set, and it can be understood as the influence weight of the frame drop rate in the previous time period on the frame drop rate in the current time period. The influence weight can be a fixed value. For example, the influence weight is 15%. Of course, the influence weight can also be determined according to the magnitude of the first frame drop rate. The larger the first frame drop rate, the greater the influence weight. To this end, the encoding device determines the first influence weight of the first frame drop rate on the encoding of the hardware encoder in the current time period. The encoding device calculates the first predicted frame drop rate of the hardware encoder encoding the video data in the current time period according to the first number of frames, the second number of frames, the first frame drop rate, and the first influence weight. Exemplarily, the first predicted frame drop rate dropRate = lastDroprate * weight + (1 - lastDroprate) * (OutputFrames – InputFrames) / InputFrames, where weight is the first influence weight.
[0146] Step S503, when the first predicted frame drop rate is greater than the first preset value, control the software encoder to encode the video data according to the target encoding parameters.
[0147] The first preset value is stored in the encoding device. The first preset value can be any appropriate value. For example, the first preset value is 20%. After the encoding device determines the first predicted frame drop rate, if the first predicted frame drop rate is greater than the first preset value, that is, there will be a delay in hardware encoding, the encoding device controls the software encoder to perform encoding operations on the video data according to the target encoding parameters. If the first predicted frame drop rate is less than or equal to the first preset value, the encoding device continues to control the hardware encoder to perform encoding operations on the video data.
[0148] In this embodiment, the encoding device predicts the frame drop rate of the hardware encoder in the current time period based on the data of the hardware encoder in the previous time period, and determines whether there is a delay in hardware encoding based on the predicted frame drop rate. If there is a delay, it switches to software encoding to ensure the video quality in communication.
[0149] Refer to Figure 6 , Figure 6 schematically shows a flowchart of another embodiment of the video encoding method provided according to an embodiment of the present disclosure. Based on Figure 4 or Figure 5 the embodiments shown, step S402 includes:
[0150] Step S601, obtain the encoding capability parameters of the target device, and verify the target encoding parameters according to the encoding capability parameters.
[0151] In this embodiment, the target encoding parameters are used for the hardware encoder to encode the video data. That is, before performing hardware encoding, the target encoding parameters are verified based on the hardware encoding capability parameters of the target device.
[0152] After obtaining the target encoding parameters, the encoding device will verify the target encoding parameters. Specifically, the device obtains the encoding capability parameters of the target device, that is, obtains its own encoding capability parameters, and thus verifies the target encoding parameters based on the encoding capability parameters. The verification method varies according to the encoding method of the encoding device and the different target encoding parameters.
[0153] In one example, the target encoding parameter is the default encoding parameter or obtained from the first configuration file, and the default encoding parameter is the encoding parameter input externally. The encoding capability parameter is the encoding capability parameter of the encoder. If the target encoding parameter matches the encoding capability parameter, it passes the verification. For example, the target encoding parameters are bit rate, frame rate, resolution, encoding input data format, encoding output format, bit rate control mode, key frame interval, etc.; the encoding device obtains the list of capabilities of the encoding output formats supported by itself. If the above target encoding parameter specifies the output format of the encoder, the output format is, for example, COLOR_FormatSurface. If COLOR_FormatSurface is included in the list of capabilities, the target encoding parameter passes the verification. If COLOR_FormatSurface is not included in the list of capabilities, the target encoding parameter fails the verification.
[0154] Step S602, in response to the target encoding parameter passing the verification, control the hardware encoder to perform an encoding operation on the video data according to the target encoding parameter.
[0155] When the target encoding parameter passes the verification, the encoding device controls the encoder to encode the video data according to the target encoding parameter. If the current target encoding parameter fails the verification, it is necessary to re-determine the target encoding parameter and verify the re-determined target encoding parameter. For example, the current target encoding parameter is obtained from the first configuration file. If the target encoding parameter fails the verification, the externally input encoding parameter is used as the new target encoding parameter for verification; if the new target encoding parameter passes the verification, encoding is performed with the new target encoding parameter; if the new target encoding parameter fails the verification, the system encoding reference is used as the target encoding parameter.
[0156] In this embodiment, the encoding device obtains the encoding capability parameter of the target device and verifies the target encoding parameter according to the encoding capability parameter. If it passes the verification, it controls the encoding to perform the encoding parameter on the video data according to the target encoding parameter, avoiding the situation that the encoding capability parameter of the target device is insufficient to support the target device to perform encoding with the target encoding parameter, thereby avoiding the problem of poor quality of the encoded video data.
[0157] Refer to Figure 7 , Figure 7 schematically shows a flowchart of another embodiment of the video encoding method provided according to an embodiment of the present disclosure. Based on Figures 2 - 6 any of the embodiments shown in
[0158] Step S701, obtain the target frame rate, target encoding bit rate, actual total data volume of the encoded images, and actual number of frames of the encoded images of the encoder in the current time period. The video data includes multiple images.
[0159] In this embodiment, the method for encoding video data is hardware encoding. Hardware encoding means that a hardware encoder encodes video data. The stability of the bitrate encoded by the hardware encoder is poor, and the bitrate fluctuates significantly, being significantly high or low. Such a high or low bitrate will reduce the quality of the encoded video. To address this, the encoding device adjusts the bitrate. Specifically, the encoding device obtains the target frame rate targetFps, the target encoding bitrate targetBitrate, the actual total data volume acturalSize of the encoded image, and the actual number of frames frameCount of the encoded image within the current time period. The target frame rate targetFps and the target encoding bitrate targetBitrate are known. The encoding device counts the data volume and the number of frames of each encoded frame output within the current time period. The actual total volume can be obtained by adding up all the data volumes, and the counted number of frames is the actual number of frames.
[0160] Step S702: Determine the average data volume of each encoded image according to the target encoding bitrate and the target frame rate.
[0161] The encoding device determines the average data volume of each encoded image based on the target encoding bitrate and the target frame rate, that is, the average data volume averageBit = targetBitrate / targetFps.
[0162] Step S703: Determine the bitrate correction ratio according to the average data volume, the actual total data volume, and the actual number of frames.
[0163] The encoding device can determine the bitrate correction ratio through the average data volume, the actual total data volume, and the actual number of frames.
[0164] Exemplarily, the bitrate correction ratio scaleRate = acturalSize / (averageBit * frameCount).
[0165] Step S704: Adjust the target encoding bitrate of the encoder in the next time period according to the bitrate correction ratio.
[0166] The encoding device adjusts the target encoding bitrate of the encoder in the next time period through the bitrate correction ratio. Specifically, when the bitrate correction ratio is greater than the first preset ratio, it indicates that the current actual encoding bitrate is higher than the target encoding bitrate. Therefore, it is necessary to reduce the target encoding bitrate in the next time period to decrease the actual encoding bitrate of the encoder in the next time period. If the bitrate correction ratio is less than the second preset ratio, it means that the current actual encoding bitrate is lower than the target encoding bitrate. Thus, it is necessary to increase the target encoding bitrate in the next time period to increase the actual encoding bitrate of the encoder in the next time period. The first preset ratio is greater than the second preset ratio. For example, the first preset ratio is 1.15 and the second preset ratio is 0.8.
[0167] In this embodiment, the encoding device determines the target encoding bitrate in the next time period based on the parameters of the encoder in the current time period, thereby avoiding large fluctuations in the encoding bitrate and ensuring the quality of the encoded video.
[0168] In one embodiment, the encoding device also has the function of encoding format adaptability. Specifically, when the format of the image in the video data does not match the encoding format supported by the encoder, that is, the format of the image is different from the encoding format supported by the encoder, the format of the image in the video data is converted to the encoding format, and the encoder is controlled to perform encoding operations on the video data after the format conversion according to the target encoding parameters, thereby preventing the encoder from being unable to encode the video data. The encoding formats supported by the encoder are, for example: NV12, NV21, I420, Texture.
[0169] Based on the above embodiments, with reference to Figure 8 , a brief description of the video encoding method of the present disclosure is given.
[0170] 1. Determine whether the data source scenario is suitable for hardware encoding. If the data source scenario is suitable for hardware encoding, obtain the device characteristics. If the data source scenario is not suitable for hardware encoding, then use software encoding to encode the video data;
[0171] 2. Obtain the configuration file according to the device characteristics and determine whether the configuration file includes the target encoding parameters;
[0172] 3. If the configuration file includes the target encoding parameters, then verify the target encoding parameters;
[0173] 4. If the configuration file does not include the target encoding parameters, or the target encoding parameters fail the verification, obtain the externally input target encoding parameters and verify the externally input target encoding parameters;
[0174] 5. If the externally input target encoding parameters fail the verification, use the default encoding parameters as the target encoding parameters;
[0175] 6. After the target encoding parameter in the configuration file passes the verification, the externally input encoding parameter passes the verification, and the default encoding parameter is used as the target encoding parameter, it is determined whether the image resolution in the video data is higher than the preset resolution. If the image resolution in the video data is lower than or equal to the preset resolution, the video data is software-encoded in the form of software encoding;
[0176] 7. If the image resolution in the video data is higher than the preset resolution, the video data is encoded in the form of hardware encoding. During the hardware encoding process, it is determined whether the predicted frame loss rate of the hardware encoder is higher than the preset frame loss rate. If it is higher than the preset frame loss rate, the encoding form is changed to software encoding for the video data. If the predicted frame loss rate is lower than or equal to the preset frame loss rate, hardware encoding is performed. In addition, during the hardware encoding process, the bit rate is adjusted, that is, bit rate adaptation is performed during hardware encoding.
[0177] It should be noted that Figure 8 The various judgment processes shown are only for examples and do not limit the sequence of the various judgment processes.
[0178] In the present disclosure, not only can the optimal encoding parameter be selected according to different devices, but also the encoding method suitable for the video data can be determined according to different data sources and the resolution of the image in the video, and the bit rate of the encoder can be dynamically adjusted according to the encoding state of the encoder during the encoding process, so that the encoding process of the video data adapts to the device itself, the encoding process, the network state, the application scenario, etc., improving the stability and smoothness of the encoding process.
[0179] The present disclosure also provides a video decoding method.
[0180] Referring to Figure 9 , Figure 9 shows a schematic flowchart of an embodiment of a video decoding method according to an embodiment of the present disclosure. The video decoding method includes:
[0181] Step S901, determining the device characteristics of the target device.
[0182] In this embodiment, the execution subject is a video decoding device. Exemplarily, the video decoding device in this embodiment can be any device with video communication. For example, the video decoding device can be a mobile phone, a computer, a tablet, etc. For the convenience of description, the decoding device is hereinafter used to refer to the video decoding device. The video decoding device and the video encoding device can be the same device or different devices.
[0183] The decoding device obtains the device characteristics of the target device, which is used to decode video data. The device characteristics include the model of the target device and / or the models of the components in the target device. For example, the model of the component in the target device is a decoder, and it can also be the model of a processor, etc. The model of the target device is, for example, the device identifier of the target device.
[0184] It should be noted that when the decoding device collects video data and needs to send the video data to the receiving end, the video device determines the device characteristics of the target device. Or, when the decoding device runs the video communication function, the decoding device determines the device characteristics of the target device.
[0185] Step S902: Obtain the target decoding parameters matching the target device according to the device characteristics.
[0186] In this embodiment, the decoding device can store the decoding parameters by itself, and each stored decoding parameter is all the decoding parameters that may be used for decoding the video. In addition, a mapping table can also be stored in the decoding device, and the mapping table stores the mapping relationship between the decoding parameters and the device characteristics. After obtaining the device characteristics, the decoding device can obtain the decoding parameters matching the device characteristics through the mapping table as the target decoding parameters.
[0187] Step S903: Control the decoder to perform a decoding operation on the video data according to the target decoding parameters.
[0188] A decoder is provided in the decoding device. After obtaining the target decoding parameters, the decoding device controls the decoder to perform a decoding operation on the video data according to the target decoding parameters to obtain the decoded video data, and sends the decoded video data to the receiving end or directly plays the decoded video data. The video data is transmitted by an external device.
[0189] In this embodiment, the decoding parameters matching the device are obtained through the device characteristics of the device, so that the device decodes the video data based on its own decoding performance, improving the effective utilization rate of the device decoding performance.
[0190] Refer to Figure 10 , Figure 10 schematically shows a flowchart of another embodiment of the video decoding method provided according to an embodiment of the present disclosure. Based on Figure 9 the embodiment shown, step S902 includes:
[0191] Step S1001: Obtain a second configuration file according to the device characteristics.
[0192] In this embodiment, the decoding device obtains a second configuration file based on the device characteristics.
[0193] In one example, all decoding parameters used for decoding video data are stored in a decoding device, and the decoding device sets the states of the decoding parameters based on different device characteristics. Different device characteristics correspond to decoding parameters in different states, and the decoding parameters in each different state are configured as a second configuration file corresponding to the device characteristics, that is, each device characteristic stored in the decoding device corresponds to a second configuration file. The states include an enabled state and a disabled state. The decoding device can use the decoding parameters in the enabled state to decode data, but the decoding device cannot use the decoding parameters in the disabled state for decoding. The decoding device obtains the corresponding second configuration file based on its own device characteristics. In addition, an encoding device can add encoding parameters available for a target device to a file to obtain a second configuration file, and store the second configuration file in association with the device characteristics of the target device. The encoding device can obtain the second configuration file through the device characteristics of the target device.
[0194] In another example, all decoding parameters used for decoding video data are stored in a server, and the server sets the states of the decoding parameters based on different device characteristics. Different device characteristics correspond to decoding parameters in different states, and the decoding parameters in each different state are configured as a second configuration file corresponding to the device characteristics, that is, each device characteristic stored in the server corresponds to a second configuration file. After obtaining the device characteristics, the decoding device generates a request for obtaining decoding parameters based on the device characteristics, and the decoding device sends the request to the server. The server obtains the device characteristics of the decoding device based on the request, and sends the second configuration file matching the device configuration to the decoding device. In addition, the server can add encoding parameters available for a target device to a file to obtain a second configuration file, and store the second configuration file in association with the device characteristics of the target device. The server obtains the second configuration file based on the device characteristics of the target device sent by the encoding device, and feeds back the second configuration location to the encoding device.
[0195] It can be understood that the second configuration file is stored in the server and / or the target device.
[0196] Step S1002, in response to the second configuration file including the decoding parameters corresponding to the device characteristics, obtain the target decoding parameters matching the target device according to the second configuration file.
[0197] In this embodiment, the decoding device can perform software decoding or hardware decoding on video data. However, the target device cannot perform hardware decoding or software decoding using some decoding parameters, and the second configuration file will indicate the decoding parameters that the target device cannot use. Exemplarily, the decoding parameters included in the second configuration file and the corresponding states can be represented by fields. For example, the decoding parameter corresponds to field C, the state corresponds to field D, and the combination of field C - field D is the decoding parameter and the corresponding state.
[0198] After obtaining the second configuration file corresponding to the device characteristics, the decoding device first determines the target method for decoding the video data by itself. The target method is hardware decoding or software decoding. If the decoding parameters in the second configuration file indicate that the target device supports decoding using the target method, it can be determined that the second configuration file includes the decoding parameters corresponding to the device characteristics, and thus the target decoding parameters matching the target device can be obtained from the second configuration file.
[0199] In addition, the second configuration file includes a second whitelist and a second blacklist. The second blacklist includes disabled first decoding parameters, and the second whitelist includes enabled second decoding parameters. The device obtains the second whitelist and the second blacklist from the second configuration file, and thus determines the target decoding parameters according to the second blacklist and / or the second whitelist. The target decoding parameters are the enabled second decoding parameters. Each enabled second decoding parameter forms a table, that is, the second whitelist is stored in the second configuration file in the form of a table. Each disabled first decoding parameter forms a table, that is, the second blacklist is stored in the second configuration file in the form of a table.
[0200] In one example, the decoding device can determine all the first decoding parameters in the second whitelist as the target decoding parameters.
[0201] In another example, all the decoding parameters in the second configuration file have corresponding states, that is, all the decoding parameters are divided into two sets. One set is the second whitelist, and the other set is the second blacklist. The decoding device can determine the decoding parameters in the second configuration file except for the second blacklist as the target decoding parameters, that is, the decoding device can determine each target decoding parameter from the second configuration file according to the second blacklist.
[0202] In yet another example, some of the decoding parameters in the second configuration file have corresponding states, that is, all the decoding parameters are divided into three sets. One set is the second whitelist, one set is the second blacklist, and the last set includes decoding parameters with unset states. The decoding device can determine the decoding parameters with unset states from the second configuration file through the second blacklist and the second whitelist, and display each decoding parameter with an unset state for the user to set the state. The decoding device determines the decoding parameters with the enabled state set and the first decoding parameters in the second whitelist as the target decoding parameters, that is, the decoding device can determine the target decoding parameters through the second blacklist and the second whitelist.
[0203] It should be noted that the first decoding parameter in the second whitelist is determined based on different data source scenarios. The data source scenarios are, for example, screen sharing document scenarios, screen sharing game scenarios, camera capture scenarios, video file input scenarios, etc. Different data source scenarios can adopt different decoding parameters, that is, a data source scenario and device characteristics correspond to a second configuration file, and the decoding device obtains the corresponding second configuration file through the device characteristics and the current data source scenario.
[0204] In addition, each first decoding parameter in the second whitelist is obtained through decoding tests. For example, the decoding parameters originally used by the decoding device for video decoding are A, B, C, and D, that is, the second whitelist includes A, B, C, and D. Then, the decoding parameter E unique to other devices is used, so that the decoding device decodes the video using A, B, C, D, and E. If the decoding device can decode high-quality video data, E is added to the second whitelist. The decoding device decodes the video by using the decoding parameters of other devices and its own original decoding parameters. If successful, the first decoding parameter in the second whitelist can be extended. If failed, the first decoding parameter in the second blacklist can be extended. It can be understood that in this embodiment, the decoding parameters included in the second configuration file are more than the original configuration parameters of the decoding device, so that the decoding ability of the decoding device can be better utilized based on the second configuration file, that is, the effective utilization rate of the decoding performance of the decoding device is relatively high.
[0205] Step S1003, in response to the second configuration file not including the decoding parameter corresponding to the device characteristics, obtain the target decoding parameter matching the target device according to the default decoding parameter.
[0206] If it is indicated in the second configuration file that the decoding parameter does not support the target device to adopt the target method, it can be determined that the second configuration file does not include the decoding parameter corresponding to the device characteristics. The decoding device then uses the default decoding parameter to obtain the target decoding parameter matching the target device, that is, determines the stored default decoding parameter as the target decoding parameter.
[0207] It should be noted that the default decoding parameters include the externally input decoding parameters and the system decoding parameters stored in the decoding device itself. The externally input decoding parameters can be the decoding parameters input by an external device or the decoding parameters carried by an application in the decoding device, and this application can be an application that requests to obtain the second configuration file from the server. When the decoding parameters corresponding to the special features are not included in the second configuration file, the decoding device obtains the externally input decoding parameters and verifies the externally input decoding parameters. If the verification is passed, the externally input decoding parameters are used as the default decoding parameters; if the verification fails, the system decoding parameters are determined as the default decoding parameters. The verification method can be to verify whether the decoding ability of the decoder supports the externally input decoding parameters. If it supports, the externally input decoding parameters pass the verification; if it does not support, the externally input decoding parameters fail the verification. In particular, when performing hardware decoding, it is necessary to verify the externally input decoding parameters.
[0208] In this embodiment, the decoding parameters used for data decoding by different devices are different. By setting the device features of the device and the decoding parameters that the device can adopt as the second configuration file, that is, the decoding parameters that the device can adopt are centralized, which is convenient for centralized maintenance of the decoding parameters and reduces the maintenance cost.
[0209] Referring to Figure 11 , Figure 11 which schematically shows a flowchart of another embodiment of the video decoding method provided according to an embodiment of the present disclosure. Based on Figures 9 to 10 any of the embodiments shown, step S903 includes:
[0210] Step S1101, obtain the data source of the video data.
[0211] In this embodiment, the ways for the decoding device to decode the video data include hardware decoding and software decoding. Different data sources of the video data result in different decoding methods. The data source scenarios include screen sharing document scenarios, screen sharing game scenarios, camera capture scenarios, video file input scenarios, etc. The decoding device obtains the data source of the video data, that is, determines the source of the video data.
[0212] Data source scenarios with higher requirements for video quality are suitable for software decoding, while data source scenarios with lower requirements for video quality are suitable for hardware decoding. In this embodiment, the data source with low requirements for video quality is determined as the first preset data source, and the data source with high requirements for video quality is determined as the second preset data source.
[0213] Step S1102, in response to the data source being the first preset data source, control the hardware decoder to perform a decoding operation on the video data according to the target decoding parameters.
[0214] When the data source is the first preset data source, the hardware decoder can be controlled to decode the video data according to the target decoding parameters. For example, the quality requirement for the video in the camera capture scenario is relatively low. If the data source of the video data is the camera capture scenario, it can be determined that the data source is the first preset data source.
[0215] Step S1103, in response to the data source being the second preset data source, control the software decoder to perform a decoding operation on the video data according to the target decoding parameters.
[0216] When the data source is the second preset data source, the software decoder can be controlled to decode the video data according to the target decoding parameters. For example, the quality requirement for the video in the screen sharing document scenario is high, and the frame rate requirement is low. Software decoding is more suitable for video software because software decoding can adjust the decoding algorithm to achieve decoding of higher-quality video using a lower bit rate. If the data source is the screen sharing file scenario, it can be determined that the data source is the second preset data source.
[0217] In addition, whether to perform hardware decoding or software decoding on the video data is related to the resolution of the images in the video data. Specifically, if the resolution of the images is relatively low, the difference in latency and power consumption between software decoding and hardware decoding is not significant, but the hardware decoder has a limit on the number of images in the video data for hardware decoding. The more the number, the more hardware resources consumed by the hardware decoder. To save hardware resources, if the resolution of the images in the video data is relatively low, software decoding is used; if the resolution of the images in the video data is relatively high, hardware decoding can be used. In this regard, in response to the resolution of the images in the video data being greater than the preset resolution, the decoding device controls the hardware decoder to perform decoding parameters on the video data according to the target decoding parameters; in response to the resolution of the images in the video data being less than or equal to the preset resolution, the decoding device controls the software decoder to perform decoding on the video data according to the target decoding parameters.
[0218] In this embodiment, the decoding device selects the most suitable decoding method for the video data through the data source of the video data, that is, determines the decoding method that matches the decoding quality of the video data.
[0219] Refer to Figure 12 , Figure 12 which schematically shows a flowchart of another embodiment of the video decoding method provided according to an embodiment of the present disclosure. Based on Figure 11 the embodiment shown, after step S1102, the following is further included:
[0220] Step S1201: Obtain the third number of frames of the images input into the hardware decoder in the previous time period, the fourth number of frames of the images output by the hardware decoder, and the second frame drop rate of the hardware decoder in the previous time period. The video data includes multiple images.
[0221] In this embodiment, during the operation of the hardware decoder, the state of the hardware may be unstable, which may lead to an increase in decoding delay or a decoding error, affecting the video quality of real-time communication. To this end, the decoding device needs to determine the state of the hardware decoder.
[0222] Specifically, the decoding device obtains the third number of frames of the images input into the hardware decoder in the previous time period, the fourth number of frames of the images output by the hardware decoder in the previous time period, and the second frame drop rate of the hardware decoder in the previous time period. For example, the decoding device records the OutputFrames (the fourth number of frames), InputFrames (the third number of frames), and lastDroprate (the second frame drop rate) within 2 seconds, and the previous 2 seconds is the previous time period. In this embodiment, the second frame drop rate refers to the ratio of the number of frames of the images not decoded by the decoder in the previous time period to the number of frames of the images input into the decoder in the previous time period. The reason why the decoder does not decode the images is that the state of the decoder is unstable, resulting in decoding delay of the decoder.
[0223] Step S1202: Determine the second influence weight of the second frame drop rate on the decoding of the hardware decoder in the current time period, and determine the second predicted frame drop rate of the hardware decoder for decoding the video data in the current time period according to the third number of frames, the fourth number of frames, the second frame drop rate, and the second influence weight.
[0224] The frame drop rate in the previous time period will affect the state of the hardware decoder. Therefore, the influence weight of the frame drop rate in the previous time period on the hardware decoder can be set, and it can be understood as the weight influence of the frame drop rate in the previous time period on the frame drop rate in the current time period. The influence weight can be a fixed value. For example, the influence weight is 15%. Of course, the influence weight can also be determined according to the size of the second frame drop rate. The larger the second frame drop rate, the greater the influence weight. To this end, the decoding device determines the second influence weight of the second frame drop rate on the decoding of the hardware decoder in the current time period. The decoding device calculates the second predicted frame drop rate of the hardware decoder for decoding the video data in the current time period according to the third number of frames, the fourth number of frames, the second frame drop rate, and the second influence weight. Exemplarily, the second predicted frame drop rate dropRate = lastDroprate * weight + (1 - lastDroprate) * (OutputFrames – InputFrames) / InputFrames, where weight is the second influence weight.
[0225] Step S1203, when the second predicted frame loss rate is greater than the second preset value, control the software decoder to decode the video data according to the target decoding parameters.
[0226] The decoding device stores the second preset value, and the second preset value can be any appropriate value. For example, the second preset value is 20%. After the decoding device determines the second predicted frame loss rate, if the second predicted frame loss rate is greater than the second preset value, that is, there will be a delay in hardware decoding, the decoding device controls the software decoder to perform decoding parameters on the video data according to the target decoding parameters. If the second predicted frame loss rate is less than or equal to the second preset value, the decoding device continues to control the hardware decoder to perform decoding operations on the video data.
[0227] In this embodiment, the decoding device predicts the frame loss rate of the hardware decoder in the current time period based on the data of the hardware decoder in the previous time period, so as to determine whether there is a delay in hardware decoding according to the predicted frame loss rate. If there is a delay, switch to software decoding to ensure the video quality in communication.
[0228] Refer to Figure 13 , Figure 13 schematically shows a flowchart of another embodiment of the video decoding method provided according to an embodiment of the present disclosure. Based on Figure 11 or Figure 12 shown in the embodiment, step S1102 includes:
[0229] Step S1301, obtain the decoding capability parameters of the target device, and verify the target decoding parameters according to the decoding capability parameters.
[0230] Refer to Figure 11 , Figure 11 schematically shows a flowchart of another embodiment of the video decoding method provided according to an embodiment of the present disclosure. Based on Figure 9 or Figure 10 shown in the embodiment, step S903 includes:
[0231] Step S1301, obtain the decoding capability parameters of the target device, and verify the target decoding parameters according to the decoding capability parameters.
[0232] In this embodiment, after the decoding device obtains the target decoding parameters, it will verify the target decoding parameters. Specifically, the device obtains the decoding capability parameters of the target device, that is, obtains its own decoding capability parameters, so as to verify the target decoding parameters based on the decoding capability parameters. The verification method varies according to the decoding method of the decoding device and the different target decoding parameters. In particular, when performing hardware encoding, the target encoding parameters are verified based on the hardware encoding capability parameters of the target device.
[0233] In one example, the target decoding parameter is obtained from a second configuration file, and the decoding device performs software decoding. The decoding capability parameter includes the performance of the software and the current network status of the decoding device. If the network status is poor and / or the performance of the software cannot support a certain target decoding parameter for software decoding of a video, the target decoding parameter fails the verification. If the network status is good and the performance of the software supports all target decoding parameters for software decoding of a video, the target decoding parameter passes the verification. The network status can be determined by the remaining bandwidth. If the remaining bandwidth is greater than a preset threshold, it can be determined that the network status is good. If the remaining bandwidth is less than or equal to the preset threshold, it can be determined that the network status is poor.
[0234] In another example, the target decoding parameter is the default decoding parameter or is obtained from a second configuration file, and the default decoding parameter is the decoding parameter input externally. The decoding capability parameter is the decoding capability parameter of the decoder. If the target decoding parameter matches the decoding capability parameter, it passes the verification. For example, the target decoding parameters are bit rate, frame rate, resolution, decoding input data format, decoding output format, bit rate control mode, key frame interval, etc.; the decoding device obtains the capability list of the decoding output formats supported by itself. If the above target decoding parameter specifies the output format of a decoder, and the output format is, for example, COLOR_FormatSurface, if COLOR_FormatSurface is included in the capability list, the target decoding parameter passes the verification. If COLOR_FormatSurface is not included in the capability list, the target decoding parameter fails the verification.
[0235] Step S1302, in response to the target decoding parameter passing the verification, control the hardware decoder to decode the video data according to the target decoding parameter.
[0236] When the target decoding parameter passes the verification, the decoding device controls the decoder to decode the video data according to the target decoding parameter. If the current target decoding parameter fails the verification, it is necessary to re-determine the target decoding parameter and verify the re-determined target decoding parameter. For example, if the current target decoding parameter is obtained from a second configuration file and this target decoding parameter fails the verification, the decoding parameter input externally is used as the new target decoding parameter for verification; if the new target decoding parameter passes the verification, decoding is performed with the new target decoding parameter; if the new target decoding parameter fails the verification, the system decoding reference is used as the target decoding parameter.
[0237] In this embodiment, the decoding device obtains the decoding capability parameters of the target device, and verifies the target decoding parameters according to the decoding capability parameters. If the verification is passed, the decoding is controlled to decode the video data according to the target decoding parameters, so as to avoid that the decoding capability of the target device is insufficient to support the target device to decode using the target decoding parameters, thereby avoiding the problem of poor quality of the decoded video data.
[0238] After obtaining the target decoding parameters, the decoding device will verify the target decoding parameters. Specifically, the device obtains the decoding capability parameters of the target device, that is, obtains its own decoding capability parameters, so as to verify the target decoding parameters based on the decoding capability parameters. The verification method varies according to the decoding method of the decoding device and the different target decoding parameters. In particular, when performing hardware encoding, the target encoding parameters are verified based on the hardware encoding capability parameters of the target device.
[0239] In an example, the target decoding parameters are default decoding parameters or obtained from a second configuration file, and the default decoding parameters are externally input decoding parameters. The decoding capability parameters are the decoding capability parameters of the decoder. If the target decoding parameters match the decoding capability parameters, the verification is passed. For example, the target decoding parameters are bit rate, frame rate, resolution, decoding input data format, decoding output format, bit rate control mode, key frame interval, etc.; the decoding device obtains the list of capabilities of the decoding output formats supported by itself. If the above target decoding parameters specify the output format of the decoder, and the output format is, for example, COLOR_FormatSurface, if COLOR_FormatSurface is included in the capability list, the target decoding parameters pass the verification, and if COLOR_FormatSurface is not included in the capability list, the target decoding parameters do not pass the verification.
[0240] Step S1302, in response to the target decoding parameters passing the verification, control the hardware decoder to decode the video data according to the target decoding parameters.
[0241] When the target decoding parameters pass the verification, the decoding device controls the decoder to decode the video data according to the target decoding parameters. If the current target decoding parameters do not pass the verification, it is necessary to re-determine the target decoding parameters and verify the re-determined target decoding parameters. For example, the current target decoding parameters are obtained from a second configuration file. If the target decoding parameters do not pass the verification, the externally input decoding parameters are used as the new target decoding parameters for verification; if the new target decoding parameters pass the verification, decoding is performed with the new target decoding parameters; if the new target decoding parameters do not pass the verification, the system decoding reference is used as the target decoding parameters.
[0242] In this embodiment, the decoding device obtains the decoding capability parameters of the target device, and verifies the target decoding parameters according to the decoding capability parameters. If the verification is passed, the decoding is controlled to decode the video data according to the target decoding parameters, so as to avoid the situation that the decoding capability of the target device is insufficient to support the target device to decode using the target decoding parameters, thereby avoiding the problem of poor quality of the decoded video data.
[0243] In one embodiment, the decoding device also has the function of decoding format adaptation. Specifically, after the decoding device controls the decoding to perform decoding operations on the video data according to the target decoding parameters, the decoding device determines the format of the decoded data, and the format of the decoded data is the data after the video data is decoded. In response to the decoded data being data to be transmitted, that is, the decoded data is data to be transmitted, the format of the decoded data is converted into a playback format supported by an external device, and the external device is a device that receives the decoded data; in response to the decoded data being data to be played, that is, the decoded data is data to be played, the format of the decoded data is converted into a playback format supported by the target device.
[0244] Based on the above embodiments, with reference to Figure 14 , a brief description of the video decoding method of the present disclosure is given.
[0245] 1. Obtain device characteristics, and determine whether there is a matching configuration file for the device characteristics. The configuration file includes the decoding parameters required for decoding. If there is no matching configuration file for the device characteristics, the video data is decoded by means of software decoding;
[0246] 2. Obtain the configuration file according to the device characteristics, and determine whether the configuration file includes the target decoding parameters;
[0247] 3. If the configuration file includes the target decoding parameters, verify the target decoding parameters;
[0248] 4. If the configuration file does not include the target decoding parameters, or the target decoding parameters fail the verification, obtain the target decoding parameters input externally, and verify the target decoding parameters input externally;
[0249] 5. If the target decoding parameters input externally fail the verification, use the default decoding parameters as the target decoding parameters;
[0250] 6. After the target decoding parameters in the configuration file pass the verification, the externally input decoding parameters pass the verification, and the default decoding parameters are used as the target decoding parameters, determine whether the image resolution in the video data is higher than the preset resolution. If the image resolution in the video data is lower than or equal to the preset resolution, the video data is software decoded in the form of software decoding;
[0251] 7. If the image resolution in the video data is higher than the preset resolution, the video data is decoded in the form of hardware decoding. During the hardware decoding process, it is determined whether the predicted frame loss rate of the hardware decoding is higher than the preset frame loss rate. If it is higher than the preset frame loss rate, the decoding form is changed to software decoding for the video data. If the predicted frame loss rate is lower than or equal to the preset frame loss rate, hardware decoding is performed.
[0252] It should be noted that Figure 14 The various judgment processes shown are only for examples and do not limit the sequence of the various judgment processes.
[0253] In the present disclosure, not only can the optimal decoding parameters be selected according to different devices, but also the decoding method suitable for the video data can be determined according to the resolution of the images in the video, so that the decoding process of the video data is adapted to the device itself, the decoding process, the network state, the application scenario, etc., improving the stability and smoothness of the decoding process.
[0254] Exemplary Medium
[0255] After introducing the method of the exemplary embodiments of the present disclosure, next, reference is made to Figure 15 to describe the storage medium of the exemplary embodiments of the present disclosure. Refer to Figure 15As shown, the storage medium 150 stores a program product for implementing the above method according to an embodiment of the present disclosure. It may be a portable compact disc read-only memory (CD-ROM) and includes computer-executable instructions for causing a computing device to execute the video encoding method / video decoding method provided by the present disclosure. However, the program product of the present disclosure is not limited thereto. The program product may be any combination of one or more readable media. The readable media may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the readable storage medium (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. The readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries computer-executable instructions. Such a propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable signal medium may also be any readable medium other than the readable storage medium. The computer-executable instructions for performing the operations disclosed in the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and also including conventional procedural programming languages such as the "C" language or similar programming languages. The computer-executable instructions may be executed entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN).
[0256] Exemplary Device
[0257] After introducing the medium of the exemplary embodiments of the present disclosure, next, reference is made to Figure 16 to describe the video encoding device of the exemplary embodiments of the present disclosure. The video encoding device is used to implement the method in any of the above method embodiments, and its implementation principle and technical effects are similar.
[0258] Reference is made to Figure 16 , Figure 16 which schematically shows a structural diagram of a video encoding device according to an embodiment of the present disclosure.
[0259] AsFigure 16 As shown in Figure 16 , the video encoding device includes: a first determination module 1610, configured to determine the device characteristics of a target device; a first acquisition module 1620, configured to acquire target encoding parameters according to the device characteristics; and a first control module 1630, configured to control an encoder to perform an encoding operation on video data according to the target encoding parameters.
[0260] In an embodiment of the present disclosure, the first acquisition module 1620 includes: a first acquisition unit, configured to acquire a first configuration file according to the device characteristics; the first acquisition unit is further configured to, in response to the first configuration file including encoding parameters corresponding to the device characteristics, acquire target encoding parameters matching the target device according to the first configuration file; and the first acquisition unit is further configured to, in response to the first configuration file not including encoding parameters corresponding to the device characteristics, acquire target encoding parameters matching the target device according to default encoding parameters.
[0261] In another embodiment of the present disclosure, the first acquisition unit includes: a first acquisition subunit, configured to acquire a first whitelist and a first blacklist from the first configuration file, the first blacklist including disabled first encoding parameters, and the first whitelist including enabled second encoding parameters; and a first determination subunit, configured to determine target encoding parameters according to the first blacklist and / or the first whitelist, the target encoding parameters being the enabled second encoding parameters.
[0262] In another embodiment of the present disclosure, the first configuration file is stored in a server and / or the target device.
[0263] In another embodiment of the present disclosure, the first control module 1630 includes: a second acquisition unit, configured to acquire a data source of the video data; a first control unit, configured to, in response to the data source being a first preset data source, control a hardware encoder to perform an encoding operation on the video data according to the target encoding parameters; and the first control unit is further configured to, in response to the data source being a second preset data source, control a software encoder to perform an encoding operation on the video data according to the target encoding parameters.
[0264] In another embodiment of the present disclosure, the first control module 1630 includes: a second control unit, configured to, in response to the resolution of an image in the video data being greater than a preset resolution, control a hardware encoder to perform an encoding operation on the video data according to the target encoding parameters; and the second control unit is further configured to, in response to the resolution of the image in the video data being less than or equal to the preset resolution, control a software encoder to perform an encoding operation on the video data according to the target encoding parameters.
[0265] In another embodiment of the present disclosure, the first control module 1630 further includes: a third acquisition unit configured to acquire a first number of frames of images input to the hardware encoder, a second number of frames of images output by the hardware encoder, and a first frame loss rate of the hardware encoder in the previous time period, where the video data includes multiple images; a second determination unit configured to determine a first influence weight of the first frame loss rate on the encoding of the hardware encoder in the current time period, and determine a first predicted frame loss rate of the hardware encoder in the current time period according to the first number of frames, the second number of frames, the first frame loss rate, and the first influence weight; and a second control unit further configured to, when the first predicted frame loss rate is greater than a first preset value, control the software encoder to perform an encoding operation on the video data according to the target encoding parameters.
[0266] In another embodiment of the present disclosure, it further includes: a first acquisition module 1620 further configured to acquire encoding capability parameters of the target device, and verify the target encoding parameters according to the encoding capability parameters; and a first control module 1630 further configured to, in response to the target encoding parameters passing the verification, control the hardware encoder to perform an encoding operation on the video data according to the target encoding parameters.
[0267] In another embodiment of the present disclosure, it further includes: a first acquisition module 1620 further configured to acquire a target frame rate, a target encoding bit rate, an actual total data amount of encoded images, and an actual number of frames of encoded images of the encoder in the current time period, where the video data includes multiple images; a first determination module 1610 further configured to determine an average data amount of each encoded image according to the target encoding bit rate and the target frame rate; a first determination module 1610 further configured to determine a bit rate correction ratio according to the average data amount, the actual total data amount, and the actual number of frames; and an adjustment module configured to adjust the target encoding bit rate of the encoder in the next time period according to the bit rate correction ratio.
[0268] In another embodiment of the present disclosure, the first control module 1630 includes: a conversion unit configured to, in response to the format of the images in the video data not matching the encoding format supported by the encoder, convert the format of the images in the video data into the encoding format, and control the encoder to perform an encoding operation on the video data with the converted format according to the target encoding parameters.
[0269] In another embodiment of the present disclosure, the device features include the model of the target device and / or the model of the components in the target device.
[0270] After introducing the media of the exemplary embodiments of the present disclosure, next, reference is made to Figure 17 A video decoding device of the exemplary embodiments of the present disclosure will be described. The video decoding device is used to implement the method in any of the above method embodiments, and its implementation principle and technical effects are similar.
[0271] Reference is made toFigure 17 , Figure 17 schematically shows a schematic structural diagram of a video decoding device provided according to an embodiment of the present disclosure.
[0272] As Figure 17 shown, the video decoding device includes: a second determination module 1710 for determining the device characteristics of the target device; a second acquisition module 1720 for acquiring target decoding parameters according to the device characteristics; and a second control module 1730 for controlling the decoder to perform a decoding operation on the video data according to the target decoding parameters.
[0273] In an embodiment of the present disclosure, the second acquisition module 1720 includes: a fourth acquisition unit for acquiring a second configuration file according to the device characteristics; the fourth acquisition unit is further configured to, in response to the second configuration file including decoding parameters corresponding to the device characteristics, acquire target decoding parameters matching the target device according to the second configuration file; the fourth acquisition unit is further configured to, in response to the second configuration file not including decoding parameters corresponding to the device characteristics, acquire target decoding parameters matching the target device according to default decoding parameters.
[0274] In another embodiment of the present disclosure, the fourth acquisition unit includes: a second acquisition subunit for acquiring a second whitelist and a second blacklist from the second configuration file, the second blacklist including disabled first decoding parameters, and the second whitelist including enabled first decoding parameters; a second determination subunit for determining target decoding parameters according to the second blacklist and / or the second whitelist, the target decoding parameters being enabled first decoding parameters.
[0275] In another embodiment of the present disclosure, the second configuration file is stored in a server and / or the target device.
[0276] In another embodiment of the present disclosure, the second control module 1730 includes: a fifth acquisition unit for acquiring a data source of the video data; a third control unit for, in response to the data source being a first preset data source, controlling a hardware decoder to perform a decoding operation on the video data according to the target decoding parameters; the third control unit is further configured to, in response to the data source being a second preset data source, control a software decoder to perform a decoding operation on the video data according to the target decoding parameters.
[0277] In another embodiment of the present disclosure, the second control module 1730 includes: a sixth acquisition unit for acquiring a resolution of an image in the video data; a fourth control unit for, in response to the resolution of the image in the video data being greater than a preset resolution, controlling a hardware decoder to perform a decoding operation on the video data according to the target decoding parameters; the fourth control unit is further configured to, in response to the resolution of the image in the video data being less than or equal to the preset resolution, control a software decoder to perform a decoding operation on the video data according to the target decoding parameters.
[0278] In another embodiment of the present disclosure, the second control module 1730 further includes: a sixth acquisition unit configured to acquire a third number of frames of an image input into a hardware decoder, a fourth number of frames of an image output by the hardware decoder, and a second frame drop rate of the hardware decoder in the previous time period, where the video data includes multiple images; a fourth determination unit configured to determine a second influence weight of the second frame drop rate on decoding by the hardware decoder in the current time period, and determine a second predicted frame drop rate of the hardware decoder in the current time period according to the third number of frames, the fourth number of frames, the second influence weight, and the second frame drop rate; and the sixth acquisition unit is further configured to, when the second predicted frame drop rate is greater than a second preset value, control the software decoder to perform a decoding operation on the video data according to target decoding parameters.
[0279] In another embodiment of the present disclosure, it further includes: a second acquisition module 1720, further configured to acquire decoding capability parameters of the target device, and verify the target decoding parameters according to the decoding capability parameters; and a second control module 1730, further configured to, in response to the target decoding parameters passing the verification, control the hardware decoder to perform a decoding operation on the video data according to the target decoding parameters.
[0280] In another embodiment of the present disclosure, it further includes: a second determination module 1710, further configured to determine the format of the decoded data, where the decoded data is the data after the video data is decoded; a conversion module configured to, in response to the decoded data being data to be transmitted, convert the format of the decoded data into a playback format supported by an external device, where the external device is a device that receives the decoded data; and the conversion module is further configured to, in response to the decoded data being data to be played, convert the format of the decoded data into a playback format supported by the target device.
[0281] In another embodiment of the present disclosure, the device features include the model of the target device and / or the model of components in the target device.
[0282] Exemplary Computing Device
[0283] After introducing the methods, media, and apparatuses of the exemplary embodiments of the present disclosure, next, reference is made to Figure 18 to describe the computing devices of the exemplary embodiments of the present disclosure. Figure 18 The computing device 180 shown is merely an example and should not impose any limitation on the functions and usage scope of the embodiments of the present disclosure. As Figure 18As shown, the computing device 180 is presented in the form of a general-purpose computing device. The components of the computing device 180 may include, but are not limited to: at least one processing unit 1801, at least one storage unit 1802, and a bus 1803 that connects different system components (including the processing unit 1801 and the storage unit 1802). Among them, computer-executable instructions are stored in at least one storage unit 1802; at least one processing unit 1801 includes a processor that executes the computer-executable instructions to implement the method described above. The bus 1803 includes a data bus, a control bus, and an address bus. The storage unit 1802 may include a readable medium in the form of volatile memory, such as random access memory (RAM) 18021 and / or cache memory 18022, and may further include a readable medium in the form of non-volatile memory, such as read-only memory (ROM) 18023. The storage unit 1802 may also include a program / utility 18025 having a set (at least one) of program modules 18024. Such program modules 18024 include, but are not limited to: an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include the implementation of a network environment. The computing device 180 may also communicate with one or more external devices 1804 (such as a keyboard, a pointing device, etc.). Such communication may be carried out through an input / output (I / O) interface 1805. And, the computing device 180 may also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 1806. As Figure 18As shown, network adapter 1806 communicates with other modules of computing device 180 via bus 1803. It should be understood that, although not shown in the figures, other hardware and / or software modules may be used in conjunction with computing device 180, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc. It should be noted that although several units / modules or sub-units / modules of the video encoding device / video decoding device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more of the above-described units / modules may be embodied in one unit / module. Conversely, the features and functions of one unit / module described above may be further divided and embodied by multiple units / modules. Additionally, although the operations of the method of the present disclosure are described in a specific order in the drawings, this does not require or imply that these operations must be performed in that specific order, or that all of the operations shown must be performed to achieve the desired result. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step for execution, and / or one step may be decomposed into multiple steps for execution. Although the spirit and principles of the present disclosure have been described with reference to several specific embodiments, it should be understood that the present disclosure is not limited to the specific embodiments disclosed, and the division of each aspect does not mean that the features in these aspects cannot be combined for benefit. This division is only for the convenience of expression. The present disclosure aims to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.
Claims
1. A video encoding method, characterized in that, it includes: Determine the device characteristics of the target device; Obtain the target encoding parameters matching the target device according to the device characteristics; Control the encoder to perform an encoding operation on the video data according to the target encoding parameters; the encoder includes a hardware encoder and a software encoder; Obtain the first number of frames of the images input into the hardware encoder, the second number of frames of the images output by the hardware encoder, and the first frame drop rate of the hardware encoder in the previous time period within the previous time period, and the video data includes multiple images; Determine the first influence weight of the first frame drop rate on the encoding of the hardware encoder in the current time period, and determine the first predicted frame drop rate of the hardware encoder in the current time period according to the first number of frames, the second number of frames, the first frame drop rate, and the first influence weight; When the first predicted frame drop rate is greater than the first preset value, control the software encoder to perform an encoding operation on the video data according to the target encoding parameters.
2. The video encoding method according to claim 1, characterized in that, The obtaining the target encoding parameters matching the target device according to the device characteristics includes: Obtain a configuration file according to the device characteristics; In response to the configuration file including the encoding parameters corresponding to the device characteristics, obtain the target encoding parameters matching the target device according to the configuration file; In response to the configuration file not including the encoding parameters corresponding to the device characteristics, obtain the target encoding parameters matching the target device according to the default encoding parameters.
3. The video encoding method according to claim 2, characterized in that, The obtaining the target encoding parameters matching the target device according to the configuration file includes: Obtain a first whitelist and a first blacklist from the configuration file, and the first blacklist includes the disabled first encoding parameters; Determine the target encoding parameters according to the first blacklist and / or the first whitelist, and the target encoding parameters are the enabled first encoding parameters.
4. The video encoding method according to claim 2, characterized in that, The configuration file is stored in the server and / or the target device.
5. The video encoding method according to claim 1, characterized in that, The controlling the encoder to perform an encoding operation on the video data according to the target encoding parameters includes: Obtain the data source of the video data; In response to the data source being the first preset data source, control the hardware encoder to perform an encoding operation on the video data according to the target encoding parameters; In response to the data source being the second preset data source, control the software encoder to perform an encoding operation on the video data according to the target encoding parameters.
6. The video encoding method according to claim 1, characterized in that, The controlling the encoder to perform an encoding operation on the video data according to the target encoding parameters includes: In response to the resolution of the images in the video data being greater than the preset resolution, control the hardware encoder to perform an encoding operation on the video data according to the target encoding parameters; In response to the resolution of the image in the video data being less than or equal to a preset resolution, control the software encoder to perform an encoding operation on the video data according to the target encoding parameters.
7. The video encoding method according to claim 5 or 6, wherein, the target encoding parameters are used for the hardware encoder to encode the video data, and controlling the hardware encoder to perform an encoding operation on the video data according to the target encoding parameters further includes: obtain the encoding capability parameters of the target device, and verify the target encoding parameters according to the encoding capability parameters; In response to the target encoding parameters passing the verification, control the hardware encoder to perform an encoding operation on the video data according to the target encoding parameters.
8. The video encoding method according to any one of claims 1-6, wherein, further includes: obtain the target frame rate, target encoding bit rate, actual total data volume of the encoded images, and actual number of frames of the encoded images of the encoder in the current time period, and the video data includes multiple images; determine the average data volume of each of the encoded images according to the target encoding bit rate and the target frame rate; determine a bit rate correction ratio according to the average data volume, the actual total data volume, and the actual number of frames; adjust the target encoding bit rate of the encoder in the next time period according to the bit rate correction ratio.
9. The video encoding method according to any one of claims 1-6, wherein, controlling the encoder to perform an encoding operation on the video data according to the target encoding parameters includes: In response to the format of the image in the video data not matching the encoding format supported by the encoder, convert the format of the image in the video data into the encoding format supported by the encoder, and control the encoder to perform an encoding operation on the video data after the format conversion according to the target encoding parameters.
10. The video encoding method according to any one of claims 1-6, wherein, the device features include the model of the target device and / or the model of the components in the target device.
11. A video decoding method, wherein, includes: determine the device features of the target device; obtain the target decoding parameters matching the target device according to the device features; control the decoder to perform a decoding operation on the video data according to the target decoding parameters; the decoder includes a hardware decoder and a software decoder; obtain the third number of frames of the images input into the hardware decoder in the previous time period, the fourth number of frames of the images output by the hardware decoder, and the second frame drop rate of the hardware decoder in the previous time period, and the video data includes multiple images; determine the second influence weight of the second frame drop rate on the decoding of the hardware decoder in the current time period, and determine the second predicted frame drop rate of the hardware decoder in the current time period according to the third number of frames, the fourth number of frames, the second influence weight, and the second frame drop rate; When the second predicted frame drop rate is greater than a second preset value, control the software decoder to perform a decoding operation on the video data according to the target decoding parameters.
12. The video decoding method according to claim 11, wherein, the obtaining of the target decoding parameters matching the target device according to the device characteristics includes: obtaining a second configuration file according to the device characteristics; when the second configuration file includes the decoding parameters corresponding to the device characteristics, obtaining the target decoding parameters matching the target device according to the second configuration file; when the second configuration file does not include the decoding parameters corresponding to the device characteristics, obtaining the target decoding parameters matching the target device according to the default decoding parameters.
13. The video decoding method according to claim 12, wherein, the obtaining of the target decoding parameters matching the target device according to the second configuration file includes: obtaining a second whitelist and a second blacklist from the second configuration file, the second blacklist including disabled first decoding parameters, and the second whitelist including enabled second decoding parameters; determining target decoding parameters according to the second blacklist and / or the second whitelist, the target decoding parameters being the enabled second decoding parameters.
14. The video decoding method according to claim 12, wherein, the second configuration file is stored in a server and / or the target device.
15. The video decoding method according to claim 11, wherein, the controlling the decoder to perform a decoding operation on video data according to the target decoding parameters includes: obtaining a data source of the video data; when the data source is a first preset data source, controlling a hardware decoder to perform a decoding operation on the video data according to the target decoding parameters; when the data source is a second preset data source, controlling a software decoder to perform a decoding operation on the video data according to the target decoding parameters.
16. The video decoding method according to claim 11, wherein, the controlling the decoder to perform a decoding operation on video data according to the target decoding parameters includes: the resolution of an image in the video data; when the resolution of an image in the video data is greater than a preset resolution, controlling a hardware decoder to perform a decoding operation on the video data according to the target decoding parameters; when the resolution of an image in the video data is less than or equal to the preset resolution, controlling a software decoder to perform a decoding operation on the video data according to the target decoding parameters.
17. The video decoding method according to claim 15 or 16, wherein, the target decoding parameters are used for the hardware decoder to perform a decoding operation on the video data, and the controlling the hardware decoder to perform a decoding operation on the video data according to the target decoding parameters further includes: obtaining decoding capability parameters of the target device and verifying the target decoding parameters according to the decoding capability parameters; when the target decoding parameters pass the verification, controlling the hardware decoder to perform a decoding operation on the video data according to the target decoding parameters.
18. The video decoding method according to any one of claims 11-16, wherein, after the controlling the decoder to perform a decoding operation on video data according to the target decoding parameters, includes: Determine the format of the decoded data, where the decoded data is the data after the video data undergoes a decoding operation; In response to the decoded data being data to be transmitted, convert the format of the decoded data to a playback format supported by an external device, where the external device is the device that receives the decoded data; In response to the decoded data being data to be played, convert the format of the decoded data to a playback format supported by the target device.
19. The video decoding method according to any one of claims 11-16, characterized in that, the device features include the model of the target device and / or the model of components in the target device.
20. A video encoding device, characterized in that, comprises: a first determination module for determining the device features of the target device; a first acquisition module for acquiring target encoding parameters according to the device features; a first control module for controlling the encoder to perform an encoding operation on the video data according to the target encoding parameters; the encoder includes a hardware encoder and a software encoder; the first control module includes: a third acquisition unit for acquiring the first number of frames of the images input into the hardware encoder, the second number of frames of the images output by the hardware encoder, and the first frame loss rate of the hardware encoder in the previous time period within the previous time period, where the video data includes multiple images; a second determination unit for determining the first influence weight of the first frame loss rate on the encoding of the hardware encoder in the current time period, and determining the first predicted frame loss rate of the hardware encoder in the current time period according to the first number of frames, the second number of frames, the first frame loss rate, and the first influence weight; a second control unit for controlling the software encoder to perform an encoding operation on the video data according to the target encoding parameters when the first predicted frame loss rate is greater than a first preset value.
21. The video encoding device according to claim 20, characterized in that, the first acquisition module includes: a first acquisition unit for acquiring a first configuration file according to the device features; the first acquisition unit is further configured to, in response to the first configuration file including the encoding parameters corresponding to the device features, acquire the target encoding parameters matching the target device according to the first configuration file; the first acquisition unit is further configured to, in response to the first configuration file not including the encoding parameters corresponding to the device features, acquire the target encoding parameters matching the target device according to the default encoding parameters.
22. The video encoding device according to claim 21, characterized in that, the first acquisition unit includes: a first acquisition subunit for acquiring a first whitelist and a first blacklist from the first configuration file, where the first blacklist includes disabled first encoding parameters, and the first whitelist includes enabled second encoding parameters; a first determination subunit for determining target encoding parameters according to the first blacklist and / or the first whitelist, where the target encoding parameters are the enabled second encoding parameters.
23. The video encoding device according to claim 21, characterized in that, The first configuration file is stored in the server and / or the target device.
24. The video encoding device according to claim 20, wherein, the first control module includes: a second obtaining unit, configured to obtain a data source of the video data; a first control unit, configured to, in response to the data source being a first preset data source, control a hardware encoder to perform an encoding operation on the video data according to the target encoding parameters; the first control unit is further configured to, in response to the data source being a second preset data source, control a software encoder to perform an encoding operation on the video data according to the target encoding parameters.
25. The video encoding device according to claim 20, wherein, the second control unit is further configured to, in response to a resolution of an image in the video data being greater than a preset resolution, control a hardware encoder to perform an encoding operation on the video data according to the target encoding parameters; and in response to the resolution of the image in the video data being less than or equal to the preset resolution, control a software encoder to perform an encoding operation on the video data according to the target encoding parameters.
26. The video encoding device according to claim 24 or 25, wherein, it further includes: the first obtaining module is further configured to obtain encoding capability parameters of the target device, and verify the target encoding parameters according to the encoding capability parameters; the first control module is further configured to, in response to the target encoding parameters passing the verification, control a hardware encoder to perform an encoding operation on the video data according to the target encoding parameters.
27. The video encoding device according to any one of claims 20-25, wherein, it further includes: the first obtaining module is further configured to obtain a target frame rate, a target encoding bit rate, an actual total data amount of encoded images, and an actual number of frames of encoded images of the encoder in a current time period, and the video data includes multiple images; the first determining module is further configured to determine an average data amount of each of the encoded images according to the target encoding bit rate and the target frame rate; the first determining module is further configured to determine a bit rate correction ratio according to the average data amount, the actual total data amount, and the actual number of frames; an adjustment module, configured to adjust a target encoding bit rate of the encoder in a next time period according to the bit rate correction ratio.
28. The video encoding device according to any one of claims 20-25, wherein, the first control module includes: a conversion unit, configured to, in response to a format of an image in the video data not matching an encoding format supported by the encoder, convert the format of the image in the video data into the encoding format supported by the encoder, and control the encoder to perform an encoding operation on the video data after the format conversion according to the target encoding parameters.
29. The video encoding device according to any one of claims 20-25, wherein, the device features include a model of the target device and / or a model of a component in the target device.
30. A video decoding device, wherein, it includes: a second determining module, configured to determine device features of a target device; A second acquisition module, configured to acquire target decoding parameters according to the device characteristics; A second control module, configured to control a decoder to perform a decoding operation on video data according to the target decoding parameters; the decoder includes a hardware decoder and a software decoder; The second control module further includes: A sixth acquisition unit, configured to acquire a third number of frames of an image input to the hardware decoder, a fourth number of frames of an image output by the hardware decoder, and a second frame drop rate of the hardware decoder in the previous time period in the previous time period, where the video data includes multiple images; A fourth determination unit, configured to determine a second influence weight of the second frame drop rate on decoding of the hardware decoder in the current time period, and determine a second predicted frame drop rate of the hardware decoder in the current time period according to the third number of frames, the fourth number of frames, the second influence weight, and the second frame drop rate; The sixth acquisition unit is further configured to, when the second predicted frame drop rate is greater than a second preset value, control the software decoder to perform a decoding operation on the video data according to the target decoding parameters.
31. The video decoding device according to claim 30, wherein, The second acquisition module includes: A fourth acquisition unit, configured to acquire a second configuration file according to the device characteristics; The fourth acquisition unit is further configured to, when the second configuration file includes decoding parameters corresponding to the device characteristics, acquire target decoding parameters matching the target device according to the second configuration file; The fourth acquisition unit is further configured to, when the second configuration file does not include decoding parameters corresponding to the device characteristics, acquire target decoding parameters matching the target device according to default decoding parameters.
32. The video decoding device according to claim 31, wherein, The fourth acquisition unit includes: A second acquisition subunit, configured to acquire a second whitelist and a second blacklist from the second configuration file, the second blacklist includes disabled first decoding parameters, and the second whitelist includes enabled second decoding parameters; A second determination subunit, configured to determine target decoding parameters according to the second blacklist and / or the second whitelist, and the target decoding parameters are the enabled second decoding parameters.
33. The video decoding device according to claim 31, wherein, The second configuration file is stored in a server and / or the target device.
34. The video decoding device according to claim 30, wherein, The second control module includes: A fifth acquisition unit, configured to acquire a data source of the video data; A third control unit, configured to, when the data source is a first preset data source, control the hardware decoder to perform a decoding operation on the video data according to the target decoding parameters; The third control unit is further configured to, when the data source is a second preset data source, control the software decoder to perform a decoding operation on the video data according to the target decoding parameters.
35. The video decoding device according to claim 30, wherein, The second control module includes: A sixth acquisition unit, configured to acquire the resolution of an image in the video data; A fourth control unit, configured to, in response to the resolution of an image in the video data being greater than a preset resolution, control a hardware decoder to perform a decoding operation on the video data according to the target decoding parameter; The fourth control unit is further configured to, in response to the resolution of an image in the video data being less than or equal to the preset resolution, control a software decoder to perform a decoding operation on the video data according to the target decoding parameter.
36. The video decoding device according to claim 34 or 35, wherein: it further includes: The second acquisition module is further configured to acquire a decoding capability parameter of a target device, and verify the target decoding parameter according to the decoding capability parameter; The second control module is further configured to, in response to the target decoding parameter passing the verification, control a hardware decoder to perform a decoding operation on the video data according to the target decoding parameter.
37. The video decoding device according to any one of claims 30-35, wherein: it further includes: The second determination module is further configured to determine a format of decoded data, where the decoded data is data after the video data undergoes a decoding operation; A conversion module, configured to, in response to the decoded data being data to be transmitted, convert the format of the decoded data into a playback format supported by an external device, where the external device is a device that receives the decoded data; The conversion module is further configured to, in response to the decoded data being data to be played, convert the format of the decoded data into a playback format supported by the target device.
38. The video decoding device according to any one of claims 30-35, wherein: The device feature includes a model of the target device and / or a model of a component in the target device.
39. A computer-readable medium, wherein: computer-executable instructions are stored thereon, and when the computer-executable instructions are executed by a processor, the computer-executable instructions are used to implement the video encoding method according to any one of claims 1 to 10 or the video decoding method according to any one of claims 11 to 19.
40. A computing device, wherein: it includes: a memory and a processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, so that the processor executes the video encoding method according to any one of claims 1 to 10 or the video decoding method according to any one of claims 11 to 19.
Citation Information
Patent Citations
Video frame encoding method, video frame encoding equipment and device with storage function
CN110198444A
Live broadcast control method, device and system
CN111010587A
Shared screen coding method and device, computer readable medium and electronic equipment
CN111182303A
Live broadcast coding method and apparatus, and electronic device
CN111447447A