Dynamic picture packaging method, device and equipment, storage medium and program product

By encoding and encapsulating the attribute information of dynamic images, a unified dynamic image format is generated, which solves the interoperability problem between different manufacturers, improves user experience, and enhances the industry ecosystem.

CN121644937APending Publication Date: 2026-03-10GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-06
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

The lack of a unified standard for encapsulating dynamic images in existing technologies leads to the inability of dynamic images from different manufacturers to communicate with each other, resulting in ecosystem fragmentation and a decline in user experience.

Method used

The attribute information of dynamic images is encoded and encapsulated using scalable metadata platform information to generate a unified dynamic image format, ensuring correct end-to-end recognition and parsing.

Benefits of technology

It enables the correct recognition and parsing of animated images across different devices and systems, improving user experience and promoting the improvement of the animated image industry ecosystem.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121644937A_ABST
    Figure CN121644937A_ABST
Patent Text Reader

Abstract

The invention discloses a dynamic picture packaging method and device, equipment, a storage medium and a program product. The method comprises the following steps: acquiring a first shot picture and a first shot video; encoding the attribute information of the first picture and the first video to generate extensible metadata platform information in a preset picture format; and packaging the first picture and the first video based on a preset picture format to generate a dynamic picture file. Thus, it can be guaranteed that the dynamic pictures can be correctly recognized and analyzed during end-to-end sharing, a uniform packaging format is adopted, and further improvement of the dynamic picture industry ecology can be promoted.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of picture processing, in particular to a dynamic picture packaging method and device, equipment, storage medium and program product. BACKGROUND

[0002] The current dynamic picture is widely used in electronic devices of various manufacturers and operating systems. The dynamic picture, also known as a live photo, is displayed in the form of a static picture in the gallery, and the user can quickly play the video by long pressing, etc. It is often used to capture exciting moments, making the photo more lively.

[0003] However, there is no uniform standard for packaging dynamic pictures, so that the existing dynamic picture scheme may have some defects. For example, due to the different packaging formats of various manufacturers, when using the picture viewing software of other manufacturers, the dynamic picture may not be recognized, so that the video cannot be normally played. In addition, the non-uniform packaging standard also causes serious ecological fragmentation, which is not conducive to the development of the dynamic picture industry ecology. SUMMARY

[0004] The present application provides a dynamic picture packaging method, device, equipment, storage medium and program product, which can ensure that the dynamic picture can be correctly recognized and analyzed when sharing end to end, and the uniform packaging format can also promote the further improvement of the dynamic picture industry ecology.

[0005] To achieve the above purpose, the technical scheme of the present application is as follows:

[0006] In a first aspect, the embodiments of the present application provide a dynamic picture packaging method, which comprises:

[0007] Obtaining a first picture and a first video taken;

[0008] Encoding the attribute information of the first picture and the first video to generate extensible metadata platform information in a preset picture format;

[0009] Packaging the first picture and the first video based on the preset picture format to generate a dynamic picture file.

[0010] In a second aspect, the embodiments of the present application provide a dynamic picture packaging method, which comprises:

[0011] Obtaining a dynamic picture file;

[0012] Decoding the dynamic picture file to determine the first picture and the extensible metadata platform information;

[0013] Decoding the dynamic picture file according to the extensible metadata platform information to determine the first video and / or the extended information.

[0014] In a third aspect, an embodiment of the present application provides a dynamic picture packaging apparatus, which comprises an acquisition unit, an encoding unit and a packaging unit, wherein:

[0015] The acquisition unit is configured to acquire a first picture and a first video.

[0016] The encoding unit is configured to encode attribute information of the first picture and the first video, to generate extensible metadata platform information in a preset picture format.

[0017] The packaging unit is configured to package the first picture and the first video based on the preset picture format, to generate a dynamic picture file.

[0018] In a fourth aspect, an embodiment of the present application provides a dynamic picture packaging apparatus, which comprises an acquisition unit and a decoding unit, wherein:

[0019] The acquisition unit is configured to acquire a dynamic picture file.

[0020] The decoding unit is configured to decode the dynamic picture file, to determine a first picture and extensible metadata platform information; and decode the dynamic picture file according to the extensible metadata platform information, to determine a first video and / or extension information.

[0021] In a fifth aspect, an embodiment of the present application provides an electronic device, which comprises a memory and a processor, wherein:

[0022] The memory is configured to store a computer program capable of running on the processor.

[0023] The processor is configured to execute the method in the first aspect or the method in the second aspect when the computer program is running.

[0024] In a sixth aspect, an embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the method in the first aspect or the method in the second aspect.

[0025] In a seventh aspect, an embodiment of the present application provides a computer program product, which comprises a computer program or instructions, and the computer program or instructions are executed by a processor to implement the method in the first aspect or the method in the second aspect.

[0026] The dynamic image encapsulation method, apparatus, device, storage medium, and program product provided in this application embodiment first acquires a captured first image and a first video. Then, the attribute information of the first image and the first video is encoded to generate extensible metadata platform information in a preset image format. Next, the first image and the first video are encapsulated based on the preset image format to generate a dynamic image file. Alternatively, after acquiring the dynamic image file, the dynamic image file is decoded to determine the first image and the extensible metadata platform information. The dynamic image file is then decoded based on the extensible metadata platform information to determine the first video and / or extended information. In this way, after generating the extensible metadata platform information in the preset image format based on the attribute information of the first image and the first video, the dynamic image is encapsulated and packaged based on the preset image format. Because a unified dynamic image encapsulation format is used, it ensures that the dynamic image can be correctly identified and parsed during end-to-end sharing. Furthermore, the extensible metadata platform information includes the offset information of the first video for accurate reading. This ensures consistent presentation effects across different manufacturers, promotes the further improvement of the dynamic image industry ecosystem, and enhances the universality of dynamic images. Attached Figure Description

[0027] Figure 1 A flowchart illustrating a dynamic image encapsulation method provided in this application embodiment. Figure 1 ;

[0028] Figure 2 This is a schematic diagram of the storage structure of a dynamic image file provided in an embodiment of this application;

[0029] Figure 3 A flowchart illustrating a dynamic image encapsulation method provided in this application embodiment. Figure 2 ;

[0030] Figure 4 A schematic diagram of the encapsulation definition of a dynamic image file provided in this application embodiment. Figure 1 ;

[0031] Figure 5 A schematic diagram of the encapsulation definition of a dynamic image file provided in this application embodiment. Figure 2 ;

[0032] Figure 6 A flowchart illustrating a dynamic image encapsulation method provided in this application embodiment. Figure 3 ;

[0033] Figure 7 A schematic diagram of the encapsulation definition of a dynamic image file provided in this application embodiment. Figure 3 ;

[0034] Figure 8A dynamic picture file encapsulation definition schematic provided by an embodiment of the present application Figure 4 ;

[0035] Figure 9 A dynamic picture encapsulation method flow schematic provided by an embodiment of the present application Figure 4 ;

[0036] Figure 10 A dynamic picture encapsulation device component structure schematic provided by an embodiment of the present application Figure 1 ;

[0037] Figure 11 A dynamic picture encapsulation device component structure schematic provided by an embodiment of the present application Figure 2 ;

[0038] Figure 12 A specific hardware structure schematic of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0039] In order to enable more detailed understanding of the features and technical contents of the embodiments of the present application, the implementation of the embodiments of the present application will be described in detail below with reference to the accompanying drawings, which are only used for reference and are not intended to limit the embodiments of the present application.

[0040] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.

[0041] It should be noted that the terms "first", "second", and "third" involved in the embodiments of the present application are only used to distinguish similar objects, and do not represent a specific order of the objects. It can be understood that "first", "second", and "third" can be interchanged in a specific order or sequence as allowed, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0042] It should also be noted that in the following description, "some embodiments" are described, which describe a subset of all possible embodiments, but it can be understood that "some embodiments" can be the same subset or different subset of all possible embodiments, and can be combined with each other without conflict.

[0043] It should be understood that the term "and / or" herein is only a description of the association relationship between the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent the three cases of A alone, A and B together, and B alone. In addition, the character " / " in this paper generally represents an "or" relationship between the associated objects before and after it.

[0044] It should also be understood that before the embodiments of the present application are further described in detail, the terms and phrases involved in the embodiments of the present application are explained, which are applicable to the following explanations:

[0045] Joint Photographic Experts Group (JPEG), JPEG is a widely used image format, but it will introduce more distortion at a higher compression rate;

[0046] High Efficiency Image File Format (HEIF), HEIF is a modern image format that uses an efficient compression algorithm to maintain high-quality images at a smaller file size; sometimes also called HEIC (High Efficiency Image File Coding), the file name usually has a.heif or.heic suffix.

[0047] AV1 Image File Format (AVIF), which is based on the AV1 codec developed by the Alliance for Open Media (AOM) for web image format;

[0048] Start of Image (SOI), which is a marker bit in a JPEG image used to describe the beginning;

[0049] End of Image (EOI), which is a marker bit in a JPEG image used to describe the end;

[0050] ISO Base Media File Format (ISO-BMFF), BMFF-Box is a data unit conforming to the BMFF format standard and used to encapsulate specific types of data units;

[0051] Extensible Metadata Platform (XMP);

[0052] Exchangeable image file format (EXIF);

[0053] Primary;

[0054] Gainmap;

[0055] Field of View (FOV);

[0056] Standard Dynamic Range (SDR), the details in SDR picture are relatively weak, and there may be details loss in bright and dark areas;

[0057] High Dynamic Range (HDR), HDR can better show the details in the picture, whether in bright or dark area, HDR picture can better present the texture of the picture;

[0058] MOV (Movie Format), that is, QuickTime packaging format, is a kind of audio, video file packaging, used to store common digital media types;

[0059] MPEG-4 (4th Moving Picture Experts Group) or MP4 for short, is a kind of video packaging standard proposed by Moving Picture Experts Group, which is a set of compression and encoding standards for audio and video information.

[0060] It should also be understood that the current dynamic picture is widely used in electronic devices of various manufacturers and operating systems. Dynamic picture, also known as Live Photo, refers to a picture that can play video. When the dynamic picture is not triggered, the dynamic picture displays the cover picture content, and when the dynamic picture is triggered, the dynamic picture will play the video content.

[0061] Live Photo technology is a scheme of packaging video in picture file. If the Live Photo function of the camera is turned on, the phone will record a fixed length (such as 1.5s) of image data before and after taking pictures, and the user can select different cover photos, add interesting effects, edit Live Photo photos, or share them with family and friends. It can be seen that LivePhoto actually has the characteristics of both pictures and videos, and cannot be simply attributed to pictures or videos. Since there is no uniform Live Photo standard in the industry, this function mainly depends on the private implementation of mobile phone manufacturers.

[0062] The key to the implementation of the Live Photo function lies in the encapsulation of the video. However, there is no uniform standard for encapsulating dynamic pictures at present, so that the existing dynamic picture scheme may have some defects. For example, when the dynamic picture of a manufacturer A is transmitted to the device of a manufacturer B, the dynamic picture may not be recognized and is parsed as a normal static photo, so that the video cannot be normally played, and the user experience is reduced. Due to the different encapsulation formats of various manufacturers, the subsequent three-party application (App) ecological support is relatively complex, the standard is not unified, the ecological fragmentation problem is serious, and it is not conducive to the development of the dynamic picture industry ecology.

[0063] Based on this, an embodiment of the present application provides a dynamic picture encapsulation method. After obtaining a first picture and a first video, the attribute information of the first picture and the first video is encoded to generate extensible metadata platform information in a preset picture format. The first picture and the first video are encapsulated based on the preset picture format to generate a dynamic picture file. In this way, the dynamic picture is encapsulated and packaged based on the preset picture format. Since a unified dynamic picture encapsulation format is adopted, the dynamic picture can be correctly recognized and parsed when shared end to end, and the extensible metadata platform information includes offset information of the first video and offset information of the extension information, so that the first video and the extension information can be accurately read. In this way, the presentation effects of various manufacturers are consistent, the further improvement of the dynamic picture industry ecology is promoted, and the universality of the dynamic picture is improved.

[0064] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0065] In an embodiment of the present application, Figure 1 a flowchart of a dynamic picture encapsulation method provided by an embodiment of the present application is shown in Figure 1 . As Figure 2 shown, the method can include:

[0066] S101, obtaining a first picture and a first video.

[0067] S102, encoding attribute information of the first picture and the first video to generate extensible metadata platform information in a preset picture format.

[0068] It should be noted that in the embodiment of the present application, the method is applied to a first device. The first picture can be a normally taken picture, or can also be a frame image in the first video. The first video can be obtained from a video stream, or can also come from a video file of a dynamic picture to be processed, which is not limited here.

