WO-2026090797-A1 - VIDEO PRODUCTION METHOD AND APPARATUS, ELECTRONIC DEVICE, AND STORAGE MEDIUM
Abstract
The present disclosure provides a video production method and apparatus, an electronic device, and a storage medium. The method comprises: when a video file is produced using high dynamic range (HDR) imaging technology, determining first metadata information, the first metadata information being metadata information related to ambient light; and writing the first metadata information into header file information of the video file. The present disclosure expands metadata information of the video file, improves the display effect of video files produced under different ambient light conditions, and improves the availability of HDR technology.
Inventors
- XIA, Hongrui
Assignees
- 北京小米移动软件有限公司
Dates
- Publication Date
- 20260507
- Application Date
- 20241028
Claims (13)
- A video production method, characterized in that the method includes: When creating a video file using high dynamic range imaging technology, first metadata information is determined, which is metadata information related to ambient light. The first metadata information is written into the header information of the video file.
- The method according to claim 1, wherein the first metadata information includes at least one of the following: The first value indicates the ratio of the maximum values of the three primary color RGB components in each frame of the video file to different grayscale intervals. A first identifier is used to identify whether the first metadata information needs to be considered when adjusting the brightness mapping curve of the video file during playback. The second identifier is used to identify whether the first metadata information needs to be considered when adjusting the color mapping curve of the video file when playing the video file; The second value indicates the ambient light illuminance value when the video file was created.
- The method according to claim 2, characterized in that determining the first value includes: The grayscale range supported by the video file is divided to obtain multiple grayscale intervals; The first value is obtained by calculating the ratio of the maximum value of the RGB component in each frame of the video file to different grayscale intervals; wherein each grayscale interval corresponds to one first value.
- The method according to claim 2 or 3, characterized in that the method further comprises: A first luminance mapping curve is generated under the ambient light conditions used to create the video file. The first identifier is used to identify that when playing the video file, the first metadata information needs to be considered to adjust the brightness mapping curve of the video file, and a brightness adjustment coefficient is generated based on the second value and the first value; The first brightness mapping curve is segmented according to the grayscale intervals to obtain multiple segmented brightness mapping curves; wherein the number of segmented brightness mapping curves is equal to the number of grayscale intervals; A second brightness mapping curve is generated based on each of the segmented brightness mapping curves and the corresponding brightness adjustment coefficients.
- The method according to claim 4, characterized in that, If the second value is greater than or equal to the illuminance threshold, and the first value corresponding to the first grayscale interval is the largest, then the weight value of the brightness adjustment coefficient corresponding to the first grayscale interval is the largest. If the second value is greater than or equal to the illuminance threshold, and the first value corresponding to the second grayscale interval is the largest, then the weight value of the brightness adjustment coefficient corresponding to the first grayscale interval and the second grayscale interval is greater than the weight value of the brightness adjustment coefficient corresponding to the third grayscale interval. If the second value is greater than or equal to the illuminance threshold, and the first value corresponding to the third grayscale interval is the largest, then the weight value of the brightness adjustment coefficient corresponding to the second grayscale interval and the third grayscale interval is greater than the weight value of the brightness adjustment coefficient corresponding to the first grayscale interval. Wherein, the maximum value of the first grayscale interval is less than the first grayscale threshold, and the third grayscale... The minimum value of the interval is greater than the second gray level threshold, the minimum value of the second gray level interval is greater than the first gray level threshold, and the maximum value of the second gray level interval is less than the second gray level threshold, and the first gray level threshold is less than the second gray level threshold.
- The method according to claim 4, characterized in that, If the second value is less than the illuminance threshold and the first value corresponding to the first grayscale interval is the largest, then the weight value of the brightness adjustment coefficient corresponding to the first grayscale interval is the largest. If the second value is less than the illuminance threshold and the first value corresponding to the second grayscale interval is the largest, then the weight values of the brightness adjustment coefficients corresponding to the first grayscale interval, the second grayscale interval, and the third grayscale interval are equal. If the second value is less than the illuminance threshold and the first value corresponding to the third grayscale interval is the largest, then the weight value of the brightness adjustment coefficient corresponding to the second grayscale interval and the first grayscale interval is greater than the weight value of the brightness adjustment coefficient corresponding to the third grayscale interval. Wherein, the maximum value of the first gray level interval is less than the first gray level threshold, the minimum value of the third gray level interval is greater than the second gray level threshold, the minimum value of the second gray level interval is greater than the first gray level threshold and the maximum value of the second gray level interval is less than the second gray level threshold, and the first gray level threshold is less than the second gray level threshold.
- The method according to any one of claims 4-6, characterized in that the method further comprises: For any gray level value, determine the fourth gray level interval to which the gray level value belongs; In the second brightness mapping curve, the maximum gray level value of the fourth gray level interval and the minimum gray level value of the fifth gray level interval are determined; wherein, the fifth gray level interval is adjacent to the fourth gray level interval, and the maximum gray level value of the fifth gray level interval is greater than or equal to the maximum gray level value of the fourth gray level interval. Based on the brightness values corresponding to the maximum gray level value in the fourth gray level interval and the minimum gray level value in the fifth gray level interval, a fitting curve is calculated. Substituting the grayscale values into the fitted curve yields a third brightness mapping curve after smoothing the second brightness mapping curve.
- The method according to any one of claims 4-7, characterized in that the method further comprises: The second identifier is used to identify that when playing the video file, the first metadata information needs to be considered to adjust the color mapping curve of the video file. Based on the second value, a color adjustment coefficient is calculated; wherein, different brightness and/or different hue grayscale values correspond to different color adjustment coefficients. The first identifier is used to identify that when playing the video file, it is not necessary to consider the first metadata information to adjust the brightness mapping curve of the video file, and a first color mapping curve is generated based on the color adjustment coefficient and the first brightness mapping curve; or The first identifier is used to identify that when playing the video file, the first metadata information needs to be considered to adjust the brightness mapping curve of the video file, and a second color mapping curve is generated based on the color adjustment coefficient and the second brightness mapping curve; or The first identifier is used to identify whether the first metadata needs to be considered when playing the video file. The information is used to adjust the brightness mapping curve of the video file, and a third color mapping curve is generated based on the color adjustment coefficient and the third brightness mapping curve.
- The method according to claim 8, characterized in that, When the saturation is greater than the saturation threshold, the color adjustment coefficient is at its maximum and equal to the third value; and/or The color is a memory color, and the color adjustment coefficient is 1; and/or The saturation is less than or equal to the saturation threshold and/or the color is not a memory color, and the color adjustment coefficient is greater than 1 and less than the third value.
- A video production apparatus, characterized in that the apparatus comprises: The processing module is configured to determine first metadata information when creating a video file using high dynamic range imaging technology, wherein the first metadata information is metadata information related to ambient light. The processing module is also configured to write the first metadata information into the header information of the video file.
- An electronic device, characterized in that it comprises: One or more processors; The processor is used to execute the video production method according to any one of claims 1-9.
- A storage medium storing instructions, characterized in that, when the instructions are executed on an electronic device, the electronic device performs the video production method as described in any one of claims 1-9.
- A computer program product includes a computer program, characterized in that, when executed by a processor, the computer program is used to implement the video production method according to any one of claims 1-9.
Description
Video production methods and apparatus, electronic devices and storage media Technical Field This disclosure relates to the field of image processing, and more particularly to video production methods and apparatus, electronic devices, and storage media. Background Technology High Dynamic Range Imaging (HDRI or HDR) is a set of techniques used in computer graphics and cinematography to achieve a greater dynamic range of exposure (i.e., a greater difference in brightness) than ordinary digital imaging techniques. Summary of the Invention To improve the usability of HDR technology, this disclosure provides a video production method and apparatus, an electronic device, and a storage medium. According to a first aspect of the present disclosure, a video production method is provided, the method comprising: When creating a video file using high dynamic range imaging technology, first metadata information is determined, which is metadata information related to ambient light. The first metadata information is written into the header information of the video file. According to a second aspect of the present disclosure, a video production apparatus is provided, the apparatus comprising: The processing module is configured to determine first metadata information when producing a video file using high dynamic range imaging technology, wherein the first metadata information is metadata information related to ambient light. The processing module is also configured to write the first metadata information into the header information of the video file. According to a third aspect of the present disclosure, an electronic device is provided, comprising: One or more processors; The processor is used to execute the video production method described in any one of the first aspects. According to a fourth aspect of the present disclosure, a storage medium is provided that stores instructions that, when executed on an electronic device, cause the electronic device to perform the video production method as described in any one of the first aspects. According to a fifth aspect of the present disclosure, a computer program product is provided, including a computer program that, when executed by a processor, is used to implement the video production method described in any one of the first aspects. In this embodiment of the disclosure, when creating video files using HDR technology, first metadata information related to ambient light can be written into the header information, which expands the metadata information of the video file, improves the display effect of video files created under different ambient light conditions, and enhances the usability of HDR technology. It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention. Figure 1 is an exemplary flowchart of a video production method provided according to an embodiment of the present disclosure. Figure 2 is another exemplary flowchart of a video production method provided according to an embodiment of the present disclosure. Figure 3 is an exemplary block diagram of an electronic device provided according to an embodiment of the present disclosure. Figure 4A is an exemplary interactive schematic diagram of an electronic device provided according to an embodiment of the present disclosure. Figure 4B is an exemplary interactive schematic diagram of a chip provided according to an embodiment of the present disclosure. Detailed Implementation Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the invention as detailed in the appended claims. This disclosure provides a video production method and apparatus, electronic device, and storage medium. In a first aspect, embodiments of this disclosure propose a video production method, the method comprising: when producing a video file using high dynamic range imaging technology, determining first metadata information, wherein the first metadata information is metadata information related to ambient light; and writing the first metadata information into the header information of the video file. In the above embodiments, the metadata information of the video file is expanded, the display effect of video files produced u