Method, apparatus, and electronic device for processing media data, and readable medium
By acquiring video segments through an edge transcoding system and performing quality checks, and dynamically adjusting the bitrate and resolution, the problem of video quality degradation when the client bandwidth is limited is solved, thus optimizing video quality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TENCENT CLOUD INTERNATIONAL CO LTD
- Filing Date
- 2024-11-29
- Publication Date
- 2026-05-29
AI Technical Summary
When transcoding video on an edge transcoding server, the client's bandwidth is limited, and when processing complex images, the transcoding service requires a large amount of data, which leads to a decrease in video quality.
By acquiring the first video segment of the video to be played, transcoding it according to the target bitrate and resolution, and sending the transcoded segment to the quality detection server for evaluation, the bitrate and resolution of subsequent video segments are adjusted according to the quality detection data to make them tend to the preset quality data and optimize the video quality.
During video playback, the bitrate and resolution are dynamically adjusted to avoid quality degradation caused by complex scenes and improve the overall video quality.
Smart Images

Figure CN122120494A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, electronic device, and readable medium for processing media data. Background Technology
[0002] With the development of computer technology, edge computing systems have begun to be applied in video playback and live streaming. Copies of media content can be stored on servers located at the network edge. When a client requests to play a video, the edge server's transcoding device or server transcodes the video for the client to play.
[0003] In related technologies, edge transcoding servers transcode media content into video data suitable for a specified playback device, and simultaneously transmit the transcoded video data to the playback device.
[0004] However, in such solutions, the edge transcoding server performs video transcoding according to predetermined parameters. When the client bandwidth is limited, the transcoding service requires a larger amount of data to process the more complex scenes in the video, which leads to a reduction in the quality of some scenes and a decrease in the overall video quality after transcoding. Summary of the Invention
[0005] In view of the above-mentioned technical problems, this application provides a media data processing method, apparatus, electronic device and readable medium to adjust the bit rate or resolution used for transcoding according to the video quality detection results of the transcoded video, so as to improve the overall video quality of the transcoded video.
[0006] Other features and advantages of this application will become apparent from the following detailed description, or may be learned in part from practice of this application.
[0007] According to one aspect of the embodiments of this application, a method for processing media data is provided, applied to an edge node, including:
[0008] Get the first video segment of the video to be played;
[0009] Based on the target bitrate and target resolution of the video to be played, the first video segment is transcoded to generate the first transcoded segment;
[0010] The first transcoded segment is sent to the quality inspection server so that the first transcoded data can be evaluated for video quality by the quality inspection server.
[0011] Receive the first quality inspection data generated by the quality inspection server for the first transcoded segment;
[0012] Based on the difference between the first quality detection data of the first transcoded segment and the preset quality data, at least one of the target bitrate and target resolution of the second video segment in the video to be played is adjusted so that the second quality detection data of the second transcoded segment obtained after transcoding the second video segment tends to the preset quality data, and the second video segment is located after the first video segment in the video to be played.
[0013] According to one aspect of the embodiments of this application, a media data processing apparatus is provided, comprising:
[0014] The segment acquisition module is configured to acquire the first video segment of the video to be played.
[0015] The video transcoding module is configured to transcode the first video segment according to the target bitrate and target resolution of the video to be played, and generate a first transcoded segment.
[0016] The data transmission model is configured to send the first transcoded segment to a quality inspection server so that the quality inspection server can perform video quality assessment on the first transcoded data.
[0017] The data receiving module is configured to receive the first quality inspection data generated by the quality inspection server for the first transcoded segment;
[0018] The parameter adjustment module is configured to adjust at least one of the target bitrate and target resolution of the second video segment in the video to be played based on the difference between the first quality detection data of the first transcoded segment and the preset quality data, so that the second quality detection data of the second transcoded segment obtained after transcoding the second video segment tends to the preset quality data, and the second video segment is located after the first video segment in the video to be played.
[0019] In some embodiments of this application, based on the above technical solutions, the segment acquisition module is specifically configured to: acquire a video playback request sent by the client and the available bandwidth of the client; acquire the video to be played from the video storage according to the video playback request; and determine the bitrate and resolution supported by the available bandwidth as the target bitrate and target resolution corresponding to the video to be played.
[0020] In some embodiments of this application, based on the above technical solutions, the data transmission model is further configured to: receive the first transcoded segment through the quality detection server; and generate first quality detection data of the first transcoded segment through the quality detection server based on the difference between the video frame of the first transcoded segment and the video frame in the video to be played.
[0021] In some embodiments of this application, based on the above technical solutions, the parameter adjustment module is specifically configured to: compare the first quality detection data of the first transcoded segment with preset quality data; if the first quality detection data of the first transcoded segment is greater than the preset quality data and the playback preference is set to preferred quality, then reduce the target bitrate of the second video segment in the video to be played; if the second quality detection data of the second transcoded segment after the second video segment is transcoded is greater than the preset quality data, then reduce the target bitrate of the third video segment in the video to be played, wherein the third video segment is the segment in the video to be played that follows the second video segment.
[0022] In some embodiments of this application, based on the above technical solutions, the parameter adjustment module is further configured to: if the first quality detection data of the first transcoded segment is less than the preset quality data and the playback preference is set to preferred quality, then obtain the current available bandwidth of the client; if the current available bandwidth is greater than the available bandwidth threshold, then increase the target bitrate of the second video segment in the video to be played.
[0023] In some embodiments of this application, based on the above technical solutions, the parameter adjustment module is further configured to: if the first quality detection data of the first transcoded segment is less than the preset quality data and the playback preference is set to preferred smoothness, then reduce the target resolution of the second video segment in the video to be played; if the first quality detection data of the first transcoded segment is greater than the preset quality data and the playback preference is set to preferred smoothness, then increase the target resolution of the second video segment in the video to be played.
[0024] In some embodiments of this application, based on the above technical solutions, the parameter adjustment module is further configured to: after sending the second transcoded segment to the client, receive the updated bandwidth sent by the client; if the bitrate supported by the updated bandwidth is less than the target bitrate of the second video segment, then reduce the target bitrate of the third video segment in the video to be played to the bitrate supported by the updated bandwidth.
[0025] In some embodiments of this application, based on the above technical solutions, the parameter adjustment module is further configured to: after sending the third transcoded segment of the third video segment to the client and the quality detection server, receive the quality detection data generated by the quality detection server for the third transcoded segment; if the quality detection data of the third video segment is lower than the preset quality data and the playback preference is set to preferred smoothness, then reduce the target resolution of the fourth video segment in the video to be played.
[0026] In some embodiments of this application, based on the above technical solutions, the parameter adjustment module is further configured to: receive smoothness data sent by the client for the first transcoded segment, wherein the smoothness data is detected by the client during the playback of the first transcoded segment; if the smoothness data of the first transcoded segment is lower than the smoothness threshold and the playback preference is set to preferred smoothness, then reduce the target resolution of the second video segment in the video to be played.
[0027] In some embodiments of this application, based on the above technical solutions, the parameter adjustment module is further configured to: if the smoothness data of the first transcoded segment is lower than the smoothness threshold and the playback preference is set to preferred quality, then reduce the target bitrate of the second video segment in the video to be played; after the second transcoded segment of the second video segment is reduced and sent to the client, if the smoothness data sent by the client for the second transcoded segment is higher than the smoothness threshold, then increase the target bitrate of each video segment after the second video segment until a cache insufficiency report sent by the client is received.
[0028] In some embodiments of this application, based on the above technical solutions, the parameter adjustment module is specifically configured to: after the video to be played is completed, statistically analyze the quality detection data of each video segment in the video to be played to generate quality statistics data of the video to be played; sample the quality statistics data at predetermined time intervals to obtain sampled quality data; cache the bitrate, resolution, and transcoded video of the video to be played when the sampled quality data is greater than or equal to the average quality data, wherein the average quality data is the average value of the quality statistics data of videos within a specified network range; when a video playback request for the video to be played is received from a client within the specified network range, play the video to be played to the client within the specified network range using the cached bitrate, resolution, and transcoded video.
[0029] According to one aspect of the embodiments of this application, an electronic device is provided, the electronic device comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform a media data processing method as described above by executing the executable instructions.
[0030] According to one aspect of the embodiments of this application, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the media data processing method as described in the above technical solutions.
[0031] According to one aspect of the embodiments of this application, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the media data processing methods provided in the various optional implementations described above.
[0032] In embodiments of this application, during video playback, the edge transcoding system acquires a first video segment of the video to be played, and then transcodes the first video segment according to the target bitrate and target resolution of the video to be played, generating a first transcoded segment. Subsequently, the edge transcoding system sends the first transcoded segment to a quality inspection server for video quality evaluation. The edge transcoding system receives first quality inspection data generated by the quality inspection server for the first transcoded segment, and then adjusts at least one of the target bitrate and target resolution of a second video segment in the video to be played, based on the difference between the first quality inspection data of the first transcoded segment and preset quality data, so that the second quality inspection data of the second transcoded segment obtained after transcoding the second video segment tends to the preset quality data. The second video segment is located after the first video segment in the video to be played.
[0033] In this way, during video playback, the edge transcoding system can adjust the bitrate or resolution used for transcoding based on the video quality detection results of the transcoded video. When processing complex scenes in the video, it avoids reducing the quality of some scenes due to complex scenes, thereby improving the overall video quality after transcoding.
[0034] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0035] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0036] Figure 1 The system architecture for applying the media data processing method according to the embodiments of this application to an edge transcoding system.
[0037] Figure 2 This is a flowchart of a media data processing method according to an embodiment of this application.
[0038] Figure 3 This is a flowchart of a media data processing method according to an embodiment of this application.
[0039] Figure 4 This is a flowchart of a media data processing method according to an embodiment of this application.
[0040] Figure 5 This is a flowchart of a media data processing method according to an embodiment of this application.
[0041] Figure 6 This is a schematic flowchart illustrating the dynamic edge transcoding process in the embodiments of this application.
[0042] Figure 7 This is a schematic diagram illustrating the dynamic bitrate adjustment process in an embodiment of this application.
[0043] Figure 8 A block diagram illustrating the composition of a media data processing apparatus in an embodiment of this application is shown schematically.
[0044] Figure 9 A schematic diagram of the structure of a computer system suitable for implementing the electronic device of the present application is shown. Detailed Implementation
[0045] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this application more comprehensive and complete, and to fully convey the concept of the exemplary embodiments to those skilled in the art.
[0046] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this application. However, those skilled in the art will recognize that the technical solutions of this application can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this application.
[0047] In the embodiments of this application, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve the predetermined function, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement at least one module or unit. Furthermore, each module or unit can be part of an overall module or unit that includes the functions of that module or unit.
[0048] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in at least one hardware module or integrated circuit, or in different network and / or processor devices and / or microcontroller devices.
[0049] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0050] It should be understood that the solution of this application can be applied to media playback systems, specifically to edge transcoding servers within such systems. In embodiments of this application, the media playback system can be an over-the-top (OTT) video or data service, such as a live streaming platform, internet communication software, or internet television. Media content in such systems needs to be transcoded by a transcoding system before being sent to a client for display. The transcoding system or service is used to encode media content in real-time, at least partially, based on the requesting device. The system can deploy edge transcoding servers based on edge computing technology. Copies of media content (such as audio, video, or multimedia files) can be stored at designated locations, such as servers located at the network edge, like Content Delivery Network (CDN) nodes or Point of Presence (POPs). When a device requests media content, the edge server checks the request and transcodes the content in real-time to an encoding suitable for the device type, operating system, application, or browser type before delivering the requested media copy to the device. Edge servers can simultaneously transcode media content and transmit the transcoded bits to the device. In different embodiments, the edge server can be a point-of-presence (POP) caching server, a dedicated transcoding server, or any other device located at the network edge capable of transcoding media. However, in such schemes, the edge transcoding server performs video transcoding according to predetermined parameters. OTT services are typically based on HLD and DASH technologies, both of which are static systems. The player requests static transcoding or an available video version or variant based on bandwidth. In such scenarios, with limited client bandwidth, the transcoding service requires a larger amount of data to process complex scenes in the video, leading to a reduction in the quality of some scenes and a decrease in the overall video quality after transcoding. Furthermore, available video versions or variants are usually pre-transcoded videos, which require storage space. Additionally, the number of pre-transcoded videos is usually fixed; for example, a video may have five video variants, each transcoded at a different discrete bitrate or resolution. The solution proposed in this application allows for more precise control over video transcoding by adjusting the bitrate and resolution using continuous values. This enables the video to be played at the optimal bitrate and resolution, thereby improving the quality of video playback.
[0051] Based on this, the technical solution of this application embodiment proposes a media data processing scheme. Specifically, please refer to... Figure 1The system architecture of the media data processing method according to the embodiments of this application applied to an edge transcoding system can mainly include a terminal device 110, a network 120, and a server 130. The terminal device 110 can include smartphones, tablets, laptops, smart voice interaction devices, smart home appliances, vehicle terminals, aircraft, etc. The server 130 can be a server providing various services; it can be an independent physical server, a server cluster composed of multiple physical servers, or a distributed system. It can also be a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The network 120 can be a communication medium of various connection types capable of providing a communication link between the terminal device 110 and the server 130, such as a wired communication link or a wireless communication link.
[0052] Depending on the implementation requirements, the system architecture in this application embodiment can have any number of terminal devices, networks, and servers. For example, server 130 can be a server group composed of multiple server devices. In addition, the technical solutions provided in this application embodiment can be applied to terminal device 110, or to server 130, or can be implemented jointly by terminal device 110 and server 130. This application does not impose any special limitations on this.
[0053] like Figure 1 As shown, the edge transcoding system in this application can be deployed in server 130. The video-on-demand file storage system can also be deployed in server 130. A client on terminal device 110 requests server 130 to play specified media content, such as a video. Server 130 then retrieves the video requested by the terminal device from the file storage system. Terminal device 110 provides server 130 with information about its available bandwidth. The edge transcoding server in server 130 transcodes the video according to the bitrate and resolution supported by the available bandwidth of terminal device 110 and sends it to terminal device 110. The transcoded video is sent to the video quality detection server deployed in server 130. The quality detection server calculates the quality data of the transcoded video and feeds it back to the edge transcoding server. The edge transcoding server adjusts the bitrate or resolution used in subsequent transcoding processes of the video based on the quality data, thereby maintaining the quality data within a specified appropriate range.
[0054] The implementation details of the technical solutions in the embodiments of this application are described in detail below: Figure 2A flowchart illustrating a media data processing method according to an embodiment of this application is shown. This media data processing method can be executed by a device with computing processing capabilities, such as a server or a terminal device. The media data processing method of this application will be described below from the perspective of an edge transcoding system on a server. (Refer to...) Figure 2 As shown, this media data processing method is applied to edge nodes, which are part of the edge transcoding system and are typically deployed at network entry points. Remote video servers are connected to edge nodes via a network, and edge nodes are also connected to playback terminals via the internet. Edge nodes store video data and, when a playback terminal requests video playback, prioritize using local video data to provide video data to the terminal device. The method includes at least steps S210 to S250, detailed below:
[0055] Step S210: Obtain the first video segment of the video to be played.
[0056] The video to be played is the video requested by the client. The video to be played can also be replaced with audio or multimedia data. The solution in this application can be executed at any point in time during edge transcoding playback. The first video segment can be any segment of the video to be played. The first video segment will contain at least one video frame from the video to be played. Typically, the video frames in the first video segment are continuous. During the playback of the video to be played, the edge transcoding system acquires a portion of the video frames to be played as the first video segment. The first video segment is untranscoded video data obtained from the original video file.
[0057] Step S220: Based on the target bitrate and target resolution of the video to be played, transcode the first video segment to generate the first transcoded segment.
[0058] The target bitrate and target resolution of the video to be played can be preset default playback parameters, or they can be playback parameters already used for transcoding the video during previous playback. The target bitrate and target resolution can be recorded in the video to be played, or they can be recorded separately in the edge node. The edge transcoding system transcodes the first video segment according to the target bitrate and target resolution of the video to be played, generating the first transcoded segment. The target bitrate and target resolution of the video to be played are the target parameters of the transcoding process, and the first transcoded segment will be encoded according to the target bitrate and target resolution. For example, the video file to be played is stored in the edge node at a resolution of 3840x2160 and a bitrate of 2Mbps, but the target bitrate for this video to be played is set to 2Mbps and the target resolution is 1920*1080. During playback, the edge node will transcode the first video segment of the video to be played, becoming the first transcoded segment with a resolution of 1920*1080 and a bitrate of 2Mbps. It is understood that the first video segment in the video to be played is a video encoded according to the bitrate and resolution of the video to be played. The transcoding process converts the bitrate and resolution of the first video segment to the target bitrate and target resolution. In some embodiments, the bitrate and resolution of the video to be played may be the same as at least one of the target bitrate and target resolution.
[0059] Step S230: The first transcoded segment is sent to the quality inspection server so that the first transcoded data can be evaluated for video quality by the quality inspection server.
[0060] The edge transcoding system sends the first transcoded segment to the client for playback. It also sends this first transcoded segment to a quality inspection server. The quality inspection server performs video quality checks on the transcoded video. This server can be a component of the edge transcoding system and is typically deployed in the same location as the edge nodes, such as at the network's entry point. It can run alongside the edge transcoding server within the system or as a standalone system or server. The quality inspection server then evaluates the video quality of the first transcoded data and generates quality inspection data. Video quality assessment can employ methods that require reference to the original video footage, such as Peak Signal-to-Noise Ratio (PSNR), Structural Similarity Index Measure (SSIM), or Video Multimethod Assessment Fusion (VMAF). Alternatively, it can use methods that do not require reference to the original video footage, such as Natural Image Quality Evaluator (NIQE), or methods that require partial reference to the original video, such as Multiscale Structural Similarity (MS-SSIM).
[0061] Step S240: Receive the first quality inspection data generated by the quality inspection server for the first transcoded segment.
[0062] The quality inspection server generates initial quality inspection data for the first transcoded segment and feeds it back to the edge transcoding server. This quality inspection data describes the image quality of the first transcoded segment. Depending on the calculation method used, the specific evaluation perspective of the quality inspection data varies. For example, the quality inspection data could be the VMAF detection result of the video frame in the first transcoded segment, a comprehensive evaluation score combining three indicators: video information fidelity, detail loss index, and motion.
[0063] Step S250: Based on the difference between the first quality detection data of the first transcoded segment and the preset quality data, adjust at least one of the target bitrate and target resolution of the second video segment in the video to be played, so that the second quality detection data of the second transcoded segment obtained after transcoding the second video segment tends to the preset quality data, and the second video segment is located after the first video segment in the video to be played.
[0064] The edge transcoding system increases or decreases at least one of the target bitrate and target resolution of the second video segment in the video to be played, based on the difference between the first quality detection data of the first transcoded segment and preset quality data. The preset quality data is a predetermined parameter indicating the desired target of the transcoding result of the video to be played. Depending on the relationship between changes in bitrate and resolution and changes in the quality detection data of the transcoded segment, the edge transcoding system adjusts at least one of the target bitrate and target resolution of the second video segment to make the quality detection data of the transcoded result of the second video segment tend towards the preset quality data. In this application, the scheme is described using an example where bitrate and resolution are positively correlated with quality detection data. If bitrate and resolution are negatively correlated with quality detection data, the corresponding operation can be derived from the description in this application. If the quality detection data of the first video segment is lower than the preset quality data, the target bitrate or resolution of the second video segment can be increased to improve the quality detection data of the second video segment, and vice versa. The second video segment is the segment in the video to be played that follows the first video segment. The comparison of the video segment order is based on the order of the video segments in the video file or their temporal sequence during video playback. Typically, the second video segment is a segment that follows and is consecutive to the first video segment; that is, the first video segment is the video of the first second, and the second video segment is the video of the second second. During subsequent playback, the edge transcoding system continuously repeats the above-mentioned process of detecting quality and adjusting bitrate and resolution for each video segment, thereby ensuring that the video quality of the transcoded video consistently tends towards the preset quality data. In the scheme of this application, the edge transcoding system can adjust the bitrate or resolution in any way. For example, when increasing the bitrate, if the current bitrate is 2Mbps and the client's available bandwidth is 5Mbps, the edge transcoding system can increase the bitrate to any value less than or equal to 5Mbps, such as 3Mbps, 3.5Mbps, or 4Mbps. The specific adjustment range can be calculated by the edge transcoding system according to a predetermined algorithm or according to a specified adjustment range value. Using the example of increasing the bitrate as described above, the edge transcoding system can pre-store the mapping relationship between the score and bitrate in the quality detection data, for example, how much bitrate can be increased by increasing the quality detection score by 1. Subsequently, based on the score difference between the current quality detection data and the preset quality data, the required bitrate increase is calculated. For example, if the score difference is 15 points, and each point increase requires a bitrate increase of 0.1 Mbps, then the edge transcoding system will increase the bitrate of the second video segment from 2 Mbps to 3.5 Mbps.
[0065] It's understandable that the preset quality data can be a range. Edge transcoding systems maintain the quality detection data within this range by adjusting the bitrate and resolution of video segments, thus preserving the video quality. However, it's also understandable that if the complexity of the video content changes, increasing the computational load, the quality detection data of transcoded segments will decrease, causing it to deviate from the preset quality data. The edge transcoding system then modifies the bitrate and resolution of subsequent segments to improve their quality detection data, thereby maintaining the overall video quality.
[0066] In embodiments of this application, during video playback, the edge transcoding system acquires a first video segment of the video to be played, and then transcodes the first video segment according to the target bitrate and target resolution of the video to be played, generating a first transcoded segment. Subsequently, the edge transcoding system sends the first transcoded segment to a quality detection server for video quality evaluation, such as evaluation indicators for video picture quality, video smoothness, and video data integrity. The edge transcoding system receives first quality detection data generated by the quality detection server for the first transcoded segment, and then adjusts at least one of the target bitrate and target resolution of the second video segment in the video to be played, based on the difference between the first quality detection data and preset quality data, so that the second quality detection data of the second transcoded segment obtained after transcoding the second video segment tends to the preset quality data. The second video segment is located after the first video segment in the video to be played. In this way, during video playback, the edge transcoding system can adjust the bitrate or resolution used for transcoding based on the video quality detection results of the transcoded video. When processing complex scenes in the video, the transcoding parameters can be adjusted to avoid reducing the quality of some scenes due to complex scenes, thereby improving the overall video quality after transcoding.
[0067] In some embodiments of this application, based on the technical solutions of this application, during the process of acquiring the first video segment of the video to be played, the edge transcoding system can acquire the video playback request sent by the client and the client's available bandwidth. Then, according to the video playback request, it retrieves the video to be played from the video storage, and determines the bitrate and resolution supported by the available bandwidth as the target bitrate and target resolution corresponding to the video to be played. In this embodiment, when the client requests to play a video, it sends its available bandwidth to the edge transcoding system. The edge transcoding system then determines the target bitrate and target resolution corresponding to the video to be played based on the bitrate and resolution supported by the available bandwidth. Specifically, the edge transcoding system can store common correspondences between bitrates and resolutions. After receiving the client's available bandwidth, the edge transcoding system selects a bitrate less than the available bandwidth from the stored bitrates as the starting bitrate for transcoding the video to be played, and uses the resolution corresponding to this bitrate as the starting resolution for transcoding the video to be played. For example, the bitrates and resolutions stored by the edge transcoding system may include a resolution of 1280*720 and a bitrate of 2Mbps, a resolution of 1280*960 and a bitrate of 3.5Mbps, and a resolution of 1920*1080 and a bitrate of 2Mbps. When the available bandwidth from the client is 5Mbps, the edge transcoding system can choose either a bitrate of 2Mbps or 3.5Mbps as the starting bitrate. In this way, at the initial stage of transcoding the video to be played, the edge transcoding system transcodes the video based on the bitrate and resolution supported by the client's available bandwidth. This ensures that an appropriate bitrate is selected as the starting bitrate for video transcoding, which helps avoid stuttering caused by excessively high bitrates and improves the smoothness of the played video.
[0068] In some embodiments of this application, based on the technical solutions of this application, the edge transcoding system can also receive the first transcoded segment through the quality inspection server, and then generate first quality inspection data for the first transcoded segment based on the differences between the video frames of the first transcoded segment and the video frames in the video to be played. In this embodiment, the quality inspection server, as part of the edge transcoding system, calculates the quality inspection data by comparing the differences between the video frames of the first transcoded segment and the video frames in the video to be played. Specifically, the quality inspection data can be any suitable full-reference evaluation method or simplified reference evaluation method. For example, PSNR, SSIM, VMAF, or MS-SSIM can be used to generate the first quality inspection data for the first transcoded segment.
[0069] In some embodiments of this application, based on the technical solutions of this application, after the video to be played is completed, the edge transcoding system can also statistically analyze the quality detection data of each video segment in the video to be played, generating quality statistics data of the video to be played. Then, the quality statistics data are sampled at predetermined time intervals to obtain sampled quality data. Subsequently, the edge transcoding system caches the bitrate, resolution, and transcoded video of the video to be played when the sampled quality data is greater than or equal to the average quality data, wherein the average quality data is the average of the quality statistics data of videos within a specified network range. When a video playback request for the video to be played is received from a client within the specified network range, the edge transcoding system can use the cached bitrate, resolution, and transcoded video to play the video to be played to the client within the specified network range. In this embodiment, after the video to be played is completed, the edge transcoding system will statistically analyze the quality statistics data of the entire video during the video playback process. Subsequently, the quality statistics data are sampled to obtain sampled quality data. For example, sampling can be performed every 10 seconds to obtain the quality detection data of sampled video segments, thereby obtaining sampled quality data. For video segments with sampled quality data greater than or equal to the average quality data, the edge transcoding system caches the segment's bitrate, resolution, and already transcoded video. The average quality data is the mean of quality statistics for videos within a specified network area. This specified network area can be a network within a region or a network within an operator's service area; for example, it could be the network coverage area of a city or a block. The cached bitrate, resolution, and already transcoded video are used to serve other clients within this specified network area. For instance, when another client within this specified network area requests to watch the video, the edge transcoding system can directly transcode it based on the cached bitrate and resolution, or directly send the cached already transcoded video to that client. This allows the system to utilize playback data from other clients to optimize the current client's video viewing experience, thereby improving the overall video playback service quality within the specified network area.
[0070] In embodiments of this application, a method for... Figure 2 Other detailed embodiments of the technical solution shown in the example are as follows: Figure 3 As shown, a media data processing method according to one embodiment of this application may include the following steps:
[0071] Step S310: Obtain the first video segment of the video to be played.
[0072] Optionally, the implementation details of step S310 are the same as those of... Figure 2 The steps S210 shown are the same and will not be repeated here.
[0073] Step S320: Based on the target bitrate and target resolution of the video to be played, transcode the first video segment to generate the first transcoded segment.
[0074] Optionally, the implementation details of step S320 are the same as those of... Figure 2 The steps S220 shown are the same and will not be repeated here.
[0075] Step S330: The first transcoded segment is sent to the quality inspection server so that the first transcoded data can be evaluated for video quality by the quality inspection server.
[0076] Optionally, the implementation details of step S330 are the same as those of... Figure 2 The steps S230 shown are the same and will not be repeated here.
[0077] Step S340: Receive the first quality inspection data generated by the quality inspection server for the first transcoded segment.
[0078] Optionally, the implementation details of step S340 are the same as those of... Figure 2 The steps S240 shown are the same and will not be repeated here.
[0079] Step S350: Compare the first quality detection data of the first transcoded segment with preset quality data;
[0080] Step S360: If the first quality detection data of the first transcoded segment is greater than the preset quality data and the playback preference is set to preferred quality, then reduce the target bitrate of the second video segment in the video to be played, so that the second quality detection data of the second transcoded segment after the second video segment is transcoded tends to the preset quality data, and the second video segment is located after the first video segment in the video to be played.
[0081] Step S370: If the second quality detection data of the second transcoded segment after the second video segment is transcoded is greater than the preset quality data, then reduce the target bitrate of the third video segment in the video to be played, wherein the third video segment is the segment in the video to be played that follows the second video segment.
[0082] In this embodiment, the edge transcoding system compares the first quality detection data of the first transcoded segment with preset quality data. The preset quality data can be data already configured in the edge transcoding system. If the first quality detection data of the first transcoded segment is greater than the preset quality data, it indicates that the picture quality of the first transcoded segment has exceeded the required quality, and the playback preference is set to preferred quality. The edge transcoding system can then reduce the target bitrate of the second video segment in the video to be played, so that the second quality detection data of the second transcoded segment after the second video segment is transcoded tends to the preset quality data. The playback preference setting is a preference test of the bitrate and resolution adjustment strategy, and usually includes two options: preferred quality and preferred smoothness. In the case of preferred quality, the edge transcoding system will choose to prioritize using a higher bitrate and a higher resolution to improve the quality score. In the case of preferred smoothness, the edge transcoding system will choose to reduce the bitrate and resolution to ensure smooth video playback. After transcoding the second video segment, if the second quality detection data of the second transcoded segment is greater than the preset quality data, it indicates that there is still room for the bitrate to decrease. The edge transcoding system will then continue to reduce the target bitrate of the third video segment in the video to be played. The third video segment is the segment following the second video segment in the video to be played. This saves bandwidth and processing costs while maintaining video quality, thereby improving resource utilization. In other embodiments, if the first quality detection data of the first transcoded segment is greater than the preset quality data and the playback preference is set to smooth playback, the edge transcoding system will reduce the target bitrate of the second video segment in the video to be played, so that the second quality detection data of the second transcoded segment is lower than the preset quality data. Then, during the subsequent transcoding of the third video segment, the target bitrate of the third video segment is increased, so that the quality detection data of the third transcoded segment of the third video segment tends towards the preset quality data. In this way, the edge transcoding system prioritizes reducing the bitrate to ensure smoothness, and then increases the bitrate to ensure quality, thereby improving video quality while ensuring smooth playback. It is understood that in the embodiments of this application, when the difference between the quality detection data and the preset quality data becomes sufficiently small, that is, the difference is less than the preset threshold, the edge transcoding system can stop adjusting the bitrate and resolution of subsequent segments, so that adjustments are made only after the difference between the quality detection data and the preset quality data exceeds the threshold.
[0083] In embodiments of this application, during video playback, the edge transcoding system acquires a first video segment of the video to be played, and then transcodes the first video segment according to the target bitrate and target resolution of the video to be played, generating a first transcoded segment. Subsequently, the edge transcoding system sends the first transcoded segment to a quality inspection server for video quality evaluation. The edge transcoding system receives first quality inspection data generated by the quality inspection server for the first transcoded segment, and then adjusts at least one of the target bitrate and target resolution of a second video segment in the video to be played, based on the difference between the first quality inspection data of the first transcoded segment and preset quality data, so that the second quality inspection data of the second transcoded segment obtained after transcoding the second video segment tends to the preset quality data. The second video segment is located after the first video segment in the video to be played. In this way, during video playback, the edge transcoding system can adjust the bitrate or resolution used for transcoding based on the video quality detection results of the transcoded video. When processing complex scenes in the video, the transcoding parameters can be adjusted to avoid reducing the quality of some scenes due to complex scenes, thereby improving the overall video quality after transcoding.
[0084] In some embodiments of this application, based on the technical solutions of this application, if the first quality detection data of the first transcoded segment is less than the preset quality data and the playback preference is set to preferred quality, the edge transcoding system can obtain the current available bandwidth of the client; if the current available bandwidth is greater than the available bandwidth threshold, the edge transcoding system can increase the target bitrate of the second video segment in the video to be played. In this embodiment, when it is necessary to increase the bitrate, the edge transcoding system will first check the current available bandwidth of the client. If the current available bandwidth is greater than the available bandwidth threshold, it means that the current available bandwidth is sufficient, and the edge transcoding system can increase the target bitrate of the second video segment in the video to be played. In this way, a certain margin can be reserved in the available bandwidth to prevent the transcoded video from occupying too much bandwidth, causing network communication congestion and resulting in abnormal video playback.
[0085] In some embodiments of this application, based on the technical solutions of this application, if the first quality detection data of the first transcoded segment is less than the preset quality data and the playback preference is set to "prefer smooth," the edge transcoding system can reduce the target resolution of the second video segment in the video to be played; if the first quality detection data of the first transcoded segment is greater than the preset quality data and the playback preference is set to "prefer smooth," the edge transcoding system can increase the target resolution of the second video segment in the video to be played. In this embodiment, if the first quality detection data of the first transcoded segment is less than the preset quality data and the playback preference is set to "prefer smooth," then the quality detection data needs to be increased. The edge transcoding system can reduce the target resolution of the second video segment, thereby reducing the data that needs to be processed during transcoding, thus allowing the edge transcoding system to include more details in a single frame, thereby increasing the target resolution of the second video segment. Conversely, if the first quality detection data of the first transcoded segment is greater than the preset quality data, then the quality detection data needs to be reduced. The edge transcoding system can increase the target resolution of the second video segment, thereby increasing the amount of data per frame in the transcoded video. In this way, adjusting the resolution adjusts the video quality, thereby avoiding the uncertainty caused by the combined effects of changes in video bitrate and changes in available bandwidth on the client during the video transmission process.
[0086] In embodiments of this application, a method for... Figure 2 Other detailed embodiments of the technical solution shown in the example are as follows: Figure 4 As shown, a media data processing method according to one embodiment of this application may include the following steps:
[0087] Step S410: Obtain the first video segment of the video to be played.
[0088] Optionally, the implementation details of step S410 are the same as those of... Figure 2 The steps S210 shown are the same and will not be repeated here.
[0089] Step S420: Based on the target bitrate and target resolution of the video to be played, transcode the first video segment to generate the first transcoded segment.
[0090] Optionally, the implementation details of step S420 are the same as those of... Figure 2 The steps S220 shown are the same and will not be repeated here.
[0091] Step S430: The first transcoded segment is sent to the quality inspection server so that the first transcoded data can be evaluated for video quality by the quality inspection server.
[0092] Optionally, the implementation details of step S430 are the same as those of... Figure 2The steps S230 shown are the same and will not be repeated here.
[0093] Step S440: Receive the first quality inspection data generated by the quality inspection server for the first transcoded segment.
[0094] Optionally, the implementation details of step S440 are the same as those of... Figure 2 The steps S240 shown are the same and will not be repeated here.
[0095] Step S450: Based on the difference between the first quality detection data of the first transcoded segment and the preset quality data, adjust at least one of the target bitrate and target resolution of the second video segment in the video to be played, so that the second quality detection data of the second transcoded segment obtained after transcoding the second video segment tends to the preset quality data, and the second video segment is located after the first video segment in the video to be played.
[0096] Optionally, the implementation details of step S450 are the same as... Figure 2 The steps S250 shown are the same and will not be repeated here.
[0097] Step S460: After sending the second transcoded segment to the client, receive the updated bandwidth sent by the client;
[0098] Step S470: If the bitrate supported by the updated bandwidth is less than the target bitrate of the second video segment, then the target bitrate of the third video segment in the video to be played is reduced to the bitrate supported by the updated bandwidth.
[0099] In this embodiment, the client reports changes in available bandwidth to the edge transcoding system. After sending the second transcoded segment to the client, the edge transcoding system receives the updated bandwidth from the client. If the bitrate supported by the updated bandwidth is less than the target bitrate of the second video segment, the edge transcoding system needs to reduce the target bitrate of the subsequent third video segment to below the bitrate supported by the updated bandwidth, thereby preventing excessively high bitrates from causing network congestion and video playback stuttering. For example, if the target bitrate of the second video segment is 3Mbps, and the edge transcoding system receives an updated bandwidth of 2Mbps from the client, the edge transcoding system can reduce the target bitrate of the third video segment to below 2Mbps, such as 1.5Mbps. The specific reduction in bitrate can be implemented in any suitable manner, such as a fixed reduction to 70% of the updated bandwidth. In this way, when the client's bandwidth changes, the edge transcoding system can adjust the bitrate of subsequent video segments in a timely manner, thereby preventing excessively high bitrates from causing video playback stuttering and improving the reliability of video playback.
[0100] In embodiments of this application, during video playback, the edge transcoding system acquires a first video segment of the video to be played, and then transcodes the first video segment according to the target bitrate and target resolution of the video to be played, generating a first transcoded segment. Subsequently, the edge transcoding system sends the first transcoded segment to a quality inspection server for video quality evaluation. The edge transcoding system receives first quality inspection data generated by the quality inspection server for the first transcoded segment, and then adjusts at least one of the target bitrate and target resolution of a second video segment in the video to be played, based on the difference between the first quality inspection data of the first transcoded segment and preset quality data, so that the second quality inspection data of the second transcoded segment obtained after transcoding the second video segment tends to the preset quality data. The second video segment is located after the first video segment in the video to be played. In this way, during video playback, the edge transcoding system can adjust the bitrate or resolution used for transcoding based on the video quality detection results of the transcoded video. When processing complex scenes in the video, the transcoding parameters can be adjusted to avoid reducing the quality of some scenes due to complex scenes, thereby improving the overall video quality after transcoding.
[0101] In some embodiments of this application, based on the technical solutions in this application, after sending the third transcoded segment of the third video clip to the client and the quality detection server, the edge transcoding system can receive quality detection data generated by the quality detection server for the third transcoded segment. If the quality detection data of the third video clip is lower than the preset quality data and the playback preference is set to preferred smoothness, the edge transcoding system can reduce the target resolution of the fourth video clip in the video to be played. In this embodiment, when the available bandwidth of the client decreases, after reducing the bitrate of the third video clip and transcoding it for playback, the edge transcoding system will receive quality detection data generated by the quality detection server for the third transcoded segment. If the quality detection data of the third video clip is lower than the preset quality data, it indicates that the video quality still needs to be improved. Since the playback preference is set to preferred smoothness, the edge transcoding system can reduce the target resolution of the fourth video clip, thereby increasing the amount of data per frame and thus improving the quality detection score of the fourth video clip. It can be understood that the fourth video clip is a segment following the third video clip.
[0102] In embodiments of this application, a method for... Figure 2 Other detailed embodiments of the technical solution shown in the example are as follows: Figure 5 As shown, a media data processing method according to one embodiment of this application may include the following steps:
[0103] Step S510: Obtain the first video segment of the video to be played.
[0104] Optionally, the implementation details of step S510 are the same as... Figure 2 The steps S210 shown are the same and will not be repeated here.
[0105] Step S520: Based on the target bitrate and target resolution of the video to be played, transcode the first video segment to generate the first transcoded segment.
[0106] Optionally, the implementation details of step S520 are the same as those of... Figure 2 The steps S220 shown are the same and will not be repeated here.
[0107] Step S530: The first transcoded segment is sent to the quality inspection server so that the first transcoded data can be evaluated for video quality by the quality inspection server.
[0108] Optionally, the implementation details of step S530 are the same as those of... Figure 2 The steps S230 shown are the same and will not be repeated here.
[0109] Step S540: Receive the first quality inspection data generated by the quality inspection server for the first transcoded segment.
[0110] Optionally, the implementation details of step S540 are the same as those of... Figure 2 The steps S240 shown are the same and will not be repeated here.
[0111] Step S550: Based on the difference between the first quality detection data of the first transcoded segment and the preset quality data, adjust at least one of the target bitrate and target resolution of the second video segment in the video to be played, so that the second quality detection data of the second transcoded segment obtained after transcoding the second video segment tends to the preset quality data, and the second video segment is located after the first video segment in the video to be played.
[0112] Optionally, the implementation details of step S550 are the same as those of step S550. Figure 2 The steps S250 shown are the same and will not be repeated here.
[0113] Step S560: Receive smoothness data sent by the client for the first transcoded segment, wherein the smoothness data is detected by the client during the playback of the first transcoded segment;
[0114] Step S570: If the smoothness data of the first transcoded segment is lower than the smoothness threshold and the playback preference is set to preferred smoothness, then reduce the target resolution of the second video segment in the video to be played.
[0115] In this embodiment, the edge transcoding system receives a report from the client regarding the smoothness of playback of the transcoded video. The smoothness data is detected by the client during the playback of the first transcoded segment. The smoothness data can be obtained by the client monitoring the stuttering time during playback of the first transcoded segment; for example, the smoothness data can be stutter duration, stutter count, or the ratio of stutter duration to segment duration. If the smoothness data of the first transcoded segment is lower than the smoothness threshold, it indicates an abnormality in the playback smoothness of the first transcoded video. The playback smoothness is compared with a pre-set indicator used to indicate the desired smoothness. In this case, if the playback preference is set to preferred smoothness, the edge transcoding system can reduce the target resolution of the second video segment in the video to be played, thereby reducing the number of pixels per frame. With the bitrate unchanged, the edge transcoding system can use more bits for encoding each pixel, thereby improving data compression efficiency and thus improving transcoding efficiency, which helps reduce video stuttering. It is understandable that during the entire video playback process, the client detects the corresponding smoothness data for each received transcoded segment and sends it to the edge transcoding system, thereby making timely adjustments to the playback smoothness of the video and responding promptly to any stuttering during the entire video playback process.
[0116] In embodiments of this application, during video playback, the edge transcoding system acquires a first video segment of the video to be played, and then transcodes the first video segment according to the target bitrate and target resolution of the video to be played, generating a first transcoded segment. Subsequently, the edge transcoding system sends the first transcoded segment to a quality inspection server for video quality evaluation. The edge transcoding system receives first quality inspection data generated by the quality inspection server for the first transcoded segment, and then adjusts at least one of the target bitrate and target resolution of a second video segment in the video to be played, based on the difference between the first quality inspection data of the first transcoded segment and preset quality data, so that the second quality inspection data of the second transcoded segment obtained after transcoding the second video segment tends to the preset quality data. The second video segment is located after the first video segment in the video to be played. In this way, during video playback, the edge transcoding system can adjust the bitrate or resolution used for transcoding based on the video quality detection results of the transcoded video. When processing complex scenes in the video, the transcoding parameters can be adjusted to avoid reducing the quality of some scenes due to complex scenes, thereby improving the overall video quality after transcoding.
[0117] In some embodiments of this application, based on the technical solutions of this application, if the smoothness data of the first transcoded segment is lower than the smoothness threshold and the playback preference is set to preferred quality, the edge transcoding system can reduce the target bitrate of the second video segment in the video to be played. After the second transcoded segment with the reduced second video segment is sent to the client, if the smoothness data sent by the client for the second transcoded segment is higher than the smoothness threshold, the edge transcoding system can increase the target bitrate of each subsequent video segment until a cache shortage report is received from the client. In this embodiment, the smoothness data of the first transcoded segment being lower than the smoothness threshold indicates insufficient video smoothness, and the playback preference is set to preferred quality, so the edge transcoding system can reduce the target bitrate of the second video segment in the video to be played. Subsequently, if the smoothness data of the second transcoded segment is higher than the smoothness threshold, the edge transcoding system increases the bitrate in subsequent video segments until the client cache is insufficient. In this way, by first reducing the bitrate to ensure smooth video playback, and then gradually increasing the bitrate to improve video quality until the client cache is insufficient, the system can improve video quality as much as possible while ensuring smooth playback under the current client state.
[0118] The implementation details of the technical solutions in the embodiments of this application are described below with specific examples. Please refer to... Figure 6 , Figure 6 This is a schematic flowchart illustrating the dynamic edge transcoding process in an embodiment of this application. Figure 6 As shown, when a client device requests video playback, it periodically uploads its available bandwidth to the edge node via Common Media Client Data (CMCD) or other suitable methods. The edge node, located at its Point of Presence (POP) within the data center, retrieves the video uploaded by the content publisher from the VOD storage upon receiving the request. Based on the bitrate and resolution supported by the client's available bandwidth, the edge node sends the first few seconds of the video to be transcoded to the edge transcoding server. For example, if the client's bandwidth is 5 Mbps, the edge node will send the video to be transcoded at a bitrate of at least 3 Mbps and a resolution of 1080p. After being transcoded and sent to the client in the initial few seconds, the transcoded image is sent to a quality measurement service located at the same location. The quality measurement service receives the transcoded image and calculates various quality measurement metrics. For example, the quality inspection server retrieves the original video from the VOD storage and calculates quality inspection data such as VMAF, PSNR, and SSIM scores by comparing the transcoded video image with the original video image. The quality inspection server periodically feeds back the quality inspection data of the transcoded video frames to the edge transcoding server. Based on algorithmic settings, such as algorithmic optimization to maximize quality and the availability of sufficient bandwidth, edge transcoders can increase the video's bitrate. See also... Figure 7 , Figure 7This is a schematic diagram illustrating the dynamic bitrate adjustment process in an embodiment of this application. For example, if the video bitrate is 2.5 Mbps in a slow-paced scene of the first transcoded segment and the VMAF (Virtual Machine Image Quality) has reached 98, the edge transcoding server may not increase the bitrate. However, suppose that several seconds later, in the second transcoded segment, the video scene changes to a fast-paced, fast-moving scene, causing the VMAF to drop to 55. Then, because of the quality decrease and sufficient bandwidth, the edge transcoding server decides to increase the bitrate to 5 Mbps in the third transcoded segment. After increasing the bitrate to 5 Mbps, the VMAF in the third transcoded segment reaches 80, and the edge transcoding server can then decide to increase the bitrate to 6 Mbps in the fourth transcoded segment to improve the quality to a target score, such as 95. If the video returns to a slow-moving scene and the VMAF rises to 99, the edge transcoding server can gradually reduce the bitrate to save bandwidth and cost until the quality score drops to 95. If the client's available bandwidth drops to 2 Mbps, the edge transcoding server can reduce the bitrate to 1.5 Mbps and obtain quality metrics at that bandwidth. Depending on whether the algorithm prioritizes quality or smoothness, the edge transcoding server can decide to reduce the resolution or slowly increase the bitrate until the client reports that its cache is insufficient.
[0119] It should be noted that although the steps of the method in this application are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.
[0120] The following describes the implementation of the apparatus of this application, which can be used to perform the media data processing method in the above embodiments of this application. Figure 8 A schematic block diagram illustrating the composition of a media data processing apparatus according to an embodiment of this application is shown. Figure 8 As shown, the media data processing device 800 mainly includes:
[0121] The segment acquisition module 810 is configured to acquire the first video segment of the video to be played.
[0122] The video transcoding module 820 is configured to transcode the first video segment according to the target bitrate and target resolution of the video to be played, and generate a first transcoded segment.
[0123] Data transmission model 830 is configured to send the first transcoded segment to a quality inspection server so that the quality inspection server can perform video quality assessment on the first transcoded data.
[0124] The data receiving module 840 is configured to receive the first quality detection data generated by the quality detection server for the first transcoded segment;
[0125] The parameter adjustment module 850 is configured to adjust at least one of the target bitrate and target resolution of the second video segment in the video to be played based on the difference between the first quality detection data of the first transcoded segment and the preset quality data, so that the second quality detection data of the second transcoded segment obtained after transcoding the second video segment tends to the preset quality data, wherein the second video segment is located after the first video segment in the video to be played.
[0126] In some embodiments of this application, based on the above technical solutions, the segment acquisition module 810 is specifically configured to: acquire a video playback request sent by the client and the available bandwidth of the client; acquire the video to be played from the video storage according to the video playback request; and determine the bitrate and resolution supported by the available bandwidth as the target bitrate and target resolution corresponding to the video to be played.
[0127] In some embodiments of this application, based on the above technical solutions, the data transmission model 830 is further configured to: receive the first transcoded segment through the quality inspection server; and generate first quality inspection data of the first transcoded segment through the quality inspection server based on the difference between the video frame of the first transcoded segment and the video frame in the video to be played.
[0128] In some embodiments of this application, based on the above technical solutions, the parameter adjustment module 850 is specifically configured to: compare the first quality detection data of the first transcoded segment with preset quality data; if the first quality detection data of the first transcoded segment is greater than the preset quality data and the playback preference is set to preferred quality, then reduce the target bitrate of the second video segment in the video to be played; if the second quality detection data of the second transcoded segment after the second video segment is transcoded is greater than the preset quality data, then reduce the target bitrate of the third video segment in the video to be played, wherein the third video segment is the segment in the video to be played that follows the second video segment.
[0129] In some embodiments of this application, based on the above technical solutions, the parameter adjustment module 850 is further configured to: if the first quality detection data of the first transcoded segment is less than the preset quality data and the playback preference is set to preferred quality, then obtain the current available bandwidth of the client; if the current available bandwidth is greater than the available bandwidth threshold, then increase the target bitrate of the second video segment in the video to be played.
[0130] In some embodiments of this application, based on the above technical solutions, the parameter adjustment module 850 is further configured to: if the first quality detection data of the first transcoded segment is less than the preset quality data and the playback preference is set to preferred smoothness, then reduce the target resolution of the second video segment in the video to be played; if the first quality detection data of the first transcoded segment is greater than the preset quality data and the playback preference is set to preferred smoothness, then increase the target resolution of the second video segment in the video to be played.
[0131] In some embodiments of this application, based on the above technical solutions, the parameter adjustment module 850 is further configured to: after sending the second transcoded segment to the client, receive the updated bandwidth sent by the client; if the bitrate supported by the updated bandwidth is less than the target bitrate of the second video segment, then reduce the target bitrate of the third video segment in the video to be played to the bitrate supported by the updated bandwidth.
[0132] In some embodiments of this application, based on the above technical solutions, the parameter adjustment module 850 is further configured to: after sending the third transcoded segment of the third video segment to the client and the quality detection server, receive the quality detection data generated by the quality detection server for the third transcoded segment; if the quality detection data of the third video segment is lower than the preset quality data and the playback preference is set to preferred smoothness, then reduce the target resolution of the fourth video segment in the video to be played.
[0133] In some embodiments of this application, based on the above technical solutions, the parameter adjustment module 850 is further configured to: receive smoothness data sent by the client for the first transcoded segment, the smoothness data being detected by the client during the playback of the first transcoded segment; if the smoothness data of the first transcoded segment is lower than the smoothness threshold and the playback preference is set to preferred smoothness, then reduce the target resolution of the second video segment in the video to be played.
[0134] In some embodiments of this application, based on the above technical solutions, the parameter adjustment module 850 is further configured to: if the smoothness data of the first transcoded segment is lower than the smoothness threshold and the playback preference is set to preferred quality, then reduce the target bitrate of the second video segment in the video to be played; after the second transcoded segment of the second video segment is reduced and sent to the client, if the smoothness data sent by the client for the second transcoded segment is higher than the smoothness threshold, then increase the target bitrate of each video segment after the second video segment until a cache insufficiency report sent by the client is received.
[0135] In some embodiments of this application, based on the above technical solutions, the parameter adjustment module 850 is specifically configured to: after the video to be played is completed, statistically analyze the quality detection data of each video segment in the video to be played to generate quality statistics data of the video to be played; sample the quality statistics data at predetermined time intervals to obtain sampled quality data; cache the bitrate, resolution, and transcoded video of the video to be played when the sampled quality data is greater than or equal to the average quality data, wherein the average quality data is the average value of the quality statistics data of videos within a specified network range; when a video playback request for the video to be played is received from a client within the specified network range, the cached bitrate, resolution, and transcoded video are used to play the video to be played to the client within the specified network range.
[0136] It should be noted that the apparatus provided in the above embodiments and the method provided in the above embodiments belong to the same concept, and the specific way in which each module performs the operation has been described in detail in the method embodiments, and will not be repeated here.
[0137] Figure 9 A schematic diagram of the structure of a computer system suitable for implementing the electronic device of the present application is shown.
[0138] It should be noted that, Figure 9 The computer system 900 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0139] like Figure 9 As shown, the computer system 900 includes a Central Processing Unit (CPU) 901, which can perform various appropriate actions and processes based on programs stored in Read-Only Memory (ROM) 902 or programs loaded from Storage Unit 908 into Random Access Memory (RAM) 903. The RAM 903 also stores various programs and data required for system operation. The CPU 901, ROM 902, and RAM 903 are interconnected via a bus 904. An Input / Output (I / O) interface 905 is also connected to the bus 904.
[0140] The following components are connected to I / O interface 905: an input section 906 including a keyboard, mouse, etc.; an output section 907 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to I / O interface 905 as needed. Removable media 911, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 910 as needed so that computer programs read from them can be installed into storage section 908 as needed.
[0141] Specifically, according to embodiments of this application, the processes described in the various method flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 909, and / or installed from removable medium 911. When the computer program is executed by central processing unit (CPU) 901, it performs various functions defined in the system of this application.
[0142] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such transmitted data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.
[0143] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0144] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0145] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, touch terminal, or network device, etc.) to execute the method according to the embodiments of this application.
[0146] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein.
[0147] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A method for processing media data, characterized in that, Applied to edge nodes, including: Get the first video segment of the video to be played; Based on the target bitrate and target resolution of the video to be played, the first video segment is transcoded to generate the first transcoded segment; The first transcoded segment is sent to the quality inspection server so that the first transcoded data can be evaluated for video quality by the quality inspection server. Receive the first quality inspection data generated by the quality inspection server for the first transcoded segment; Based on the difference between the first quality detection data of the first transcoded segment and the preset quality data, at least one of the target bitrate and target resolution of the second video segment in the video to be played is adjusted so that the second quality detection data of the second transcoded segment obtained after transcoding the second video segment tends to the preset quality data, and the second video segment is located after the first video segment in the video to be played.
2. The processing method according to claim 1, characterized in that, The process of obtaining the first video segment of the video to be played includes: Obtain the video playback request sent by the client and the available bandwidth of the client; According to the video playback request, retrieve the video to be played from the video storage; The bitrate and resolution supported by the available bandwidth are determined as the target bitrate and target resolution corresponding to the video to be played.
3. The processing method according to claim 1, characterized in that, The method further includes: The first transcoded segment is received by the quality inspection server; The quality inspection server generates first quality inspection data for the first transcoded segment based on the differences between the video frames of the first transcoded segment and the video frames in the video to be played.
4. The processing method according to claim 1, characterized in that, The step of adjusting at least one of the target bitrate and target resolution of the second video segment in the video to be played, based on the difference between the first quality detection data of the first transcoded segment and preset quality data, includes: Compare the first quality detection data of the first transcoded segment with the preset quality data; If the first quality detection data of the first transcoded segment is greater than the preset quality data and the playback preference is set to preferred quality, then the target bitrate of the second video segment in the video to be played is reduced. If the second quality detection data of the second transcoded segment after the second video segment is transcoded is greater than the preset quality data, then the target bitrate of the third video segment in the video to be played is reduced, wherein the third video segment is the segment in the video to be played that follows the second video segment.
5. The processing method according to claim 4, characterized in that, The method further includes: If the first quality detection data of the first transcoded segment is less than the preset quality data and the playback preference is set to preferred quality, then obtain the current available bandwidth of the client; If the current available bandwidth is greater than the available bandwidth threshold, then the target bitrate of the second video segment in the video to be played is increased.
6. The processing method according to claim 4, characterized in that, The method further includes: If the first quality detection data of the first transcoded segment is less than the preset quality data and the playback preference is set to smooth playback, then the target resolution of the second video segment in the video to be played is reduced. If the first quality detection data of the first transcoded segment is greater than the preset quality data and the playback preference is set to smooth playback, then the target resolution of the second video segment in the video to be played is increased.
7. The processing method according to claim 1, characterized in that, The method further includes: After sending the second transcoded segment to the client, receive the updated bandwidth sent by the client; If the bitrate supported by the updated bandwidth is less than the target bitrate of the second video segment, then the target bitrate of the third video segment in the video to be played will be reduced to the bitrate supported by the updated bandwidth.
8. The processing method according to claim 7, characterized in that, The method further includes: After sending the third transcoded segment of the third video clip to the client and the quality detection server, the system receives the quality detection data generated by the quality detection server for the third transcoded segment. If the quality detection data of the third video segment is lower than the preset quality data and the playback preference is set to smooth playback, then the target resolution of the fourth video segment in the video to be played is reduced.
9. The processing method according to claim 1, characterized in that, The method further includes: The system receives smoothness data sent by the client for the first transcoded segment, the smoothness data being detected by the client during the playback of the first transcoded segment; If the smoothness data of the first transcoded segment is lower than the smoothness threshold and the playback preference is set to preferred smoothness, then the target resolution of the second video segment in the video to be played is reduced.
10. The processing method according to claim 9, characterized in that, The method further includes: If the smoothness data of the first transcoded segment is lower than the smoothness threshold and the playback preference is set to preferred quality, then reduce the target bitrate of the second video segment in the video to be played. After reducing the second transcoded segment of the second video segment and sending it to the client, if the smoothness data sent by the client for the second transcoded segment is higher than the smoothness threshold, then the target bitrate of each video segment after the second video segment is increased until a cache insufficiency report is received from the client.
11. The processing method according to claim 1, characterized in that, The method further includes: After the video to be played has finished playing, the quality detection data of each video segment in the video to be played is statistically analyzed to generate the quality statistics data of the video to be played. The quality statistics data are sampled at predetermined time intervals to obtain sampled quality data. The bitrate, resolution, and transcoded video of the video to be played are cached when the sampled quality data is greater than or equal to the average quality data, wherein the average quality data is the average of the quality statistics of videos within a specified network range; When a video playback request for the video to be played is received from a client within the specified network range, the cached bitrate, resolution, and transcoded video are used to play the video to the client within the specified network range.
12. A media data processing apparatus, characterized in that, Applied to edge nodes, including: The segment acquisition module is configured to acquire the first video segment of the video to be played. The video transcoding module is configured to transcode the first video segment according to the target bitrate and target resolution of the video to be played, and generate a first transcoded segment. The data transmission model is configured to send the first transcoded segment to a quality inspection server so that the quality inspection server can perform video quality assessment on the first transcoded data. The data receiving module is configured to receive the first quality inspection data generated by the quality inspection server for the first transcoded segment; The parameter adjustment module is configured to adjust at least one of the target bitrate and target resolution of the second video segment in the video to be played based on the difference between the first quality detection data of the first transcoded segment and the preset quality data, so that the second quality detection data of the second transcoded segment obtained after transcoding the second video segment tends to the preset quality data, and the second video segment is located after the first video segment in the video to be played.
13. An electronic device, characterized in that, include: processor; Memory for storing the executable instructions of the processor; The processor is configured to execute the media data processing method according to any one of claims 1 to 11 by executing the executable instructions.
14. A computer-readable medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method for processing media data as described in any one of claims 1 to 11.
15. A computer program product, characterized in that, The computer program product includes computer instructions stored in a computer-readable storage medium, a processor of a computer device reading the computer instructions from the computer-readable storage medium, and the processor executing the computer instructions to cause the computer device to perform a method for processing media data as described in any one of claims 1 to 11.