[0069] It should be noted that in the embodiments of the present application, the attribute information of the first picture and the first video is encoded by using the extensible metadata platform information (i.e., XMP information) in the preset picture format, so that the first picture and the first video can be accurately decoded subsequently.

[0070] In some embodiments, the attribute information can include at least one of the following: offset information of the first video, length information of the first video, offset information of the extension information, indication information of whether the dynamic picture file is a dynamic picture, file format version of the dynamic picture file, and presentation timestamp of the video frame corresponding to the first picture.

[0071] In the embodiments of the present application, for the dynamic picture file, in addition to including the first picture and the first video, the extension information can also be included, which is used to store private data information of various manufacturers, such as video interpolation information, FOV view clipping information, etc.

[0072] Here, for the attribute information, the offset information of the first video specifically refers to the offset starting position of the first video relative to the dynamic picture file, which can be represented by VideoOffset; the length information of the first video can be represented by VideoLength; the offset information of the extension information specifically refers to the offset starting position of the extension information relative to the dynamic picture file, which can be represented by ExtensionOffset; the indication information of whether the dynamic picture file is a dynamic picture can be represented by MotionPhoto; the file format version of the dynamic picture file can be represented by MotionPhotoVersion; and the presentation timestamp of the video frame corresponding to the first picture can be represented by MotionPhotoPresentationTimestampUs.

[0073] Exemplarily, the default namespace prefix of the dynamic picture XMP information is GCamera, and Table 1 shows the related attribute information that can be displayed in the XMP information.

[0074] Table 1

[0075]

[0076]

[0077] S103, encapsulating the first picture and the first video based on the preset picture format to generate a dynamic picture file.

[0078] In the embodiments of the present application, the first picture and the first video can be packaged into a media file, i.e., a dynamic picture file (also referred to as "dynamic picture" for short) according to a preset picture format, and stored in the electronic device. After the dynamic picture file is generated, the dynamic picture is displayed in the gallery in the form of a static picture, and the user can quickly play the video by long pressing, etc., which is commonly used for capturing exciting moments, making the photo more lively, such as fireworks, diving, etc.

[0079] It should be noted that, in the embodiments of the present application, as shown in Figure 2 , the preset picture format can include two parts: a static picture part 201 and a video part 202. The static picture part 201 is used to store the main picture content, and the video part 202 is used to store the video file and the extension information, and the video part 202 is located after the static picture part 201. It should be noted that the attribute information in Table 1 is set in the XMP information of the main picture.

[0080] In some embodiments, the first picture and the first video are encapsulated based on the preset picture format, which can include: storing the first picture in the static picture part; and storing the first video in the video part.

[0081] That is, in the embodiments of the present application, the first picture is stored in the static picture part 201 as the main picture content in the dynamic picture, and the first video is stored in the video part 202.

[0082] It should also be noted that, still taking Figure 2 as an example, the video part 202 can include a video data subpart and an extensible subpart. The method further includes: storing the first video in the video data subpart; and after obtaining the extension information of the dynamic picture file, storing the extension information in the extensible subpart.

[0083] That is, in the embodiments of the present application, the first video is stored in the video data subpart as the video file in the dynamic picture, and the extension information is stored in the extensible subpart. In this way, when the first video and the extension information are included in the dynamic picture file at the same time, the offset information of the first video and the offset information of the extension information are included in the XMP information at this time, so that the first video and the extension information can be accurately read.

[0084] In some embodiments, the video part can be represented by a box, and the video data subpart and the extensible subpart can also be represented by a box. The data storage mode of the extension information is shown in Table 2.

[0085] Table 2

[0086]

[0087] As shown in Table 2, the related content is explained as follows:

[0088] size: 4 bytes of UInt, indicating the size of the box, including the size of the placeholder;

[0089] type: indicating the type of the box, usually consisting of four printable ASCII characters;

[0090] largeSize: 8 bytes of ULong, indicating that the box is large when the size is 1, wherein the size of the box is defined in this area.

[0091] In the embodiments of the present application, the data content in the extension information is stored in the form of key-value pairs. For example, if more information needs to be added, it can be saved in the form of multiple layers of key-value pairs.

[0092] It can be understood that, in the embodiments of the present application, the extensible part (box) for storing the extension information can be independent of the video part for the extension information, at this time the dynamic picture file includes a still picture part, a video part and an extensible part; or it can also be a subpart under the video part, that is, the aforementioned extensible subpart. Considering the actual application scenario, the embodiments of the present application are described by taking the extension information as a subpart (subbox) under the video part as an example, but are not limited thereto.

[0093] It can also be understood that, in the embodiments of the present application, the total length (size) of the dynamic picture file can include the length of the still picture part and the length of the video part. Here, the length of the still picture part 201 is equal to the offset of the video relative to the file, and the length of the video part is composed of the length of the video file and the length of the extension information. Moreover, according to the Figure X It can be seen that the extension information should be stored at the end of the dynamic picture (after the video file), and the main Figure 3 The length of "MotionPhoto" in MP should be the length of the original video file plus the length of the extension information.

[0094] This application provides a dynamic image encapsulation method. After generating XMP information in a preset image format based on the attribute information of a first image and a first video, the dynamic image is encapsulated and packaged based on the preset image format. A unified dynamic image encapsulation format is used here, which can ensure that the dynamic image can be correctly identified and parsed when shared end-to-end. Moreover, when the dynamic image file includes both a first video and extended information, the XMP information includes the offset information of the first video and the offset information of the extended information, so that the first video and extended information can be read accurately. This can ensure that the presentation effect of various manufacturers is consistent and promote the further improvement of the dynamic image industry ecosystem.

[0095] In another embodiment of this application, based on the dynamic image encapsulation method of the foregoing embodiments, the image format of the first image may include at least JPEG format and HEIF / AVIF format, and the video format of the first video may include at least MP4 format and MOV format, but is not limited thereto.

[0096] In other words, in this application embodiment, the encapsulation of dynamic images can theoretically be extended to any information, such as video super-resolution, post-processing information, etc., in addition to encapsulating the video frame interpolation information and FOV perspective cropping information mentioned above. Furthermore, in addition to encapsulating the MP4 video format mentioned in this technical solution, this application embodiment can also be extended to other video file formats such as MOV, etc., without any limitation.

[0097] In one possible implementation, Figure 2 A flowchart illustrating a dynamic image encapsulation method provided in this application embodiment. Figure 3 .like Figure 4 As shown, the method may include:

