CN112416873A - Method and device for recovering video fragment file, computer equipment and storage medium - Google Patents

Method and device for recovering video fragment file, computer equipment and storage medium Download PDF

Info

Publication number
CN112416873A
CN112416873A CN202011292459.5A CN202011292459A CN112416873A CN 112416873 A CN112416873 A CN 112416873A CN 202011292459 A CN202011292459 A CN 202011292459A CN 112416873 A CN112416873 A CN 112416873A
Authority
CN
China
Prior art keywords
file
fragment
type
fragments
video
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.)
Granted
Application number
CN202011292459.5A
Other languages
Chinese (zh)
Other versions
CN112416873B (en
Inventor
蔡文锦
彭重阳
王志雄
孙守贤
谢智宏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wanxing Technology Group Co ltd
Original Assignee
Wanxing Technology Group Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Wanxing Technology Group Co ltd filed Critical Wanxing Technology Group Co ltd
Priority to CN202011292459.5A priority Critical patent/CN112416873B/en
Publication of CN112416873A publication Critical patent/CN112416873A/en
Application granted granted Critical
Publication of CN112416873B publication Critical patent/CN112416873B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/1724Details of de-fragmentation performed by the file system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Quality & Reliability (AREA)
  • Television Signal Processing For Recording (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to a method and a device for recovering a video fragment file, computer equipment and a storage medium; the method comprises the following steps: traversing a storage medium for storing a video file, identifying a first type of fragment containing media data and a second type of fragment containing a media data structure; matching the first type fragments and the second type fragments, and combining the matched first type fragments and second type fragments into file fragments; judging whether the file segments are complete or not; and if so, restoring the file segments into the video file. The invention can more completely and accurately recover the fragmented video files and improve the usability and accuracy of the recovered video files.

Description

Method and device for recovering video fragment file, computer equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of video file recovery, in particular to a method and a device for recovering a video fragment file, computer equipment and a storage medium.
Background
When file data is stored in a storage medium, fragmented storage often occurs, that is, a file may be divided into a plurality of file data areas stored in different positions of the storage medium, and the file data areas generally do not have physical continuity; the related information of the file fragments is generally managed by a file system, complete file data can be correctly read through the file system, the storage medium of the video shooting device usually uses a FAT32/exFAT file system, the related information of the file fragments is easily lost under the data loss scenes such as mistaken deletion, mistaken formatting and the like of the file system, and complete recovery cannot be performed through a data recovery common method such as file system information, continuous file structure characteristics and the like.
Disclosure of Invention
Embodiments of the present invention provide a method and an apparatus for recovering a fragmented video file, a computer device, and a storage medium, which overcome the defects in the prior art.
In order to achieve the purpose, the embodiment of the invention adopts the following technical scheme:
the recovery method of the video fragment file comprises the following steps:
traversing a storage medium for storing a video file, identifying a first type of fragment containing media data and a second type of fragment containing a media data structure;
matching the first type fragments and the second type fragments, and combining the matched first type fragments and second type fragments into file fragments;
judging whether the file segments are complete or not;
and if so, restoring the file segments into the video file.
The further technical scheme is as follows: matching the first type of fragments and the second type of fragments by adopting the following method:
calculating the size of a corresponding second type fragment according to the first type fragment, and matching according to the continuity of the first type fragment and the second type fragment on a storage medium;
or
And matching according to the corresponding relation between the media management information in the first type fragments and the data stream in the second type fragments.
The further technical scheme is as follows: before the step of judging whether the file segment is complete, the method further comprises the following steps:
judging whether fragment points of file fragments exist in a storage medium for storing a video file;
if the fragment points exist, searching the end positions of the fragment points backwards in the storage medium, and finding out the fragment points;
judging whether fragment points in the file fragments are complete or not;
if yes, executing the step of judging whether the file segments are complete.
The further technical scheme is as follows: after the step of judging whether the file fragment is complete, the method further comprises the following steps:
judging whether traversing of a storage medium for storing the video file is finished or not;
and if the file fragment is finished, packaging and recovering the rest file fragments into a video file.
A video clip file restoration apparatus, comprising: the device comprises a traversal identification unit, a matching combination unit, a first judgment unit and a first packaging recovery unit;
the traversal identification unit is used for traversing a storage medium for storing a video file and identifying a first type fragment containing media data and a second type fragment containing a media data structure;
the matching and combining unit is used for matching the first type fragments and the second type fragments and combining the matched first type fragments and second type fragments into file fragments;
the first judging unit is used for judging whether the file segments are complete or not;
and the first encapsulation recovery unit is used for recovering the file segments into the video files.
The further technical scheme is as follows: matching the first type of fragments and the second type of fragments by adopting the following method:
calculating the size of a corresponding second type fragment according to the first type fragment, and matching according to the continuity of the first type fragment and the second type fragment on a storage medium;
or
And matching according to the corresponding relation between the media management information in the first type fragments and the data stream in the second type fragments.
The further technical scheme is as follows: the apparatus for restoring a video fragment file further comprises: a second judgment unit, a search finding unit and a third judgment unit;
the second judging unit is used for judging whether fragment points of the file fragments exist in a storage medium for storing the video file;
the searching and finding unit is used for searching the ending position of the fragment point backwards in the storage medium and finding out the fragment point;
and the third judging unit is used for judging whether the fragment points in the file fragments are complete or not.
The further technical scheme is as follows: the apparatus for restoring a video fragment file further comprises: a fourth judging unit and a second package recovering unit;
the fourth judging unit is used for judging whether traversing of the storage medium for storing the video file is finished or not;
and the second packaging and recovering unit is used for packaging and recovering the residual file segments into the video file.
A computer device comprising a memory having stored thereon a computer program and a processor implementing a method of recovering a video clip file as described above when the computer program is executed by the processor.
A storage medium storing a computer program comprising program instructions which, when executed by a processor, implement a method of recovering a video clip file as described above.
Compared with the prior art, the embodiment of the invention has the beneficial effects that: the method can more completely and accurately recover the fragmented video files, improves the usability and accuracy of the recovered video files, and solves the problem of low recovery rate of the traditional data recovery scheme.
Embodiments of the invention are further described below with reference to the drawings and the detailed description.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart of a method for recovering a video fragment file according to an embodiment of the present invention;
fig. 2 is a schematic block diagram of a video fragment file recovery apparatus according to an embodiment of the present invention;
FIG. 3 is a schematic block diagram of a computer device provided by an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention are described in further detail below with reference to the accompanying drawings and the 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 that can be obtained by a person skilled in the art based on the embodiments of the present invention without any inventive step belong to the scope of the embodiments of the present invention.
In the description of the embodiments of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", etc. indicate orientations and positional relationships based on those shown in the drawings, and are only for convenience of describing the embodiments of the present invention and simplifying the description, but do not indicate or imply that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus should not be construed as limiting the embodiments of the present invention.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the embodiments of the present invention, "a plurality" means two or more unless specifically limited otherwise.
In the embodiments of the present invention, unless otherwise explicitly specified or limited, the terms "mounted," "connected," "fixed," and the like are to be construed broadly, e.g., as being connected, detachably connected, or integrated; can be mechanically or electrically connected; either directly or indirectly through intervening media, either internally or in any other relationship. Specific meanings of the above terms in the embodiments of the present invention can be understood by those of ordinary skill in the art according to specific situations.
In embodiments of the invention, unless expressly stated or limited otherwise, the first feature "on" or "under" the second feature may comprise the first and second features being in direct contact, or the first and second features being in contact, not directly, but via another feature therebetween. Also, the first feature being "on," "above" and "over" the second feature includes the first feature being directly on and obliquely above the second feature, or merely indicating that the first feature is at a higher level than the second feature. A first feature being "under," "below," and "beneath" a second feature includes the first feature being directly under and obliquely below the second feature, or simply meaning that the first feature is at a lesser elevation than the second feature.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of an embodiment of the invention. In this specification, the schematic representations of the terms used above should not be understood to necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples described in this specification can be combined and combined by one skilled in the art.
Referring to the embodiments shown in fig. 1 to fig. 3, wherein, referring to fig. 1, an embodiment of the present invention discloses a method for recovering a video fragment file, including the following steps:
s1, traversing the storage medium for storing the video file, and identifying a first type fragment containing media data and a second type fragment containing a media data structure;
in this embodiment, the first type of fragments are moov fragments, and the second type of fragments are mdat fragments.
S2, matching the first type fragments and the second type fragments, and combining the matched first type fragments and second type fragments into file fragments;
and storing the unmatched first type fragments and second type fragments separately for subsequent matching.
In this embodiment, the identified first type fragments and the second type fragments are matched in the following manner: and calculating the size of the corresponding second type fragment according to the first type fragment, matching according to the continuity of the first type fragment and the second type fragment on a storage medium, or matching according to the corresponding relation between the media management information in the first type fragment and the data stream in the second type fragment.
Combining the matched moov fragments and mdat fragments into file fragments, further calculating the initial fragment breakpoint position of the mdat data block, namely the possible discontinuous point of the subsequent storage data of the mdat data stream, and recording the finally-matchable media information, for example: the video coding format of the file is AVC/H264, wherein the information of the nth sample can be sequentially matched in the mdat data stream according to the media management information in the moov, but the mdat data cannot be matched at the N +1 sample, and then the fragment breakpoint position of the mdat data block is considered to be between the matching point of the nth sample and the matching point of the N +1 sample, and the matching point of the nth sample is recorded as a preliminary fragment breakpoint position.
S3, judging whether fragment points of the file fragments exist in the storage medium for storing the video file; if not, executing step S8 "determine whether traversing the storage medium for storing the video file is completed";
s4, if yes, searching the ending position of the fragment point backwards in the storage medium, and finding out the fragment point;
in the embodiment, for a combined segment of matched moov fragments and mdat fragments and a preliminary fragment breakpoint position is identified, an attempt is made to retrieve a start position of next media information of a fragment breakpoint in a storage medium, in the above example, in subsequent retrieval, an attempt is made to search for information matching with an N +1 th sample, if a matching condition is satisfied, the initial start position is considered as a preliminary start position of a next fragment data block of the segment, an accurate position of an end point of a previous fragment data block and an accurate position of a start point of a current fragment block is further determined through a media data determination algorithm, and then a fragment breakpoint determination method is continuously used to determine a preliminary end position of the current fragment block.
S5, judging whether the fragment points in the file fragment are complete; if not, returning to step S4 of searching the end position of the fragment point backwards in the storage medium and finding out the fragment point;
s6, judging whether the file fragment is complete; if not, returning to step S3 "determine whether there is a fragment point of the file fragment in the storage medium for storing the video file";
s7, if yes, the file segments are packaged and restored into video files;
the step of recovering the file fragment package into the video file is to assemble the file fragments according to the MP4 file container specification, and splice a plurality of fragments of moov box, mdat box and mdat into a video file according to a specific sequence.
S8, judging whether traversing the storage medium for storing the video file is finished; if not, returning to step S1 "traverse the storage medium for storing the video file, and identify a first type of fragment containing the media data and a second type of fragment containing the media data structure";
and S9, if the process is finished, packaging the rest file segments and restoring the file segments into the video file.
Wherein, for the mdat data stream fragment block which is not completely retrieved, the specific filling data meeting the MP4/MOV packaging format can be adopted for filling processing.
In this embodiment, the storage medium includes a hard disk, a usb disk, an SD card, and a flash memory, and the format of the video file is MP4 or MOV.
Where abbreviations and key terms to which the invention applies are defined:
MP4 or MPEG-4Part 14 (english: MPEG-4Part 14) is a standard digital multimedia container format, with the extension of MPEG-4Part 14 being MP4, which is used primarily to store digital audio and digital video, but may also store subtitles and still images. MPEG-4 is a set of compression coding standards for audio and video information, which is established by the international organization for standardization (ISO) and the "Moving Picture Experts Group" (MPEG) under the International Electrotechnical Commission (IEC), and the MPEG-4 format is mainly used for streaming over a network, optical discs, voice transmission (video telephony), and television broadcasting.
MOV is a file extension used in the QuickTime movie format, which is a multimedia framework that can handle many digital video, media passages, sound effects, text, animation, music formats, and types of interactive panoramic imagery.
All data in an MP4 file is contained in a box (atom in QuickTime format), that is, an MP4 file is composed of several boxes, each box has a type and a length, a box can be understood as a data object block, another box can be contained in the box, such a box is called a Container box, an MP4 file first has and only has a "ftyp" type box as a flag of MP4 format and contains some information about the file; there will be and only one "moov" type box (movie box) later, which is a container box, and the sub-box contains metadata information of the media; the media Data of the MP4 file is contained in a box (midia Data box) of the "mdat" type, which is also a container box, and there may be a plurality of boxes or none (when the media Data all refer to other files), and the structure of the media Data is described by metadata.
Sample is a unit of storing media data, and one Sample is one element of a series of chronologically arranged data.
H.264/AVC, also known as MPEG-4Part10, Advanced Video Coding (English: MPEG-4Part10, Advanced Video Coding, abbreviated as MPEG-4AVC) is a block-oriented, motion compensation-based Video Coding standard.
The FAT32, which is the simplest file system supported by Windows NT, develops through three stages of FAT12, FAT16 and FAT32, and the FAT name is because the FAT file system uses a "file allocation table" to describe the state of data storage units in the file system and the front-to-back connection relationship of file contents. Microsoft later introduced the exFAT format to support ultra-large capacity storage.
The FAT32 refers to a disk file management mode in which a file allocation table is recorded and managed by 32-bit binary number, because the core of the FAT file system is the file allocation table, the FAT file system is named from the file allocation table, and the FAT32 is developed from FAT and FAT16, and has the advantages of good stability and compatibility, full compatibility with Win 9X and previous versions, and convenient maintenance. The defects are that the security is poor, the partition can only support 32GB at most, and a single file can only support 4GB at most.
exfat (extended File Allocation table), a File system better suited for flash memories.
The embodiment of the invention can more completely and accurately recover the fragmented video files, improves the usability and the accuracy of the recovered video files and solves the problem of low recovery rate of the traditional data recovery scheme.
Referring to fig. 2, the present invention also discloses a device for recovering a video fragment file, including: the traversal identification unit 10, the matching combination unit 20, the first judgment unit 30, and the first package restoration unit 40;
the traversal identification unit 10 is configured to traverse a storage medium for storing a video file, and identify a first type of fragment containing media data and a second type of fragment containing a media data structure;
the matching and combining unit 20 is configured to match the first type fragments and the second type fragments, and combine the matched first type fragments and second type fragments into file fragments;
the first judging unit 30 is configured to judge whether the file segment is complete;
the first encapsulation recovering unit 40 is configured to recover the file segments into the video file.
Wherein, the matching of the identified first type fragment and the second type fragment is performed by adopting the following matching mode: and calculating the size of the corresponding second type fragment according to the first type fragment, matching according to the continuity of the first type fragment and the second type fragment on a storage medium, or matching according to the corresponding relation between the media management information in the first type fragment and the data stream in the second type fragment.
The device for recovering the video fragment file further comprises: a second judging unit 50, a search finding unit 60, and a third judging unit 70;
the second judging unit 50 is configured to judge whether fragment points of a file fragment exist in a storage medium for storing a video file;
the search finding unit 60 is configured to search for an end position of the fragment point backward in the storage medium, and find out the fragment point;
the third judging unit 70 is configured to judge whether the fragment points in the file fragment are complete.
The device for recovering the video fragment file further comprises: a fourth judging unit 80 and a second package recovering unit 90;
the fourth judging unit 80 is configured to judge whether traversing the storage medium for storing the video file is completed;
the second packaging and recovering unit 90 is configured to package and recover the remaining file segments into a video file.
It should be noted that, as can be clearly understood by those skilled in the art, the specific implementation processes of the recovery apparatus for video fragment files and each unit may refer to the corresponding descriptions in the foregoing method embodiments, and for convenience and brevity of description, no further description is provided herein.
The above-mentioned means for restoring a video clip file may be implemented in the form of a computer program which may be run on a computer device as shown in fig. 3.
Referring to fig. 3, fig. 3 is a schematic block diagram of a computer device according to an embodiment of the present application; the computer device 500 may be a terminal or a server, where the terminal may be an electronic device with a communication function, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, and a wearable device. The server may be an independent server or a server cluster composed of a plurality of servers.
Referring to fig. 3, the computer device 500 includes a processor 502, memory, and a network interface 505 connected by a system bus 501, where the memory may include a non-volatile storage medium 503 and an internal memory 504.
The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. The computer program 5032 comprises program instructions that, when executed, cause the processor 502 to perform a method of recovering a video clip file.
The processor 502 is used to provide computing and control capabilities to support the operation of the overall computer device 500.
The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503, and when the computer program 5032 is executed by the processor 502, the processor 502 may be enabled to execute a method for recovering a video fragment file.
The network interface 505 is used for network communication with other devices. Those skilled in the art will appreciate that the configuration shown in fig. 3 is a block diagram of only a portion of the configuration associated with the present application and does not constitute a limitation of the computer device 500 to which the present application may be applied, and that a particular computer device 500 may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
It should be understood that in the embodiment of the present Application, the Processor 502 may be a Central Processing Unit (CPU), and the Processor 502 may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. Wherein a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
It will be understood by those skilled in the art that all or part of the flow of the method implementing the above embodiments may be implemented by a computer program instructing associated hardware. The computer program includes program instructions, and the computer program may be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the flow steps of the embodiments of the method described above.
Therefore, the embodiment of the invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, wherein the computer program comprises program instructions which, when executed by a processor, may implement the above-described method of restoring a video clip file.
The storage medium may be a usb disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk, which can store various computer readable storage media.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present embodiments.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative. For example, the division of each unit is only one logic function division, and there may be another division manner in actual implementation. For example, various elements or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented.
The steps in the method of the embodiment of the invention can be sequentially adjusted, combined and deleted according to actual needs. The units in the device of the embodiment of the invention can be merged, divided and deleted according to actual needs. In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a storage medium. Based on such understanding, the technical solution of the embodiment of the present invention essentially or partially contributes to the prior art, or all or part of the technical solution may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which may be a personal computer, a terminal, or a network device) to execute all or part of the steps of the method of the embodiment of the present invention.
The technical contents of the embodiments of the present invention are further described by the examples only, so as to facilitate the reader to understand more easily, but not to represent that the implementation manner of the embodiments of the present invention is limited thereto, and any technical extension or re-creation performed by the embodiments of the present invention is protected by the embodiments of the present invention. The protection scope of the embodiments of the present invention is subject to the claims.

Claims (10)

1. The method for restoring the video fragment file is characterized by comprising the following steps:
traversing a storage medium for storing a video file, identifying a first type of fragment containing media data and a second type of fragment containing a media data structure;
matching the first type fragments and the second type fragments, and combining the matched first type fragments and second type fragments into file fragments;
judging whether the file segments are complete or not;
and if so, restoring the file segments into the video file.
2. The method for recovering a video fragment file according to claim 1, wherein the matching of the first type fragment and the second type fragment is performed by:
calculating the size of a corresponding second type fragment according to the first type fragment, and matching according to the continuity of the first type fragment and the second type fragment on a storage medium;
or
And matching according to the corresponding relation between the media management information in the first type fragments and the data stream in the second type fragments.
3. The method for recovering a video clip file according to claim 2, wherein before said step of determining whether said file segment is complete, further comprising:
judging whether fragment points of file fragments exist in a storage medium for storing a video file;
if the fragment points exist, searching the end positions of the fragment points backwards in the storage medium, and finding out the fragment points;
judging whether fragment points in the file fragments are complete or not;
if yes, executing the step of judging whether the file segments are complete.
4. The method for recovering a video clip file according to claim 3, wherein said step of determining whether the file segment is complete further comprises:
judging whether traversing of a storage medium for storing the video file is finished or not;
and if the file fragment is finished, packaging and recovering the rest file fragments into a video file.
5. An apparatus for restoring a video clip file, comprising: the device comprises a traversal identification unit, a matching combination unit, a first judgment unit and a first packaging recovery unit;
the traversal identification unit is used for traversing a storage medium for storing a video file and identifying a first type fragment containing media data and a second type fragment containing a media data structure;
the matching and combining unit is used for matching the first type fragments and the second type fragments and combining the matched first type fragments and second type fragments into file fragments;
the first judging unit is used for judging whether the file segments are complete or not;
and the first encapsulation recovery unit is used for recovering the file segments into the video files.
6. The apparatus for retrieving a video fragment file according to claim 5, wherein the matching of the first type of fragment and the second type of fragment is performed by:
calculating the size of a corresponding second type fragment according to the first type fragment, and matching according to the continuity of the first type fragment and the second type fragment on a storage medium;
or
And matching according to the corresponding relation between the media management information in the first type fragments and the data stream in the second type fragments.
7. The apparatus for restoring a video clip file as set forth in claim 6, further comprising: a second judgment unit, a search finding unit and a third judgment unit;
the second judging unit is used for judging whether fragment points of the file fragments exist in a storage medium for storing the video file;
the searching and finding unit is used for searching the ending position of the fragment point backwards in the storage medium and finding out the fragment point;
and the third judging unit is used for judging whether the fragment points in the file fragments are complete or not.
8. The apparatus for restoring a video clip file as set forth in claim 7, further comprising: a fourth judging unit and a second package recovering unit;
the fourth judging unit is used for judging whether traversing of the storage medium for storing the video file is finished or not;
and the second packaging and recovering unit is used for packaging and recovering the residual file segments into the video file.
9. A computer device, characterized in that the computer device comprises a memory having stored thereon a computer program and a processor implementing the method of restoring a video clip file according to any one of claims 1-4 when the computer program is executed.
10. A storage medium, characterized in that the storage medium stores a computer program comprising program instructions which, when executed by a processor, implement the method of restoring a video clip file according to any one of claims 1 to 4.
CN202011292459.5A 2020-11-18 2020-11-18 Video fragment file recovery method and device, computer equipment and storage medium Active CN112416873B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011292459.5A CN112416873B (en) 2020-11-18 2020-11-18 Video fragment file recovery method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011292459.5A CN112416873B (en) 2020-11-18 2020-11-18 Video fragment file recovery method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112416873A true CN112416873A (en) 2021-02-26
CN112416873B CN112416873B (en) 2024-05-28

Family

ID=74831995

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011292459.5A Active CN112416873B (en) 2020-11-18 2020-11-18 Video fragment file recovery method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112416873B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104301682A (en) * 2014-10-22 2015-01-21 厦门市美亚柏科信息股份有限公司 Monitoring video fragment restoration method and device
CN110781037A (en) * 2020-01-02 2020-02-11 成都易我科技开发有限责任公司 Method and system for recovering video file in storage medium and readable storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104301682A (en) * 2014-10-22 2015-01-21 厦门市美亚柏科信息股份有限公司 Monitoring video fragment restoration method and device
CN110781037A (en) * 2020-01-02 2020-02-11 成都易我科技开发有限责任公司 Method and system for recovering video file in storage medium and readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
黄步根等: ""SANYO数码相机中被删除视频的恢复"", 《第26次全国计算机安全学术交流会》 *

Also Published As

Publication number Publication date
CN112416873B (en) 2024-05-28

Similar Documents

Publication Publication Date Title
JP6410899B2 (en) Media file generation device, generation method, and program
CN108093299B (en) Method for repairing damaged MP4 file and storage medium
US9076488B2 (en) Media file for multi-platform non-linear video editing systems
CN111063376B (en) Method, terminal equipment and storage medium for audio and video synchronization in MP4 repairing
US20090024644A1 (en) Extended Multimedia File Structure and Multimedia File Producting Method and Multimedia File Executing Method
US10978109B2 (en) Synchronously playing method and device of media file, and storage medium
US20080256431A1 (en) Apparatus and Method for Generating a Data File or for Reading a Data File
US11064269B2 (en) Conversion method, device and storage medium for media file
US7890556B2 (en) Content recording apparatus, content playback apparatus, content playback system, image capturing apparatus, processing method for the content recording apparatus, the content playback apparatus, the content playback system, and the image capturing apparatus, and program
US9888293B2 (en) Apparatus and method for delivering and receiving multimedia data in hybrid network
US10924801B2 (en) Method and device for playing media file while switching resolution in webpage and storage medium
US20080098040A1 (en) Combonation journaling/non-journaling file system
US20150052159A1 (en) File name display method and system, and computer storage medium
US20170084309A1 (en) Video file creation device and video file creation method
CN114007112B (en) Method for repairing mdat box data errors in MP4 video file
JP7391963B2 (en) Apparatus and method for signaling information in container file format
CN110781037B (en) Method and system for recovering video file in storage medium and readable storage medium
CN110851301B (en) Recovery method and system for MP4 file
CN112416873B (en) Video fragment file recovery method and device, computer equipment and storage medium
JP7174762B2 (en) METADATA CONTAINER ANALYSIS METHOD, APPARATUS AND STORAGE MEDIUM
KR101632689B1 (en) The method for recovery of multimedia piece file
US8749616B2 (en) Apparatus and method for creating and displaying media file
EP3293647B1 (en) Methods of storing essence data in media file systems
KR20070023188A (en) A Method for Managing Files with Additional Management Information
CN115114246A (en) File format, parsing method and device for picture storage and readable storage medium

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