CN112732180B - Information processing method, processing device, electronic equipment and storage medium - Google Patents
Information processing method, processing device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN112732180B CN112732180B CN202011604466.4A CN202011604466A CN112732180B CN 112732180 B CN112732180 B CN 112732180B CN 202011604466 A CN202011604466 A CN 202011604466A CN 112732180 B CN112732180 B CN 112732180B
- Authority
- CN
- China
- Prior art keywords
- data block
- frame
- information
- writing
- frame sequence
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0638—Organizing or formatting or addressing of data
- G06F3/064—Management of blocks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/11—File system administration, e.g. details of archiving or snapshots
- G06F16/116—Details of conversion of file system types or formats
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0626—Reducing size or complexity of storage systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0629—Configuration or reconfiguration of storage systems
- G06F3/0631—Configuration or reconfiguration of storage systems by allocating resources to storage systems
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/76—Television signal recording
- H04N5/91—Television signal processing therefor
- H04N5/92—Transformation of the television signal for recording, e.g. modulation, frequency changing; Inverse transformation for playback
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Signal Processing For Digital Recording And Reproducing (AREA)
Abstract
The information processing method, the processing device, the electronic equipment and the storage medium provided by the invention can store the media parameter information depended by the recombined fourth data block, namely the data block containing the audio and video track summary information, in the second data block in real time, namely the packaging format file, so that the packaging format file carries the media parameter information necessary for damage repair without maintaining the mapping relation between an external file and the packaging format file, the storage complexity is reduced, and the maintenance is simple.
Description
Technical Field
The present invention relates to the field of communications technologies, and in particular, to an information processing method, a processing apparatus, an electronic device, and a storage medium.
Background
In a video scene with Mp4 or Mov as the package format, taking the package format file as Mp4 as an example, the video is often interrupted accidentally due to a device drop or other abnormal situations, so that the Mp4 file is damaged and cannot be played. The reason is that the damaged MP4 file lacks a data block containing the audio/video track summary information, and the organization structure of the data block is a nested data structure, which is inconvenient for real-time writing during recording.
The existing solution is to write the media parameter information required for reconstructing the data blocks into another external file during recording, and when the MP4 file needs to be repaired, reconstruct the data blocks according to the information recorded in the external file, and write the data blocks back into the MP4 file, so as to achieve the purpose of repairing the file. However, this requires additional maintenance of mapping relationship between the MP4 file and the external file, which is inconvenient to use.
Disclosure of Invention
In view of the above, in order to solve the above problems, the present invention provides an information processing method, a processing apparatus, an electronic device, and a storage medium, and the technical solution is as follows:
an information processing method, the method comprising:
responding to a packaging instruction of a media format file obtained by video recording, creating a first data block, and writing version information of the media format file into the first data block;
creating a second data block adjacent to the first data block, and writing the coding information of the media format file into the second data block;
creating a third data block adjacent to the second data block, and sequentially writing frame data of the media format file into the third data block in a frame sequence mode, wherein one frame sequence consists of a plurality of frame data which are of the same type and are adjacent in time;
and monitoring a frame sequence currently in a writing end state in the third data block, and writing frame parameter information of the frame sequence currently in the end state into the second data block, wherein the coding information and the frame parameter information written into the second data block are media parameter information for realizing recombination.
Preferably, after the monitoring the sequence of frames currently in the write-end state in the third data block, the method further includes:
acquiring the size of the free storage space of the second data block;
judging whether the size of the free storage space is larger than the size of the frame parameter of the frame sequence in the ending state at present;
and if so, writing the frame parameter information of the frame sequence currently in the ending state into the second data block.
Preferably, the method further comprises:
if not, moving the frame sequence positioned at the starting position in the third data block to the tail position of the third data block;
updating the starting position of the third data block to increase the free storage space of the second data block, and returning to execute the judgment whether the size of the free storage space is larger than the size of the frame parameter of the frame sequence currently in the ending state;
and updating the frame parameter information of the frame sequence moved to the tail position of the third data block in the second data block.
Preferably, the method further comprises:
responding to a video abnormal instruction, and recombining a fourth data block containing audio and video track summary information based on the coding information and the frame parameter information written in the second data block;
or
Responding to a normal video finishing instruction, creating a fourth data block containing audio and video track summary information, and writing the audio and video track summary information of the media format file into the fourth data block;
and erasing the coding information and the frame parameter information written in the second data block.
An information processing apparatus, the apparatus comprising:
the creating and writing module is used for responding to a packaging instruction of a media format file obtained by video recording, creating a first data block and writing the version information of the media format file into the first data block; creating a second data block adjacent to the first data block, and writing the coding information of the media format file into the second data block; creating a third data block adjacent to the second data block, and sequentially writing frame data of the media format file into the third data block in a frame sequence mode, wherein one frame sequence is composed of a plurality of frame data of the same type and adjacent time;
and the monitoring and writing module is used for monitoring the frame sequence currently in the writing end state in the third data block and writing the frame parameter information of the frame sequence currently in the writing end state into the second data block, wherein the coding information and the frame parameter information written into the second data block are media parameter information for realizing recombination.
Preferably, the monitoring writing module is further configured to:
acquiring the size of the free storage space of the second data block; judging whether the size of the free storage space is larger than the size of the frame parameter of the frame sequence in the ending state at present; and if so, writing the frame parameter information of the frame sequence currently in the ending state into the second data block.
Preferably, the monitoring writing module is further configured to:
if not, moving the frame sequence positioned at the starting position in the third data block to the tail position of the third data block; updating the starting position of the third data block to increase the free storage space of the second data block, and returning to execute the judgment whether the size of the free storage space is larger than the size of the frame parameter of the frame sequence currently in the ending state; updating frame parameter information in the second data block for the sequence of frames moved to the end position of the third data block.
Preferably, the create write module is further configured to:
responding to a video abnormal instruction, and recombining a fourth data block containing audio and video track summary information based on the coding information and the frame parameter information written in the second data block;
or
Responding to a normal video recording ending instruction, creating a fourth data block containing audio and video track summary information, and writing the audio and video track summary information of the media format file into the fourth data block; and erasing the coding information and the frame parameter information written in the second data block.
An electronic device, the electronic device comprising: at least one memory and at least one processor; the memory stores a program, and the processor calls the program stored in the memory, the program being for implementing any of the information processing methods.
A storage medium having stored therein computer-executable instructions for executing any one of the information processing methods.
The information processing method, the processing device, the electronic equipment and the storage medium provided by the invention can store the media parameter information depended by the recombined fourth data block, namely the data block containing the audio and video track summary information, in the second data block in real time, namely the packaging format file, so that the packaging format file carries the media parameter information necessary for damage repair without maintaining the mapping relation between an external file and the packaging format file, the storage complexity is reduced, and the maintenance is simple.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flowchart of a method of processing information according to an embodiment of the present invention;
fig. 2 is a schematic diagram of an MP4 file structure according to an embodiment of the present invention;
FIG. 3 is an example of a free box data block according to an embodiment of the present invention;
FIG. 4 is a schematic diagram illustrating the expansion of a storage space of a free box data block according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an information processing apparatus according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
The information processing scheme provided by the invention can be applied to recordable products, such as law enforcement recorder applications of related terminals, and is used for repairing package format files when the video recording is abnormally interrupted, and the MP4 file is used for the following description of the present application, and it can be understood that other package formats (any file formats including following typ box data block, free box data block, mdat box data block and moov box data block), which are not listed, are also within the protection scope of the present application.
To facilitate understanding of the present invention, the following description first deals with the structure of an MP4 file:
the structure of the MP4 file includes ftypbox (file type and compatibility) data blocks, free box data blocks, mdat box (media data container) data blocks, and moov box data blocks.
The ftyp box data block is used for storing version information of the file; the content in the free box data block is irrelevant, and can be ignored, and after being added or deleted, the content will not affect the playing, and generally speaking, the content is empty; the mdatbox data block is used for storing audio/video encoded frame data, and is internally composed of an audio frame sequence (i.e. audio frame sequence) or a video frame sequence (i.e. video frame sequence), and the frame sequence (also referred to as Chunk in the industry) is composed of a set of encoded audio frame data or a set of encoded video frame data; the moov box data block records the audio and video coded metadata, i.e. video track summary information.
At present, the order of storing the data blocks in the file in the MP4 file format standard is not required. The present invention requires that the free box data block and the mdat box data block be placed adjacent to each other, and that the free box data block be located before the mdat box data block. For details, see the following example disclosure.
In summary, from the definition of the MP4 file structure, the irrelevance of the content of the free box data block can be known, so the present invention proposes to store the media parameter information required for repairing the damage of the late moov box data block generated during the video recording process into the free box data block in real time, and read the content in the free box data block during the repair, that is, the missing moov box data block can be reconstructed by using the information, thereby achieving the purpose of repairing the MP4 file.
See the method flow diagram shown in fig. 1. The embodiment of the invention provides an information processing method, which comprises the following steps:
s10, responding to a packaging instruction of the media format file obtained by video recording, creating a first data block, and writing the version information of the media format file into the first data block.
In an embodiment of the present invention, the media format file is encoded frame data, and the frame data includes at least one of audio frame data and video frame data.
In addition, in the embodiment of the present invention, a first data block is created, that is, an ftyp box data block is created, and version information of the media format file, such as the MP4_ V1 version, is written in the ftyp box data block.
And S20, creating a second data block adjacent to the first data block, and writing the coding information of the media format file into the second data block.
Referring to the MP4 file structure shown in fig. 2, in the embodiment of the present invention, a second data block, i.e., a free box data block, is disposed adjacent to an ftyp box data block, and a certain storage space is allocated, and coding information is written into the free box data block, where the coding information includes audio parameters and video parameters, the audio parameters include an audio coding type, a sampling rate, and a channel, and the video parameters include a video coding type, a resolution, and a frame rate.
And S30, creating a third data block adjacent to the second data block, and sequentially writing frame data of the media format file into the third data block in a frame sequence mode, wherein one frame sequence is composed of a plurality of frame data of the same type and adjacent time.
With continued reference to the MP4 file structure shown in fig. 2, in the embodiment of the present invention, the third data block, i.e., the mdat box data block, is disposed adjacent to the free box data block, and the frame data in the memory is written into the mdat box data block in the form of a frame sequence, where one frame sequence may be an audio frame sequence or a video frame sequence.
It should be noted that, the arrangement of the audio frame sequence and the video frame sequence in the plurality of frame sequences is not limited in the embodiments of the present invention. In practical applications, the memory may start an audio frame sequence and a video frame sequence simultaneously, and when a plurality of audio frame data in the memory meet a corresponding frame sequence end condition, the plurality of audio frame data are combined into an audio frame sequence, and correspondingly, when a plurality of video frame data in the memory meet a corresponding frame sequence end condition, the plurality of video frame data are combined into a video frame sequence. The above-described frame sequence end condition may be set for the number of frames, and may also be set for the key frame.
And S40, monitoring the frame sequence currently in the writing ending state in the third data block, and writing the frame parameter information of the frame sequence currently in the ending state into the second data block, wherein the coding information and the frame parameter information written into the second data block are media parameter information for realizing recombination.
See fig. 3 for an example of a free box data block. When the frame sequence Chunk1 in the mdat box data block finishes writing and Chunk2 starts writing, the frame parameter information related to Chunk1 is written into the free box data block. Taking the Chunk1 frame parameter information as an example, "2-byte length size" is the data amount of the frame parameter information in the free box data block, "4-byte Chunk offset" is the offset of the beginning position of Chunk1 in the mdat box data block, "4-byte frame size" is the data amount of the single frame data in Chunk1 in the mdat box data block, and "4-byte frame timestamp" is the timestamp of the single frame data in Chunk 1.
The audio parameters, video parameters, and frame parameter information of multiple chunks written in the free box data block are media parameter information necessary for reconstructing the moov box data block. However, how to reconstruct the moov box data block based on the information written in the free box data block may be implemented in any manner, which is not limited in the present invention.
In other embodiments, since the storage space of the free box data block is reserved, there may be a problem of insufficient storage space during the video recording process, and to solve this problem, after the step S40 "monitoring the frame sequence currently in the write-end state in the third data block" is executed, the following steps may also be executed:
acquiring the size of a free storage space of a second data block; judging whether the size of the free storage space is larger than the size of the frame parameter of the frame sequence in the ending state at present; if yes, step S40 "write the frame parameter information of the frame sequence currently in the end state into the second data block" is executed.
Continuing with the free box data block example shown in FIG. 3. In the embodiment of the invention, a certain storage space is allocated to the free box data block in advance, so when the frame sequence Chunk3 in the mdat box data block finishes writing and Chunk4 starts writing, whether the size of the unoccupied part of the storage space, namely the size of the free storage space, is larger than or equal to the size (data volume) of the Chunk3 frame parameter information is judged by acquiring the size of the free storage space in real time, and if so, the Chunk3 frame parameter information can be written into the free box data block, otherwise, the Chunk3 frame parameter information cannot be written into the free box data block.
On this basis, in order to deal with the situation that the free storage space of the free box data block is not enough to write the Chunk3 frame parameter information, the embodiment of the invention further comprises the following steps:
if not, moving the frame sequence positioned at the starting position in the third data block to the tail position of the third data block; updating the initial position of the third data block to increase the free storage space of the second data block, and returning to execute the judgment whether the size of the free storage space is larger than the size of the frame parameter of the frame sequence in the ending state currently; frame parameter information in the second data block of the frame sequence moved to the end position of the third data block is updated.
See fig. 4 for a schematic diagram of expansion of the storage space of the free box data block. In the present invention, the free box data block and the mdat box data block are adjacently arranged, and the free box data block is before the mdat box data block, so that the content of the frame sequence Chunk near the start position of the mdat box data block (i.e. the Chunk located at the start position in the mdat box data block) can be moved to the end of the mdat box data block by utilizing the independence of the Chunk sequence in the mdat box data block, and the frame sequence Chunk1 in fig. 4 is moved to the back of the frame sequence Chunk 3.
Further, the start bit of the mdat box data block is changed, the storage space of the free box data block is expanded, and the offset of the shifted frame sequence Chunk recorded in the free box data block is updated. In order to free enough storage space for the free box data blocks for recording the corruption repair information.
In some other embodiments, for a scene with abnormal recording, the embodiment of the present invention may further include the following steps: and responding to the video abnormal instruction, and recombining a fourth data block containing audio and video track summary information based on the coding information and the frame parameter information written in the second data block.
It should be noted that how to reconstruct the moov box data block based on the information written in the free box data block may be implemented in any manner, and the present invention is not limited to this.
For a scene where the video recording is normally ended, the embodiment of the present invention may further include the following steps:
responding to a normal video recording ending instruction, creating a fourth data block containing audio and video track summary information, and writing the audio and video track summary information of the media format file into the fourth data block; and erasing the coding information and the frame parameter information written in the second data block.
In the embodiment of the invention, when the video recording is normally finished, a complete moov box data block can be created into an MP4 file, the moov box data block is written into audio and video track summary information, the audio track summary information comprises coding information and frame parameter information of a frame sequence, and other information, and at the moment, the information written into the free box data block can be erased.
The invention designs a scheme for storing media parameter information depended by the damage repair moov box data block in the MP4 file in real time in the video recording process, so that the MP4 file carries the media parameter information required by the damage repair, compared with the existing scheme, the mapping relation between the MP4 file and an external file is not required to be maintained additionally, the complexity of a storage module is reduced, and the maintenance is simple.
In addition, the method for storing the private data of the MP4 format file is provided by skillfully arranging the internal structure of the MP4 file and the regular moving Chunk file structure. Of course, the method is also suitable for the packaging format similar to the Mp4 file, such as the Mov format, i.e. the invention is also suitable for storing other customized private data.
Based on the information processing method provided in the foregoing embodiment, an embodiment of the present invention provides an apparatus for executing the information processing method, where a schematic structural diagram of the apparatus is shown in fig. 5, and the apparatus includes:
a creating and writing module 10, configured to create a first data block in response to a packaging instruction for a media format file obtained by video recording, and write version information of the media format file into the first data block; creating a second data block adjacent to the first data block, and writing the coding information of the media format file into the second data block; creating a third data block adjacent to the second data block, and sequentially writing frame data of the media format file into the third data block in a frame sequence mode, wherein one frame sequence consists of a plurality of frame data which are of the same type and are adjacent in time;
and a monitoring and writing module 20, configured to monitor a frame sequence currently in a writing end state in the third data block, and write frame parameter information of the frame sequence currently in the end state into the second data block, where the coding information and the frame parameter information written in the second data block are media parameter information for implementing reassembly.
Optionally, the monitoring writing module 20 is further configured to:
acquiring the size of a free storage space of a second data block; judging whether the size of the free storage space is larger than the size of the frame parameter of the frame sequence in the ending state at present; and if so, writing the frame parameter information of the frame sequence currently in the ending state into the second data block.
Optionally, the monitoring writing module 20 is further configured to:
if not, moving the frame sequence positioned at the starting position in the third data block to the tail position of the third data block; updating the initial position of the third data block to increase the free storage space of the second data block, and returning to execute the judgment whether the size of the free storage space is larger than the size of the frame parameter of the frame sequence in the ending state currently; frame parameter information in the second data block of the frame sequence moved to the end position of the third data block is updated.
Optionally, the writing module 10 is further configured to:
responding to the video abnormal instruction, and recombining a fourth data block containing audio and video track summary information based on the coding information and the frame parameter information written in the second data block;
or alternatively
Responding to a normal video recording ending instruction, creating a fourth data block containing audio and video track summary information, and writing the audio and video track summary information of the media format file into the fourth data block; and erasing the coding information and the frame parameter information written in the second data block.
The information processing device provided by the embodiment of the invention can store the media parameter information depended by the recombined fourth data block, namely the data block containing the audio and video track summary information, in the second data block in real time, namely the packaged format file, so that the packaged format file carries the media parameter information necessary for damage repair without maintaining the mapping relation between the external file and the packaged format file, the storage complexity is reduced, and the maintenance is simple.
An embodiment of the present invention further provides an electronic device, where the electronic device includes: at least one memory and at least one processor; the memory stores a program, and the processor calls the program stored in the memory, and the program is used for realizing the information processing method provided by the above embodiment.
The embodiment of the invention also provides a storage medium, wherein the storage medium stores computer-executable instructions, and the computer-executable instructions are used for executing the information processing method provided by the embodiment.
The foregoing detailed description of the information processing method, processing apparatus, electronic device and storage medium provided by the present invention has been presented, and specific examples are applied herein to illustrate the principles and implementations of the present invention, and the above descriptions of the examples are only used to help understand the method and the core ideas of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
It is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include or include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (10)
1. An information processing method, characterized in that the method comprises:
responding to a packaging instruction of a media format file obtained by video recording, creating a first data block, and writing version information of the media format file into the first data block;
creating a second data block adjacent to the first data block, and writing the coding information of the media format file into the second data block, wherein after the data stored in the second data block is added or deleted, no influence is generated on playing;
creating a third data block adjacent to the second data block, and sequentially writing frame data of the media format file into the third data block in a frame sequence mode, wherein one frame sequence is composed of a plurality of frame data of the same type and adjacent time;
monitoring a frame sequence currently in a writing end state in the third data block, and writing frame parameter information of the frame sequence currently in the writing end state into the second data block, wherein the coding information and the frame parameter information written in the second data block are media parameter information for realizing recombination.
2. The method of claim 1, wherein after monitoring the sequence of frames currently in a write-end state in the third data block, the method further comprises:
acquiring the size of the free storage space of the second data block;
judging whether the size of the free storage space is larger than the size of the frame parameter of the frame sequence in the ending state at present;
and if so, writing the frame parameter information of the frame sequence currently in the ending state into the second data block.
3. The method of claim 2, further comprising:
if not, moving the frame sequence positioned at the starting position in the third data block to the tail position of the third data block;
updating the starting position of the third data block to increase the free storage space of the second data block, and returning to execute the judgment whether the size of the free storage space is larger than the size of the frame parameter of the frame sequence currently in the ending state;
and updating the frame parameter information of the frame sequence moved to the tail position of the third data block in the second data block.
4. The method of claim 1, further comprising:
responding to a video abnormal instruction, and recombining a fourth data block containing audio and video track summary information based on the coding information and the frame parameter information written in the second data block;
or
Responding to a normal video finishing instruction, creating a fourth data block containing audio and video track summary information, and writing the audio and video track summary information of the media format file into the fourth data block;
and erasing the coding information and the frame parameter information written in the second data block.
5. An information processing apparatus characterized in that the apparatus comprises:
the creating and writing module is used for responding to a packaging instruction of a media format file obtained by video recording, creating a first data block and writing the version information of the media format file into the first data block; creating a second data block adjacent to the first data block, and writing the coding information of the media format file into the second data block, wherein after the data stored in the second data block is added or deleted, no influence is generated on the playing; creating a third data block adjacent to the second data block, and sequentially writing frame data of the media format file into the third data block in a frame sequence mode, wherein one frame sequence consists of a plurality of frame data which are of the same type and are adjacent in time;
and the monitoring and writing module is used for monitoring the frame sequence currently in the writing end state in the third data block and writing the frame parameter information of the frame sequence currently in the writing end state into the second data block, wherein the coding information and the frame parameter information written into the second data block are media parameter information for realizing recombination.
6. The apparatus of claim 5, wherein the monitor write module is further configured to:
acquiring the size of the free storage space of the second data block; judging whether the size of the free storage space is larger than the size of the frame parameter of the frame sequence in the ending state at present; and if so, writing the frame parameter information of the frame sequence currently in the ending state into the second data block.
7. The apparatus of claim 6, wherein the monitor write module is further configured to:
if not, moving the frame sequence positioned at the starting position in the third data block to the tail position of the third data block; updating the starting position of the third data block to increase the free storage space of the second data block, and returning to execute the judgment whether the size of the free storage space is larger than the size of the frame parameter of the frame sequence currently in the ending state; and updating the frame parameter information of the frame sequence moved to the tail position of the third data block in the second data block.
8. The apparatus of claim 5, wherein the create write module is further configured to:
responding to a video abnormal instruction, and recombining a fourth data block containing audio and video track summary information based on the coding information and the frame parameter information written in the second data block;
or
Responding to a normal video recording ending instruction, creating a fourth data block containing audio and video track summary information, and writing the audio and video track summary information of the media format file into the fourth data block; and erasing the coding information and the frame parameter information written in the second data block.
9. An electronic device, characterized in that the electronic device comprises: at least one memory and at least one processor; the memory stores a program that the processor calls, the program being for implementing the information processing method according to any one of claims 1 to 4.
10. A storage medium having stored therein computer-executable instructions for performing the information processing method of any one of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011604466.4A CN112732180B (en) | 2020-12-29 | 2020-12-29 | Information processing method, processing device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011604466.4A CN112732180B (en) | 2020-12-29 | 2020-12-29 | Information processing method, processing device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112732180A CN112732180A (en) | 2021-04-30 |
CN112732180B true CN112732180B (en) | 2023-04-14 |
Family
ID=75610778
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011604466.4A Active CN112732180B (en) | 2020-12-29 | 2020-12-29 | Information processing method, processing device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112732180B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113986623A (en) * | 2021-10-25 | 2022-01-28 | 威盛电子(深圳)有限公司 | Method, device and computer readable storage medium for creating MP4 file |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103404146A (en) * | 2013-03-11 | 2013-11-20 | 华为技术有限公司 | Video file repairing method and device |
CN105872484A (en) * | 2016-06-04 | 2016-08-17 | 武汉诚迈科技有限公司 | Protection method of monitoring video abnormity |
US9575642B1 (en) * | 2014-01-28 | 2017-02-21 | Wiltech, Inc. | System and method for managing digital media playback |
CN108093299A (en) * | 2017-12-22 | 2018-05-29 | 厦门市美亚柏科信息股份有限公司 | MP4 damages the restorative procedure and storage medium of file |
CN110781037A (en) * | 2020-01-02 | 2020-02-11 | 成都易我科技开发有限责任公司 | Method and system for recovering video file in storage medium and readable storage medium |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4264833B2 (en) * | 2005-06-17 | 2009-05-20 | ソニー株式会社 | Recording apparatus and method, program, and recording medium |
US10223343B2 (en) * | 2015-03-17 | 2019-03-05 | Goessential Inc. | Method for providing selection overlays on electronic consumer content |
CN105847724B (en) * | 2016-04-12 | 2018-12-07 | 深圳市极酷威视科技有限公司 | A kind of video record power-off protection method and device |
KR101890429B1 (en) * | 2017-05-11 | 2018-08-21 | 펜타시큐리티시스템 주식회사 | Apparatus and method for verifying integrity of video file based on characteristics information of video recording device |
-
2020
- 2020-12-29 CN CN202011604466.4A patent/CN112732180B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103404146A (en) * | 2013-03-11 | 2013-11-20 | 华为技术有限公司 | Video file repairing method and device |
US9575642B1 (en) * | 2014-01-28 | 2017-02-21 | Wiltech, Inc. | System and method for managing digital media playback |
CN105872484A (en) * | 2016-06-04 | 2016-08-17 | 武汉诚迈科技有限公司 | Protection method of monitoring video abnormity |
CN108093299A (en) * | 2017-12-22 | 2018-05-29 | 厦门市美亚柏科信息股份有限公司 | MP4 damages the restorative procedure and storage medium of file |
CN110781037A (en) * | 2020-01-02 | 2020-02-11 | 成都易我科技开发有限责任公司 | Method and system for recovering video file in storage medium and readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN112732180A (en) | 2021-04-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108093299B (en) | Method for repairing damaged MP4 file and storage medium | |
CN101661787B (en) | Data recording method | |
CN1643605B (en) | Data recording method, data recording device, data recording medium, data reproduction method, and data reproduction device | |
KR100288203B1 (en) | Real time data recording method | |
CN105872484B (en) | A kind of abnormal guard method of monitoring video | |
JP2007012112A (en) | Data recording device and method thereof, program, and recording medium | |
WO2006014561A2 (en) | Recovery of real-time video data after power loss | |
JP2000076785A5 (en) | ||
CN108322808A (en) | A kind of video record processing method and processing device, computer installation, storage medium | |
CN112732180B (en) | Information processing method, processing device, electronic equipment and storage medium | |
CN106600750A (en) | Method and system for loop recording and tachograph | |
US8868429B2 (en) | Method and device for storing audio data | |
CN100527252C (en) | Recording apparatus and recording method | |
JP2013528823A5 (en) | ||
CN117834979A (en) | MP4 video recording method and system capable of realizing power-off protection | |
CN102930875B (en) | A kind of method of real-time synchronization video and audio recording | |
CN113660442B (en) | Video restoration method and device, electronic equipment and readable medium | |
CN107800917A (en) | Archival digitalization Machining Intelligent process flow line platform | |
JP2019075628A (en) | Recording device | |
TWI555406B (en) | Storage method and processing device and video recording system thereof | |
CN103165155B (en) | Pen recorder and control method thereof | |
CN103165154A (en) | Recording apparatus | |
JP2012049956A (en) | Semiconductor integrated circuit loadable to drive recorder and method of operating the same | |
CN100454225C (en) | An apparatus for and a method of storing a real time stream of digital information signals | |
KR20100078810A (en) | Method and apparatus for recording and reading information |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |