Method and device for acquiring key metadata of MP4 file, medium and equipment
By processing key metadata into custom data blocks and storing them in front of the FTYP box during MP4 file recording, the problem of low acquisition efficiency in existing technologies is solved, achieving fast and efficient acquisition of key metadata, reducing resource consumption, and improving user experience.
Patent Information
- Application Number
- CN202610089984.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-22
- Publication Date
- 2026-05-12
AI Technical Summary
The existing technology for obtaining key metadata of MP4 files is inefficient, consumes a lot of device hardware and software resources, and affects device response performance and user experience.
During the MP4 file recording and generation process, key metadata is serialized and verified into data blocks of a preset byte length, which are then written to the disk along with standard data and stored before the ftyp box. During scanning, this data block is read and parsed to obtain key metadata, avoiding traversal and parsing of the moov box.
It improves the efficiency of obtaining key metadata of MP4 files, reduces the consumption of device input/output resources and computing resources, and enhances the user experience.
Smart Images

Figure CN122019807A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of audio and video data storage and processing technology, and in particular to a technology for obtaining key metadata of MP4 files. Background Technology
[0002] Audio and video recording devices, such as dashcams and law enforcement recorders, typically encode recorded audio and video into MP4 files and store them on disks (such as SD cards, TF cards, or WeChat Drive). MP4 files are based on a box structure. The standard box structure of MP4 file data usually includes the following in sequence: ftyp (file type) box, mdat (media data) box, and moov (movie) box. The atomic data in the ftyp box is used to indicate relevant information referenced by the MP4 file. The mdat box stores the actual audio and video atomic data. The moov box contains all the metadata describing the media data (such as creation time, duration, media stream type, resolution, etc.). Without it, the MP4 file cannot be played. In the standard MP4 file recording and generation process, the ftyp box is written to disk storage first as the file header, while the moov box is usually generated only after all audio and video data has been written and is often placed at the end of the file. If a user wants to obtain key metadata of an MP4 file (such as the total duration of the MP4 file, the total number of video frames, the total number of audio frames, the video encoding format, resolution, etc.) as relevant information for viewing or displaying on the device screen, it is usually necessary to traverse the MP4 file and locate, read, and parse the entire moov box. This method of obtaining information requires a lot of input / output overhead and computational overhead, which is inefficient. Especially for large-capacity disks, if there are many MP4 files stored, it may take a long time to consume the hardware and software resources of the audio and video recording device to process and obtain the relevant information of a single MP4 file. This will not only affect the other responsiveness of the device, but also the user experience.
[0003] Therefore, how to quickly and efficiently obtain key metadata of MP4 files while avoiding excessive consumption of device hardware and software resources is a technical problem that urgently needs to be solved. Summary of the Invention
[0004] In order to at least partially solve the above-mentioned technical problems, the purpose of this application is to provide a method, apparatus, medium and device for obtaining key metadata of MP4 files.
[0005] According to one aspect of this application, a method for obtaining key metadata of an MP4 file is provided, applied to an audio / video recording device, wherein the method includes: When an MP4 file is generated during recording, the key metadata of the MP4 file is obtained, and after serialization and verification, it is processed into a first data block of a preset first byte length, which is written to the disk together with the standard data of the MP4 file. The first data block is stored before the standard data of the MP4 file. When scanning the disk, for each MP4 file stored on the disk, the first data block corresponding to the MP4 file is obtained, and the first data block is deserialized and verified. If successful, the key metadata of the MP4 file is extracted from the processing result.
[0006] Optionally, the first data block, processed by serialization and verification into a preset first byte length, includes: The key metadata of the MP4 file is serialized. After adjusting the serialized data to a preset second byte length, a preset verification algorithm is used to calculate the checksum of the adjusted data. The checksum is appended to the end of the adjusted data to obtain a first data block of a preset first byte length.
[0007] Optionally, the deserialization and verification processing of the first data block further includes: If this fails, the key metadata of the MP4 file is obtained from the standard data of the MP4 file.
[0008] Optionally, the method for obtaining key data of an MP4 file further includes: The key metadata obtained from the standard data of the MP4 file is serialized and verified to obtain a second data block of the preset first byte length. The second data block is then written to the storage area of the first data block corresponding to the MP4 file on the disk to update the first data block of the MP4 file.
[0009] According to another aspect of this application, a method for obtaining key metadata of an MP4 file is provided, applied to an audio / video recording device, wherein the method includes: When an MP4 file is generated during recording, the key metadata of the MP4 file is obtained, and after serialization and verification, it is processed into a first data block of a preset first byte length, which is written to the disk together with the standard data of the MP4 file. The first data block is stored before the standard data of the MP4 file. When scanning the disk, based on the disk's file system, file information for each MP4 file stored on the disk is obtained, wherein the file information includes at least the storage path and update time of the MP4 file; The file information of MP4 files in the disk is compared with the file information of MP4 files stored in the local database. Based on the comparison results, the relevant MP4 files stored in the disk are marked. The local database records the file information and key metadata of each MP4 file stored in the disk during the last scan. For each marked MP4 file, obtain the first data block corresponding to the MP4 file, and perform deserialization and verification processing on the first data block. If successful, extract the key metadata of the MP4 file from it.
[0010] Optionally, the relevant MP4 files stored in the disk include at least one of the following: MP4 files stored on the disk but not recorded in the local database; The MP4 files stored on the disk and recorded in the local database, but updated later than those recorded in the local database.
[0011] Optionally, the deserialization and verification processing of the first data block further includes: If this fails, the key metadata of the MP4 file is obtained from the standard data of the MP4 file.
[0012] Optionally, the method for obtaining key metadata of MP4 files further includes: The key metadata obtained from the standard data of the MP4 file is serialized and verified to obtain a second data block of the preset first byte length. The second data block is then written to the storage area of the first data block corresponding to the MP4 file on the disk to update the first data block of the MP4 file.
[0013] Optionally, the method for obtaining key metadata of MP4 files further includes: For each untagged MP4 file, retrieve the key metadata of the MP4 file from the local database.
[0014] Optionally, the method for obtaining key metadata of MP4 files further includes: Write the file information and key metadata of each tagged MP4 file to a local database.
[0015] According to another aspect of this application, an apparatus for obtaining key metadata of an MP4 file is provided, deployed in an audio / video recording device, wherein the apparatus includes: The first module is used to obtain the key metadata of the MP4 file when an MP4 file is generated by recording, and to serialize and verify it into a data block of a preset first byte length, and write it to the disk together with the standard data of the MP4 file, wherein the first data block is stored before the standard data of the MP4 file. The second module is used to, when scanning the disk, obtain the first data block corresponding to each MP4 file stored in the disk, and perform deserialization and verification processing on the first data block. If successful, the key metadata of the MP4 file is extracted from the processing result.
[0016] Optionally, the second module is further configured to: If this fails, the key metadata of the MP4 file is obtained from the standard data of the MP4 file.
[0017] Optionally, the apparatus for obtaining key metadata of MP4 files further includes: The third module is used to serialize and verify the key metadata obtained from the standard data of the MP4 file to obtain a second data block of the preset first byte length, and to overwrite the storage area of the first data block corresponding to the MP4 file on the disk with the second data block to update the first data block of the MP4 file.
[0018] According to another aspect of this application, an apparatus for obtaining key metadata of an MP4 file is provided, deployed in an audio / video recording device, wherein the apparatus includes: The first module is used to obtain the key metadata of the MP4 file when an MP4 file is generated by recording, and to serialize and verify it into a first data block of a preset first byte length, and write it to the disk together with the standard data of the MP4 file, wherein the first data block is stored before the standard data of the MP4 file. The second module is used to obtain file information of each MP4 file stored on the disk based on the file system of the disk when scanning the disk, wherein the file information includes at least the storage path and update time of the MP4 file; The third module is used to compare the file information of MP4 files in the disk with the file information of MP4 files stored in the local database, and to mark the relevant MP4 files stored in the disk according to the comparison results. The local database records the file information and key metadata of each MP4 file stored in the disk during the last scan. The fourth module is used to obtain the first data block corresponding to each marked MP4 file, and to perform deserialization and verification processing on the first data block. If successful, the key metadata of the MP4 file is extracted from it.
[0019] Optionally, the fourth module is further configured to: If this fails, the key metadata of the MP4 file is obtained from the standard data of the MP4 file.
[0020] Optionally, the apparatus for obtaining key metadata of MP4 files further includes: The fifth module is used to serialize and verify the key metadata obtained from the standard data of the MP4 file to obtain a second data block of the preset first byte length, and to overwrite the storage area of the first data block corresponding to the MP4 file on the disk with the second data block to update the first data block of the MP4 file.
[0021] Optionally, the apparatus for obtaining key metadata of MP4 files further includes: The sixth module is used to retrieve key metadata of each untagged MP4 file from the local database.
[0022] Optionally, the apparatus for obtaining key metadata of MP4 files further includes: The seventh module is used to write the file information and key metadata of each tagged MP4 file to a local database.
[0023] According to another aspect of this application, a computer-readable medium is provided, wherein computer-readable instructions are stored thereon, which are executed by a processor to implement part or all of any of the above methods.
[0024] According to another aspect of this application, an audio-visual recording device is provided, wherein the device includes: one or more processors; and a memory storing computer-readable instructions that, when executed, cause the processor to perform some or all of the operations of any of the above methods.
[0025] Compared with existing technologies, this application provides a method, apparatus, medium, and device for obtaining key metadata of MP4 files. The method includes: when an MP4 file is recorded and generated, obtaining the key metadata of the MP4 file, serializing and verifying it into a first data block of a preset first byte length, and writing it to a disk along with the standard data of the MP4 file, wherein the first data block is stored before the standard data of the MP4 file; when scanning the disk, for each MP4 file stored on the disk, obtaining the first data block corresponding to the MP4 file, and performing deserialization and verification processing on the first data block; if successful, extracting the key metadata of the MP4 file from the processing result. This application processes the obtained key metadata of the MP4 file into a custom data block and writes it to the disk along with the standard data of the MP4 file, wherein the data block is stored before the standard container structure (usually an FTYP box) data of the MP4 file. When obtaining relevant information of the MP4 file, it is only necessary to read and parse the data block corresponding to the MP4 file without traversing the MP4 file and locating, reading, and parsing the entire Moov box. It can greatly improve the efficiency of obtaining key metadata of MP4 files, enhance the user experience of obtaining relevant information about MP4 files, and greatly reduce the occupation of device input / output resources and computing resources. Attached Figure Description
[0026] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings: Figure 1 A schematic diagram illustrating a method for obtaining key metadata of an MP4 file according to one aspect of this application is shown. Figure 2 This illustration shows a method for obtaining key metadata of an MP4 file according to another aspect of this application; Figure 3 A schematic diagram of an apparatus for obtaining key metadata of an MP4 file is shown according to another aspect of this application; Figure 4 A schematic diagram of an apparatus for obtaining key metadata of an MP4 file is shown according to another aspect of this application; The same or similar reference numerals in the accompanying drawings represent the same or similar parts. Detailed Implementation
[0027] The present application will now be described in further detail with reference to the accompanying drawings.
[0028] In a typical configuration of various embodiments of this application, the method execution entity, each trusted party of the system, and / or each module of the device may include one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0029] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0030] Computer-readable media include both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include non-transitory computer-readable media, such as modulated data signals and carrier waves.
[0031] In the standard MP4 file recording and generation process, the FTYP box is written to disk first as the file header, while the Moov box is usually placed at the end of the file only after all audio and video data has been written. If a user wants to obtain key metadata of the MP4 file (such as the total duration, total number of video frames, total number of audio frames, video encoding format, resolution, etc.) as relevant information for viewing or displaying on the device screen, it is usually necessary to traverse the MP4 file and locate, read, and parse the entire Moov box. This method of acquisition consumes a lot of input / output overhead and computational overhead, resulting in low efficiency. Especially for large-capacity disks storing many MP4 files, it may take a long time to consume the hardware and software resources of the audio and video recording device to process and obtain the relevant information of a single MP4 file. This not only affects the device's other responsiveness but also the user experience.
[0032] This application provides a technical solution for obtaining key metadata of MP4 files. During the MP4 file recording and generation process, key metadata of the MP4 file is obtained, processed into custom data blocks, and then written to the disk for storage along with the standard data of the MP4 file. If it is necessary to obtain the key metadata of the MP4 file as relevant information of the MP4 file, it is only necessary to read and parse the corresponding data block of the MP4 file, without traversing the MP4 file and locating, reading, and parsing the entire moov box. This method is highly efficient, improves the user experience, and can greatly reduce the occupation of device input / output resources and computing resources.
[0033] To further illustrate the technical means adopted and the effects achieved in this application, the technical solution of this application will be clearly and completely described below in conjunction with the accompanying drawings and embodiments and / or optional embodiments.
[0034] Figure 1 The diagram illustrates a method for obtaining key metadata of an MP4 file according to one aspect of this application, applied to an audio / video recording device. One embodiment of the method includes: S101 When an MP4 file is generated during recording, the key metadata of the MP4 file is obtained, and after serialization and verification, it is processed into a first data block of a preset first byte length, which is written to the disk together with the standard data of the MP4 file. The first data block is stored before the standard data of the MP4 file. S102 When scanning the disk, for each MP4 file stored in the disk, obtain the first data block corresponding to the MP4 file, and perform deserialization and verification processing on the first data block. If successful, extract the key metadata of the MP4 file from the processing result.
[0035] This application provides a method for obtaining key metadata of MP4 files, applicable to device 100. This method can be implemented through the hardware and software of device 100. Device 100 includes an audio / video recording device with an embedded system, pre-installed with relevant hardware and software environments (e.g., a processor, an audio / video encoder supporting H.264 / H.265, and a built-in non-volatile memory and a disk for persistently storing recorded files (e.g., a pluggable external storage device such as an SD card, TF card, or micro hard drive). The audio / video recording device includes, but is not limited to, dashcams and law enforcement recorders; these are merely examples. Other existing or future devices and / or resource platforms that are applicable to this application should also be included within the scope of protection of this application, and are hereby incorporated by reference.
[0036] In this embodiment, in step S101, when an MP4 file is generated by recording, the key metadata of the MP4 file is obtained and serialized and verified into a first data block of a preset first byte length, which is written to the disk together with the standard data of the MP4 file. The first data block is stored before the standard data of the MP4 file.
[0037] During the audio and video recording process of device 100, the audio and video data acquired in real time by the image sensor are encoded by the encoder. When the encoded data is packaged into an MP4 file by an MP4 encapsulation library (such as FFMPEG, miniMP4, etc.) that conforms to the MP4 standard, the key metadata of the MP4 file can be obtained by calling its corresponding preset API interface. (Usually, it is not necessary to obtain all the metadata of the MP4 file (i.e., all the metadata in the moov box). It can be determined according to the actual application scenario and needs. Usually, the total duration of the MP4 file, the total number of video frames, the total number of audio frames, the video encoding format, resolution, frame rate, etc. can be obtained as the summary information of the MP4 file.) In order to facilitate storage or transmission and to ensure data integrity, the obtained key metadata is serialized and verified to obtain a first data block with a custom preset first byte length. This first data block and the standard data of the MP4 file are written to the disk storage of device 100. The first data block is stored before the standard container structure (usually the ftyp box) data of the MP4 file. That is, the standard data of the MP4 file is stored starting from the first storage address after the area where the first data block is stored. Considering the disk read / write speed requirements of device 100 and the relatively stable composition of MP4 file metadata, the acquired metadata can be stored in data blocks of a fixed, preset first byte length for easy and quick location and reading / writing. Optionally, a version field can also be included in the data block to manage the update version or number of updates via version number.
[0038] Continuing in this embodiment, in step S102, when scanning the disk, for each MP4 file stored on the disk, the first data block corresponding to the MP4 file is obtained, and the first data block is deserialized and verified. If successful, the key metadata of the MP4 file is extracted from the processing result.
[0039] Specifically, when it is necessary to obtain information about MP4 files stored on the disk, for example, when device 100 is powered on, it typically scans all MP4 files stored on the disk to obtain relevant information, which can be displayed as summary information in the app or client. In step S102, when scanning the disk of device 100, for each MP4 file stored on the disk, the first data block corresponding to that MP4 file can be read from the storage area on the disk corresponding to that MP4 file, and corresponding deserialization and verification processing can be performed on it. If the processing is successful and there are no anomalies, the key metadata of the MP4 file can be extracted from the processing result as the summary information of the MP4 file. This eliminates the need to traverse the MP4 file and locate, read, and parse the entire moov box. Obtaining the key metadata of the MP4 file from the atomic data of the moov box greatly improves the efficiency of obtaining the key metadata of the MP4 file, enhances the user's experience in obtaining MP4 file-related information, and significantly reduces the occupation of device input / output resources and computing resources. Optionally, in step S101, the first data block processed into a preset first byte length after serialization and verification includes: The key metadata of the MP4 file is serialized. After adjusting the serialized data to a preset second byte length, a preset verification algorithm is used to calculate the checksum of the adjusted data. The checksum is appended to the end of the adjusted data to obtain a first data block of a preset first byte length.
[0040] In this optional embodiment, in step S101, the obtained key metadata of the MP4 file can be serialized using a preset serialization method to obtain serialized data that can be stored or transmitted. For example, JSON format can be used to serialize the key metadata of the MP4 file to obtain serialized JSON format data. Other serialization methods, such as YAML, XML, Protobuf, TOML, etc., are also applicable to this application, and are only examples here. After obtaining the serialized data, it can be adjusted to a preset second byte length, and then a preset verification algorithm, such as CRC code verification algorithm, Hamming code verification algorithm, etc., can be used to calculate the check code corresponding to the adjusted data with the preset second byte length, and the check code is appended to the end of the adjusted data with the preset second byte length to obtain a first data block with a preset first byte length. For example, the first byte length can be preset to 1024 bytes, the preset verification algorithm can be CRC-32 (Cyclic Redundancy Check), and the second byte length can be preset to 1020 bytes. Using JSON format, the obtained MP4 file's key metadata is serialized to obtain a string containing a JSON object. This JSON object contains multiple key-value pairs (each key-value pair corresponds to a parameter in the metadata and its value). Then, this string is adjusted: if the string length is less than 1020 bytes, a null character ("\0") is added to the end; if the string length is greater than 1020 bytes, 1020 bytes are retained from the beginning, and the excess is truncated. (Usually, the length of the string containing the JSON object corresponding to the key metadata is unlikely to exceed 1020 bytes; however, if a specific application scenario requires a large amount of key metadata, the first byte length can be increased.) After adjusting the string, a 1020-byte JSON format data is obtained. Then, the CRC-32 checksum algorithm is used to verify the 1020-byte JSON format data, resulting in a 4-byte checksum. Finally, the 4-byte checksum is appended to the end of the 1020-byte JSON format data, resulting in a 1024-byte first data block. This first data block is written to disk along with the standard data of the MP4 file. The first data block is stored before the standard container structure (usually the FTYP box) data of the MP4 file, and the standard container structure (usually the FTYP box) data of the MP4 file is stored immediately after the first data block.
[0041] Optionally, step S102 further includes: If this fails, the key metadata of the MP4 file is obtained from the standard data of the MP4 file.
[0042] In this optional embodiment, in step S102, the first data block of the acquired MP4 file undergoes corresponding deserialization and verification processing. If the processing fails for any reason (e.g., the acquired first data block is partially truncated or overwritten, resulting in incomplete data and verification failure), the key metadata of the MP4 file cannot be obtained from the first data block. A downgraded acquisition process can be triggered, using conventional processing methods to traverse the standard data of the MP4 file and locate, read, and parse the entire moov box to obtain the key data of the MP4 file from the moov box, thus avoiding failure in obtaining the key metadata of the MP4 file. This ensures the robustness of key metadata acquisition.
[0043] Optionally, the method for obtaining key metadata of MP4 files further includes: S103 performs serialization and verification processing on the key metadata obtained from the standard data of the MP4 file to obtain a second data block of the preset first byte length, and writes the second data block to the storage area of the first data block corresponding to the MP4 file on the disk to update the first data block of the MP4 file.
[0044] If the key metadata of the MP4 file is obtained from the moov box of standard data, it indicates that the data of the first data block of the MP4 file is incomplete. In this optional embodiment, in step S103, the key metadata of the MP4 file obtained from the moov box of standard data can be serialized and verified to obtain a second data block with a preset first byte length (i.e., the same byte length as the first data block). The second data block is then written to the storage area of the first data block corresponding to the MP4 file on the disk to update the first data block of the MP4 file. This allows the key metadata of the MP4 file to be quickly obtained through the first data block, avoiding the need to traverse the standard data of the MP4 file and locate, read, and parse the entire moov box each time.
[0045] In the above embodiments and / or optional embodiments, by optimizing the processing method, storage location and acquisition method of MP4 file key metadata, MP4 file key metadata can be obtained quickly and efficiently, greatly reducing the occupation of device input / output resources and computing resources, and improving user experience.
[0046] Figure 2 The diagram illustrates a method for obtaining key metadata of an MP4 file according to one aspect of this application, applied to an audio / video recording device. One embodiment of the method includes: S201 When an MP4 file is generated during recording, the key metadata of the MP4 file is obtained, and after serialization and verification, it is processed into a data block of a preset first byte length, which is written to the disk together with the standard data of the MP4 file. The first data block is stored before the standard data of the MP4 file. S202 When scanning the disk, based on the disk's file system, obtain the file information of each MP4 file stored on the disk, wherein the file information includes at least the storage path and update time of the MP4 file; S203 compares the file information of MP4 files in the disk with the file information of MP4 files stored in the local database, and marks the relevant MP4 files stored in the disk according to the comparison result. The local database records the file information and key metadata of each MP4 file stored in the disk during the last scan. S204 For each marked MP4 file, obtain the first data block corresponding to the MP4 file, and perform deserialization and verification processing on the first data block. If successful, extract the key metadata of the MP4 file from it.
[0047] In this embodiment, step S201 is the same as step S101 in the aforementioned method embodiment and / or optional embodiment, and will not be repeated here.
[0048] Continuing in this embodiment, in step S202, when scanning the disk, based on the disk's file system, file information for each MP4 file stored on the disk is obtained, wherein the file information includes at least the storage path and update time of the MP4 file.
[0049] Specifically, when it is necessary to obtain information about MP4 files stored on the disk—for example, when device 100 is powered on, it typically scans all MP4 files stored on the disk to obtain relevant information, which is then displayed as summary information in the app or client—in step S202, when scanning the disk of device 100, the file system of the disk can be traversed to obtain file information for each MP4 file stored on the disk. This file information includes at least the storage path and update time of the corresponding MP4 file. For example, the storage path and update time of each MP4 file stored on the disk can be obtained by viewing the attributes of each MP4 file in the file system.
[0050] Continuing in this embodiment, in step S203, the file information of MP4 files in the disk is compared with the file information of MP4 files stored in the local database, and the relevant MP4 files stored in the disk are marked according to the comparison result. The local database records the file information and key metadata of each MP4 file stored in the disk during the last scan.
[0051] In step S203, device 100 compares the file information of each MP4 file in its disk with the file information of each MP4 file stored in its local database. Based on the comparison result, it temporarily marks the relevant MP4 files stored on the disk. For example, if the storage path or update time of one or more MP4 files does not match, it is identified as a relevant MP4 file and temporarily marked as a "file to be processed". A local database can be pre-built in the non-volatile memory (such as Flash memory) of device 100. This local database includes at least a file information table, recording the file information and key metadata of each MP4 file stored on the disk during the last scan. Each row in this file information table corresponds to one MP4 file and includes at least the storage path (which can be used as a primary key), update time, and key metadata (one field for each parameter). Initially, this file information table has no records.
[0052] Continuing in this embodiment, in step S204, for each marked MP4 file, the first data block corresponding to the MP4 file is obtained, and the first data block is deserialized and verified. If successful, the key metadata of the MP4 file is extracted from it.
[0053] Specifically, for each MP4 file temporarily marked in step S203, its corresponding first data block can be obtained from the storage area on the disk corresponding to the MP4 file. This first data block is then deserialized and verified. If the processing is successful and without errors, the key metadata of the MP4 file can be extracted from the processing result, serving as the MP4 file's summary information. For example, if the first data block of a temporarily marked MP4 file is determined using the method described above, a 1024-byte first data block of the MP4 file can be obtained from the storage area on the disk corresponding to the MP4 file. After CRC-32 verification, a 1020-byte string including a JSON object can be obtained, which is then deserialized to obtain the key metadata of the MP4 file.
[0054] In this embodiment, for each MP4 file stored on the disk, it is not necessary to traverse the entire Moov box to obtain the key metadata of the MP4 file, nor is it necessary to obtain the key metadata of each MP4 file by reading and parsing the first data block of the entire MP4 file. Instead, the key metadata is obtained only for incremental MP4 files that have been temporarily marked, by reading and parsing the first data block of the MP4 file. This can significantly improve the efficiency of obtaining key metadata of batch MP4 files, enhance the user experience, and greatly reduce the occupation of device input / output resources and computing resources.
[0055] Optionally, in step S203, the relevant MP4 files stored in the disk include at least one of the following: MP4 files stored on the disk but not recorded in the local database; The MP4 files stored on the disk and recorded in the local database, but updated later than those recorded in the local database.
[0056] In this optional embodiment, the MP4 files temporarily marked in the disk in step S203 are MP4 files that have been added or updated since the last scan. They may include MP4 files stored in the disk but not recorded in the local database (i.e., MP4 files newly recorded and written to the disk after the last scan), or MP4 files stored in the disk and recorded in the local database but updated later than those recorded in the local database (i.e., MP4 files written to the disk before the last scan but updated after the last scan).
[0057] Optionally, step S204 further includes: If this fails, the key metadata of the MP4 file is obtained from the standard data of the MP4 file.
[0058] In this optional embodiment, in step S204, the first data block corresponding to the obtained MP4 file is subjected to corresponding deserialization and verification processing. If the processing fails for any reason (for example, the obtained first data block is partially truncated or overwritten, resulting in incomplete data and verification failure), the key metadata of the MP4 file cannot be obtained from the first data block. A downgraded acquisition process can be triggered, using conventional processing methods to traverse the standard data of the MP4 file and locate, read, and parse the entire moov box to obtain the key data of the MP4 file from the moov box, thus avoiding failure to obtain the key metadata of the MP4 file. This ensures the robustness of key metadata acquisition.
[0059] Optionally, the method for obtaining key metadata of MP4 files further includes: S205 performs serialization and verification processing on the key metadata obtained from the standard data of the MP4 file to obtain a second data block of the preset first byte length, and writes the second data block to the storage area of the first data block corresponding to the MP4 file on the disk to update the first data block of the MP4 file.
[0060] If the key metadata of the MP4 file is obtained from the moov box of standard data, it indicates that the data of the first data block of the MP4 file is incomplete. In this optional embodiment, in step S205, the key metadata of the MP4 file obtained from the moov box of standard data can be serialized and verified to obtain a second data block with a preset first byte length (i.e., the same byte length as the first data block). The second data block is then written to the storage area of the first data block corresponding to the MP4 file on the disk to update the first data block of the MP4 file. This allows the key metadata of the MP4 file to be quickly obtained through the first data block, avoiding the need to traverse the standard data of the MP4 file and locate, read, and parse the entire moov box each time.
[0061] Optionally, the method for obtaining key metadata of MP4 files further includes: S206 For each untagged MP4 file, retrieve the key metadata of the MP4 file from the local database.
[0062] In this optional embodiment, based on the comparison result in step S203, MP4 files whose file information completely matches are not marked. In step S206, for each unmarked MP4 file, it indicates that the relevant MP4 file was stored on the disk during the last scan and has not been changed since the last scan. It can be considered as an MP4 file whose file information and key metadata have been cached in the local database. The key metadata of the unmarked MP4 file is directly obtained from the local database, without the need to obtain the first data block corresponding to the MP4 file from the disk and perform corresponding deserialization and verification processing. The key metadata is obtained after successful processing, which can further improve the acquisition efficiency.
[0063] Optionally, the method for obtaining key metadata of MP4 files further includes: S207 writes the file information and key metadata of each marked MP4 file to a local database.
[0064] For each MP4 file that has been temporarily marked, if there is no record of it in the local database or the relevant information has been updated, in this optional embodiment, the file information and key metadata of the relevant MP4 files need to be incrementally written to or overwritten to the local database to ensure that the file information and key metadata of the MP4 files recorded in the local database are consistent with the MP4 files stored on the disk after the current scan, thereby further improving the efficiency of obtaining the key metadata of the batch of MP4 files stored on the disk.
[0065] In this embodiment and / or optional embodiments, for each MP4 file stored on the disk, it is first determined whether it is an incremental MP4 file. For incremental MP4 files, the key metadata is obtained by reading and parsing the first data block corresponding to the incremental MP4 file. For MP4 files that have not changed, their key metadata can be directly read from the local database. This can further improve the efficiency of obtaining key metadata for batch MP4 files, enhance the user experience, and greatly reduce the occupation of device input / output resources and computing resources.
[0066] Figure 3 The diagram illustrates an apparatus for obtaining key metadata of an MP4 file according to another aspect of this application. The apparatus is deployed in an audio / video recording device, wherein, in one embodiment, the apparatus includes: The first module 310 is used to obtain the key metadata of the MP4 file when an MP4 file is generated by recording, and to serialize and verify it into a data block of a preset first byte length, and write it to the disk together with the standard data of the MP4 file, wherein the first data block is stored before the standard data of the MP4 file. The second module 320 is used to, when scanning the disk, obtain the first data block corresponding to each MP4 file stored in the disk, and perform deserialization and verification processing on the first data block. If successful, the key metadata of the MP4 file is extracted from the processing result.
[0067] In this embodiment, the device may include modular software and / or a combination of modular software and hardware or firmware, deployed in an audio-visual recording device, the hardware and software environment of which is the same as that of the aforementioned device 100.
[0068] In this embodiment, during the audio and video recording process, the audio and video data collected in real time by the image sensor are encoded by the encoder, and then packaged into an MP4 file by the MP4 encapsulation library that conforms to the MP4 standard. Through the first module 310 of the device, the corresponding preset API interface can be called to obtain the key metadata of the MP4 file. In order to facilitate storage or transmission and to ensure the integrity of the data, the obtained key metadata is serialized and verified to obtain a first data block with a custom preset first byte length. This first data block and the standard data of the MP4 file obtained by encapsulation are written together to the disk storage of the device 100. The first data block is stored before the standard container structure (usually the FTYP box) data of the MP4 file, that is, the standard data of the MP4 file is stored starting from the first storage address after the area where the first data block is stored.
[0069] Continuing in this embodiment, when scanning the disk of device 100, the second module 320 of the device can read the corresponding first data block from the storage area corresponding to each MP4 file stored on the disk, perform corresponding deserialization and verification processing on it, and if the processing is successful and without errors, the key metadata of the MP4 file can be extracted from the processing result as the summary information of the MP4 file. This eliminates the need to traverse the MP4 file and locate, read, and parse the entire moov box. Obtaining the key metadata of the MP4 file from the atomic data of the moov box greatly improves the efficiency of obtaining key metadata of MP4 files, enhances the user experience in obtaining MP4 file-related information, and significantly reduces the occupation of device input / output resources and computing resources.
[0070] Optionally, the second module 320 is further configured to: If this fails, the key metadata of the MP4 file is obtained from the standard data of the MP4 file.
[0071] In this optional embodiment, the second module 320 performs corresponding deserialization and verification processing on the first data block of the read MP4 file. If the processing fails for any reason (e.g., the obtained first data block is partially truncated or overwritten, resulting in incomplete data and verification failure), and the key metadata of the MP4 file cannot be obtained from the first data block, the second module 320 can also trigger a downgrade acquisition process. This process uses conventional methods to traverse the standard data of the MP4 file and locate, read, and parse the entire moov box to obtain the key data of the MP4 file from the moov box, thus avoiding failure in obtaining the key metadata of the MP4 file. This ensures the robustness of key metadata acquisition.
[0072] Optionally, the apparatus for obtaining key metadata of MP4 files further includes: The third module 330 is used to serialize and verify the key metadata obtained from the standard data of the MP4 file to obtain a second data block of the preset first byte length, and to overwrite the storage area of the first data block corresponding to the MP4 file in the disk with the second data block to update the first data block of the MP4 file.
[0073] If the key metadata of the MP4 file is obtained from the moov box of the standard data of the MP4 file through the second module 320, it indicates that the data of the first data block of the MP4 file is incomplete. In this optional embodiment, the key metadata of the MP4 file obtained from the moov box of the standard data can be serialized and verified by the third module 330 to obtain a second data block of a preset first byte length (i.e., the same byte length as the first data block). The second data block is then written to the storage area of the first data block corresponding to the MP4 file on the disk to update the first data block of the MP4 file. This allows the key metadata of the MP4 file to be quickly obtained through the first data block in the future, avoiding the need to traverse the standard data of the MP4 file and locate, read, and parse the entire moov box each time.
[0074] In the above-described device embodiments and / or optional embodiments, the method steps corresponding to the functions that can be achieved by each component module 310-330 of the device are the same as the relevant steps S101-S103 in the aforementioned related method embodiments and / or optional embodiments, and will not be repeated here.
[0075] Figure 4 The diagram illustrates an apparatus for obtaining key metadata of an MP4 file according to another aspect of this application. The apparatus is deployed in an audio / video recording device, wherein, in one embodiment, the apparatus includes: The first module 410 is used to obtain the key metadata of the MP4 file when an MP4 file is generated by recording, and to serialize and verify it into a first data block of a preset first byte length, and write it to the disk together with the standard data of the MP4 file, wherein the first data block is stored before the standard data of the MP4 file. The second module 420 is used to obtain file information of each MP4 file stored on the disk based on the file system of the disk when scanning the disk, wherein the file information includes at least the storage path and update time of the MP4 file; The third module 430 is used to compare the file information of MP4 files in the disk with the file information of MP4 files stored in the local database, and to mark the relevant MP4 files stored in the disk according to the comparison result. The local database records the file information and key metadata of each MP4 file stored in the disk during the last scan. The fourth module 440 is used to obtain the first data block corresponding to each marked MP4 file, and to perform deserialization and verification processing on the first data block. If successful, the key metadata of the MP4 file is extracted from it.
[0076] In this embodiment, the device may include modular software and / or a combination of modular software and hardware or firmware, deployed in an audio-visual recording device, the hardware and software environment of which is the same as that of the aforementioned device 100.
[0077] In this embodiment, the function implemented by the first module 410 is the same as that implemented by the first module 310 in the aforementioned device embodiments and / or optional embodiments, and will not be described again here.
[0078] Continuing in this embodiment, when scanning the disk of the device 100, the second module 420 of the device can be used to traverse the file system of the disk to obtain the file information of each MP4 file stored on the disk. The file information includes at least the storage path and update time of the corresponding MP4 file. For example, the storage path and update time of each MP4 file stored on the disk can be obtained by viewing the attributes of each MP4 file in the file system.
[0079] Continuing in this embodiment, the third module 430 of the device can compare the file information of each MP4 file in the disk of the device 100 with the file information of each MP4 file stored in its local database. Based on the comparison result, related MP4 files stored on the disk are temporarily marked. For example, if the storage path or update time of one or more MP4 files does not match, they are identified as related MP4 files and temporarily marked as "files to be processed". A local database is constructed in the non-volatile memory (such as Flash memory) of the device 100. This local database includes at least a file information table, recording the file information and key metadata of each MP4 file stored on the disk during the last scan. Each row in this file information table corresponds to one MP4 file and includes at least the storage path (which can be used as a primary key), update time, and key metadata (one field for each parameter). Initially, this file information table has no records.
[0080] Continuing in this embodiment, for each MP4 file that has been temporarily marked by the third module 430, the fourth module 440 can obtain the corresponding first data block from the storage area of the disk of the device 100 corresponding to the MP4 file, and perform corresponding deserialization and verification processing on the first data block. If the processing is successful and there are no abnormalities, the key metadata of the MP4 file can be extracted from the processing result, which can be used as the summary information of the MP4 file.
[0081] In this embodiment, for each MP4 file stored on the disk, it is not necessary to traverse the entire Moov box to obtain the key metadata of the MP4 file, nor is it necessary to obtain the key metadata of each MP4 file by reading and parsing the first data block of the entire MP4 file. Instead, the key metadata is obtained only for incremental MP4 files that have been temporarily marked, by reading and parsing the first data block of the MP4 file. This can significantly improve the efficiency of obtaining key metadata of batch MP4 files, enhance the user experience, and greatly reduce the occupation of device input / output resources and computing resources.
[0082] Optionally, the fourth module 440 is further configured to: If this fails, the key metadata of the MP4 file is obtained from the standard data of the MP4 file.
[0083] In this optional embodiment, the fourth module 440 of the device performs corresponding deserialization and verification processing on the first data block corresponding to the acquired MP4 file. If the processing fails for any reason (e.g., the acquired first data block is partially truncated or overwritten, resulting in incomplete data and verification failure), the key metadata of the MP4 file cannot be obtained from the first data block. A downgraded acquisition process can be triggered, using conventional processing methods to traverse the standard data of the MP4 file and locate, read, and parse the entire moov box to obtain the key data of the MP4 file from the moov box, thus avoiding failure in obtaining the key metadata of the MP4 file. This ensures the robustness of key metadata acquisition.
[0084] Optionally, the apparatus for obtaining key metadata of MP4 files further includes: The fifth module 450 is used to serialize and verify the key metadata obtained from the standard data of the MP4 file to obtain a second data block of the preset first byte length, and to overwrite the storage area of the first data block corresponding to the MP4 file on the disk with the second data block to update the first data block of the MP4 file.
[0085] If the key metadata of the MP4 file is obtained from the moov box of the standard data of the MP4 file through the fourth module 440, it indicates that the data of the first data block of the MP4 file is incomplete. In this optional embodiment, the key metadata of the MP4 file obtained from the moov box of the standard data can be serialized and verified through the fifth module 450 of the device to obtain a second data block of a preset first byte length (i.e., the same byte length as the first data block). The second data block is then written to the storage area of the first data block corresponding to the MP4 file on the disk to update the first data block of the MP4 file. This allows the key metadata of the MP4 file to be quickly obtained through the first data block in the future, avoiding the need to traverse the standard data of the MP4 file and locate, read, and parse the entire moov box each time.
[0086] Optionally, the apparatus for obtaining key metadata of MP4 files further includes: Module 460 is used to retrieve key metadata of each untagged MP4 file from a local database.
[0087] Based on the comparison results in the third module 430, MP4 files whose file information completely matches are not marked. For each unmarked MP4 file, it indicates that the relevant MP4 file was stored on the disk during the last scan and has not changed since then; it can be considered an MP4 file whose file information and key metadata have been cached in the local database. In this optional embodiment, the key metadata of the unmarked MP4 file can be directly obtained from the local database through the sixth module 460 of the device, without needing to obtain the first data block corresponding to the MP4 file from the disk and perform corresponding deserialization and verification processing. The key metadata is obtained after successful processing, further improving the acquisition efficiency.
[0088] Optionally, the apparatus for obtaining key metadata of MP4 files further includes: Module 7, 470, is used to write the file information and key metadata of each tagged MP4 file to a local database.
[0089] For each MP4 file that has been temporarily marked, if there is no record of it in the local database or the relevant information has been updated, in this optional embodiment, the file information and key metadata of the relevant MP4 files can be incrementally written to or overwritten into the local database through the seventh module 470 of the device. This ensures that after the scan, the file information and key metadata of the MP4 files recorded in the local database are consistent with the MP4 files stored on the disk, further improving the efficiency of obtaining the key metadata of the batch of MP4 files stored on the disk.
[0090] In the above-described device embodiments and / or optional embodiments, the method steps corresponding to the functions that can be achieved by each component module 410-470 of the device are the same as the relevant steps S201-S207 in the aforementioned related method embodiments and / or optional embodiments, and will not be repeated here.
[0091] According to another aspect of this application, a computer-readable medium is also provided, the computer-readable medium storing computer-readable instructions that can be executed by a processor to implement some or all of the foregoing method embodiments and / or optional embodiments.
[0092] It should be noted that the method embodiments and / or optional embodiments in this application do not strictly limit the order of execution of each step, as long as the method embodiments and / or optional embodiments can solve the defects existing in the prior art, achieve the inventive purpose of this application, and obtain beneficial effects. The method embodiments and / or optional embodiments in this application can be implemented in software and / or combinations of software and hardware. The software program involved in this application can be executed by a processor to implement the steps or functions of the above embodiments. Similarly, the software program of this application (including related data structures) can be stored in a computer-readable recording medium.
[0093] Furthermore, part or all of this application can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to this application through the operation of the computer. The program instructions invoking the methods of this application may be stored in a fixed or removable recording medium, and / or transmitted via data streams in broadcast or other signal carrying media, and / or stored in the working memory of a computer device operating according to the program instructions.
[0094] According to another aspect of this application, an audio-visual recording device is also provided, the device comprising: a memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, the device is triggered to run part or all of the methods and / or technical solutions of the foregoing embodiments.
[0095] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.
[0096] In this application, when terms such as "upper," "lower," "left," "right," "front," "rear," "top," "bottom," "inner," "outer," "middle," "vertical," "horizontal," "lateral," and "longitudinal" are used, the indicated orientation and / or positional relationship is based on the orientation and / or positional relationship shown in the accompanying drawings. These terms are primarily for the purpose of better describing this application and its embodiments, and are not intended to limit the indicated device, element, or component to having a specific orientation, or to be constructed and operated in a specific orientation. Furthermore, some of the above terms, in addition to indicating orientation or positional relationship, can also be used to indicate other meanings; for example, the term "upper" can also be used in some cases to indicate a certain dependency or connection relationship. Those skilled in the art can understand the specific meaning of these terms in this application according to the specific circumstances. Furthermore, the terms "installation," "setup," "equipped with," "connection," and "linked" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral structure; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection via an intermediate medium; and they can refer to an internal connection between two devices, components, or constituent parts. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.
[0097] Furthermore, the terms "first," "second," etc., are primarily used to distinguish different devices, units, modules, elements, circuits, or components (which may be the same or different in specific type and construction), and are not intended to indicate or imply the relative importance, order, and / or quantity of the indicated devices, units, modules, elements, circuits, or components. Unless otherwise stated, "a plurality of" means two or more.
[0098] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices recited in the apparatus claims may also be implemented by a single unit or device through software and / or hardware.
Claims
1. A method for obtaining key metadata of MP4 files, applied to an audio / video recording device, characterized in that, The method includes: When an MP4 file is generated during recording, the key metadata of the MP4 file is obtained, and after serialization and verification, it is processed into a first data block of a preset first byte length, which is written to the disk together with the standard data of the MP4 file. The first data block is stored before the standard data of the MP4 file. When scanning the disk, for each MP4 file stored on the disk, the first data block corresponding to the MP4 file is obtained, and the first data block is deserialized and verified. If successful, the key metadata of the MP4 file is extracted from the processing result.
2. The method according to claim 1, characterized in that, The first data block, which has been serialized and verified to a preset first byte length, includes: The key metadata of the MP4 file is serialized. After adjusting the serialized data to a preset second byte length, a preset verification algorithm is used to calculate the checksum of the adjusted data. The checksum is appended to the end of the adjusted data to obtain a first data block of a preset first byte length.
3. The method according to claim 1, characterized in that, The deserialization and verification processing of the first data block further includes: If this fails, the key metadata of the MP4 file is obtained from the standard data of the MP4 file.
4. The method according to claim 3, characterized in that, The method further includes: The key metadata obtained from the standard data of the MP4 file is serialized and verified to obtain a second data block of the preset first byte length. The second data block is then written to the storage area of the first data block corresponding to the MP4 file on the disk to update the first data block of the MP4 file.
5. A method for obtaining key metadata of MP4 files, applied to an audio / video recording device, characterized in that, The method includes: When an MP4 file is generated during recording, the key metadata of the MP4 file is obtained, and after serialization and verification, it is processed into a first data block of a preset first byte length, which is written to the disk together with the standard data of the MP4 file. The first data block is stored before the standard data of the MP4 file. When scanning the disk, based on the disk's file system, file information for each MP4 file stored on the disk is obtained, wherein the file information includes at least the storage path and update time of the MP4 file; The file information of MP4 files in the disk is compared with the file information of MP4 files stored in the local database. Based on the comparison results, the relevant MP4 files stored in the disk are marked. The local database records the file information and key metadata of each MP4 file stored in the disk during the last scan. For each marked MP4 file, obtain the first data block corresponding to the MP4 file, and perform deserialization and verification processing on the first data block. If successful, extract the key metadata of the MP4 file from it.
6. The method according to claim 5, characterized in that, The MP4 files stored on the disk include at least one of the following: MP4 files stored on the disk but not recorded in the local database; The MP4 files stored on the disk and recorded in the local database, but updated later than those recorded in the local database.
7. The method according to claim 5, characterized in that, The deserialization and verification processing of the first data block further includes: If this fails, the key metadata of the MP4 file is obtained from the standard data of the MP4 file.
8. The method according to claim 7, characterized in that, The method further includes: The key metadata obtained from the standard data of the MP4 file is serialized and verified to obtain a second data block of the preset first byte length. The second data block is then written to the storage area of the first data block corresponding to the MP4 file on the disk to update the first data block of the MP4 file.
9. The method according to claim 5, characterized in that, The method further includes: For each untagged MP4 file, retrieve the key metadata of the MP4 file from the local database.
10. The method according to claim 5, characterized in that, The method further includes: Write the file information and key metadata of each tagged MP4 file to a local database.
11. An apparatus for acquiring key metadata of MP4 files, deployed in an audio / video recording device, characterized in that, The device includes: The first module is used to obtain the key metadata of the MP4 file when an MP4 file is generated by recording, and to serialize and verify it into a first data block of a preset first byte length, and write it to the disk together with the standard data of the MP4 file, wherein the first data block is stored before the standard data of the MP4 file. The second module is used to, when scanning the disk, obtain the first data block corresponding to each MP4 file stored in the disk, and perform deserialization and verification processing on the first data block. If successful, the key metadata of the MP4 file is extracted from the processing result.
12. The apparatus according to claim 11, characterized in that, The second module is also used for: If this fails, the key metadata of the MP4 file is obtained from the standard data of the MP4 file.
13. The apparatus according to claim 11, characterized in that, The device further includes: The third module is used to serialize and verify the key metadata obtained from the standard data of the MP4 file to obtain a second data block of the preset first byte length, and to overwrite the storage area of the first data block corresponding to the MP4 file on the disk with the second data block to update the first data block of the MP4 file.
14. An apparatus for acquiring key metadata of MP4 files, deployed in an audio / video recording device, characterized in that, The device includes: The first module is used to obtain the key metadata of the MP4 file when an MP4 file is generated by recording, and to serialize and verify it into a first data block of a preset first byte length, and write it to the disk together with the standard data of the MP4 file, wherein the first data block is stored before the standard data of the MP4 file. The second module is used to obtain file information of each MP4 file stored on the disk based on the file system of the disk when scanning the disk, wherein the file information includes at least the storage path and update time of the MP4 file; The third module is used to compare the file information of MP4 files in the disk with the file information of MP4 files stored in the local database, and to mark the relevant MP4 files stored in the disk according to the comparison results. The local database records the file information and key metadata of each MP4 file stored in the disk during the last scan. The fourth module is used to obtain the first data block corresponding to each marked MP4 file, and to perform deserialization and verification processing on the first data block. If successful, the key metadata of the MP4 file is extracted from it.
15. The apparatus according to claim 14, characterized in that, The fourth module is also used for: If this fails, the key metadata of the MP4 file is obtained from the standard data of the MP4 file.
16. The apparatus according to claim 15, characterized in that, The device further includes: The fifth module is used to serialize and verify the key metadata obtained from the standard data of the MP4 file to obtain a second data block of the preset first byte length, and to overwrite the storage area of the first data block corresponding to the MP4 file on the disk with the second data block to update the first data block of the MP4 file.
17. The apparatus according to claim 14, characterized in that, The device further includes: The sixth module is used to retrieve key metadata of each untagged MP4 file from the local database.
18. The apparatus according to claim 14, characterized in that, The device further includes: The seventh module is used to write the file information and key metadata of each tagged MP4 file to a local database.
19. A computer-readable medium, characterized in that, It stores computer-readable instructions that are executed by a processor to implement part or all of the method as claimed in any one of claims 1 to 10.
20. An audio-visual recording device, characterized in that, The device includes: One or more processors; and A memory storing computer-readable instructions, which, when executed, cause the processor to perform some or all of the operations of the method as described in any one of claims 1 to 10.