How to use ffmpeg to encode a file with possible error?

8,029

The simple solution I found, is to use the -ss option to skip the place that have errors.

Share:
8,029
David S.
Author by

David S.

Senior software engineer with solid knowledge in data structure and algorithm. Familiar with Cloud-Native architecture. Proficient in developing using a wide variety of tools. Eager to learn new technologies.

Updated on September 18, 2022

Comments

  • David S.
    David S. almost 2 years

    I have a video file, which contains some error. The file is readable, but possible some blocks are wrong during some disk operation. So while playing the video, a few seconds will no be displayed correctly. Most media player will let me play this file without crash.

    Now I want to use ffmpeg to encode the file into some other format. But the re-encode process is blocked by that error.

    I want to know if there's anyway to let ffmpeg to ignore that error, just like the media players. It can just ignore/skip that few seconds, and continue working on the rest.