摘要 |
A method and apparatus for repairing a video file, used for improving the success rate of video file repairing. The method comprises: if frame data of a video frame can be extracted from a video data stream of a damaged video file according to a video frame structure feature in a coder-decoder (CODEC) feature library, generating a video frame sequence from the extracted frame data of the video frame; recording a CODEC type corresponding to the video frame structure feature, storage location information about the video frame sequence and index data of a timestamp-based index used for recording the video frame sequence; determining a sequence header (SH) of the video frame sequence, the SH including a decoding parameter adopted by the data in the video frame sequence; and reconstructing container data conforming to a target container format according to the SH, the recorded CODEC type, the storage location information about the video frame sequence and the index data, and generating and outputting a video file with the target container format on the basis of the reconstructed container data. |