WO2014139069A1 - Procédé et appareil de réparation d'un fichier vidéo - Google Patents

Procédé et appareil de réparation d'un fichier vidéo Download PDF

Info

Publication number
WO2014139069A1
WO2014139069A1 PCT/CN2013/072390 CN2013072390W WO2014139069A1 WO 2014139069 A1 WO2014139069 A1 WO 2014139069A1 CN 2013072390 W CN2013072390 W CN 2013072390W WO 2014139069 A1 WO2014139069 A1 WO 2014139069A1
Authority
WO
WIPO (PCT)
Prior art keywords
video
video frame
data
decoding
sequence
Prior art date
Application number
PCT/CN2013/072390
Other languages
English (en)
Chinese (zh)
Inventor
周剑辉
王科
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2013/072390 priority Critical patent/WO2014139069A1/fr
Priority to CN201380000249.6A priority patent/CN103404146B/zh
Publication of WO2014139069A1 publication Critical patent/WO2014139069A1/fr
Priority to US14/850,376 priority patent/US10136163B2/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/85Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
    • H04N19/89Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression involving methods or arrangements for detection of transmission errors at the decoder
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/172Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a picture, frame or field
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/40Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using video transcoding, i.e. partial or full decoding of a coded input stream followed by re-encoding of the decoded output stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/46Embedding additional information in the video signal during the compression process
    • H04N19/463Embedding additional information in the video signal during the compression process by compressing encoding parameters before transmission
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding

Definitions

  • the present invention relates to the field of multimedia technologies, and in particular, to a video file repair method and apparatus. Background technique
  • video files are usually generated by encapsulating video data in a video container by using video encapsulation technology
  • the video container refers to a file format when encapsulating video data, such as Audio Video Interleaved (AVI) format. , MP4 (MPEG-4 Part) format, etc.
  • Figure 1 is a schematic diagram of the structure of a video file, including container header data, container tail data, and video data.
  • the video data is composed of data of several video frames, and the video frame refers to a static picture that constitutes a dynamic image during video playback.
  • the data of a video frame includes a container frame header (CFH) data and a frame. Data (shown as Fl, F2, Fn in Figure 1).
  • the container header data and the container tail data are used to store a codec (Coder-Decoder, CODEC for short) type, a decoding parameter, a storage location information of the video data, and index data, and the index data is used to record each video.
  • the frame data of the frame is based on the index of the timestamp; the timestamp of the video frame is used to store the timestamp of the video frame and the storage location information of the video frame, and Fn represents the frame data of the nth video frame, also referred to as the nth video.
  • the CODEC data of the frame The sum of the frame data of each video frame constitutes the encoded video data stream (i.e., the CODEC data stream).
  • the above container header data, container tail data, and CFH are collectively referred to as container data.
  • the video data stream may be sequentially scanned according to various known container formats, so as to extract the CFH of each video frame and the frames of each video frame. Data, and reconstruct the container header data and the container tail data according to the CFH and frame data of each video frame, and the player can normally play the video according to the reconstructed container header data and the container tail data. If the CFH of the container header data, the container tail data, and the video frame in the video file are damaged, the video file cannot be repaired by using the existing video repair technology, so the success rate of the prior art video file repair is low. Summary of the invention
  • the embodiment of the invention provides a video file repairing method and device, which are used to improve the success rate of video file recovery.
  • a video file repairing method including:
  • the frame data of the video frame can be extracted from the video data stream of the damaged video file according to the video frame structure feature in the codec CODEC feature library, a sequence of video frames is generated from the extracted frame data of the video frame, wherein each The video frame structure feature corresponds to a CODEC type;
  • the video frame can be extracted from the video data stream of the damaged video file.
  • Frame data including:
  • the frame structure feature is capable of extracting frame data of a video frame from a video data stream of the damaged video file;
  • the second video frame structure feature is obtained from the CODEC feature library until the second video frame structure feature is capable of extracting frame data of the video frame from the video data stream of the damaged video file.
  • SH includes:
  • the reconfiguring the SH by using a decoding parameter in a predetermined set of decoding parameters includes:
  • a video file repair apparatus including:
  • An extracting module configured to extract frame data of a video frame from a video data stream of the damaged video file according to a video frame structure feature in the CODEC feature library, where the video frame structure feature corresponds to a CODEC type;
  • Generating a recording module configured to generate a video frame sequence by using frame data of the video frame extracted by the extraction module, and record a CODEC type corresponding to the video frame structure feature, storage location information and index data of the video frame sequence
  • the index data is used to record a timestamp-based index of the sequence of video frames
  • a determining module configured to determine a sequence header SH of the sequence of video frames generated by the generating record module, where the SH includes decoding parameters used for data in the sequence of video frames
  • a reconstruction output module configured to Determining the SH determined by the determining module, the generating Recording the CODEC type recorded by the module and the storage location information of the video frame sequence and the index data, reconstructing container data conforming to the target container format, and generating and outputting the target based on the reconstructed container data Video file in container format.
  • the determining module includes:
  • a judging unit configured to decode the video frame sequence according to a standard decoder, and if the decoding is successful, confirm that the SH is not damaged, otherwise confirm that the SH is damaged;
  • An SH extraction unit configured to: if the determining unit determines that the SH is not damaged, the root reconstruction unit is configured to use decoding in a predetermined decoding parameter set if the determining unit determines that the SH is damaged The parameter reconstructs the SH.
  • the reconfiguring unit is configured to obtain, by using the predetermined decoding parameter set, a first decoding parameter, according to Decoding, by the first decoding parameter, the video frame sequence, determining whether the decoding is successful according to the decoding result; if the decoding is successful, reconstructing the SH by using the first decoding parameter; otherwise, from the predetermined decoding parameter set And obtaining a second decoding parameter, until the second decoding parameter can successfully decode the video frame sequence, and reconstructing the SH by using the second decoding parameter.
  • a video file repair device including a receiver, a processor, and a memory, wherein:
  • the receiver is configured to receive a damaged video file
  • the memory is used to store instructions and data, and provides instructions and data to the processor;
  • the processor is configured to read instructions and data stored in the memory, and execute: if the video frame structure in the CODEC feature library is coded according to the codec Feature, capable of extracting frame data of a video frame from a video data stream of the damaged video file, and generating a sequence of video frames from the extracted frame data of the video frame, wherein each of the video frame structure features corresponds to a CODEC type ;
  • the determining, by the processor, the sequence header SH of the video frame sequence specifically includes: using, according to a standard decoder, the video frame Decoding the sequence, if successful decoding, confirming that the SH is not damaged, otherwise confirming that the SH is damaged; if the SH is not damaged, the decoding uses the decoding parameter in the predetermined decoding parameter set to reconstruct Said SH.
  • the processor by using the decoding parameter in the predetermined decoding parameter set, to reconstruct the SH, specifically includes: Obtaining a first decoding parameter from the predetermined decoding parameter set, decoding the video frame sequence according to the first decoding parameter, determining whether the decoding is successful according to the decoding result; and if the decoding is successful, using the first decoding Parameter reconstructing the SH; otherwise, acquiring a second decoding parameter from the predetermined set of decoding parameters until the second decoding parameter is capable of successfully decoding the sequence of video frames, reconstructing the second decoding parameter SH.
  • the frame data of the video frame is extracted from the video data stream of the damaged video file according to the video frame structure feature, and the video frame sequence is generated from the frame data of the extracted video frame; when the frame data is extracted and recorded a CODEC type corresponding to the used video frame structure feature, storage location information of the video frame sequence, and index data for recording a timestamp-based index of the video frame sequence; determining a sequence header SH of the video frame sequence SH includes a decoding parameter used for data in the sequence of video frames; according to the SH, Decoding the storage location information of the video CODEC type and the video frame sequence and the index data, reconstructing container data conforming to the target container format, and generating and outputting the target container based on the reconstructed container data Formatted video file.
  • the embodiment of the present invention does not need to parse the CFH from the video data stream of the damaged video file in the process of video repair, so that the video file can be repaired not only when the container header data and/or the container tail data are damaged. Moreover, when the container header data, the container tail data, and the CFH are damaged in the container data of the damaged video file, the damaged video data stream can still be repaired, thereby improving the success rate of the video repair.
  • FIG. 1 is a schematic structural diagram of a video data stream encapsulated in a video container provided in the background art
  • FIG. 2a is a flowchart of a video repairing method according to an embodiment of the present invention.
  • Figure 2b is a flow chart of an implementation of step 203 of Figure 2a;
  • FIG. 3a is a schematic diagram of a format of a CODEC data stream according to an embodiment of the present invention
  • FIG. 3b is a schematic diagram of a correspondence relationship between a video frame sequence (Fl, F2...Fn) and a CODEC data stream according to an embodiment of the present invention
  • FIG. 4a is a schematic structural diagram of a video file repairing apparatus according to an embodiment of the present invention.
  • Figure 4b is a schematic structural view of the determining module of Figure 4a;
  • FIG. 5 is a schematic structural diagram of a video file repairing device according to an embodiment of the present invention.
  • the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
  • the embodiment of the present invention can repair the video data stream (also referred to as a damaged video data stream) of the damaged video file, especially when the container data in the video data stream is damaged, the container data can be successfully reconstructed, and Repair damaged video data streams.
  • damaged refers to data loss or error.
  • video file corruption refers to partial data loss or error in the video file.
  • Container Frame Header (CFH) is damaged. The corresponding data is missing or incorrect.
  • the structure used before the video file is damaged is as shown in FIG. 1.
  • the container data includes container header data, container tail data, and CFH. If the video file is damaged, both the container data and the frame data may be incorrect or missing.
  • Video file recovery is for the case where the container data is corrupted, in which case the container header data, the container tail data, and the CFH may be damaged at the same time.
  • the container data is used to store the CODEC type used for the video file, the decoding parameters, the index data for recording the time-based index of the frame data of each video frame, and the time stamp of the video frame and the storage location information of the video frame.
  • a video repairing method including:
  • the video data stream is usually a binary data stream.
  • the CODEC types include, but are not limited to: H.264, Moving Pictures Experts Group-4 (MPEG4) or technology, Motion Joint Photographic Experts Grou (Motion Joint Photographic Experts Grou, Abbreviation: MJPEG).
  • Video frames obtained by encoding with different CODEC types have different video frame structure features.
  • at least one video frame structure feature is stored in a preset CODEC feature library, where each video frame structure feature corresponds to a CODEC type.
  • the video frame structure features corresponding to the two types of CODEC types are described below as an example:
  • the typical frame header of an H.264 video frame is 00 00 01 XX, where XX includes the frame type, the importance degree of the frame data, and the alignment bit.
  • a typical H.264 I frame header can be 00 00 01 65; and the end of each frame also has a bit indicating the end of the frame.
  • the end of the frame of H.264 usually has a tail bit ( Trailing bits ) , ⁇ mouth xxxl OOOO 00000000.
  • the CODEC feature library provided in this embodiment stores at least one video frame structure feature
  • the structural feature is capable of successfully extracting frame data of each video frame from the video data stream of the damaged video file; otherwise acquiring the second video frame structural feature from the CODEC feature library until a type of damaged video file can be found
  • the video frame structure feature of the frame data of each video frame is successfully extracted in the video data stream, or the frame data of each video frame cannot be extracted from the video data stream according to the video frame structure features of the CODEC type in the CODEC feature library.
  • Frame data of a video frame if the typical frame header 00 00 01 XX or the end of the frame is not detected, Further features such as alignment bits indicate that the frame data of each video frame cannot be successfully extracted from the video data stream according to the video frame structure feature of H.264.
  • MJPEG When MJPEG is used to extract frame data of each video frame from the video data stream, when FF D8 is detected, it can be determined that this data is the start position of the frame data of an MJPEG video frame, and when FF D9 is detected, this data can be determined. Is the end position of the frame data of an MJPEG video frame, and then in the case where the data is MJPEG video data, the frame data of each MJPEG video frame is extracted from the video data stream based on the structural features of the MJPEG video frame. If FF D8 or FF D9 is not detected, it means that the frame data of each video frame cannot be successfully extracted from the video data stream according to the video frame structure feature of MJPEG.
  • the extraction of MPEG4 video frames is similar to MJPEG video frames and will not be described here.
  • the video frame data feature of the CODEC type is not limited to the above-mentioned frame header and frame tail feature data, and may also include other constant data in the frame data (such as a fixed position FF), alignment bits, etc. A fixed position is inserted with a value of 1 alignment bit).
  • the frame data of the video frame can be extracted from the video data stream of the damaged video file, the CODEC type corresponding to the video frame structure feature used in the data, and the storage location information and the index data of the video frame sequence,
  • the index data is used to record a timestamp-based index of the sequence of video frames.
  • each video frame is arranged in the order of extraction, as arranged in the order of Fl, F2...Fn, and a video frame sequence is generated, which is a CODEC data stream.
  • the format of the CODEC data stream is as shown in FIG. 3a, wherein a stream header indicates a data header of the CODEC data stream, and is used to store an overall parameter describing the CODEC data stream, for example, the CODEC data stream is used.
  • Gn denotes an nth group of pictures (GOP), and fn denotes an nth video original data frame in the image group.
  • Each GOP has a corresponding SH, and each GOP includes frame data of n video original data frames, and the frame data of the original data frame of the video is data that has not been encoded and/or compressed.
  • the video frame sequence formed by the frame data of each video frame extracted in step 202 is a CODEC data stream, a specific embodiment will be described below.
  • the data of the frame data of each video frame is:
  • the frame data stored in F1 is the data stream header in the CODEC data stream shown in FIG. 3a.
  • the frame data stored in the first SH and G1; F2 is the second SH and G2 in the CODEC data stream shown in Figure 3a, and the frame data stored in Fn is the first in the CODEC data stream shown in Figure 3a.
  • the frame data stored in F1 is the data stream header in the CODEC data stream shown in FIG. 3a; the frame stored in F2.
  • the data is the first SH, Gl and the second SH, G2, ... Fn stored in the CODEC data stream shown in Figure 3a.
  • the frame data stored in the CODEC data stream shown in Figure 3a is the nth SH, Gn. And the end of the data stream. In practice, there are many different implementations, which are not limited herein.
  • the SH stores a decoding parameter for a sequence of video frames (that is, a CODEC data stream), where the decoding parameter includes one or more of the following parameters: a resolution, a compression algorithm, an entropy encoding algorithm, or Field coding, etc., where field coding is another coding method relative to frame coding.
  • the resolution may be a Common Intermediate Format (CIF) or D1
  • the compression algorithm may use a Context-based Adaptive Binary Arithmetic Coding (CAB AC). Wait.
  • CIF Common Intermediate Format
  • CAB AC Context-based Adaptive Binary Arithmetic Coding
  • the time stamp and the storage location information of the video frame may be obtained in the process of extracting, and the index data may be obtained by extracting the time stamp and storage location information of each video frame obtained when the video frame is extracted.
  • the specific process of reconstructing the container data is:
  • the CODEC type recorded in step 202 Writing, according to the target container format, the CODEC type recorded in step 202, the storage location information for describing the storage location of the video frame sequence, the index data, the decoding parameters obtained from the SH determined in step 203, etc., into the container header or In the specified position of the container tail, the CFH of each video frame is regenerated according to the time stamp and storage location information of each video frame obtained when the frame data is extracted in step 202.
  • the target container format may be any standard container format, such as AVI, Movie digital video technology (MOV), MP4 or FLV (Flash Video).
  • this step outputs the video in AVI format.
  • the player can play the AVI format video normally by reading the container data in the AVI format video and the encoding parameters in the SH.
  • the CODEC type in the container data, the storage location information of the video frame sequence, the decoding parameter, and the index data may all be stored in the container header portion in FIG. 1, or may be all stored in the container header portion.
  • the tail portion of the container in Fig. 1 may also be partially stored in the head portion of the container in Fig. 1, and the other portion is stored in the tail portion of the container in Fig. 1, which is not limited herein.
  • the process of frequency files can be performed in accordance with a standard video generation process.
  • frame data of the video frame can be extracted from the video data stream of the damaged video file, and the video frame structure feature used in the data is corresponding to a CODEC type, storage location information of the sequence of video frames, and index data for recording a timestamp-based index of the sequence of video frames; determining a sequence header SH of the sequence of video frames, the SH including the sequence of video frames Decoding parameters used in the data in the data; reconstructing the container data conforming to the target container format according to the SH, the recorded CODEC type, and the storage location information of the video frame sequence and the index data, and based on the weight Constructing the container data, generating and outputting a video file in the target container format.
  • the embodiment of the present invention can repair the video file not only when the container header data and/or the container tail data are damaged, but also the container header data, the container tail data and the CFH in the container data of the damaged video data stream. When damaged, the damaged video data stream can still be repaired, thus improving the success rate of video repair.
  • the video data stream is sequentially scanned in accordance with various container formats.
  • the standard container format includes: AVI, MOV, MP4 or FLV, etc. Since there are more than 40 different container formats, each scan requires a separate container format, if you scan the video stream with a certain container format.
  • the frame data of each video frame is extracted from the video data stream by using video frame structure features of various CODEC types, and the number of CODEC types is smaller than the number of the container format.
  • the embodiment of the present invention The complexity of video frame extraction is reduced, the efficiency of video frame extraction is improved, the complexity of damaged video file repair is reduced, and the efficiency of repairing damaged video files is improved.
  • the sequence header SH in the video frame sequence formed by determining the frame data of each video frame may specifically adopt the following implementation manner:
  • the video frame sequence is decoded using a standard decoder. If successful decoding is possible, SH is not damaged in the video frame sequence. If the decoding fails, the SH in the video frame sequence is damaged.
  • the standard decoder may be an FFmeg decoder or a VLC decoder.
  • the SH since the SH includes decoding parameters for the video frame sequence, and the container data is reconstructed, the decoding parameters are required. Therefore, after the SH is extracted, the decoding parameters can be used for reconstruction of the container data.
  • the various decoding parameters may be stored in a decoding parameter database, and the decoding parameters include one or more of the following parameters: resolution, compression algorithm, entropy encoding algorithm, or parameters for indicating whether to encode the field, and the like.
  • the resolution can use CIF or D1
  • the compression algorithm can use CABAC. Wait.
  • Extracting a decoding parameter (which may be referred to as a first decoding parameter) from a predetermined set of solution parameters, decoding the video frame sequence according to the first decoding parameter that is extracted, and determining whether the decoding is successful according to the decoding result;
  • decoding fails, returning to perform the step of extracting another decoding parameter (which may be referred to as a second decoding parameter) from the predetermined solution parameter set, and decoding the video frame sequence according to the extracted second decoding parameter, until The decoding is successful, or each decoding parameter in the predetermined set of solution parameters has been used for decoding failure.
  • another decoding parameter which may be referred to as a second decoding parameter
  • the decoding parameter included in the reconstructed SH is a normal decoding parameter of the video image obtained by decoding the decoding parameter.
  • Case 2 The video image is obtained after decoding, because the video image obtained by decoding with the wrong decoding parameters may be distorted.
  • the wrong decoding parameter cannot correctly restore the true color and texture of the video image, so that the decoder obtains the abnormal image.
  • monochrome images pure gray, pure or white, pure black, etc.
  • full-screen mosaic images noise images, etc.
  • it is necessary to use a common anomaly image recognition algorithm (not in the scope of this patent) to further determine the video image.
  • an embodiment of the present invention further provides a video file repairing apparatus, including:
  • the extracting module 41 is configured to extract frame data of the video frame from the video data stream of the damaged video file according to the video frame structure feature in the codec CODEC feature library, where the video frame structure feature corresponds to a CODEC type;
  • the video data stream is usually a binary data stream.
  • the CODEC type includes: H.264, MPEG4 or MJPEG.
  • Video frames obtained by encoding with different CODEC types have different video frame structure features.
  • the generating record module 42 is configured to generate a video frame sequence of the frame data of the video frame extracted by the extracting module 41, and record a CODEC type corresponding to the video frame structure feature, storage location information and index data of the video frame sequence.
  • the index data is used to record a timestamp-based index of the sequence of video frames.
  • the index data may be obtained by using a timestamp and storage location information of each video frame obtained when the video frame is extracted;
  • a determining module 43 configured to determine a sequence header SH of the sequence of video frames generated by the recording module 42, the SH includes decoding parameters used for data in the sequence of video frames; and a reconstruction output module 44, configured to Determining the SH determined by the module 43, generating the CODEC type recorded by the recording module 42 and the storage location information of the video frame sequence and the index data, reconstructing the container data conforming to the target container format, and based on the reconstructed The container data generates and outputs a video file in the target container format.
  • frame data of the video frame can be extracted from the video data stream of the damaged video file, and the video frame structure feature used in the data is corresponding to a CODEC type, storage location information of the sequence of video frames, and index data for recording a timestamp-based index of the sequence of video frames; determining a sequence header SH of the sequence of video frames, the SH including the sequence of video frames a decoding parameter used in the data; according to the SH, the recorded CODEC type and the And storing the location data of the video frame sequence and the index data, reconstructing the container data conforming to the target container format, and generating and outputting the video file in the target container format based on the reconstructed container data.
  • the embodiment of the present invention does not need to parse the CFH from the video data stream of the damaged video file in the process of video repair, so that the video file can be repaired not only when the container header data and/or the container tail data are damaged. Moreover, when the container header data, the container tail data, and the CFH are damaged in the container data of the damaged video file, the damaged video data stream can still be repaired, thereby improving the success rate of the video repair.
  • the video data stream is sequentially scanned in accordance with various container formats.
  • standard container formats include: AVI, MOV, MP4 or FLV, etc.
  • each scan requires a separate container format, if you scan the video stream with a container format If the CFH of each video frame and the frame data of each video frame cannot be successfully extracted, another container format needs to be replaced, resulting in a larger workload, which in turn increases the repair workload of the damaged video; On the other hand, if the format of the container used by the video stream itself is an unknown container format, for example, some private container format, the private container format is usually not published, so the private container format cannot be known, and the container cannot be successfully extracted at this time. The CFH of each video frame and the frame data of each video frame are not successfully restored to the damaged video.
  • the frame data of each video frame is extracted from the video data stream by using video frame structure features of various CODEC types, and the number of CODEC types is less than the number of the container format, and the present invention is compared with the prior art.
  • the embodiment reduces the complexity of video frame extraction, improves the success rate of video frame extraction, reduces the complexity of repairing damaged video files, and improves the success rate of damaged video file repair.
  • the determining module 43 includes:
  • the determining unit 431 is configured to decode the video frame sequence according to a standard decoder, and if the decoding is successful, confirm that the SH is not damaged, otherwise confirm that the SH is damaged;
  • the SH extracting unit 432 is configured to, if the determining unit 431 determines that the SH undamaged reconstruction unit 433 is used, if the determining unit 431 determines that the SH is damaged, reconstructing by using decoding parameters in a predetermined decoding parameter set.
  • the SH is specifically configured to acquire a first decoding parameter from a predetermined decoding parameter set, decode the video frame sequence according to the first decoding parameter, and determine according to the decoding result.
  • the SH is reconstructed by using the first decoding parameter; otherwise, the second decoding parameter is obtained from the predetermined decoding parameter set until the second decoding parameter is capable of the video frame sequence Successful decoding is performed, and the SH is reconstructed by using the second decoding parameter.
  • an embodiment of the present invention further provides a video file repairing device, including: a receiver 51, a processor 52, a memory 53, a bus 5000, and a driving circuit 5001.
  • the receiver 51 is configured to receive a damaged video file.
  • the memory 53 is configured to store instructions and data
  • the processor 52 is configured to read the instructions and data stored in the memory 53 and execute: if the video frame structure feature in the C 0 DEC feature library is coded, the video data stream of the damaged video file can be extracted. a frame data of a video frame, wherein a sequence of video frames is generated from the frame data of the extracted video frame, wherein the video frame structure feature corresponds to a CODEC type;
  • the processor 52 may be an integrated circuit chip with signal processing capability. In the implementation process, each step of the above method may be completed by an integrated logic circuit of hardware in a processor or an instruction in a form of software. These instructions may be implemented and controlled by a processor therein for performing the methods disclosed in the embodiments of the present invention.
  • the processor may also be a general purpose processor, a digital signal processing (DSP), an application specific integrated circuit, a Field Programmable Gate Array (FPGA) or other programmable logic. Devices, discrete gates or transistor logic devices, discrete hardware components.
  • the above general purpose processor may be a microprocessor or the processor may be any conventional processor, decoder or the like.
  • the steps of the method disclosed in the embodiments of the present invention may be directly implemented as hardware processor execution completion, or performed by a combination of hardware and software modules in the processor.
  • the software module can be located in a conventional storage medium such as random access memory, flash memory, read only memory, programmable read only memory or electrically erasable programmable memory, registers, and the like.
  • the driving circuit 5001 is configured to provide drivers for each hardware in the video file repairing device so that each hardware can work normally.
  • bus system 5000 the various hardware components of the video file repair device are coupled together by a bus system 5000, wherein the bus system 5000 includes a power bus, a control bus, and a status signal bus in addition to the data bus.
  • bus system 5000 includes a power bus, a control bus, and a status signal bus in addition to the data bus.
  • various buses are labeled as the bus system 5000 in FIG.
  • the video frame structure feature is configured to: extract, from the video data stream of the damaged video file, a CODEC type corresponding to the video frame structure feature, storage location information and index data of the video frame sequence; and determine the video frame sequence a sequence header SH, the SH includes a decoding parameter for data usage in the sequence of video frames; and according to the SH, the recorded CODEC type, and storage location information of the video frame sequence and the index data, Reconstructing the container data in accordance with the target container format, and generating and outputting the video file in the target container format based on the reconstructed container data.
  • the embodiment of the present invention can repair the video file not only when the container header data and/or the container tail data are damaged, but also the container header data, the container tail data and the CFH in the container data of the damaged video data stream. When damaged, the damaged video data stream can still be repaired, thus improving the success rate of video repair.
  • the video data stream is sequentially scanned in accordance with various container formats.
  • standard container formats include: AVI, MOV, MP4 or FLV, etc.
  • each scan requires a separate container format, if you scan the video stream with a container format If the CFH of each video frame and the frame data of each video frame cannot be successfully extracted, another container format needs to be replaced, resulting in a larger workload, which in turn increases the repair workload of the damaged video; On the other hand, if the format of the container used by the video stream itself is an unknown container format, for example, some private container format, the private container format is usually not published, so the private container format cannot be known, and the container cannot be successfully extracted at this time. The CFH of each video frame and the frame data of each video frame are not successfully restored to the damaged video.
  • the frame data of each video frame is extracted from the video data stream by using video frame structure features of various CODEC types, and the number of CODEC types is less than the number of the container format, and the present invention is compared with the prior art.
  • the embodiment reduces the complexity of video frame extraction, improves the success rate of video frame extraction, reduces the complexity of repairing damaged video files, and improves the success rate of damaged video file repair.
  • the processor 52 is configured to determine a sequence header SH of the sequence of video frames, and specifically includes: configured to decode the sequence of video frames according to a standard decoder, and if the decoding is successful, confirm the SH Not damaged, otherwise it is confirmed that the SH is damaged; if the SH; if the SH is damaged, the SH is reconstructed by using decoding parameters in a predetermined decoding parameter set.
  • the processor 52 is configured to reconstruct the SH by using a decoding parameter in a predetermined set of decoding parameters, and specifically includes: acquiring, by using the predetermined decoding parameter set, a first decoding parameter, according to the first decoding parameter Decoding the video frame sequence to determine whether the decoding is successful according to the decoding result; if the decoding is successful, reconstructing the SH by using the first decoding parameter; otherwise, acquiring the second decoding parameter from the predetermined decoding parameter set, until The second decoding parameter is capable of successfully decoding the sequence of video frames, and reconstructing the SH with the second decoding parameter.
  • aspects of the invention, or possible implementations of various aspects may be embodied as a system, method, or computer program product.
  • aspects of the invention, or possible implementations of various aspects may be in the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, etc.), or a combination of software and hardware aspects, They are collectively referred to herein as "circuits," “modules,” or “systems.”
  • various aspects of the invention, or possible implementations of various aspects may take the form of a computer program product, which is stored in a computer. Computer readable program code in a readable medium.
  • the computer readable medium can be a computer readable signal medium or a computer readable storage medium.
  • the computer readable storage medium includes, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing, such as random access memory (RAM), read only memory (ROM), Erase programmable read-only memory (EPROM or flash memory), optical fiber, portable read-only memory (CD-ROM).
  • a processor in the computer reads a computer readable program stored in a computer readable medium
  • the sequence code enables the processor to perform the functional actions specified in each step or combination of steps in the flowchart; generating means for implementing the functional actions specified in each block of the block diagram, or in a combination of blocks.
  • the computer readable program code can be executed entirely on the user's computer, partly on the user's computer, as a separate software package, partly on the user's computer and partly on the remote computer, or entirely on the remote computer or server.
  • the functions noted in the various steps in the flowcharts or in the blocks in the block diagrams may not occur in the order noted. For example, two steps, or two blocks shown in succession, may be executed substantially concurrently, or the blocks may sometimes be performed in the reverse order, depending upon the functionality involved.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

