Patent attributes
A method and a device for repairing a video file. The method includes the device generating, if frame data of a video frame can be extracted from a video data stream of a corrupted video file according to a video frame structure feature, a video frame sequence from the extracted frame data of the video frame; recording the CODEC type corresponding to the video frame structure feature, storage location information of the video frame sequence, and index data that is used to record a timestamp-based index of the video frame sequence; determining a sequence header of the video frame sequence; and reconstructing, according to the sequence header, the recorded CODEC type, the recorded storage location information, and the recorded index data, container data that complies with a target container format, and generating and outputting a video file in the target container format based on the reconstructed container data.