CN116801009A - Video data processing method, device, medium and equipment - Google Patents

Video data processing method, device, medium and equipment Download PDF

Info

Publication number
CN116801009A
CN116801009A CN202210269061.2A CN202210269061A CN116801009A CN 116801009 A CN116801009 A CN 116801009A CN 202210269061 A CN202210269061 A CN 202210269061A CN 116801009 A CN116801009 A CN 116801009A
Authority
CN
China
Prior art keywords
target
stream
video stream
resolution
original
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210269061.2A
Other languages
Chinese (zh)
Inventor
杨硕
曾东方
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guizhou Baishancloud Technology Co Ltd
Original Assignee
Guizhou Baishancloud Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guizhou Baishancloud Technology Co Ltd filed Critical Guizhou Baishancloud Technology Co Ltd
Priority to CN202210269061.2A priority Critical patent/CN116801009A/en
Publication of CN116801009A publication Critical patent/CN116801009A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • H04N21/234309Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements by transcoding between formats or standards, e.g. from MPEG-2 to MPEG-4 or from Quicktime to Realvideo
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • H04N21/234363Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements by altering the spatial resolution, e.g. for clients with a lower screen resolution
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • H04N21/234363Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements by altering the spatial resolution, e.g. for clients with a lower screen resolution
    • H04N21/234372Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements by altering the spatial resolution, e.g. for clients with a lower screen resolution for performing aspect ratio conversion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440218Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by transcoding between formats or standards, e.g. from MPEG-2 to MPEG-4
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440263Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by altering the spatial resolution, e.g. for displaying on a connected PDA
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440263Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by altering the spatial resolution, e.g. for displaying on a connected PDA
    • H04N21/440272Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by altering the spatial resolution, e.g. for displaying on a connected PDA for performing aspect ratio conversion

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The present disclosure relates to a video data processing method, apparatus, medium and device. The video data processing method comprises the following steps: receiving a play request sent by a target client; according to the obtained video stream to be processed corresponding to the stream identification information, determining original display characteristic information of the video stream to be processed; processing the video stream to be processed according to the stream identification information, the original display characteristic information and the play characteristic identification to obtain a target video stream with target display characteristic information; outputting the target video stream to a target client; the target stream size or aspect ratio of the target video stream matches the original stream size or aspect ratio of the video stream to be processed and/or the target stream resolution is not higher than the original stream resolution. The video data processing method can ensure the video display effect of the target client and avoid waste of bandwidth resources.

Description

Video data processing method, device, medium and equipment
Technical Field
The present disclosure relates to the field of video processing, and in particular, to a method, an apparatus, a medium, and a device for processing video data.
Background
With the rapid development of the internet, more and more people choose to play videos, such as watching movies or live programs, through intelligent terminals.
In order to ensure smoothness when the client device plays the video, the video stream is usually transcoded before being sent to the client device, so as to meet the playing requirement of the client device or the data transmission requirement.
However, due to different parameters of different video streams, the fixed transcoding strategy can cause problems of wasting bandwidth resources of data transmission, distorting display pictures of the client device and the like in the video streams obtained by transcoding, and affecting user experience.
Disclosure of Invention
To at least partially overcome the problems in the related art, a video data processing method, apparatus, medium, and device are provided herein.
According to a first aspect herein, there is provided a video data processing method comprising:
receiving a play request sent by a target client, wherein the play request comprises stream identification information of a video stream to be played and a play characteristic identification;
according to the acquired video stream to be processed corresponding to the stream identification information, determining original display characteristic information of the video stream to be processed;
processing the video stream to be processed according to the stream identification information, the original display characteristic information and the play characteristic identification to obtain a target video stream with target display characteristic information;
outputting the target video stream to the target client;
wherein the target stream size or aspect ratio of the target video stream is matched with the original stream size or aspect ratio of the video stream to be processed, and/or the target stream resolution is not higher than the original stream resolution.
According to a second aspect herein, there is provided a video data processing apparatus comprising:
a play request receiving module configured to receive a play request sent by a target client, where the play request includes stream identification information of a video stream to be played and a play feature identifier;
the original display characteristic information determining module is configured to determine original display characteristic information of the video stream to be processed according to the acquired video stream to be processed corresponding to the stream identification information;
the to-be-processed video stream processing module is configured to process the to-be-processed video stream according to the stream identification information, the original display characteristic information and the play characteristic identification to obtain a target video stream with target display characteristic information;
an output module configured to output the target video stream to the target client;
wherein the target stream size or aspect ratio of the target video stream is matched with the original stream size or aspect ratio of the video stream to be processed, and/or the target stream resolution is not higher than the original stream resolution.
In some embodiments herein, the raw display characteristic information includes: original stream resolution and original stream display size or aspect ratio, the target display characteristic information comprising: target stream resolution and target stream display size or aspect ratio.
In some embodiments herein, the video stream processing module to be processed is configured to:
determining a corresponding default processing strategy according to the play characteristic identifier, wherein the default processing strategy comprises a preset target resolution and a display size or an aspect ratio corresponding to the target resolution;
and comparing the original display characteristic information with the default processing strategy, and processing the video stream to be processed according to the default processing strategy or performing self-adaptive processing on the video stream to be processed according to the comparison result to obtain a target video stream.
In some embodiments herein, the video stream processing module to be processed is configured to:
and if the original resolution is higher than the target resolution and the original stream size or the length-width ratio is matched with the display size or the length-width ratio corresponding to the target resolution, transcoding the video stream to be processed according to a default processing strategy to obtain the target video stream.
In some embodiments herein, the video stream processing module to be processed is configured to:
and if the original resolution is higher than the target resolution and the original stream size or the length-width ratio is not matched with the display size or the length-width ratio corresponding to the target resolution, scaling the pixel values of the long side and the wide side of the video to be processed according to the ratio between the pixel value of any side of the original resolution and the pixel value of the corresponding side in the target resolution so as to obtain the target video stream.
In some embodiments herein, the video stream processing module to be processed is configured to:
and if the original resolution is smaller than or equal to the target resolution, not processing the video stream to be processed.
In some embodiments herein, the output module is configured to:
and outputting the target video stream to the target client according to a preset target transmission code rate.
According to a third aspect herein, there is provided a computer readable storage medium having stored thereon a computer program which when executed implements the steps of the method as described above.
According to another aspect herein, there is provided a computer device comprising a processor, a memory and a computer program stored on the memory, the processor implementing the steps of the method as described above when executing the computer program.
In the video data processing method provided by the application, after receiving the play request sent by the target client, after determining the original characteristic information of the corresponding video stream to be processed according to the play request, the video stream to be processed is processed according to the original display characteristic information and the play characteristic identification in the play request, so that the target stream size or the aspect ratio of the obtained target video stream is matched with the original stream size or the aspect ratio, and the conditions of stretching or compressing and the like of the target video stream played by the target client are avoided, and the obtained target resolution is not higher than the original stream resolution, thereby avoiding the problems of wasting bandwidth resources of data transmission and playing picture distortion, reducing redundant transcoding and improving the bearing capacity.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application as claimed.
Drawings
The accompanying drawings, which are included to provide a further understanding of the disclosure, illustrate and explain the disclosure, and do not constitute a limitation on the disclosure. In the drawings:
FIG. 1 is a schematic diagram of a transcoding process using a fixed transcoding strategy, in an embodiment.
Fig. 2 illustrates a flow chart of a video data processing method according to an exemplary embodiment.
Fig. 3 is a flowchart illustrating a video data processing method according to an exemplary embodiment.
Fig. 4 is a block diagram of a video data processing apparatus according to an exemplary embodiment.
FIG. 5 is a block diagram of a computer device, according to an example embodiment.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments herein more apparent, the technical solutions in the embodiments herein will be clearly and completely described below with reference to the accompanying drawings in the embodiments herein, and it is apparent that the described embodiments are some, but not all, embodiments herein. All other embodiments, based on the embodiments herein, which a person of ordinary skill in the art would obtain without undue burden, are within the scope of protection herein. It should be noted that, without conflict, the embodiments and features of the embodiments herein may be arbitrarily combined with each other.
When a user watches video resources such as movies, live broadcast and the like through terminal equipment, in order to ensure the smoothness of video playing of the terminal equipment, transcoding processing is required to be carried out on a video stream before the video is sent to the terminal equipment. For example, if the resolution of the original video stream is high, the playing effect can be guaranteed only if the code rate (bandwidth) required by transmission is high. However, since the playing network of part of the terminal devices cannot support such a large code rate, playing the original video stream can result in higher playing card, worse experience, and part of the mobile terminal devices also do not need such high resolution (for example, the resolution requirements of the television/PC/mobile phone for the live stream of the same content are different), different resolutions can be output through transcoding, so as to adapt to the playing requirements of different terminals and different network environments.
In order to realize the transcoding processing of the video stream, a fixed transcoding strategy is generally set in a server, the server transcodes the video stream according to the fixed transcoding strategy and then sends the video stream to a terminal device for playing, and the fixed transcoding strategy can cause the problems of wasting bandwidth resources of data transmission, distorting display pictures of the client device and the like of the obtained video stream due to different parameters of different video streams, so that user experience is affected.
In an embodiment, the terminal device sends a play request of a certain video stream to the server, where the play request generally carries a stream name and a play feature identifier, where the stream name is identification information for characterizing the video stream, and the corresponding video stream can be determined according to the stream name, and the play feature identifier is used for characterizing the resolution of the video that the user wants to watch. The server generally performs transcoding processing on the video stream in response to the requirement of the user, that is, the server performs transcoding processing on the video stream corresponding to the play request according to the resolution and a fixed transcoding strategy, processes the video stream into a resolution corresponding to the play feature identifier in the play request, and sends the resolution to the terminal device for play. For example, the resolution of the video stream is processed to 1080x960 and then sent to the terminal device for playing, that is, no matter what the resolution of the original video stream is, the resolution of the video stream finally sent to the terminal device is 1080x960, so as to meet the watching requirement of the user.
However, the resolution, the picture size, the aspect ratio, and other information of different video streams may be different, if a fixed transcoding strategy is used to transcode the video streams, a situation of converting low resolution into high resolution may occur, which may result in that the picture quality is not improved, but the code rate (the rate occupied by transmitting the video streams, the higher the rate, the higher the occupied bandwidth) may be improved due to the improvement of the resolution, which may result in the waste of playing bandwidth resources of the terminal device. For example, the play feature in the play request is 1280P, the resolution of the original video stream is 640x480, the server transcodes the original video stream according to a fixed transcoding strategy, and the video stream is transcoded to 1280x720 and then sent to the terminal device for playing, thereby wasting the play bandwidth resources of the terminal device.
In the transcoding method described above, the picture may be distorted. The play characteristic identifier carried in the play request is typically in the form of 480P, 720P, 1080P, and after receiving the play request, the server converts the play characteristic identifier into a standard resolution form, for example, converts 480P, 1280P, 1080P into 640x480, 1280x720, 1080x960. In addition, the resolution of the original video stream may be vertical, for example 1080×1920, and if the frame is output according to a fixed transcoding strategy, as shown in fig. 1, stretching or compression occurs on the final output picture, which affects the viewing experience of the user.
Based on the above, the present disclosure provides a video data processing method, after receiving a play request sent by a target client, after determining original feature information of a corresponding video stream to be processed according to the play request, processing the video stream to be processed according to the original display feature information and a play feature identifier in the play request, so that a target stream size or an aspect ratio of the obtained target video stream is matched with the original stream size or the aspect ratio, thereby avoiding a situation that a target video stream played by the target client is stretched or compressed in a picture, and enabling the obtained target resolution to be not higher than the original stream resolution, so as to avoid wasting bandwidth resources of data transmission and avoid a problem of picture distortion.
Fig. 2 is a flowchart illustrating a video data processing method according to an exemplary embodiment. Referring to fig. 2, the video data processing method at least includes the steps of:
s10, receiving a playing request sent by a target client, wherein the playing request comprises stream identification information of a video stream to be played and a playing characteristic identification.
The stream identifier information may be, for example, a stream name, according to which a corresponding video stream may be found, and the play feature identifier is used to characterize a video display effect desired by the target client, for example, the play request may include: test.flv-1080P; wherein test.flv is stream name, 1080P is play feature identification.
S20, according to the obtained video stream to be processed corresponding to the stream identification information, original display characteristic information of the video stream to be processed is determined.
And according to the stream identification information in the play request, the video stream to be processed corresponding to the stream identification information can be found. The video stream to be processed can be obtained by streaming from a previous server, or from other terminal devices, or obtained from a local storage location, for example.
After the video stream to be processed is obtained, according to the video stream to be processed, the original display characteristic information of the video stream to be processed can be determined, wherein the original display characteristic information is used for representing the original display effect of the video stream to be processed, and can be, for example, original stream resolution, original stream display size, original stream aspect ratio and the like. The original display characteristic information can be located in a header file of the video stream to be processed, and the original display characteristic information can be extracted by reading the header file. Or a corresponding relation table of the stream identification information and the original display characteristic information can be established in advance, the original display characteristic information of the video stream to be processed can be determined by inquiring the corresponding relation table according to the stream identification information, and the like.
S30, processing the video stream to be processed according to the stream identification information, the original display characteristic information and the play characteristic identification to obtain a target video stream with target display characteristic information.
Wherein the target display characteristic information is used for characterizing a target display effect of the target video stream, and may be, for example, a target stream resolution, a target stream display size, an aspect ratio, and the like.
In an embodiment, after the video stream to be processed is processed, the target stream size or aspect ratio of the obtained target video stream is matched with the original stream size or aspect ratio of the video stream to be processed, so that the situation that the target video stream played by the target client side is stretched or compressed in a picture is avoided. In another embodiment, after the video stream to be processed is processed, the target stream resolution is not higher than the original stream resolution, so that the problems of wasting bandwidth resources of data transmission and picture distortion are avoided, redundant transcoding can be reduced, and the bearing capacity is improved. Of course, it may be understood that, after the video stream to be processed is processed, the target stream size or aspect ratio of the obtained target video stream may be matched with the original stream size or aspect ratio of the video stream to be processed, and the target stream resolution is not higher than the original stream resolution, which is not particularly limited in the present application.
In the step, the video stream to be processed is processed according to the original display characteristic information and the play characteristic identification, so that the target stream size or the aspect ratio of the obtained target video stream is matched with the original stream size or the aspect ratio, and the obtained target resolution is not higher than the original stream resolution.
S40, outputting the target video stream to the target client.
After the processing of the video stream to be processed is completed, the processed target video stream is output to the target client, so that the video display effect of the target client can be ensured, and the waste of bandwidth resources can be avoided.
Wherein the target stream size matches the original stream size, which may be that the picture size of the target video stream output picture matches the picture size of the video stream output picture to be processed, for example, the picture size of the target video stream output picture is reduced by an equal ratio of the picture size of the video stream output picture to be processed, i.e. the picture length L of the target video stream output picture 1 Picture length L of output picture with video stream to be processed 2 Has a ratio of k 1 Order ofFrame width W of target video stream output frame 1 Picture width W of output picture with video stream to be processed 2 Has a ratio of k 2 Then k 1 =k 2 . It will be appreciated that k does not affect the viewing experience 1 And k is equal to 2 Or may be a relatively close value instead of being equal.
The aspect ratio of the target video stream is matched with the aspect ratio of the video stream to be processed, which can be the ratio m of the picture length and the width of the output picture of the target video stream 1 Ratio m of picture length and width of output picture of video stream to be processed 2 Equal or closer together. The aspect ratio of the target video stream may be calculated from the resolution of the target video stream, that is, the ratio of the pixel value of the long side to the pixel value of the wide side in the resolution of the target video stream is the aspect ratio of the target video stream, and the aspect ratio of the video stream to be processed may be calculated from the resolution of the video stream to be processed, that is, the ratio of the pixel value of the long side to the pixel value of the wide side in the resolution of the video stream to be processed is the aspect ratio of the video stream to be processed.
The target stream resolution is not higher than the original stream resolution, and may be lower than the original stream resolution, or equal to the original stream resolution. For example, when the video stream to be processed and the target video stream are both horizontal or vertical, the pixel value of the long side of the target stream resolution is smaller than or equal to the pixel value of the long side of the original stream resolution, and the pixel value of the wide side of the target stream resolution is smaller than or equal to the pixel value of the wide side of the original stream resolution. If one of the video stream to be processed and the target video stream is a horizontal screen and the other is a vertical screen, the larger pixel value in the target stream resolution is smaller than or equal to the larger pixel value in the original stream resolution, and the smaller pixel value in the target stream resolution is smaller than or equal to the smaller pixel value in the original stream resolution. Alternatively, the target stream resolution is not higher than the original stream resolution, or the product between the pixel value of the long side and the pixel value of the wide side of the target video stream is smaller than or equal to the product between the pixel value of the long side and the pixel value of the wide side of the video stream to be processed, and so on. Those skilled in the art may choose a corresponding implementation according to actual implementation needs, and the present application is not limited thereto.
In one embodiment, as shown in fig. 3, step S30 specifically includes the following steps:
s31, determining a corresponding default processing strategy according to the play characteristic identifier, wherein the default processing strategy comprises a preset target resolution and a display size or an aspect ratio corresponding to the target resolution.
The default processing policy is a processing policy preset for the play feature identifier, and the video stream to be processed is processed into the display effect requested by the target client, for example, into the resolution requested by the target client through the default processing policy. For example, if the play feature identifier in the play request is 1080P, the default processing policy includes a preset target resolution 1080x960 and a display size or an aspect ratio corresponding to the resolution 1080x960, where the display size is a length and a width of the display screen, and the aspect ratio refers to a ratio of the length and the width of the display screen.
In an exemplary embodiment of the present application, the video provider may preset default processing policies corresponding to different play feature identifiers, so that based on the play feature identifiers, the corresponding default processing policies may be queried and determined to process the video stream to be processed, thereby obtaining a target video stream meeting the requirements of the client.
Illustratively, determining the corresponding default processing policy according to the play feature identifier may specifically include the following steps:
s311, acquiring configuration information, wherein the configuration information is used for representing the corresponding relation between the playing characteristic identifier and the resolution, display size or aspect ratio information, and the configuration information can be in forms of tables, mapping and the like, can be pre-stored information, and can be called from other servers according to a request;
s312, determining the resolution, the display size or the aspect ratio information corresponding to the stream identification information based on the play characteristic identification and the configuration information, and taking the determined resolution, display size or aspect ratio information as the target resolution and the display size or aspect ratio corresponding to the target resolution.
Of course, it can be understood that only the target resolution corresponding to the play feature identifier may be determined according to the play feature identifier, and then the aspect ratio corresponding to the target resolution may be determined according to the pixel value of the long side and the pixel value of the wide side in the target resolution.
S32, comparing the original display characteristic information with a default processing strategy, and processing the video stream to be processed according to the default processing strategy or performing self-adaptive processing on the video stream to be processed according to the comparison result to obtain a target video stream.
In this step, the final processing strategy of the video stream to be processed is determined by comparing the original display characteristic information with the default processing strategy. If the default processing strategy is adopted to be suitable for the current video stream to be processed, the video stream to be processed can be processed according to the default processing strategy to obtain the video stream with the resolution requested by the target client, and if the default processing strategy is adopted to be unsuitable for the current video stream to be processed, the video stream to be processed is subjected to self-adaptive processing, for example, the resolution of the video stream to be processed is not changed, the aspect ratio of the video stream to be processed is not changed, and the like.
In one embodiment, according to the comparison result, processing the video stream to be processed according to the default processing policy specifically includes:
if the original resolution is higher than the target resolution and the original stream size or aspect ratio is matched with the display size or aspect ratio corresponding to the target resolution, transcoding the video stream to be processed according to a default processing strategy to obtain the target video stream.
In this step, if the original resolution is higher, transcoding is required to be performed on the video stream to be processed to reduce the resolution of the target video stream, and on this basis, if the original stream size is matched with the display size corresponding to the target resolution, or the aspect ratio of the original stream size to the aspect ratio corresponding to the target resolution is matched, it is indicated that compression or stretching will not be caused to the picture when the video stream is to be processed according to the default processing policy. Therefore, transcoding processing can be performed on the video stream to be processed according to a default processing policy, so that the resolution of the obtained target processing video stream is a preset target resolution, and the display size or aspect ratio of the target processing video stream is the display size or aspect ratio corresponding to the target resolution.
If the above conditions are not satisfied, adaptive processing is required for the video stream to be processed. In one embodiment, performing adaptive processing on a video stream to be processed according to a comparison result, including:
if the original resolution is higher than the target resolution and the original stream size or the aspect ratio is not matched with the display size or the aspect ratio corresponding to the target resolution, scaling the pixel values of the long side and the wide side of the video to be processed according to the ratio between the pixel value of any side of the original resolution and the pixel value of the corresponding side in the target resolution so as to obtain the target video stream.
In this step, if the original resolution is higher, transcoding is required to be performed on the video stream to be processed to reduce the resolution of the target video stream, and if the video stream to be processed is processed according to the default processing policy, the frame is compressed and stretched, so that the distortion of the frame is caused, because the original stream size or aspect ratio is not matched with the display size or aspect ratio corresponding to the target resolution. Therefore, it is necessary to perform equal-ratio scaling on the video stream to be processed, for example, equal-ratio scaling may be performed according to a ratio of a pixel value of a long side in the original resolution to a pixel value of a long side in the target resolution, or equal-ratio scaling may be performed according to a ratio of a pixel value of a wide side in the original resolution to a pixel value of a wide side in the target resolution.
Illustratively, the original resolution is 1080x1920, the target resolution is 640x480, and then it may be determined that the original stream size or aspect ratio does not match the display size or aspect ratio corresponding to the target resolution, at which time the video stream to be processed is scaled by an equal ratio. For example, first, a ratio a of the pixel value 1080 of the long side in the original resolution to the pixel value 640 of the long side in the target resolution is determined, and the original resolution is scaled by the ratio a to make the pixel value of the long side in the resolution of the obtained target video stream equal to the pixel value of the long side in the target resolution, and the aspect ratio of the target video stream equal to the aspect ratio of the video stream to be processed. For another example, first, a ratio b of the pixel value 1920 of the broadside in the original resolution to the pixel value 480 of the broadside in the target resolution is determined, and the original resolution is scaled by the ratio b to make the pixel value of the broadside in the resolution of the obtained target video stream equal to the pixel value of the broadside in the target resolution, and the aspect ratio of the target video stream equal to the aspect ratio of the video stream to be processed.
If the original resolution is low, transcoding of the video to be processed is not required, and in one embodiment, adaptive processing of the video stream to be processed according to the comparison result includes:
if the original resolution is less than or equal to the target resolution, the video stream to be processed is not processed.
In this step, if the original resolution is smaller or equal to the target resolution, transcoding is not necessary, and at this time, the video to be processed is not processed, so that the situation that the overall image quality is not improved, the code rate is improved due to the improvement of the resolution, and the playing bandwidth resource is wasted is avoided, and redundant transcoding can be reduced, so that the bearing capacity is improved.
After the target video stream is obtained, the target video stream is output to the target client for viewing by a user of the target client. Video streams of different resolutions are transmitted with different transmission code rates, i.e. when the resolution of the video stream is small, the code rate required for transmitting the video stream is small, and when the resolution of the video stream is large, the code rate is large. In one embodiment, when transmitting a target video stream to a target client, the target client outputs the target video stream according to a preset target transmission code rate, so that the target transmission code rate is matched with the target video stream.
Through the above embodiment, after receiving the play request sent by the target client, the video data processing method provided herein processes the video stream to be processed according to the original display feature information and the play feature identifier in the play request after determining the original feature information of the corresponding video stream to be processed according to the play request, so that the target stream size or aspect ratio of the obtained target video stream is matched with the original stream size or aspect ratio, thereby avoiding the situation that the target video played by the target client is subjected to picture compression or stretching, and enabling the obtained target resolution not to be higher than the original stream resolution, so as to avoid the problems of wasting the bandwidth resources of data transmission and the distortion of the play picture, and reducing redundant transcoding and improving the bearing capacity.
Fig. 4 is a block diagram of a video data processing apparatus according to an exemplary embodiment. Referring to fig. 4, the video data processing apparatus includes: a play request receiving module 301, an original display characteristic information determining module 302, a video stream processing module 303 to be processed and an output module 304.
Wherein the play request receiving module 301 is configured to receive a play request sent by a target client, where the play request includes stream identification information of a video stream to be played and a play feature identifier.
The original display characteristic information determining module 302 is configured to determine original display characteristic information of the video stream to be processed according to the acquired video stream to be processed corresponding to the stream identification information.
The to-be-processed video stream processing module 303 is configured to process the to-be-processed video stream according to the stream identification information, the original display feature information and the play feature identification, so as to obtain a target video stream with target display feature information.
The output module 304 is configured to output the target video stream to the target client.
Wherein the target stream size or aspect ratio of the target video stream is matched with the original stream size or aspect ratio of the video stream to be processed, and/or the target stream resolution is not higher than the original stream resolution.
In some embodiments herein, the raw display characteristic information includes: original stream resolution and original stream display size or aspect ratio, the target display characteristic information includes: target stream resolution and target stream display size or aspect ratio.
In some embodiments herein, the video stream processing module to be processed 303 is configured to:
determining a corresponding default processing strategy according to the play characteristic identifier, wherein the default processing strategy comprises a preset target resolution and a display size or an aspect ratio corresponding to the target resolution;
and comparing the original display characteristic information with a default processing strategy, and processing the video stream to be processed according to the default processing strategy or performing self-adaptive processing on the video stream to be processed according to the comparison result to obtain a target video stream.
In some embodiments herein, the video stream processing module to be processed 303 is configured to:
and if the original resolution is higher than the target resolution and the original stream size or the length-width ratio is matched with the display size or the length-width ratio corresponding to the target resolution, transcoding the video stream to be processed according to a default processing strategy to obtain the target video stream.
In some embodiments herein, the video stream processing module to be processed 303 is configured to:
if the original resolution is higher than the target resolution and the original stream size or the aspect ratio is not matched with the display size or the aspect ratio corresponding to the target resolution, scaling the pixel values of the long side and the wide side of the video to be processed according to the ratio between the pixel value of any side of the original resolution and the pixel value of the corresponding side in the target resolution so as to obtain the target video stream.
In some embodiments herein, the video stream processing module to be processed 303 is configured to:
if the original resolution is less than or equal to the target resolution, the video stream to be processed is not processed.
In some embodiments herein, the output module 304 is configured to:
and outputting the target video stream to the target client according to the preset target transmission code rate.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
Fig. 5 is a block diagram illustrating a computer device 400 for cache distribution, according to an example embodiment. For example, computer device 400 may be provided as a server. Referring to fig. 5, the computer apparatus 400 includes a processor 401, and the number of the processors may be set to one or more as needed. Computer device 400 also includes a memory 402 for storing instructions, such as application programs, that are executable by processor 401. The number of the memories can be set to one or more according to the requirement. Which may store one or more applications. The processor 401 is configured to execute instructions to perform the video data processing method described above.
It will be apparent to one of ordinary skill in the art that embodiments herein may be provided as a method, apparatus (device), or computer program product. Accordingly, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present disclosure may take the form of a computer program product embodied on one or more computer-usable storage media having computer-usable program code embodied therein. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, including, but not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital Versatile Disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Furthermore, as is well known to those of ordinary skill in the art, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media.
The description herein is with reference to flowchart illustrations and/or block diagrams of methods, apparatus (devices) and computer program products according to embodiments herein. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that an article or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such article or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of additional identical elements in an article or apparatus that comprises the element.
While preferred embodiments herein have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all alterations and modifications as fall within the scope herein.
It will be apparent to those skilled in the art that various modifications and variations can be made herein without departing from the spirit and scope of the disclosure. Thus, given that such modifications and variations herein fall within the scope of the claims herein and their equivalents, such modifications and variations are intended to be included herein.

