Method for adaptive coding parameter management and electronic device supporting the same
By segmenting the video content and calculating the final encoding parameter value, the problem of difficulty in setting the encoding parameters of the video encoder in the prior art is solved, and adaptive video encoding parameter optimization is realized, and video encoding efficiency is improved.
Patent Information
- Application Number
- CN202380068332.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-07-17
- Filing Date
- 2023-07-25
- Publication Date
- 2025-05-27
AI Technical Summary
Existing video encoders have difficulties in setting encoding parameters, resulting in poor encoding performance and inability to adapt to the needs of different video content.
By segmenting the video content into video scenes and calculating the final encoding parameter value for each video scene, selecting the preferred encoding parameter value using array indexes and predefined schemes to achieve adaptive video encoding parameter optimization.
The compression rate and encoding efficiency of the video encoder are improved, the characteristics of different video content are adapted to the requirements of different video contents, and the encoding performance is optimized.
Smart Images

Figure CN120051990A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to video data processing of an electronic device, and more particularly, to a method of adaptively operating encoding parameters. Background Art
[0002] Video encoders such as H.264, HEVC (High Efficiency Video Coding) (H.265), VVC (H.266), and AV1 (Advanced Video Coding) provide various parameters for setting the video encoder in addition to input video information. For example, in the case of H.264, various encoding parameters including GOP (Group of Picture) size, the number of B frames, the number of reference frames, whether deblocking is applied, the number of threads, IP rate, and PB rate are included to encode a video content.
[0003] Such coding parameters affect the encoding time and compression efficiency of a video encoder. Therefore, it is necessary to determine appropriate coding parameter values for the coding parameters in order to optimize the compression efficiency and encoding time of the video encoder. However, since there are so many coding parameters applied to video encoders, it is not easy to determine the preferred coding parameter values. For example, in the case of X.264, which is an open source implementation of H.264, there are more than 70 parameters, and assuming that each coding parameter has approximately 5 option values, calculations for 5^70 cases are required to determine the coding parameter values. Therefore, it is almost impossible to test all cases for the coding parameters of a specific video encoder. Therefore, the current solution for determining the coding parameter values of a video encoder is to define presets such as fast, medium, and slow that predetermine the coding parameter values from the perspective of a trade-off between compression efficiency and encoding time, and select the preset that meets the requirements for encoding time or video compression rate.
[0004] Because it is very difficult for users to set such encoding parameter values in detail, each video encoder vendor typically provides presets that pre-determine encoding parameter values based on encoding time (or computational complexity) through numerous experiments. In the case of X.264, presets such as Ultrafast, Extremely Fast, Very Fast, Faster, Faster, Medium, Slower, Slower, Ultraslow, and Control are provided. However, since the provided presets are not configured to suit all video content, encoding performance varies depending on the video content or the video codec. Summary of the Invention
[0005] Technical issues
[0006] The present invention aims to provide a method for adaptive encoding parameter operation capable of improving the compression rate for each video content by optimizing the adaptive encoding parameters for the video content and an electronic device supporting the method.
[0007] However, the objects of the present invention are not limited to the above objects, and other objects not mentioned can be clearly understood from the following description.
[0008] Technical Solution
[0009] In order to achieve the above-mentioned purpose, a method for adaptive video coding parameter operation includes the following steps: obtaining video content by a server processor of a server device; segmenting the video content into video scenes; obtaining video segments corresponding to some of the corresponding video scenes; performing video encoding on each of the video segments to encode the video content based on encoding parameter values set for at least some of all encoding parameters related to the video encoder; calculating a final encoding parameter value to be applied to each of the video segments based on the encoding results of the video encoding; and performing video encoding on the video content by applying the calculated final encoding parameter value to the video scene, wherein the step of calculating the final encoding parameter value includes: assigning array indexes to the encoding parameter values of the at least some encoding parameters, selecting multiple array indexes from the array indexes according to a predefined scheme, and performing encoding on the video segment based on the multiple encoding parameter values corresponding to the selected array indexes to detect encoding parameter values of preferred quality.
[0010] Specifically, the step of calculating the encoding parameter value of the preferred quality may include: selecting a first plurality of encoding parameters from all encoding parameters related to the video encoder, and performing multiple video encodings on a specific video segment by using multiple encoding parameter values set to the selected first plurality of encoding parameters; and calculating a first encoding parameter value with the highest quality by comparing the qualities of the multiple video encoding results.
[0011] Specifically, the step of calculating the encoding parameter value with the preferred quality may include: selecting a second plurality of encoding parameters different from the first plurality of encoding parameters, and performing multiple video encodings on the specific video segment by using multiple encoding parameter values set to the selected second plurality of encoding parameters; calculating the highest quality second encoding parameter value for the specific video segment by comparing the qualities of the multiple video encoding results; and comparing the video encoding quality of the first encoding parameter value and the video encoding quality of the second encoding parameter value with each other to select the highest quality encoding parameter value as the final encoding parameter value.
[0012] Specifically, the method may include the following steps: performing video encoding on the video scene to which the specific video clip belongs based on the final encoding parameter value.
[0013] Specifically, the step of calculating the final encoding parameter value may include: classifying the entire encoding parameters according to characteristics; sampling encoding parameters from each of the encoding parameter groups classified according to the characteristics, and performing video encoding on the video clip using the encoding parameter values set to the sampled encoding parameters; selecting multiple encoding parameters from a group including specific encoding parameter values indicating the highest quality encoding results; performing video encoding on the video clip based on the encoding parameter values set to the selected multiple encoding parameters; and calculating the highest quality encoding parameter value among the encoding results as the final encoding parameter.
[0014] Specifically, the method may further include the following steps: defining the entire coding parameter as an array index, and the step of defining the array index may include at least one of the following items: generating the array index by sorting predefined assignable values for coding parameters with a limited coding parameter length; generating an array index with a limited number by discretizing coding parameters with continuous values using quantization; or generating an array index by sorting classified sequence coding parameters based on computational complexity.
[0015] Specifically, the step of performing video encoding on each of the video segments may include: performing downsampling on each of the video segments; and performing video encoding on the downsampled video segments.
[0016] According to an embodiment of the present invention, a server device supporting adaptive video coding parameter operations includes: a server memory storing video content; and a server processor functionally connected to the server memory. The server processor is configured to: obtain video content, segment the video content into video scenes, obtain video segments corresponding to some of the corresponding video scenes, perform video encoding on each of the video segments based on encoding parameter values set for at least some of all encoding parameters related to a video encoder to encode the video content, calculate final encoding parameter values to be applied to each of the video segments based on encoding results of the video encoding, and perform video encoding on the video content by applying the calculated final encoding parameter values to the video scenes. The server processor is also configured to: assign array indices to the encoding parameter values of the at least some encoding parameters, select multiple array indices from the array indices according to a predefined scheme, and perform encoding on the video segments based on the multiple encoding parameter values corresponding to the selected array indices to detect encoding parameter values of preferred quality.
[0017] Specifically, the server processor can be configured to: select a first plurality of encoding parameters from all encoding parameters related to the video encoder, and perform multiple video encodings on a specific video segment by using multiple encoding parameter values set to the selected first plurality of encoding parameters, and calculate a first encoding parameter value with the highest quality by comparing the qualities of the multiple video encoding results.
[0018] Specifically, the server processor can be configured to: select a second plurality of encoding parameters different from the first plurality of encoding parameters, and perform multiple video encodings on the specific video segment by using multiple encoding parameter values set as the selected second plurality of encoding parameters, calculate the highest quality second encoding parameter value for the specific video segment by comparing the qualities of the multiple video encoding results, and compare the video encoding quality of the first encoding parameter value and the video encoding quality of the second encoding parameter value with each other to select the highest quality encoding parameter value as the final encoding parameter value.
[0019] Specifically, the server processor may be configured to: perform video encoding on the video scene to which the specific video clip belongs based on the final encoding parameter value.
[0020] Specifically, the server processor can be configured to: classify the entire encoding parameters according to characteristics, perform video encoding on the video clip based on encoding parameter values of encoding parameters sampled from the encoding parameter group classified according to the characteristics, and select multiple encoding parameters from a group including specific encoding parameter values indicating the highest quality encoding results.
[0021] Specifically, the server processor can be configured to: select multiple encoding parameters from a group containing specific encoding parameter values, perform video encoding on the video clip based on the encoding parameter values set as the selected multiple encoding parameters, and calculate the highest quality encoding parameter value among the encoding results as the final encoding parameter.
[0022] Specifically, the server processor can be configured to: define the entire coding parameter as an array index, generate the array index by sorting predefined assignable values for the coding parameter with a limited coding parameter length, generate an array index with a limited number by discretizing the coding parameter with continuous values using quantization, or generate an array index by sorting classified sequence coding parameters based on computational complexity.
[0023] Specifically, the server processor may be configured to: perform downsampling on each of the video segments, and perform video encoding on the downsampled video segments.
[0024] Beneficial effects
[0025] According to the present invention, by calculating and operating encoding parameter values having a preferred compression ratio for each video content, optimization of encoding parameter values related to compression efficiency of a specific video encoder for each video content can be provided.
[0026] In addition, various effects other than the above-described effects may be disclosed directly or implicitly in the detailed description of the embodiments according to the present invention to be described later. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 is a diagram showing an example of a video encoder operating environment according to one embodiment of the present invention.
[0028] Figure 2 is a diagram illustrating an example of components of a user terminal according to one embodiment of the present invention.
[0029] Figure 3 is a diagram showing an example of components of a server device according to one embodiment of the present invention.
[0030] Figure 4 is a diagram illustrating an example of components of a server processor according to one embodiment of the present invention.
[0031] Figure 5 is a diagram showing an example of a method of adaptive encoding parameter operation according to one embodiment of the present invention.
[0032] Figure 6 is a diagram showing another example of a method of adaptive encoding parameter operation according to one embodiment of the present invention. DETAILED DESCRIPTION
[0033] Now, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
[0034] However, in the following description and drawings, in order to avoid obscuring the subject matter of the present invention, well-known functions and components may not be described and illustrated in detail. In addition, in the entire drawings, the same components are represented by the same reference numerals as much as possible.
[0035] The terms or words used in the following description and drawings should not be interpreted as being limited to their general or dictionary meanings, and should be interpreted as meanings and concepts that conform to the technical ideas of the present invention based on the principle that the inventor can appropriately define the concepts of the terms to best describe his or her invention. Therefore, the embodiments described herein are merely the most preferred embodiments of the present invention and do not represent all technical ideas of the present invention. Therefore, it should be understood that various equivalents and modified examples that can replace the embodiments when filing this application may exist.
[0036] In addition, the terms including ordinal numbers such as first, second, etc. are used to describe various elements only for the purpose of distinguishing one element from another element, and are not used to limit these elements. For example, the second element can be named the first element without departing from the scope of the present invention, and similarly, the first element can also be named the second element.
[0037] In addition, the terms used herein are only used to describe specific embodiments and do not limit the present disclosure. Unless the context clearly indicates otherwise, singular expressions include plural expressions. In addition, terms such as "comprise" and "include" used herein are intended to specify the presence of features, numbers, steps, operations, elements, components, or combinations thereof disclosed herein, and should not be interpreted as excluding the possibility of the presence or addition of other features, numbers, steps, operations, elements, components, or combinations thereof in advance.
[0038] In addition, terms such as "unit" and "module" used herein refer to a unit that processes at least one function or operation and can be implemented by hardware, software, or a combination of hardware and software. In addition, unless the context clearly indicates otherwise, the terms "a", "an", "one", "the" and similar terms can be used in the context of describing the present invention (especially in the context of the appended claims) as both singular and plural meanings.
[0039] In addition to the terms mentioned above, specific terms used in the following description are provided to help understanding the present invention, and the use of such specific terms may be changed to other forms without departing from the technical meaning of the present invention.
[0040] In addition, embodiments within the scope of the present invention include computer-readable media having computer-executable instructions or data structures stored on a computer-readable medium. Such computer-readable media can be any available medium that can be accessed by a general-purpose or special-purpose computer system. By way of example, such computer-readable media can include, but is not limited to, RAM, ROM, EPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage device or any other physical storage medium that can be used to store or transmit certain program codes formed by computer-executable instructions, computer-readable instructions or data structures and that can be accessed by a general-purpose or special-purpose computer system.
[0041] Hereinafter, various embodiments related to an adaptive operation of video encoding parameters will be described based on the accompanying drawings.
[0042] Figure 1 is a diagram showing an example of a video encoder operating environment according to an embodiment of the present invention.
[0043] Reference Figure 1 , the electronic device operating environment 10 according to the embodiment of the present invention may include, for example, a network 50, a user terminal 100, and a server device 200. The user terminal 100 and the server device 200 may be one of the electronic devices.
[0044] The network 50 can support the formation of at least one communication channel among the communication channels between the user terminal 100 and the server device 200. The network 50 may include, for example, a communication circuit that can be connected to at least one of the user terminal 100 and the server device 200 in a wired or wireless manner. In one example, the network 50 can form a communication channel with the server device 200 based on the user terminal 100 and transmit a message to the server device 200 according to the request of the user terminal 100. The network 50 can transmit the video content stored in the server device 200 to the user terminal 100. Regarding wireless connection, the network 50 may include an Internet network element or may include at least one base station and a base station controller. The network 50 according to one embodiment of the present invention is not limited to a specific communication type, communication scheme, communication generation, etc., and may include a communication device that supports at least one of various communication schemes for signal flow between the user terminal 100 and the server device 200.
[0045] The user terminal 100 can establish a communication channel with the server device 200 via the network 50. The user terminal 100 can transmit video content stored in the memory to the server device 200 in response to user input. Furthermore, the user terminal 100 can receive video content from the server device 200 and store it in the memory. Furthermore, the user terminal 100 can include a camera and collect video content via the camera. In response to a request from the server device 200, the user terminal 100 can provide the video content collected using the camera to the server device 200.
[0046] For example, according to the present invention, the user terminal 100 may perform the following operations: segmenting video content into scenes and determining optimized video encoding parameter values for the segmented scenes, and encoding the acquired video content by applying the determined encoding parameter values. In one example, the user terminal 100 may perform encoding on video content stored in a memory using a specific video encoder. In this process, the user terminal 100 may segment the video content into scenes, then group the segmented scenes into specific groups (e.g., X-second video segments based on scenes, where X is a natural number), and encode the scene groups by applying encoding parameter values of at least some of the multiple encoding parameters provided by the video encoder to the scene groups, while selecting (or determining) encoding parameter values with preferred quality, and encoding the corresponding scene groups using the selected (or determined) preferred encoding parameter values. In addition, the user terminal 100 may store matching information in the memory that matches the selected preferred encoding parameter values with the corresponding scene groups. The user terminal 100 may transmit the encoded video content of the integrated encoded scene groups to the server device 200. Furthermore, although a single user terminal 100 is illustrated for the video encoder operating environment 10, the present invention is not limited thereto. For example, in addition to the user terminal 100, the video encoder operating environment 10 may further include other user terminals capable of forming a communication channel with the user terminal 100 or the server device 200 via the network 50. These other user terminals may further support the function of selecting preferred encoding parameter values and generating video content encoded per scene group as provided by the user terminal 100. Furthermore, these other user terminals may further provide the encoded video content and matching information to the user terminal 100 or the server device 200.
[0047] The server device 200 can collect video content through various routes. For example, the server device 200 can collect video content from at least one user terminal 100. Alternatively, the server device 200 can form a communication channel with a specific external server device that produces and distributes video content and receive video content from the external server device. In one example, the server device 200 can use a specific video encoder to encode the video content stored in the server memory. In this process, the server device 200 can perform scene-based segmentation on the video content, then group the segmented scenes into specific groups (for example, scene-based X-second video clips, where X is a natural number), and encode the scene groups by applying encoding parameter values of at least some of the multiple encoding parameters provided by the specific video encoder to the scene groups, while selecting encoding parameter values with preferred quality, and encoding the corresponding scene groups using the selected preferred encoding parameter values. In addition, the server device 200 can store matching information in the server memory that matches the selected preferred encoding parameter values with the corresponding scene groups. The server device 200 can store multiple video encoders. Therefore, for each video encoder, the server device 200 can perform scene group extraction, selection of preferred encoding parameter values for the corresponding scene, and encoding operations using the selected preferred encoding parameter values. When the user terminal 100 is connected via the network 50, the server device 200 can provide the user terminal 100 with a screen for selecting at least one video encoder and a screen for selecting at least one encoded video content. In response to a request from the user terminal 100, the server device 200 can provide the user terminal 100 with a specific video encoder and specific encoded video content.
[0048] Furthermore, the above description illustrates an example in which a user terminal 100 and a server device 200 are connected via a network 50 in the video encoder operating environment 10, but the present invention is not limited thereto. For example, in the video encoder operating environment 10, multiple sub-server devices may be connected to the server device 200 via the network 50 instead of the user terminal 100. When the server device 200 provides video content to the sub-server devices, the sub-server devices may extract scene groups from the provided video content, select preferred encoding parameter values for the extracted scene groups, encode the video content using the selected encoding parameter values, and provide the encoded video content to the server device 200. Here, the sub-server devices may provide the server device 200 with matching information indicating that the scene group information and the selected encoding parameter values match each other. Upon request from the user terminal 100, the server device 200 may provide the user terminal 100 with video content encoded using the preferred encoding parameter values for the corresponding scene groups, while also providing the matching information. In addition, the server device 200 may provide the user terminal 100 with a video decoder associated with the encoding parameters (or encoding parameter values), and the user terminal 100 may perform playback of the encoded video content by downloading and installing the video decoder.
[0049] As described above, the operation of selecting preferred encoding parameter values and encoding video content by scene group based on the selected encoding parameter values according to one embodiment of the present invention can be independently performed in at least one of the user terminal 100 installed with the video encoder and the server device 200 providing the video encoder.
[0050] Figure 2 is a diagram illustrating an example of components of a user terminal according to one embodiment of the present invention.
[0051] Reference Figure 2 According to one embodiment of the present invention, the user terminal 100 may include a communication circuit 110, a memory 120, a camera 130, a display 140, and a processor 150. The user terminal 100 may be any of various electronic devices capable of computing operations (e.g., such as a portable communication device and a desktop computing device). The user terminal 100 including such components may be a consumer that receives and consumes matching information (the matching information matches the preferred encoding parameter values for each scene group according to one embodiment of the present invention with the video content encoded using the corresponding encoding parameter values from the server device 200), and may also be a supplier that can generate matching information and encoded video content and provide them to the server device 200.
[0052] The communication circuit 110 can support forming a communication channel with the user terminal 100. For example, the communication circuit 110 may include at least one communication module for supporting various generations of communication schemes, such as 3G (generation), 4G, 5G, and 6G. The communication circuit 110 can establish a communication channel with the network 50 based on the settings of the user terminal 100 or in response to user input, and access the server device 200 based on the input address information. Under the control of the processor 150, the communication circuit 110 can receive various data or programs through the communication channel formed with the server device 200. For example, the communication circuit 110 can receive at least one video encoder from the server device 200 in response to user input. In addition, the communication circuit 110 can receive firmware that can update the at least one video encoder from the server device 200. In addition, the communication circuit 110 can receive at least one video content from the server device 200. The at least one video content received from the server device 200 may include, for example, encoded video content and matching information, where preferred encoding parameter values are matched for each scene group. In another example, the communication circuit 110 can transmit video content collected by the camera 130 in response to user manipulation to the server device 200. In this process, the video content transmitted to the server device 200 may include matching information for selecting a preferred encoding parameter value for each scene group and encoded video content obtained by encoding the scene group using the corresponding encoding parameter value.
[0053] The memory 120 can store at least one program related to the operation of the user terminal 100 and data used for the program operation. In one example, the memory 120 can store first video content 121 captured by the camera 130. Furthermore, the first video content 121 stored in the memory 120 can be received and stored from the server device 200, an external server device, or another user terminal. Furthermore, the memory 120 can store first encoded video content 122 encoded according to the scheme of the present invention (e.g., a scheme for encoding the first video content 121 using preferred encoding parameter values for each scene group). The memory 120 can store first matching information 123 generated while encoding the first video content 121 into the first encoded video content 122. The first matching information 123 can include information about the scene groups of the first video content 121 and information about the encoding parameter values used to encode the scene groups. The memory 120 can include at least one first video encoder 124 for encoding the first video content 121. The first video encoder 124 can, for example, be at least partially formed as a software module. Alternatively, the first video encoder 124 can, for example, be at least partially formed as a hardware module. The first video encoder 124 may be previously received and stored from the server device 200. The first video encoder 124 may be activated to encode the first video content 121.
[0054] The camera 130 can capture still images or moving images. For example, the camera 130 can capture a specific object or a background including the object under the control of the processor 150 or in response to user input, and send the captured video content to the memory 120. The first video content 121 stored in the memory 120 can include various scenes in response to the operation of the camera 130.
[0055] The display 140 can output at least one screen related to the operation of the user terminal 100. For example, the display 140 can output an access screen provided by the server device 200 or a usage screen of the server device 200 according to the operation of the communication circuit 110. For example, the display 140 can output a screen for selecting at least one video encoder provided by the server device 200, a video encoder selection and download screen, and a video encoder installation screen. The display 140 can output a list of at least one encoded video content provided by the server device 200. When specific video content is selected, the display 140 can output a screen for downloading a video player required to play the corresponding video content. Alternatively, when a video player capable of playing the selected video content is already installed, the display 140 can output the downloaded (or streamed) video content through the video player.
[0056] The display 140 can output screens related to the operation of the camera 130. For example, when the camera 130 is operating in a video capture mode, the display 140 can display the currently captured video content. The display 140 can also provide a control screen for recording, saving, deleting, and the like the video content during the video content display process. The display 140 can also output at least one of a list of the first video content 121 stored in the memory 120, a list of the first encoded video content 122, a list of the first matching information 123, and installation information of the first video encoder 124.
[0057] The input unit 160 may include a component that supports user input related to the operation of the user terminal 100. For example, the input unit 160 may include at least one of various devices such as a keyboard, a keypad, a mouse, a touch screen, a touchpad, a touch key, a voice input device, a gesture input device, a joystick, and a scroll wheel device. Based on the user input, the input unit 160 may generate at least one input signal among an input signal for requesting a communication connection with the server device 200, an input signal for selecting at least one object on the access screen provided by the server device 200 (for example, an object including at least one of a video content list, an encoded video content list, and a video encoder list), and an input signal for requesting playback control of the encoded video content.
[0058] The processor 150 may at least one of transmit and apply at least one signal related to the operation of the user terminal 100, output the application result, and store and transmit data based on the result. For example, when the user terminal 100 is operating as a consumer consuming encoded video content, the processor 150 may control the communication circuit 110 to establish a communication channel with the server device 200 in response to user manipulation. The processor 150 may receive a list of encoded video content from the server device 200, receive specific encoded video content and matching information in response to user input, and store them in the memory 120. The processor 150 may play back the received encoded video content based on the matching information. In this regard, the processor 150 may execute a video player for encoding the video content. If the video player required to play the encoded video content is not present, the processor 150 may notify the user that the video player is not installed and, in response to user manipulation, download and install the corresponding video player from the server device 200. The video player may decode the encoded video content by scene group based on the matching information and output the decoded video frames to the display 140.
[0059] When the user terminal 100 operates as a provider of encoded video content, the processor 150 can execute the first video encoder 124 stored in the memory 120 in response to user manipulation. Upon receiving an input to select and encode the first video content 121 stored in the memory 120, the processor 150 can segment the first video content 121 into scenes and generate scene groups (e.g., video segments) based on the segmented scenes. In this process, the processor 150 can multiply each scene by a preset time in seconds and store the scene groups (or video segments) segmented by this time. The processor 150 can collect information about encoding parameters related to the first video encoder 124 and select an encoding parameter value with preferred quality (or preferred compression efficiency) for each of the segmented and stored scene groups. The processor 150 can encode the scene groups using the selected encoding parameter values and generate the first encoded video content 122. During this process, the processor 150 can generate first matching information 123 by matching the encoding parameter values with the identification information for the scene group, and store the first matching information 123 in the memory 120. The first matching information 123 may include identification information of the first video encoder 124. The processor 150 may provide the first encoded video content 122 stored in the memory 120 and the first matching information 123 to another user terminal or server device 200 upon request from the other user terminal or server device 200. The operation of the processor 150 generating the first encoded video content 122 may be substantially the same as the operation of the server processor 250 generating the second encoded video content 227 described below. Therefore, the processor operation related to the generation of the first encoded video content 122 may be at least partially the same as the operation of the server processor 250 regarding the selection and operation of encoding parameter values.
[0060] As described above, the user terminal 100 includes a memory 120 for storing video content and a processor 150 functionally connected to the memory 120. The processor 150 can segment the video content into video scenes, obtain video segments corresponding to some of the corresponding video scenes, and perform video encoding on each of the video segments using encoding parameter values of at least some of all encoding parameters associated with a video encoder that encodes the video content. The processor 150 can be configured to calculate a preferred encoding parameter value to be applied to each of the video segments based on the encoding results of the video encoding, and perform video encoding on the video content by applying the calculated preferred encoding parameter value to the video scene. Here, the processor 150 can perform multiple video encodings for a specific video segment based on encoding parameter values of a first plurality of encoding parameters having a predetermined condition among all encoding parameters associated with the video encoder, and compare the quality of the multiple video encoding results to calculate a first encoding parameter value having the highest quality. Furthermore, regarding calculation of the final encoding parameters, the processor 150 may perform multiple video encodings for a specific video clip based on encoding parameter values of a second plurality of encoding parameters having conditions different from those of the first plurality of encoding parameters having predetermined conditions, and compare the quality of the multiple video encoding results to calculate a second encoding parameter value with the highest quality for the specific video clip. The processor 150 may compare the video encoding quality of the first encoding parameter value with the video encoding quality of the second encoding parameter value, thereby selecting the encoding parameter value with the highest quality as the final encoding parameter value. The aforementioned preferred encoding parameter value selection process may be repeated for the corresponding video clip. The processor 150 may perform a first process of calculating the preferred encoding parameter value from the encoding parameter values of the first plurality of encoding parameters and a second process of calculating the preferred encoding parameter value from the encoding parameter values of the second plurality of encoding parameters in parallel, thereby more quickly calculating the preferred encoding parameter value for the specific video clip. Furthermore, the processor 150 may classify all encoding parameters into three or more groups, calculate preferred encoding parameter values from the corresponding encoding parameter groups, and compare the calculated preferred encoding parameter values to generate a final preferred encoding parameter value for the specific video clip. In another example, without performing parallel processing, the processor 150 may select at least some encoding parameters from all encoding parameters and calculate an encoding parameter value indicating a preferred encoding efficiency for a specific video segment from among the selected at least some encoding parameters.
[0061] In addition, the predetermined conditions may include classification criteria based on the characteristics of the encoding parameters. For example, the encoding parameters associated with a specific video encoder may be classified according to specific characteristics. For example, they may include encoding parameters with discrete values, encoding parameters with continuous values, and encoding parameters in a classified series. The processor 150 may classify all encoding parameters according to the above characteristics, select at least one encoding parameter from the encoding parameter group classified by the characteristics, perform video encoding on the video clip using an encoding parameter value that supports the at least one selected encoding parameter, and select a specific encoding parameter value that indicates the highest quality encoding result. The processor 150 may compare the encoding results of preferred encoding parameter values according to the characteristics with each other, and finally perform video encoding on the video clip based on the encoding parameter value with the preferred quality. The above operations of the processor 150 may also be performed by the server processor 250 described below.
[0062] Figure 3 is a diagram showing an example of components of a server device according to one embodiment of the present invention, and Figure 4 is a diagram illustrating an example of components of a server processor according to one embodiment of the present invention.
[0063] First, refer to Figure 3 , the server device 200 may include a server communication circuit 210 , a server memory 220 , a server display 240 , and a server processor 250 .
[0064] The server communication circuit 210 may support forming a communication channel of the server device 200. For example, the server communication circuit 210 may form a communication channel with at least one of an external server device that provides video content, another user terminal, and another sub-server device, and may receive video content from any other electronic device forming a communication channel (e.g., the user terminal 100, another user terminal, a sub-server device, or an external server device) at a specific cycle or in response to an administrator input.
[0065] For example, the server communication circuit 210 can form a communication channel with the user terminal 100 over the network 50 under the control of the server processor 250. The server communication circuit 210 can receive the first video content 121 from the user terminal 100. In addition, the server communication circuit 210 can receive the first encoded video content 122 and the first matching information 123 from the user terminal 100. In another example, the server communication circuit 210 can provide at least one of the second video content 221, the second encoded video content 227, and the second matching information 229 stored in the server memory 220 to the user terminal 100 under the control of the server processor 250. In addition, the server communication circuit 210 can provide the user terminal 100 with a program corresponding to the at least one second video encoder 223 in response to a request from the user terminal 100.
[0066] Server memory 220 may store at least one of data and programs related to the operation of server device 200. For example, server memory 220 may store at least some of second video content 221, second video encoder 223, parameter information 225, second encoded video content 227, and second matching information 229. Second video content 221 may include, for example, video content generated by user terminal 100 via camera 130. Furthermore, second video content 221 may be provided from a specific external server device that generates and distributes video content. Second video encoder 223 may include at least one video encoder that server device 200 may use to convert second video content 221 into second encoded video content 227. In one example, server device 200 may include one or more video encoders and may provide programs corresponding to the video encoders to user terminal 100 in response to a request from user terminal 100.
[0067] The parameter information 225 may include information about parameters corresponding to the second video encoder 223 . For example, when the second video encoder 223 is X.265, the parameter information 225 may include at least some of the encoding parameters of cabac, ref, deblock, analyze, me, subme, psy, psy_rd, mixed_ref, me_range, chroma_me, trellis, 8x8dct, cqm, deadzone, fast_pskip, chroma_qp_offset, threads, lookahead_threads, sliced_threads, nr, decimate, interlaced, bluray_compat, constrained_intra, bframes, b_pyramid, b_adapt, b_bias, direct, weightb, open_gop, weightp, keyint, keyint_min, scenecut, intra_refresh, rc_lookahead, rc, mbtree, crf, qcomp, qpmin, qpmax, qpstep, ip_ratio and aq, and encoding parameter values supporting the corresponding encoding parameters. The parameter information 225 may vary according to the type of the second video encoder 223. When a plurality of different video encoders are included in the server storage 220, the parameter information 225 may include encoding parameters corresponding to each video encoder and encoding parameter values supporting the corresponding encoding parameters.
[0068] The second encoded video content 227 may include video content encoded from the second video content 221 by the second video encoder 223 under the control of the server processor 250. For example, the second encoded video content 227 may include video content encoded using preferred encoding parameter values for scene groups, where the second video content 221 is segmented into scenes, and the segmented scenes are then defined as multiple video segments of a specific length. The second matching information 229 may include matching information of the encoding parameter values used to encode the scene groups, segmentation information (or identification information) of the scene groups, and identification information of the video encoder used.
[0069] In addition, the server storage 220 may store a video player capable of playing the second encoded video content 227. For example, the second encoded video content 227 may include versions corresponding to various video encoders, so the server storage 220 may include various video players and provide the user terminal 100 with a program corresponding to the video player capable of playing the second encoded video content 227 in response to a request from the user terminal 100.
[0070] The server display 240 may output at least one screen related to the operation of the server device 200. For example, the server display 240 may output at least one screen from among a screen indicating the connection status with the user terminal 100, an access screen to be provided to the user terminal 100, and a screen indicating the access status of another user terminal or an external server device other than the user terminal 100 that provides the second video content 221. In another example, the server display 240 may also output a screen corresponding to at least a portion of the process of generating the second encoded video content 227 based on the second video content 221.
[0071] The server processor 250 may perform at least one of receiving, transmitting, and processing signals related to the operation of the server device 200 and storing or transmitting processing results. For example, the server processor 250 may generate and provide the second encoded video content 227 based on the second video content 221. In this regard, the server processor 250 may include the following: Figure 4 Components shown. Figure 4 The server processor 250 may include a video collecting unit 251, a scene detecting unit 252, a scene extracting unit 253, a downsampling unit 254, a preferred parameter calculating unit 255, an encoded content generating unit 256, and a content providing unit 257. Here, the downsampling unit 254 may be omitted. The server processor 250 may determine encoding parameter values (e.g., encoding parameter values of at least some of the encoding parameters included in the parameter information 225) of a video encoder (e.g., the second video encoder 223) to improve compression efficiency (or compression rate) according to input video content (e.g., the second video content 221).
[0072] The video collection unit 251 can control the collection of video content. For example, the video collection unit 251 can establish a communication channel with an external server device that provides video content at regular intervals, collect video content from the external server device, and store it in the server memory 220. In addition, the video collection unit 251 can establish a communication channel with at least one user terminal 100 and receive video content from at least one user terminal 100. When collecting video content, the video collection unit 251 can send the collected video content to the scene detection unit 252.
[0073] The scene detection unit 252 can obtain the second video content 221 stored in the server memory 220 or obtain video content from the video collection unit 251. The scene detection unit 252 can perform scene detection on the obtained second video content 221. In the present invention, a scene can include a single scene. Alternatively, a scene can include a scene based on a background change. Alternatively, a scene can include a scene in which the number of objects on the screen changes. For example, when a new object is added to the screen or an object on the screen disappears, it can be determined that the scene has changed. Alternatively, the scene detection unit 252 can apply scene change detection technology to the second video content 221 to segment it into scenes. Alternatively, the second video content 221 can include scene data recorded according to at least one of the various scene definitions described above (e.g., a title for a scene or scene group, a table of contents, the playback time of each scene, and the location information of each scene). The scene data can include data defining scene transition points of the second video content 221. The scene detection unit 252 can detect the scenes of the second video content 221 based on the scene data of the second video content 221. Alternatively, the scene detection unit 252 may extract I frames from the second video content 221 and compare the extracted I frames to determine whether there is a change greater than a predefined reference value. If there is any change greater than the predefined reference value, the scene detection unit 252 may detect the frames preceding the I frame with a change greater than the reference value as a scene. For example, the scene detection unit 252 may define a scene transition itself (e.g., fade in / out or zoom in / out) as a scene. A single scene may have a playback time of several seconds to several minutes.
[0074] The scene extraction unit 253 can use scene data or scene transition points to multiply the starting frame of a specific scene by a predefined X seconds to extract a video segment (for example, a video segment represents a scene among multiple video segments, wherein a scene can include at least one video segment or multiple segments). The value of X can vary depending on the total length of the scene. For example, if a scene is one minute long, the value of X can be ten seconds, and the scene can be extracted into six video segments. The six video segments can have similar picture characteristics (or similar object characteristics) to the picture characteristics segmented from a scene. For example, the six video segments can include similar backgrounds, a similar number of objects, and similar objects.
[0075] According to one embodiment of the present invention, the downsampling unit 254 may downsample at least a portion of the video content used for the preferred parameter calculation. For example, the downsampling unit 254 may reduce the image quality of at least one video segment for each scene extracted by the scene extraction unit 253. In one example, if the pixels of a frame included in a video segment are 1000×1000, the downsampling unit 254 may downsample the corresponding frame to 100×100. As a method of reducing pixels, an interpolation method (for example, a method of selecting the average value of the pixel values of nine pixels) may be applied, or a method of selecting pixels to be deleted in a specified pattern (for example, a method of selecting the center pixel among 9 pixels) or a method of randomly selecting them may be applied.
[0076] The preferred parameter calculation unit 255 can calculate the preferred encoding parameter value for each scene by applying the preferred encoding parameter value calculation algorithm to at least one video segment for each scene provided by the scene extraction unit 253 (or a representative video segment for each scene). Furthermore, the preferred parameter calculation unit 255 can downsample the second video content 221 using the downsampling unit 254 based on the playback length of the second video content 221 and apply the preferred encoding parameter value calculation algorithm to the downsampled second video content. Regarding the application of the preferred encoding parameter value calculation algorithm, the preferred parameter calculation unit 255 generates an array of finite length for the corresponding encoding parameters (hereinafter referred to as EPs) belonging to the second video encoder 223 (or the corresponding EPs obtained from the parameter information 225 stored in the server memory 220). In this process, the preferred parameter calculation unit 255 generates the array by sorting predefined assignable values for the EPs having discrete values (values of finite length). The preferred parameter calculation unit 255 generates the array of finite length by discretizing the EPs having continuous values using quantization. It is preferred that the parameter calculation unit 255 generates an array by sorting EPs of categorical sequences rather than numerical values based on computational complexity.
[0077] The preferred parameter calculation unit 255 sets an initial EP value for a specific EP. When the EPs included in the parameter information 225 for a specific video encoder consist of N, the EP set can be represented as {EP0, EP1, . . . , EP N-1 Each of the corresponding EPs (e.g., EP0, EP1, . . . , EP N-1) may include multiple EP values (or EP option values). Corresponding EPs may include the same number or different numbers of EP values. Corresponding information may be obtained from parameter information 225. The preferred parameter calculation unit 255 may select a specific EP from the EP set based on a random method, receiving a user input signal, or a specified method, and determine an initial EP value from the EP values of the selected EP. In one example, the preferred parameter calculation unit 255 may determine the median value in the list of multiple EP values as the initial EP value.
[0078] The preferred parameter calculation unit 255 encodes at least a portion of the video segment selected based on the initial EP value (for example, the first I frame of the video segment or one of the plurality of video segments) and measures the video quality. Regarding the video quality measurement, the preferred parameter calculation unit 255 can use PSNR (peak signal-to-noise ratio), VMAF (video multi-method evaluation fusion), SSIM (structural similarity), LPIPS (learning perceptual image block similarity), etc., but the present invention is not limited thereto and any quality metric can be applied as long as it is a video quality measurement standard that allows numerical comparison.
[0079] Regarding the selection of EP values, the preferred parameter calculation unit 255 may set an array index for each EP based on an initial EP value, and use the initial EP value to perform encoding on a video clip based on a target bit rate to measure video quality. The preferred parameter calculation unit 255 changes the array index value by + / -M (M is an integer greater than or equal to 1) for all EPs or each of N EPs, performs encoding by applying the EP value corresponding to the selected array index to the video clip according to the M change, and then measures video quality. In order to encode a video clip while updating the EP value, the preferred parameter calculation unit 255 may index multiple EPs and index the EP values of the corresponding EPs.
[0080] In one example, the EP value array index can be defined as a matrix (e.g., EP ij ), the matrix having an i-th row representing a plurality of EPs and a j-th column representing an EP value of a corresponding EP. Here, "i" may correspond to the number (or order) of at least some (or all) of the EPs related to the video encoder. Here, when the EP value of the corresponding EP is set to a different number, the "j" value may vary for each EP value. The preferred parameter calculation unit 255 may set variables "i" and "j" to 0 as an initial value, and select an EP by applying any value other than 0 to each of the "i" and "j" values. ij The preferred parameter calculation unit 255 can be based on the EP ijThe video clip is encoded using a specific EP value selected in a specified method in the array index and the video quality is measured. The preferred parameter calculation unit 255 can change the array index EP in a predefined specific method (e.g., sequential selection, odd or even selection, multiple selection). ij rows and columns.
[0081] In another example, the preferred parameter calculation unit 255 may perform EP selection and EP value selection based on a linear array. For example, the preferred parameter calculation unit 255 may list N EPs in a row and select EPs with a specific order among them. L (e.g., Lth). In one example, the preferred parameter calculation unit 255 may select an EP value in the middle order among N EPs. Alternatively, the preferred parameter calculation unit 255 may select an EP for the order of the N EPs according to a predefined selection method (e.g., sequential selection, odd or even selection, regular or irregular distribution selection). Thereafter, the preferred parameter calculation unit 255 may select at least one EP value from the K EP values that support the selected EP according to a predetermined method, encode the video segment using the selected EP value, and measure the quality. For example, the preferred parameter calculation unit 255 may list K EP values of a specific EP in the order of -P, ..., -M, ..., 0 (middle order), ..., M, ..., P (-P to P are K segments, M is less than or equal to P), select a specific EP value (e.g., -Mth, Mth, and middle order EP values) from the listed EP values, perform encoding on the video segment, measure and compare the quality, and calculate a preferred EP value. The preferred parameter calculation unit 255 may also apply multiple M values to select three or more EP values, and then compare the encoding result of the video segment with the three or more EP values to calculate the preferred EP value.
[0082] If visual quality does not improve while encoding a video segment using multiple EP values, the preferred parameter calculation unit 255 may stop execution and determine the last EP value as the final EP value, or repeatedly update the EP index and calculate the preferred EP value a predetermined number of times to determine the final EP value, thereby generating a preferred final EP value for the particular video segment. When applying the algorithm, the initial values of the encoding parameters are arbitrarily selected. Experimentally, an intermediate preset, which is a compromise between encoding time and compression performance, has shown preferred results as the initial value. Therefore, the preferred parameter calculation unit 255 typically uses the intermediate preset defined as the initial value of the algorithm for finding the encoding parameter value. The bit rate is not included in the encoding parameter target used to find the preferred value.
[0083] The encoding content generation unit 256 can obtain the preferred encoding parameter values for the video segments representing the corresponding scenes from the preferred parameter calculation unit 255. The encoding content generation unit 256 can generate the second encoded video content 227 by encoding the corresponding scenes based on the obtained encoding parameter values. That is, the encoding content generation unit 256 can perform encoding on a scene-by-scene basis by using the preferred encoding parameter values found for video segments (or video scenes composed of multiple video segments) having common characteristics.
[0084] The content providing unit 257 can support access by the user terminal 100 and provide the second encoded video content 227 according to the request of the user terminal 100. For example, in response to the access request of the user terminal 100, the content providing unit 257 can provide the user terminal 100 with a web page corresponding to the access and a list of the second encoded video content 227 stored in the server memory 220. Alternatively, in response to the request of the user terminal 100, the content providing unit 257 can provide the user terminal 100 with at least one video player that can be installed in the user terminal 100 (e.g., a video player that can play the second encoded video content 227). The server device 200 can calculate the preferred encoding parameter values of the encoding parameters (encoding parameter sets) belonging to each of the multiple video encoders for one second video content 221 and apply them to the encoding. Therefore, the content providing unit 257 can identify the type of video player installed in each user terminal 100 and provide the user terminal 100 with the second encoded video content 227 of a type that can be played in the corresponding video player. In the process of providing the second encoded video content 227 to the user terminal 100 , the content providing unit 257 may also provide second matching information 229 .
[0085] Figure 5 is a diagram showing an example of a method of adaptive encoding parameter operation according to one embodiment of the present invention.
[0086] Reference Figures 1 to 5 Regarding the method for adaptive encoding parameter operation according to one embodiment of the present invention, the server processor 250 of the server device 200 (or the processor 150 of the user terminal 100) may obtain video content in step 501 in response to scheduling information input or pre-specified by an administrator. For example, the server processor 250 may obtain video content previously stored in the server memory 220. Alternatively, the server processor 250 may obtain video content from the user terminal 100 or an external server device.
[0087] In step 503, the server processor 250 may perform scene segmentation on the video content. In one example, the server processor 250 may segment the video content by scene and generate at least one video clip based on the segmented scene. For example, the server processor 250 may multiply each scene by a preset time in seconds to generate video clips, which are then stored in the server memory 220. Alternatively, the server processor 250 may apply scene change detection technology to the video content to segment it into scenes. Alternatively, the server processor 250 may detect scenes in the video content based on scene data recorded about the video content (e.g., titles for scenes or groups of scenes, a table of contents, playback time of each scene, location information for each scene, and data defining scene transition points). Alternatively, the server processor 250 may compare frames to identify the next frame with a change greater than or equal to a predefined reference value as a new scene. A scene may have a playback time of several seconds to several minutes. The server processor 250 may generate video clips that segment scenes in predefined units of a specific second (e.g., 10 seconds).
[0088] At step 505, the server processor 250 may perform encoding on a video segment corresponding to at least a portion of the segmented scene while encoding the array indexes EP0 to EP N-1 At least one array index EP q The EP value (q is zero or a natural number less than or equal to N-1) is used for encoding based on the target bit rate. The array index EP0 to EP N-1 Indicates N encoding parameters belonging to a pre-installed video encoder. Alternatively, the server processor 250 may select at least some EPs for a plurality of EPs in a pre-specified manner, and may perform encoding on the video segment by selecting a plurality of EP values among EP values supporting the selected corresponding EPs.
[0089] In step 507, the server processor 250 may measure the video quality of the encoding result to which multiple EP values have been applied. For example, the server processor 250 may measure the video quality of the encoding result to which multiple EP values have been applied according to a specified criterion. N-1 A plurality of indexes less than N are selected and the video quality of the encoding results is compared, wherein the EP value (encoding parameter value) corresponding to the selected EP index has been applied to the video segment. Here, the server processor 250 selects the video quality of the encoding result from EP0 to EP N-1 The criteria for selecting the plurality of indexes less than N may include various methods. For example, the server processor 250 may select from EP0 to EP N-1A predetermined number of indexes are randomly selected. Alternatively, the server processor 250 may select a specific number of EP indexes based on EP characteristics (e.g., discrete EP, continuous EP, and categorized EP). Alternatively, the server processor 250 may select an EP index for each EP characteristic, perform encoding based on the EP value corresponding to the selected EP index, and then compare the video quality. Thereafter, the server processor 250 may select a predefined number of EP indexes from the EP characteristic group with the highest quality, and apply the EP values corresponding to the selected EP indexes to the video clip to measure the video quality. In another example, the server processor 250 may repeatedly perform the above steps 505 to 507 until no quality improvement occurs or a predetermined number of times is reached.
[0090] The server processor 250 may select the highest quality EP value in step 509. That is, the server processor 250 may determine the EP value corresponding to the EP index having the highest quality encoding result among the EP values of the EP indexes selected in a predefined manner as the final EP value.
[0091] In step 511, the server processor 250 may check whether it is the final video scene. If it is not the final video scene, the server processor 250 may return to step 505 and re-execute subsequent operations for a video segment of another scene.
[0092] If it is the final video scene, the server processor 250 can check whether an end event has occurred in step 513. If any end event has occurred, the server processor 250 can terminate the function of calculating and applying the preferred encoding parameter value. On the other hand, if no end event has occurred, the server processor 250 can return to step 501, obtain other video content, and re-execute subsequent operations. In addition, if the server processor 250 generates a final EP value for the video segment of the final video scene, it can perform encoding for the entire video content by applying the final EP value corresponding to the corresponding scene. In this process, the server processor 250 can create matching information for each scene, in which the scene identification information and the EP value (encoding parameter value) used for each scene match each other, and store it in the server memory 220.
[0093] Figure 6 is a diagram showing another example of a method of adaptive encoding parameter operation according to one embodiment of the present invention.
[0094] Reference Figures 1 to 6Regarding the method for adaptive encoding parameter operation according to one embodiment of the present invention, in step 601, the server processor 250 of the server device 200 (or the processor 150 of the user terminal 100) may obtain video content. The process of obtaining video content may correspond to the same steps as the above step 501.
[0095] In step 603, the server processor 250 may determine a video encoder to be used to encode the obtained video content and collect parameter information corresponding to the determined video encoder. In this regard, the server device 200 may store at least one video encoder and parameter information used in the at least one video encoder in the server memory 220, or may obtain them from an external server device. When there are multiple video encoders, the server processor 250 may select a specific video encoder based on the characteristics of the video content. In this regard, the server device 200 may store and manage matching information about a preferred video encoder for each video content characteristic (e.g., documentary, movie, drama, educational video, etc.). Information about the preferred video encoder may be obtained statistically or through experiments.
[0096] In step 605, the server processor 250 may generate an array corresponding to the parameters obtained from the parameter information. For example, the server processor 250 may generate an array by sorting predefined assignable values for EPs (encoding parameters) having discrete values (values of finite length). The server processor 250 may generate an array having a finite number of values by discretizing EPs having continuous values using quantization. The server processor 250 may generate an array by sorting EPs of a classified series based on computational complexity. With respect to array generation, the server processor 250 may operate an array generator that generates a specific array by applying predefined rules to the input EPs.
[0097] In step 607, the server processor 250 may generate an index corresponding to each of the generated arrays. Regarding index generation, the server processor 250 may generate an index that can distinguish each array according to the length and complexity of the array. For example, if the parameter information includes N parameters, the server processor 250 may generate indexes EP0, EP1, ..., EP N-1 Additionally or alternatively, the server processor 250 may generate an index (eg, EP0, EP1, ..., EP N-1 ).
[0098] At step 609, the server processor 250 may select a specific EP from among the N EPs in a pre-specified manner. L , in the setting for the selected EP LA plurality of EP values are selected from among all EP values of , and encoding is performed on a video scene (or a video segment corresponding to a portion of a video scene) based on a target bit rate. L When K EP values are set in the video scene, the server processor 250 may select some EP values (e.g., EP values in a specific order from the 0th EP value to the Kth EP value, or EP values within a specific range) from the K EP values and perform encoding for the video scene based on the selected EP values. Alternatively, the server processor 250 may select some EP values (e.g., EP values in a specific order from the 0th EP value to the Kth EP value, or EP values within a specific range) from the K EP values. L The server processor 250 selects the +Mth and -Mth EP values based on a specific order from the EP value sequence of , and encodes the video scene based on the target bit rate using the selected EP values. At this time, the indexes of other EPs remain unchanged. Alternatively, the server processor 250 may use an EP array with an integer y as an array index. L The value (EP value) performs encoding for a video scene where -M<=y<=M.
[0099] Regarding encoding of a video scene, the server memory 230 may store a plurality of EPs, and each EP may include a plurality of EP values (for example, when a specific EP is a QP, the EP value of the QP may be defined as [10, 22, 27, 32, 37, 42, 47]). The server processor 250 may define an array index for the plurality of EPs and an array index for the plurality of EP values for each of the EPs.
[0100] In one example, the server processor 250 may be based on EP L Select EPs with +M index to -M index and encode the video scene based on the target bit rate. L is an index value indicating N EPs related to the video encoder and can be EP0 to EP N-1 For example, EP L Can be between EP0 and EP N-1 In addition, M may have a natural value. The server processor 250 may select an intermediate index between EP0 and EP1 according to the above criteria. N-1 For example, when M is 3 and is configured to select three EP indexes, the server processor 250 may select the EP indexes corresponding to the EP L , EP L+3 and EP L-3 The M value may be a value other than 3, and the server processor 250 may select two or more EP indices between +M and -M. When multiple EP indices are selected, the server processor 250 may apply the multiple EP values set to the selected EP indices to encode at least a portion of the video scene. In this process, the server processor 250 may Figure 5 Step 503 described in the above performs scene segmentation of the video content, obtains video segments of a few seconds in length based on the starting point of each scene, and then performs video encoding by applying a plurality of selected EP values to the corresponding video segments. For higher-speed operation, the server processor 250 can downsample the obtained video segments (e.g., convert the video segments to lower quality) and then perform video encoding on the downsampled video segments.
[0101] In step 611, the server processor 250 may select the index of the EP value with the highest quality among the encoding results to which the selected plurality of EP values are applied. In step 613, the server processor 250 may check whether the operation of selecting the index of the EP value with the highest quality has been performed a specified number of times or more. If it has been performed less than the specified number of times, the server processor 250 may increase or decrease the L value used to change the EP index by 1 in step 615 and return to step 609 to re-execute the subsequent operation. The server processor 250 may perform the above steps 609 to 615 for all video scenes included in the video content. The increase or decrease of the L value by 1 may be performed in parallel. In this case, the server processor 250 may perform the increase and decrease of the EP index in parallel and execute the video encoding application for the video segment of the EP value set for the corresponding EP index.
[0102] When the specified number of times is reached, the server processor 250 may perform video content encoding using the highest quality EP value in step 617. For example, the server processor 250 may perform encoding for each entire video scene (e.g., a video segment included in each video scene) having the highest quality EP value.
[0103] In step 619, the server processor 250 may check whether an end event has occurred indicating the end of encoding the video content. If any end event has occurred, the server processor 250 may terminate the function of calculating and applying the preferred EP value. On the other hand, if no end event has occurred, the server processor 250 may return to step 601, obtain other video content, and re-execute subsequent operations.
[0104] As described above, according to one embodiment of the present invention, a method for adaptively operating encoding parameters can extract at least one video clip for each scene of video content, calculate encoding parameter values indicating preferred quality for a specific video clip (or at least one frame included in a specific video clip) for at least some of a plurality of encoding parameter values belonging to a video encoder, and perform video encoding on the video content including the entire scene in a manner similar to encoding one scene to which the plurality of video clips belong by using the calculated encoding parameter values, thereby obtaining an encoding result having preferred quality. Since a plurality of video clips belonging to a video scene have the same or similar picture characteristics, they can be encoded with preferred quality even when the same encoding parameter values are applied. Therefore, the preferred encoding parameter values can be calculated and operated with a relatively small amount of calculation (for example, encoding a video clip corresponding to a portion of a scene).
[0105] In one example, regarding a method for adaptive encoding parameter operation, the server processor 250 may perform the steps of obtaining video content, segmenting the video content into video scenes, obtaining video clips corresponding to some of the corresponding video scenes, performing video encoding on each of the video clips based on EP values (encoding parameter values) of at least some of the encoding parameters among all encoding parameters associated with the video encoder to encode the video content, calculating a final encoding parameter value to be applied to each of the video clips based on the encoding results of the video encoding, and performing video encoding on the video content by applying the calculated final encoding parameter value to the video scene. The step of selecting (or calculating) the final encoding parameter value may be performed for each of the video clips. For example, for a specific video clip among the corresponding video clips, when the specified number of times is three, the server processor 250 may calculate a first encoding parameter value, a second encoding parameter value, and a third encoding parameter value, and determine the encoding parameter value with the highest quality as the final encoding parameter value. Regarding calculating the first encoding parameter value, the server processor 250 may select a first plurality of encoding parameters from among all encoding parameters associated with the video encoder and perform multiple video encoding operations on the specific video segment based on at least some of the encoding parameter values of the selected first plurality of encoding parameters, and calculate the first encoding parameter value with the highest quality by comparing the qualities of the multiple video encoding results. Regarding calculating the second encoding parameter value (or third encoding parameter value), the server processor 250 may select a second plurality of encoding parameters (or third plurality of encoding parameters) different from the first plurality of encoding parameters and perform multiple video encoding operations on the specific video segment based on at least some of the encoding parameter values of the selected encoding parameters, and calculate the second encoding parameter value (or third encoding parameter value) with the highest quality for the specific video segment by comparing the qualities of the multiple video encoding results. Finally, the server processor 250 may compare the video encoding qualities of the first to third encoding parameter values to select the encoding parameter value with the highest quality as the final encoding parameter value.
[0106] In another example, with respect to calculating the final encoding parameter value, the server processor 250 may perform the steps of classifying all encoding parameters by characteristics, sampling encoding parameters from each of the encoding parameter groups classified by characteristics, and video encoding the video clip by using at least some of the encoding parameter values set to the sampled encoding parameters, selecting a specific encoding parameter value indicating the highest quality encoding result, selecting multiple encoding parameters from a characteristic group including the specific encoding parameter value, video encoding the video clip based on the encoding parameter values set to the multiple selected encoding parameters, and calculating the encoding parameter value with the highest quality among the encoding results as the final encoding parameter value.
[0107] While the description contains many specific implementation details, these should not be construed as limitations on the scope of the disclosure or on what may be claimed, but rather as descriptions of features that may be specific to particular implementations of particular disclosures.
[0108] Furthermore, although this specification describes operations performed in a predetermined order with reference to the accompanying drawings, it should not be interpreted as requiring that the operations be performed sequentially or in the predetermined order illustrated to obtain the preferred results, or that all illustrated operations be performed. In some cases, multitasking and parallel processing may be advantageous. Furthermore, it should not be interpreted as requiring partitioning of various system components in all types of implementations. It should be understood that the described program components and systems are typically integrated into a single software product or packaged into multiple software products.
[0109] This specification illustrates the best mode of the present disclosure and provides examples to illustrate the present disclosure and enable those skilled in the art to make and use the present disclosure. The present disclosure is not limited by the specific terms used herein. Based on the above embodiments, those of ordinary skill in the art can modify, change or change the embodiments without departing from the scope of the present disclosure.
[0110] Therefore, the scope of the present disclosure should not be limited by the described embodiments, but should be defined by the appended claims.
[0111] [Description of Reference Signs]
[0112] 50: Network
[0113] 100: User terminal
[0114] 110: Communication circuit
[0115] 120: Memory
[0116] 130: Camera
[0117] 140: Display
[0118] 150: Processor
[0119] 160: Input unit
[0120] 200: Server device
[0121] 210: Server communication circuit
[0122] 220: Server storage
[0123] 240: Server Display
[0124] 250: Server processor
Claims
1. A method for operating adaptive video coding parameters, the method comprises the following steps: obtain video content by a server processor of a server device; segment the video content into video scenes; obtain video segments corresponding to some of the respective video scenes; perform video coding on each of the video segments based on coding parameter values set for at least some of all coding parameters related to encoding the video content by a video encoder; calculate final coding parameter values to be applied to each of the video segments based on the coding results of the video coding; and perform video coding on the video content by applying the calculated final coding parameter values to the video scenes, wherein the step of calculating the final coding parameter values comprises: assign array indices to the coding parameter values of the at least some coding parameters, select multiple array indices from among the array indices according to a predefined scheme, and perform coding on the video segments based on multiple coding parameter values corresponding to the selected array indices to detect coding parameter values of a preferred quality.
2. The method according to claim 1, wherein, the step of calculating the coding parameter values of the preferred quality comprises: select a first plurality of coding parameters from among all coding parameters related to the video encoder, and perform multiple video codings on a specific video segment by using multiple coding parameter values set as the selected first plurality of coding parameters; and calculate a first coding parameter value of the highest quality by comparing the qualities of the multiple video coding results.
3. The method according to claim 2, wherein, the step of calculating the coding parameter values of the preferred quality comprises: select a second plurality of coding parameters different from the first plurality of coding parameters, and perform multiple video codings on the specific video segment by using multiple coding parameter values set as the selected second plurality of coding parameters; calculate a second coding parameter value of the highest quality for the specific video segment by comparing the qualities of the multiple video coding results; and compare the video coding quality of the first coding parameter value and the video coding quality of the second coding parameter value with each other to select the coding parameter value of the highest quality as the final coding parameter value.
4. The method according to claim 3, the method further comprises the following steps: perform video coding on the video scene to which the specific video segment belongs based on the final coding parameter values.
5. The method according to claim 1, wherein, the step of calculating the final coding parameter values comprises: classify all the coding parameters according to characteristics; sample coding parameters from each of the groups of coding parameters classified according to the characteristics, and perform video coding on the video segments by using coding parameter values set as the sampled coding parameters; select multiple coding parameters from the group including specific coding parameter values indicating the highest quality coding results; perform video coding on the video segments based on coding parameter values set as the selected multiple coding parameters; and calculate the coding parameter value of the highest quality among the coding results as the final coding parameter.
6. The method according to claim 1, the method further comprises the following steps: defining all the encoding parameters as array indices, wherein the step of defining the array indices comprises at least one of the following items: generating the array index by sorting predefined assignable values for an encoding parameter having a finite encoding parameter length; generating array indices having a finite number by discretizing an encoding parameter having continuous values by using quantization; or generating an array index by sorting classification sequence encoding parameters based on computational complexity.
7. The method according to claim 1, wherein, the step of performing video encoding on each of the video segments comprises: performing downsampling on each of the video segments; and performing video encoding on the downsampled video segments.
8. A server device supporting adaptive video encoding parameter operations, the server device comprises: a server memory storing video content; and a server processor functionally connected to the server memory, the server processor being configured to: obtain video content, segment the video content into video scenes, obtain video segments corresponding to some of the respective video scenes, perform video encoding on each of the video segments based on encoding parameter values set for at least some of all encoding parameters related to encoding the video content by a video encoder, calculate final encoding parameter values to be applied to each of the video segments based on the encoding results of the video encoding, and perform video encoding on the video content by applying the calculated final encoding parameter values to the video scenes, and the server processor being configured to: assign array indices to the encoding parameter values of the at least some encoding parameters, select a plurality of array indices from among the array indices according to a predefined scheme, and perform encoding on the video segments based on a plurality of encoding parameter values corresponding to the selected array indices to detect encoding parameter values of a preferred quality.
9. The server device according to claim 8, wherein, the server processor is configured to: select a first plurality of encoding parameters from among all encoding parameters related to the video encoder, perform a plurality of video encodings on a specific video segment by using a plurality of encoding parameter values set as the selected first plurality of encoding parameters, and calculate a first encoding parameter value of the highest quality by comparing the qualities of the plurality of video encoding results.
10. The server device according to claim 9, wherein, the server processor is configured to: Select a second plurality of encoding parameters different from the first plurality of encoding parameters, perform a plurality of video encodings on the specific video segment by using a plurality of encoding parameter values set to the selected second plurality of encoding parameters, calculate a second encoding parameter value of the highest quality for the specific video segment by comparing the qualities of the plurality of video encoding results, and compare the video encoding quality of the first encoding parameter value and the video encoding quality of the second encoding parameter value with each other to select the encoding parameter value of the highest quality as the final encoding parameter value.
11. The server device according to claim 10, wherein, the server processor is configured to: Perform video encoding on the video scene to which the specific video segment belongs based on the final encoding parameter value.
12. The server device according to claim 8, wherein, the server processor is configured to: Classify all the encoding parameters according to characteristics, perform video encoding on the video segment based on the encoding parameter values of the encoding parameters sampled from the encoding parameter groups classified according to the characteristics, select a plurality of encoding parameters from the group including specific encoding parameter values indicating the highest quality encoding results, perform video encoding on the video segment based on the encoding parameter values set to the selected plurality of encoding parameters, and calculate the encoding parameter value of the highest quality among the encoding results as the final encoding parameter.
13. The server device according to claim 8, wherein, the server processor is configured to: Regarding defining all the encoding parameters as array indices, Generate the array indices by sorting the predefined assignable values for the encoding parameters with a limited encoding parameter length, Generate array indices with a limited number by discretizing the encoding parameters with continuous values by using quantization, or Generate array indices by sorting the classification sequence encoding parameters based on computational complexity.
14. The server device according to claim 8, wherein, the server processor is configured to: Perform downsampling for each of the video segments, and perform video encoding on the downsampled video segments.