L'invention concerne un procédé et un appareil de réparation d'un fichier vidéo, utilisés pour améliorer le taux de réussite de la réparation de fichiers vidéo. Le procédé comporte les étapes suivantes: si des données de trame d'une trame vidéo peuvent être extraites d'un flux de données vidéo d'un fichier vidéo endommagé en fonction d'une caractéristique de structure de trame vidéo dans une bibliothèque de caractéristiques de codeur-décodeur (CODEC), générer une séquence de trames vidéo à partir des données de trame extraites de la trame vidéo; enregistrer un type de CODEC correspondant à la caractéristique de structure de trame vidéo, des informations d'emplacement de stockage concernant la séquence de trames vidéo et des données d'indice d'un indice basé sur une estampille temporelle utilisée pour enregistrer la séquence de trames vidéo; déterminer un en-tête de séquence (SH) de la séquence de trames vidéo, le SH comprenant un paramètre de décodage adopté par les données figurant dans la séquence de trames vidéo; et reconstituer des données de conteneurs se conformant à un format de conteneurs de destination en fonction du SH, du type de CODEC enregistré, des informations d'emplacement de stockage concernant la séquence de trames vidéo et des données d'indice, et générer et émettre un fichier vidéo au format de conteneurs de destination en se basant sur les données de conteneurs reconstituées.
PCT/CN2013/072390 2013-03-11 2013-03-11 Procédé et appareil de réparation d'un fichier vidéo WO2014139069A1 (fr)

Priority Applications (3)

Application Number Priority Date Filing Date Title
PCT/CN2013/072390 WO2014139069A1 (fr) 2013-03-11 2013-03-11 Procédé et appareil de réparation d'un fichier vidéo
CN201380000249.6A CN103404146B (zh) 2013-03-11 2013-03-11 视频文件修复方法及装置
US14/850,376 US10136163B2 (en) 2013-03-11 2015-09-10 Method and apparatus for repairing video file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2013/072390 WO2014139069A1 (fr) 2013-03-11 2013-03-11 Procédé et appareil de réparation d'un fichier vidéo

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/850,376 Continuation US10136163B2 (en) 2013-03-11 2015-09-10 Method and apparatus for repairing video file

Publications (1)

Publication Number Publication Date
WO2014139069A1 true WO2014139069A1 (fr) 2014-09-18

Family

ID=49565865

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/072390 WO2014139069A1 (fr) 2013-03-11 2013-03-11 Procédé et appareil de réparation d'un fichier vidéo

Country Status (3)

Country Link
US (1) US10136163B2 (fr)
CN (1) CN103404146B (fr)
WO (1) WO2014139069A1 (fr)

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104980712A (zh) * 2015-07-14 2015-10-14 济南中维世纪科技有限公司 视频监控数据恢复后的智能索引方法
CN105653385B (zh) * 2015-12-31 2019-02-01 深圳市蓝泰源信息技术股份有限公司 一种车载录像方法
CN106484566B (zh) * 2016-09-28 2020-06-26 上海爱数信息技术股份有限公司 基于ndmp协议的nas数据备份和文件细粒度浏览恢复方法
CN107896343A (zh) * 2017-11-29 2018-04-10 天津聚飞创新科技有限公司 Mp4文件的修复方法及装置
CN109936715B (zh) 2017-12-19 2021-09-03 华为技术有限公司 一种mp4文件的处理方法及其相关设备
US10657032B2 (en) * 2018-03-30 2020-05-19 Atlassian Pty Ltd Systems and methods for monitoring performance of applications
CN108924634A (zh) * 2018-07-19 2018-11-30 深圳国微视安科技有限公司 一种ts流快速识别方法及装置
CN109474827B (zh) * 2018-12-03 2022-11-29 四川巧夺天工信息安全智能设备有限公司 监控视频快速转码的方法
US11750784B2 (en) * 2019-05-31 2023-09-05 Medicapture, Inc. Automatic video file repair method and system
CN111935500B (zh) * 2020-09-22 2021-08-10 腾讯科技(深圳)有限公司 视频解码方法、装置及电子设备
CN112732180B (zh) * 2020-12-29 2023-04-14 哈尔滨海能达科技有限公司 一种信息处理方法、处理装置、电子设备及存储介质
CN113507625B (zh) * 2021-06-22 2022-08-19 西安理工大学 一种自适应视频修复方法
CN113613088A (zh) * 2021-08-02 2021-11-05 安徽文香科技有限公司 一种mp4文件的修复方法、装置、电子设备及可读存储介质
CN113660442B (zh) * 2021-08-31 2024-03-19 广州盈可视电子科技有限公司 一种视频修复方法、装置、电子设备及可读介质
CN114125469B (zh) * 2021-11-08 2022-07-12 北京天宇威视科技股份有限公司 Mp4文件修复方法、装置、电子设备及存储介质
CN114257840B (zh) * 2021-11-26 2024-03-19 厦门市美亚柏科信息股份有限公司 一种用于Matroska格式视频的修复方法和系统
CN114860996B (zh) * 2022-07-06 2022-10-04 北京中科开迪软件有限公司 一种基于光盘库的电子视频档案修复方法及系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102045557A (zh) * 2009-10-20 2011-05-04 鸿富锦精密工业(深圳)有限公司 视频编解码方法及使用其的视频编码、解码装置
WO2012099438A2 (fr) * 2011-01-20 2012-07-26 Samsung Electronics Co., Ltd Procédé de prédiction de trame adaptable pour codage de séquence vidéo multivue
WO2012099440A2 (fr) * 2011-01-21 2012-07-26 에스케이텔레콤 주식회사 Appareil et procédé de génération/récupération d'informations de mouvement basées sur un encodage d'indice de vecteur de mouvement prédictif, et appareil et procédé d'encodage/décodage d'images utilisant ce dernier
CN102946534A (zh) * 2011-09-02 2013-02-27 斯凯普公司 视频编码

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
ES2364755T3 (es) * 2004-04-28 2011-09-13 Panasonic Corporation Aparato de generación de trenes de información , procedimiento de generación de trenes de información, aparato de codificación, procedimiento de codificación, medio de grabación y programa para los mismos.
CN101742334B (zh) * 2008-11-10 2013-04-24 华为技术有限公司 修复视频数据流的方法、设备及视频传输系统
EP2285122B1 (fr) * 2009-07-17 2013-11-13 Canon Kabushiki Kaisha Procédé et dispositif pour reconstruire une séquence de données vidéo après la transmission dans un réseau
CN101867821B (zh) * 2010-06-18 2011-11-16 上海交通大学 基于稀疏采样和纹理重建的视频编码系统
CN102469315B (zh) * 2010-11-16 2013-12-04 联芯科技有限公司 Mpeg-4视频码流的错误恢复方法和装置
GB2495467B (en) 2011-09-02 2017-12-13 Skype Video coding
US9118744B2 (en) * 2012-07-29 2015-08-25 Qualcomm Incorporated Replacing lost media data for network streaming

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102045557A (zh) * 2009-10-20 2011-05-04 鸿富锦精密工业(深圳)有限公司 视频编解码方法及使用其的视频编码、解码装置
WO2012099438A2 (fr) * 2011-01-20 2012-07-26 Samsung Electronics Co., Ltd Procédé de prédiction de trame adaptable pour codage de séquence vidéo multivue
WO2012099440A2 (fr) * 2011-01-21 2012-07-26 에스케이텔레콤 주식회사 Appareil et procédé de génération/récupération d'informations de mouvement basées sur un encodage d'indice de vecteur de mouvement prédictif, et appareil et procédé d'encodage/décodage d'images utilisant ce dernier
CN102946534A (zh) * 2011-09-02 2013-02-27 斯凯普公司 视频编码

Also Published As

Publication number Publication date
CN103404146A (zh) 2013-11-20
CN103404146B (zh) 2016-10-12
US10136163B2 (en) 2018-11-20
US20160007048A1 (en) 2016-01-07

Similar Documents

Publication Publication Date Title
WO2014139069A1 (fr) Procédé et appareil de réparation d'un fichier vidéo
TWI259724B (en) Converter-assisted video encoder
TWI691198B (zh) 動態影像預測編碼裝置、動態影像預測解碼裝置、動態影像預測編碼方法、動態影像預測解碼方法、及電腦可讀取之非暫時性記錄媒體
JP6475228B2 (ja) コンテナフォーマットでのメディアファイルの構文を意識した操作
US20060015735A1 (en) Electronic watermarking method and storage medium for storing electronic watermarking program
JP2009159359A (ja) 動画像データ符号化装置、動画像データ復号化装置、動画像データ符号化方法、動画像データ復号化方法及びプログラム
JP2009118244A (ja) 再生単位が可変のデータを送信する技術
JP4928176B2 (ja) 映像符号化装置及び映像符号化方法
JP4642854B2 (ja) 復号装置
JP2001157204A (ja) 動画像復号化方法及び装置
JP4262139B2 (ja) 信号処理装置
KR101539260B1 (ko) 선택적 영상정보 무손실 압축, 복원 장치 및 방법
JP2014011572A5 (ja) 動画像予測復号装置、方法及びプログラム
CN113228665A (zh) 用于处理配置数据的方法、设备、计算机程序和计算机可读介质
WO2022110870A1 (fr) Procédé de codage et de décodage d'images, appareil de codage et de décodage, codeur et décodeur
US11599570B2 (en) Device and method to render multimedia data stream tamper-proof based on block chain recording
US11496757B2 (en) Methods, apparatuses, computer programs and computer-readable media for scalable video coding and transmission
TWI700918B (zh) 具有初始化片段之視訊及音訊之寫碼
CN113422962B (zh) 视频编码方法及编码器
US11997314B2 (en) Video stream processing method and apparatus, and electronic device and computer-readable medium
CN111757168B (zh) 音频解码方法、装置、存储介质及设备
JP3897783B2 (ja) 画像処理装置及びその制御方法、並びにコンピュータプログラム及びコンピュータ可読記憶媒体
US20230034764A1 (en) Video stream processing method and apparatus, and electronic device and computer-readable medium
US9973209B2 (en) Processor and data processing method thereof
KR100567542B1 (ko) 동영상 구현 방법

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13878373

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13878373

Country of ref document: EP

Kind code of ref document: A1