Claims (10)

1. A video data processing method, characterized in that the video data processing method comprises:
receiving a play request sent by a target client, wherein the play request comprises stream identification information of a video stream to be played and a play characteristic identification;
according to the acquired video stream to be processed corresponding to the stream identification information, determining original display characteristic information of the video stream to be processed;
processing the video stream to be processed according to the stream identification information, the original display characteristic information and the play characteristic identification to obtain a target video stream with target display characteristic information;
outputting the target video stream to the target client;
wherein the target stream size or aspect ratio of the target video stream is matched with the original stream size or aspect ratio of the video stream to be processed, and/or the target stream resolution is not higher than the original stream resolution.
2. The video data processing method according to claim 1, wherein the original display characteristic information includes: original stream resolution and original stream display size or aspect ratio, the target display characteristic information comprising: target stream resolution and target stream display size or aspect ratio.
3. The method according to claim 2, wherein said processing the video stream to be processed according to the stream identification information, the original display feature information, and the play feature identification comprises:
determining a corresponding default processing strategy according to the play characteristic identifier, wherein the default processing strategy comprises a preset target resolution and a display size or an aspect ratio corresponding to the target resolution;
and comparing the original display characteristic information with the default processing strategy, and processing the video stream to be processed according to the default processing strategy or performing self-adaptive processing on the video stream to be processed according to the comparison result to obtain a target video stream.
4. A video data processing method according to claim 3, wherein said processing the video stream to be processed according to a default processing policy based on the comparison result comprises:
and if the original resolution is higher than the target resolution and the original stream size or the length-width ratio is matched with the display size or the length-width ratio corresponding to the target resolution, transcoding the video stream to be processed according to a default processing strategy to obtain the target video stream.
5. A video data processing method according to claim 3, wherein said adaptively processing said video stream to be processed according to the comparison result comprises:
and if the original resolution is higher than the target resolution and the original stream size or the length-width ratio is not matched with the display size or the length-width ratio corresponding to the target resolution, scaling the pixel values of the long side and the wide side of the video to be processed according to the ratio between the pixel value of any side of the original resolution and the pixel value of the corresponding side in the target resolution so as to obtain the target video stream.
6. A video data processing method according to claim 3, wherein said adaptively processing said video stream to be processed according to the comparison result comprises:
and if the original resolution is smaller than or equal to the target resolution, not processing the video stream to be processed.
7. The video data processing method according to any one of claims 1 to 6, wherein the outputting the target video stream to the target client includes:
and outputting the target video stream to the target client according to a preset target transmission code rate.
8. A video data processing apparatus, characterized in that the video data processing apparatus comprises:
a play request receiving module configured to receive a play request sent by a target client, where the play request includes stream identification information of a video stream to be played and a play feature identifier;
the original display characteristic information determining module is configured to determine original display characteristic information of the video stream to be processed according to the acquired video stream to be processed corresponding to the stream identification information;
the to-be-processed video stream processing module is configured to process the to-be-processed video stream according to the stream identification information, the original display characteristic information and the play characteristic identification to obtain a target video stream with target display characteristic information;
an output module configured to output the target video stream to the target client;
wherein the target stream size or aspect ratio of the target video stream is matched with the original stream size or aspect ratio of the video stream to be processed, and/or the target stream resolution is not higher than the original stream resolution.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when executed, implements the steps of the method according to any one of claims 1-7.
10. A computer device comprising a processor, a memory and a computer program stored on the memory, characterized in that the processor implements the steps of the method according to any of claims 1-7 when the computer program is executed.
CN202210269061.2A 2022-03-18 2022-03-18 Video data processing method, device, medium and equipment Pending CN116801009A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210269061.2A CN116801009A (en) 2022-03-18 2022-03-18 Video data processing method, device, medium and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210269061.2A CN116801009A (en) 2022-03-18 2022-03-18 Video data processing method, device, medium and equipment