[0098] S301, confirm that the first image is in JPEG format.

[0099] S302, when the first image is a standard dynamic range type image, encapsulation is performed based on the image start bit, extensible metadata platform information, first image and image end bit in the static image portion, and the first video and / or extended information in the video portion.

[0100] In this embodiment, assuming the first image is an SDR type in JPEG format and the first video is an SDR / HDR type in MP4 format, the preset image format is as follows: Figure 4As shown, the static image portion includes the Start of Image (SOI), Exchangeable Image File Format (APP1: EXIF), Extensible Metadata Platform Information (APP2: XMP), Start of Scan (StartofScan), First Image, and End of Image (EOI). Then, video data (i.e., MotionPhoto), denoted as "mpvd", is added after the EOI of the JPEG image data to describe the video file and related extended information.

[0101] In addition, this application embodiment also allows manufacturers to add customized BMFF-Boxes, such as... Figure 5 This is an expandable sub-section within the 'mpvd' box, used to store private data. This customized box must conform to the BMFF standard and can be stored as a sub-box within the 'mpvd' box.

[0102] S303, when the first image is a high dynamic range type image, encapsulation is performed based on the main image portion and gain image portion in the static image portion and the first video and / or extended information in the video portion; wherein, the main image portion includes the main image start bit, extensible metadata platform information, the first image and the main image end bit.

[0103] In this embodiment, assuming the first image is an HDR type in JPEG format and the first video is an SDR / HDR type in MP4 format, the preset image format is as follows: Figure 5 As shown, the static image portion includes a main image portion and a gain image portion. The main image portion may include the start of main image (SOI), extensible metadata platform information (APP1: XMP), multiple data files (APP2: MPF), the first image, and the end of main image (EOI), etc. The gain image portion includes the start of gain image (SOI), private extensible metadata platform information (APP1: XMP), start of scan (StartofScan), the gain image of the first image, and the end of gain image (EOI), etc. Then, video data (i.e., MotionPhoto), which can also be represented as "mpvd", is added after the EOI of the gain image to describe the video file and related extended information.

[0104] like Figure 5 As shown, based on Google's Ultra-HDR format, a MotionPhoto field is added to the main image's XMP file to describe video file information. Video data is added after the gain map, and manufacturers can customize a Box to store proprietary information at the end of the file. This customized Box must conform to the BMFF standard and is stored as a sub-box within the 'mpvd' box.

[0105] For example, forFigure 5 Regarding the Extensible Metadata Platform Information (APP1:XMP) 501, its code description is as follows:

[0106]

[0107]

[0108] For example, for Figure 6 Regarding the private extensible metadata platform information (APP1:XMP) 502 in the system, its code description is as follows:

[0109]

[0110]

[0111] In another possible implementation Figure 3 A flowchart illustrating a dynamic image encapsulation method provided in this application embodiment. Figure 6 .like Figure 7 As shown, the method may include:

[0112] S601, confirm that the first image is in HEIF / AVIF format.

[0113] S602, when the first image is a standard dynamic range type image, encapsulation is performed based on the mdat data block, meta data block, and free data block in the static image part, as well as the first video and / or extended information in the video part, wherein the first image and the extensible metadata platform information are both located in the mdat data block.

[0114] In this embodiment, assuming the first image is an SDR type in HEIF / AVIF format and the first video is an SDR / HDR type in MP4 format, the preset image format is as follows: Figure 7 As shown, the static image section includes an mdat data block, a meta data block, and a free data block. Then, video data (i.e., MotionPhoto), which can also be represented as "mpvd", is added after the free data block to describe the video file and related extended information. The mdat data block includes Title 1 (tiles1), Title 2 (tiles2), EXIF, and XMP, etc.

[0115] In other words, in this embodiment, MotionPhoto video data is added to the end of the main image file (HEIF / AVIF) to describe the video file and related extended information. Additionally, manufacturers are allowed to add customized BMFF-Boxes to store proprietary data. These customized Boxes must conform to the BMFF standard and are stored as sub-boxes within the 'mpvd' box.

[0116] For example, for Figure 7 For XMP 701 in the mdat data block, its code description is as follows:

[0117]

[0118]

[0119] For example, for Figure 7 For XMP 702 in the mdat data block, its code description is as follows:

[0120]

[0121]

[0122] For example, for Figure 8 Taking the expandable (sub-part) 703 in the mpvd section as an example, with 8 expanded information entries, its code description is as follows: [

[0124] {"length":437368,"name":"local.hdr.linear.mask","offset":478741,"version":1},

[0125] {"length":144,"name":"local.hdr.meta.data","offset":41373,"version":1},

[0126] {"length":4,"name":"private.emptyspace","offset":478927,"version":1},

[0127] {"length":41209,"name":"watermark","offset":41229,"version":1},

[0128] {"length":72,"name":"watermark.color","offset":478813,"version":1},

[0129] {"length":20,"name":"watermark.config","offset":20,"version":1},

[0130] {"length":47,"name":"watermark.device","offset":478923,"version":1},

[0131] {"length":63,"name":"watermark.params","offset":478876,"version":1}

[0132] jxrs-

[0133] S603, when the first image is a high dynamic range type image, it is encapsulated based on the mdat data block, meta data block and free data block in the static image part and the first video and / or extended information in the video part; wherein, the first image, the gain image corresponding to the first image and the extensible metadata platform information are all located in the mdat data block.

[0134] In this embodiment, assuming the first image is an HDR type in HEIF / AVIF format and the first video is an SDR / HDR type in MP4 format, the preset image format is as follows: Figure 8 As shown, the static image section includes an mdat data block, a meta data block, and a free data block. Then, video data (i.e., MotionPhoto), which can also be represented as "mpvd", is added after the free data block to describe the video file and related extended information. The mdat data block includes Tiles1, Tiles2, Gainmap, EXIF, and XMP, among other things.

[0135] In other words, in this embodiment, MotionPhoto video data is added to the end of the main image file (HEIF / AVIF) to describe the video file and related extended information. Additionally, manufacturers are allowed to add customized BMFF-Boxes to store proprietary data. These customized Boxes must conform to the BMFF standard and are stored as sub-boxes within the 'mpvd' box.

[0136] For example, for Figure 8For XMP 801 in the mdat data block, its code description is as follows:

[0137]

[0138]

[0139] For example, for Figure 8 For XMP 802 in the mdat data block, the code description is as follows:

[0140]

[0141]

[0142] For example, for Figure 9 Taking the extensible (sub-part) 803 in the mpvd section as an example, with 8 extended information entries, its code description is as follows: [

[0144] {"length":437368,"name":"local.hdr.linear.mask","offset":478741,"version":1},

[0145] {"length":144,"name":"local.hdr.meta.data","offset":41373,"version":1},

[0146] {"length":4,"name":"private.emptyspace","offset":478927,"version":1},

[0147] {"length":41209,"name":"watermark","offset":41229,"version":1},

[0148] {"length":72,"name":"watermark.color","offset":478813,"version":1},

[0149] {"length":20,"name":"watermark.config","offset":20,"version":1},

[0150] {"length":47,"name":"watermark.device","offset":478923,"version":1},

[0151] {"length":63,"name":"watermark.params","offset":478876,"version":1}

[0152] jxrs-

[0153] It is also understandable that after obtaining the animated image file, it can be decoded. In some embodiments, the method may further include: decoding the animated image file to determine a first image and extensible metadata platform information; and decoding the animated image file based on the extensible metadata platform information to determine a first video and / or extended information.

[0154] In this embodiment, the animated image file can be generated by the device itself or it can be from a peer device (e.g., a second device). Regardless of whether the animated image file is generated by the device itself or from a second device, it can be decoded to obtain the first video and / or extended information.

[0155] In this embodiment, if the animated image file does not include extended information, the first video can be determined by decoding the animated image file based on the extensible metadata platform information. If the animated image file includes extended information, the first video and the extended information can be determined by decoding the animated image file based on the extensible metadata platform information.

[0156] In this embodiment of the application, the scalable metadata platform information includes at least the offset information of the first video and the offset information of the extended information. In this case, the storage location of the first video in the dynamic image file can be accurately read based on the offset information of the first video, and the storage location of the extended information in the dynamic image file can be accurately read based on the offset information of the extended information, thereby enabling precise reading of the first video and the extended information.

[0157] It is also understood that, in this embodiment of the application, the application scenario is not limited to dynamic vehicles, but can be applied to any scenario of packaging images / photos and videos in any field; in addition, various image formats such as JPEG, HEIF, and AVIF can be used; moreover, this embodiment of the application stores extended information through the scalable dynamic information XMP method, which is more flexible in implementation and has strong scalability.

[0158] In other words, this application provides a method for encapsulating dynamic images, specifically proposing a packaged dynamic image encapsulation standard. This standard packages image files (i.e., the aforementioned "first image") and video files (i.e., the aforementioned "first video") into a single media file and stores it in an electronic device. When encapsulating the file, extended information (such as video frame interpolation information, FOV cropping information, etc.) can be added according to this standard. When used by the application, the extended information is obtained by parsing the dynamic image file using this standard, resulting in a wider range of higher-quality user experiences for the dynamic images and thus improving their universality.

[0159] In another embodiment of this application, based on the dynamic image encapsulation method described in the foregoing embodiments, Figure 4 A flowchart illustrating a dynamic image encapsulation method provided in this application embodiment. Figure 9 .like Figure 2 As shown, the method may include:

[0160] S901, retrieve animated image files.

[0161] It should be noted that in this embodiment, the method is applied to a second device. The first and second devices can communicate interactively. After generating a dynamic image file, the first device can transmit the dynamic image file to the second device, which then performs decoding. In other words, the dynamic image file obtained here can be sent by the first device, or, if the second device has encoding and encapsulation capabilities, the dynamic image file can be encapsulated and generated by the second device itself.

[0162] It should also be noted that, in this embodiment, the animated image file obtained here is stored in the gallery as a static image, and the user can quickly play the video by long-pressing or other methods. That is to say, the animated image file may include two parts: a static image part and a video part. The static image part is used to store the main image content, and the video part is used to store the video file and extended information, and the video part is located after the static image part.

[0163] It should also be noted that, in this embodiment, the animated image file is generated by encapsulating a first image and a first video according to a preset image format. Specifically, the first image is stored as the main image content in the animated image within the static image section, while the first video is stored within the video section.

[0164] S902 decodes the animated image file to determine the first image and the extensible metadata platform information.

[0165] S903 decodes the dynamic image file based on the extensible metadata platform information to determine the first video and / or extended information.

[0166] In this embodiment, the animated image file is first decoded to obtain a first image and extensible metadata platform information. This extensible metadata platform information stores attribute information for the first image and the first video. Here, the attribute information may include at least one of the following: offset information of the first video, length information of the first video, offset information of the extended information, indication information indicating whether the animated image file is an animated image, file format version of the animated image file, and the presentation timestamp of the video frame corresponding to the first image, as shown in Table 1 above. Based on the attribute information in the extensible metadata platform information, the first video and / or extended information can be accurately decoded.

[0167] It should be noted that animated image files may or may not include extended information. If the animated image file does not include extended information, it is decoded based on the extensible metadata platform information, at which point the first video can be determined. If the animated image file includes extended information, it is decoded based on the extensible metadata platform information, at which point both the first video and the extended information can be determined.

[0168] In some embodiments, when the animated image file includes a first video and extended information, decoding the animated image file based on the extensible metadata platform information may include: determining the offset information of the first video and the offset information of the extended information based on the extensible metadata platform information; decoding the animated image file based on the offset information of the first video to determine the first video; and decoding the animated image file based on the offset information of the extended information to determine the extended information.

[0169] In other words, in this embodiment of the application, the scalable metadata platform information includes at least the offset information of the first video and the offset information of the extended information. At this time, based on the offset information of the first video, that is, the starting position of the offset of the first video relative to the dynamic image file, the storage location of the first video in the dynamic image file can be accurately read. Based on the offset information of the extended information, that is, the starting position of the offset of the extended information relative to the dynamic image file, the storage location of the extended information in the dynamic image file can be accurately read, thereby enabling precise reading of the first video and the extended information.

[0170] It should also be noted that, in the embodiments of this application, if the video portion is located at the end of the animated image file, and the length of the video portion is equal to the length of the first video plus the length of the extended information, then the difference between the total file length corresponding to the animated image file and the length of the video portion can also be used to determine the offset information of the first video, without any limitation.

[0171] This application provides a method for encapsulating dynamic images. The method decodes dynamic image files based on extensible metadata platform information. For example, it decodes the dynamic image file based on the offset information of a first video to determine the first video, and decodes the dynamic image file based on the offset information of extended information to determine the extended information. This allows for accurate reading of the first video and the extended information. In other words, when a second device (i.e., the application) uses this standard to parse the dynamic image file and obtain the extended information, resulting in a wider range of higher-quality user experiences for the dynamic images, thereby improving their universality.

[0172] In another embodiment of this application, based on the dynamic image encapsulation method described in the foregoing embodiments, this application aims to establish a universal dynamic image encapsulation standard, unify the encapsulation format of dynamic images, and promote the further improvement of the dynamic image industry ecosystem. This mainly involves four technologies: extended information data storage methods, extended information storage methods in dynamic images, image and video packaging and storage methods, and the definition of a universal XMP information standard for dynamic images.

[0173] In one specific implementation, this technical solution may include the following parts:

[0174] (1) Data storage method for extended information of dynamic images.

[0175] The extended information must conform to the ISO-BMFF format standard, such as ISO / IEC 14496-12, and its data storage method is shown in Table 2 above.

[0176] (2) Methods for storing extended information in animated images.

[0177] As mentioned above Figure X As shown, the extended information for animated GIFs should be placed at the end of the animated GIF (specifically, after the video file), and the main information for the animated GIF should be... Figure 4 In MP information, the length of "MotionPhoto" should be equal to the original video length plus the length of the extended information.

[0178] (3) Definition of dynamic image encapsulation standard (i.e. image and video packaging and storage method).

[0179] Based on mainstream image formats, this standard mainly describes the following encapsulation schemes:

[0180] (a) JPEG (SDR) + MP4 (SDR / HDR): Images are in JPEG format with SDR type, and videos are in MP4 format with SDR / HDR type.

[0181] As mentioned above Figure 5As shown, MotionPhoto video data is added after the EOI of the JPEG image data to describe the video file and related extended information. Additionally, manufacturers are allowed to add custom BMFF-Boxes to store proprietary data. These custom Boxes must conform to the BMFF standard and are stored as sub-boxes within the 'mpvd' box.

[0182] (b) JPEG (HDR) + MP4 (SDR / HDR): Images are in JPEG format with HDR content, and videos are in MP4 format with SDR / HDR content.

[0183] As mentioned above Figure X As shown, based on the Google Ultra-HDR format, in the main... Figure 7 A MotionPhoto field is added to the MP file to describe the video file and related extended information. Video data is added after the Gainmap graph, allowing manufacturers to customize boxes to store private information at the end of the file. This customized box must conform to the BMFF standard and is stored as a sub-box within the 'mpvd' box.

[0184] (c) HEIF / AVIF(SDR)+MP4(SDR / HDR): Images are in HEIF / AVIF format (SDR type), and videos are in MP4 format (SDR / HDR type).

[0185] As mentioned above Figure 8 As shown, MotionPhoto video data is added to the end of the main image file (HEIF / AVIF) to describe the video file and related extended information. Additionally, manufacturers are allowed to add custom BMFF-Boxes to store proprietary data. These custom Boxes must conform to the BMFF standard and are stored as sub-boxes within the 'mpvd' box.

[0186] (d) HEIF / AVIF(HDR)+MP4(SDR / HDR): Images are in HEIF / AVIF format with HDR content, and videos are in MP4 format with SDR / HDR content.

[0187] As mentioned above Figure 10 As shown, MotionPhoto video data is added to the end of the main image file (HEIF / AVIF) to describe the video file and related extended information. Additionally, manufacturers are allowed to add custom BMFF-Boxes to store proprietary data. These custom Boxes must conform to the BMFF standard and are stored as sub-boxes within the 'mpvd' box.

[0188] (4) Definition of XMP information standard for dynamic images.

[0189] General XMP information for moving images is shown in Table 1 above. Camera metadata encodes information about how the main image portion and video portion of a moving image are presented. The namespace URI can be found at http: / / ns.google.com / photos / 1.0 / camera / ; the default namespace prefix is ​​GCamera. The attribute information shown in Table 1 may be displayed in the XMP metadata of still images.

[0190] In simple terms, the core modules of this application embodiment are divided according to their main functions, and mainly include: extended information data storage method, extended information storage method in dynamic images, image and video package storage method, and dynamic image general XMP information standard definition.

[0191] Here, the functions of each module are described as follows:

[0192] Extended information data storage method: Extended information of dynamic images (such as video frame interpolation information, FOV perspective cropping information, etc.) is saved in key-value pairs. If there is a lot of information, multiple layers of key-value pairs can be used to save it.

[0193] The extended information is stored in the animated image as follows: The extended information is encapsulated into a BMFF-Box according to the ISO-BMFF format standard and stored at the end of the file. The length of the video plus the length of the extended information is used as the "MotionPhoto" length in the XMP information.

[0194] Image and video packaging and storage method: Package images and videos into a single media file according to this specification and store it on the device.

[0195] The Universal XMP Information Standard for Moving Images defines: the encoding of metadata information about how the main image portion and video portion of a moving image are presented.

[0196] It should be noted that, regarding the encapsulation of dynamic images, in addition to encapsulating the video frame interpolation information and FOV (Field of View) cropping information mentioned above, this technical solution can theoretically be extended to any information, such as video super-resolution, post-processing information, etc. Furthermore, besides encapsulating the MP4 video format mentioned in this article, it can also be extended to other video file formats such as MOV, without any limitations.

[0197] This application provides a packaged dynamic image encapsulation standard. The specific implementation of the aforementioned embodiments is described in detail through the above embodiments. It can be seen that the technical solutions of the aforementioned embodiments mainly describe how to perform packaged dynamic image encapsulation, unifying the encapsulation method of extended information. This ensures correct recognition during end-to-end sharing of dynamic images. Furthermore, when a dynamic image file includes both video and extended information, the XMP information includes the offset information of both the video and extended information, thus enabling accurate reading of the video and extended information. In addition, third-party applications can correctly parse dynamic images encapsulated according to this standard, ensuring consistent results across manufacturers, further improving the dynamic image industry ecosystem, and enhancing the universality of dynamic images.

[0198] In yet another embodiment of this application, based on the same inventive concept as the foregoing embodiments, Figure 1 A schematic diagram of the composition structure of a dynamic image encapsulation device provided in this application embodiment. Figure 10 .like Figure 10 As shown, applied to the first device, the dynamic image encapsulation device 100 may include an acquisition unit 1001, an encoding unit 1002, and an encapsulation unit 1003, wherein:

[0199] Acquisition unit 1001 is configured to acquire the captured first image and first video;

[0200] Decoding unit 1002 is configured to encode the attribute information of the first image and the first video to generate extensible metadata platform information in a preset image format;

[0201] The encapsulation unit 1003 is configured to encapsulate the first image and the first video based on a preset image format to generate a dynamic image file.

[0202] In some embodiments, the preset image format includes a static image portion and a video portion, with the video portion located after the static image portion; correspondingly, the encapsulation unit 1003 is further configured to store the first image in the static image portion and the first video in the video portion.

[0203] In some embodiments, the video portion includes a video data sub-portion and an expandable sub-portion; the encapsulation unit 1003 is further configured to store the first video in the video data sub-portion; and after obtaining the expanded information of the animated image file, to store the expanded information in the expandable sub-portion.

[0204] In some embodiments, the attribute information includes at least one of the following: offset information of the first video, length information of the first video, offset information of the extended information, indication information of whether the animated image file is an animated image, file format version of the animated image file, and presentation timestamp of the video frame corresponding to the first image.

[0205] In some embodiments, the image format of the first image includes at least JPEG and HEIF / AVIF formats; the video format of the first video includes at least MP4 and MOV formats.

[0206] In some embodiments, when the first image is in JPEG format, the encapsulation unit 1003 is further configured to encapsulate based on the image start bit, extensible metadata platform information, first image and image end bit in the static image portion, and the first video and / or extended information in the video portion when the first image is a standard dynamic range type image; or, when the first image is a high dynamic range type image, encapsulate based on the main image portion and gain image portion in the static image portion, and the first video and / or extended information in the video portion; wherein the main image portion includes the main image start bit, extensible metadata platform information, first image and main image end bit, and the gain image portion includes the gain image start bit, private extensible metadata platform information, the gain image of the first image and the gain image end bit.

[0207] In some embodiments, when the first image is in HEIF / AVIF format, the encapsulation unit 1003 is further configured to encapsulate based on the mdat data block, meta data block, and free data block in the static image portion and the first video and / or extended information in the video portion when the first image is a standard dynamic range type image, wherein the first image and the extensible metadata platform information are both located in the mdat data block; or, when the first image is a high dynamic range type image, encapsulation is performed based on the mdat data block, meta data block, and free data block in the static image portion and the first video and / or extended information in the video portion; wherein the first image, the gain map of the first image, and the extensible metadata platform information are all located in the mdat data block.

[0208] In some embodiments, see Figure 11 The dynamic image encapsulation device 100 may further include a decoding unit 1004, configured to decode the dynamic image file after acquiring it to determine the first image and extensible metadata platform information; and to decode the dynamic image file according to the extensible metadata platform information to determine the first video and / or extended information.

[0209] In yet another embodiment of this application, based on the same inventive concept as the foregoing embodiments, Figure 2A schematic diagram of the composition structure of a dynamic image encapsulation device provided in this application embodiment. Figure 11 .like Figure 12 As shown, when applied to a second device, the dynamic image encapsulation device 110 may include an acquisition unit 1101 and a decoding unit 1102, wherein:

[0210] Unit 1101 is configured to acquire animated image files;

[0211] Decoding unit 1102 is configured to decode a dynamic image file to determine a first image and extensible metadata platform information; and to decode the dynamic image file based on the extensible metadata platform information to determine a first video and / or extended information.

[0212] In some embodiments, when the animated image file includes a first video and extended information, the decoding unit 1102 is further configured to determine the offset information of the first video and the offset information of the extended information based on the extensible metadata platform information; and to decode the animated image file according to the offset information of the first video to determine the first video; and to decode the animated image file according to the offset information of the extended information to determine the extended information.

[0213] In the embodiments of this application, a "unit" can be a portion of a circuit, a portion of a processor, a portion of a program or software, etc., and can also be a module or a non-modular one. Furthermore, the components in this embodiment can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional module.

[0214] Furthermore, those skilled in the art should understand that the description of the dynamic image encapsulation device in the embodiments of this application can be understood with reference to the description of the dynamic image encapsulation method in the embodiments of this application.

[0215] In another embodiment of this application, based on the same inventive concept as the foregoing embodiments, Figure 12 This is a schematic diagram of the specific hardware structure of an electronic device provided in an embodiment of this application. For example... Figure 9 As shown, electronic device 120 may include: a communication interface 1201, a memory 1202, and a processor 1203; the various components are coupled together via a bus system 1204. It is understood that the bus system 1204 is used to implement communication between these components. In addition to a data bus, the bus system 1204 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... ​The various buses are all labeled as bus system 1204. Among them, communication interface 1201 is used for receiving and sending signals during the process of sending and receiving information with other external network elements; memory 1202 is used to store computer programs that can run on processor 1203.

[0216] In some embodiments, when the electronic device 120 is a first device, the processor 1203 is configured to, when running the computer program, perform the following: acquire a captured first image and a first video; encode the attribute information of the first image and the first video to generate extensible metadata platform information in a preset image format; and encapsulate the first image and the first video based on the preset image format to generate a dynamic image file.

[0217] In some embodiments, when the electronic device 120 is a second device, the processor 1203 is configured to, while running the computer program, perform the following: acquiring a dynamic image file; decoding the dynamic image file to determine a first image and extensible metadata platform information; and decoding the dynamic image file based on the extensible metadata platform information to determine a first video and / or extended information.

[0218] It is understood that the memory 1202 in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 1202 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0219] The processor 1203 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 1203 or by instructions in software form. The processor 1203 may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules may reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 1202. Processor 1203 reads the information in memory 1202 and completes the steps of the above method in conjunction with its hardware.

[0220] It is understood that the embodiments described herein can be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described herein, or combinations thereof.

[0221] For software implementation, the techniques described herein can be achieved through modules (e.g., procedures, functions, etc.) that perform the functions described herein. The software code can be stored in memory and executed by a processor. The memory can be implemented within the processor or externally.

[0222] Alternatively, as another embodiment, the processor 1203 is further configured to perform the steps of the method described in any of the foregoing embodiments when running the computer program.

[0223] In some embodiments, this application also provides an electronic device, which may include the dynamic image encapsulation device 100 as described in any of the foregoing embodiments, or may include the dynamic image encapsulation device 110 as described in any of the foregoing embodiments.

[0224] This application also provides a computer-readable storage medium for storing computer programs.

[0225] In some embodiments, the computer-readable storage medium may be applied to the electronic device in the embodiments of this application, and when the computer program is executed by at least one processor, it implements the corresponding processes implemented by the electronic device in the various methods of the embodiments of this application. For the sake of brevity, these will not be described in detail here.

[0226] This application also provides a computer program product, including a computer program or instructions.

[0227] In some embodiments, the computer program product may be applied to the electronic device in the embodiments of this application, and the computer program or instructions cause the computer to execute the corresponding processes implemented by the electronic device in the various methods of the embodiments of this application. For the sake of brevity, these will not be described in detail here.

[0228] This application also provides a computer program.

[0229] In some embodiments, the computer program can be applied to the electronic device in the embodiments of this application. When the computer program is run on a computer, it causes the computer to execute the corresponding processes implemented by the electronic device in the various methods of the embodiments of this application. For the sake of brevity, it will not be described in detail here.

[0230] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0231] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described apparatus and unit can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0232] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0233] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0234] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. If the functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes: USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, optical disks, and other media capable of storing program code.

[0235] It should be noted that, in this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0236] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0237] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.

[0238] The features disclosed in the several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.

[0239] The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method or device embodiments.

[0240] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A dynamic picture packaging method, characterized by, The method comprises: acquiring a first picture and a first video; encoding attribute information of the first picture and the first video to generate extensible metadata platform information in a preset picture format; packaging the first picture and the first video based on the preset picture format to generate a dynamic picture file.

2. The method of claim 1, wherein, The preset picture format comprises a static picture part and a video part, and the video part is located after the static picture part; The packaging of the first picture and the first video based on the preset picture format comprises: storing the first picture in the static picture part; storing the first video in the video part.

3. The method of claim 2, wherein, The video part comprises a video data subpart and an extensible subpart; the method further comprises: storing the first video in the video data subpart; after acquiring extension information of the dynamic picture file, storing the extension information in the extensible subpart.

4. The method of claim 3, wherein, The attribute information comprises at least one of the following: offset information of the first video, length information of the first video, offset information of the extension information, indication information of whether the dynamic picture file is a dynamic picture, file format version of the dynamic picture file, and presentation timestamp of a video frame corresponding to the first picture.

5. The method of claim 3, wherein, In the case where the first picture is in JPEG format, the packaging of the first picture and the first video based on the preset picture format comprises: in the case where the first picture is a standard dynamic range type picture, packaging based on a picture start bit in the static picture part, the extensible metadata platform information, the first picture, and a picture end bit, and the first video and / or the extension information in the video part; or in the case where the first picture is a high dynamic range type picture, packaging based on a main picture part and a gain picture part in the static picture part, and the first video and / or the extension information in the video part; wherein the main picture part comprises a main picture start bit, the extensible metadata platform information, the first picture, and a main picture end bit, and the gain picture part comprises a gain picture start bit, private extensible metadata platform information, a gain picture of the first picture, and a gain picture end bit.

6. The method of claim 3, wherein, In the case where the first picture is in HEIF / AVIF format, the packaging of the first picture and the first video based on the preset picture format comprises: in the case where the first picture is a standard dynamic range type picture, packaging based on an mdat data block, a meta data block, and a free data block in the static picture part, and the first video and / or the extension information in the video part, wherein the first picture and the extensible metadata platform information are both located in the mdat data block; or in the case where the first picture is a high dynamic range type picture, packaging based on a main picture part and a gain picture part in the static picture part, and the first video and / or the extension information in the video part; wherein the main picture part comprises a main picture start bit, the extensible metadata platform information, the first picture, and a main picture end bit, and the gain picture part comprises a gain picture start bit, private extensible metadata platform information, a gain picture of the first picture, and a gain picture end bit. When the first picture is a high dynamic range type picture, encapsulation is performed based on the mdat data block, the meta data block and the free data block in the static picture part and the first video and / or the extended information in the video part; wherein the first picture, the gain map of the first picture and the extensible metadata platform information are located in the mdat data block.

7. The method according to any one of claims 3 to 6, characterized in that, After the dynamic picture file is acquired, the method further comprises: decoding the dynamic picture file to determine the first picture and the extensible metadata platform information; decoding the dynamic picture file according to the extensible metadata platform information to determine the first video and / or the extended information.

8. A dynamic picture packing method, characterized by, The method comprises: acquiring a dynamic picture file; decoding the dynamic picture file to determine a first picture and extensible metadata platform information; decoding the dynamic picture file according to the extensible metadata platform information to determine a first video and / or extended information.

9. The method of claim 8, wherein, When the first video and the extended information are included in the dynamic picture file, the decoding the dynamic picture file according to the extensible metadata platform information comprises: determining offset information of the first video and offset information of the extended information based on the extensible metadata platform information; decoding the dynamic picture file according to the offset information of the first video to determine the first video; decoding the dynamic picture file according to the offset information of the extended information to determine the extended information.

10. A dynamic picture packaging apparatus, characterized by comprising: The dynamic picture encapsulation apparatus comprises an acquisition unit, an encoding unit and an encapsulation unit, wherein: the acquisition unit is configured to acquire a first picture and a first video taken; the decoding unit is configured to encode attribute information of the first picture and the first video to generate extensible metadata platform information in a preset picture format; the encapsulation unit is configured to encapsulate the first picture and the first video based on the preset picture format to generate a dynamic picture file.

11. A dynamic picture packaging apparatus, characterized by comprising: The dynamic picture encapsulation apparatus comprises an acquisition unit and a decoding unit, wherein: the acquisition unit is configured to acquire a dynamic picture file; the decoding unit is configured to decode the dynamic picture file to determine a first picture and extensible metadata platform information, and decode the dynamic picture file according to the extensible metadata platform information to determine a first video and / or extended information.

12. An electronic device, comprising: The electronic device comprises a memory and a processor, wherein: the memory is configured to store a computer program capable of running on the processor; the processor is configured to execute the method according to any one of claims 1 to 7, or the method according to any one of claims 8 to 9 when the computer program is running.

13. A computer readable storage medium having stored thereon a computer program, characterized in that The computer program is executed by the processor to implement the method according to any one of claims 1 to 7, or the method according to any one of claims 8 to 9.

14. A computer program product comprising computer programs or instructions, characterized in that, The computer program or instructions are executed by the processor to implement the method according to any one of claims 1 to 7, or the method according to any one of claims 8 to 9.