Publications (1)

Publication Number Publication Date
CN116801009A true CN116801009A (en) 2023-09-22

Family

ID=88042521

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210269061.2A Pending CN116801009A (en) 2022-03-18 2022-03-18 Video data processing method, device, medium and equipment

Country Status (1)

Country Link
CN (1) CN116801009A (en)

Similar Documents

Publication Publication Date Title
EP3562163B1 (en) Audio-video synthesis method and system
CN108810649B (en) Image quality adjusting method, intelligent television and storage medium
JP7179443B2 (en) Extended High Dynamic Range ("HDR") - Method, Apparatus, and System for HDR Tone Mapping
US10735742B2 (en) Adaptive bitrate video testing
CN108650542B (en) Method for generating vertical screen video stream and processing image, electronic equipment and video system
WO2016138844A1 (en) Multimedia file live broadcast method, system and server
US10720091B2 (en) Content mastering with an energy-preserving bloom operator during playback of high dynamic range video
CN111416989A (en) Video live broadcast method and system and electronic equipment
WO2018009828A1 (en) Systems and methods for region-of-interest tone remapping
JP2006525771A (en) System and method for communicating with a display device via a network
US9473549B2 (en) Method of playing internet video and related electronic device
CN202799004U (en) Video playback terminal and video playback system
CN110662114B (en) Video processing method and device, electronic equipment and storage medium
WO2018014523A1 (en) Media data acquisition method and apparatus
US11438645B2 (en) Media information processing method, related device, and computer storage medium
US20200228837A1 (en) Media information processing method and apparatus
CN107534797B (en) Method and system for enhancing media recording
US10291677B2 (en) Method of adaptive downloading of digital contents for several screens
CN111885393A (en) Live broadcast method, system, storage medium and equipment
CN116801009A (en) Video data processing method, device, medium and equipment
EP3522525B1 (en) Method and apparatus for processing video playing
US20210183028A1 (en) Saturation control for high-dynamic range reconstruction
CN114827617A (en) Video coding and decoding method and system based on perception model
CN114494037A (en) Image data processing method, image data processing device, electronic device, and storage medium
CN114268830A (en) Cloud director synchronization method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination