Repair: Past Duration Too Large Error in FFmpeg



Updated November 2024: Stop getting error messages and slow down your system with our optimization tool. Get it now at this link
  1. Download and install the repair tool here.
  2. Let it scan your computer.
  3. The tool will then repair your computer.

Past Duration Too Large error warning message is displayed when users attempt to encode a high frame rate source to a low frame rate output, which means that the images must be deleted.

FFmpeg is a free and open source program used to process video, audio and other multimedia streams. The program is designed to manage the command line processing of video and audio files. Recently, however, there have been many “Past Duration Too Large” error reports when encoding or downscaling a video.

How to Fix Past Duration Too Large Error in FFmpeg:

Setting the input frame rate

Error messages disappear by setting the input frame rate instead of the output frame rate. The output frequency is then automatically selected as the input frequency. You should also be careful in new versions of ffmpeg, because when you use PNG images with the -i option or the image2 or v4l2 input format, you should use -framerate instead of -r, see the documentation on the -r option.

November 2024 Update:

You can now prevent PC problems by using this tool, such as protecting you against file loss and malware. Additionally, it is a great way to optimize your computer for maximum performance. The program fixes common errors that might occur on Windows systems with ease - no need for hours of troubleshooting when you have the perfect solution at your fingertips:

  • Step 1 : Download PC Repair & Optimizer Tool (Windows 10, 8, 7, XP, Vista – Microsoft Gold Certified).
  • Step 2 : Click “Start Scan” to find Windows registry issues that could be causing PC problems.
  • Step 3 : Click “Repair All” to fix all issues.

Download Now

  • ffmpeg -framerate 24 -i %05d.png -c:v libx264 -crf 5 out.mkv

It is also possible to specify the input and output frame rate separately:

  • ffmpeg -framerate 25 -i %05d.png -r 10 -c:v libx264 -crf 5 out.mkv

In this case, only 161/400 images are encoded. The other images will be deleted in the meantime.

Both variants are incremental bit rates, because after deinterlacing each field (half of the image) displayed as a frame (the frame rate is doubled), the bit rate increases and if fps is variable, we have time stamping problems. And if we activate the second field, then everything looks good with bitrate and timestamps.

Using Sync flags

Adding sync flags can help to synchronize the video output and video input according to the initial frame rate of the video. Therefore, if the synchronization commands have not been added, the images may not be synchronized correctly. In this step, we will add the synchronization commands.

At this point, you will probably need to use the following call

  • ffmpeg -framerate 24 -i %05d.png -c:v libx264 -crf 5 out.mkv

However, use the following call instead

  • ffmpeg -framerate 24 -i %05d.png -c:v libx264 -crf 5 out.mkv -async 1 -vsync 1

Note that we have just added “-async 1 -vsync1” to the call, and this must be added at the end of the call you are using.
Note: Your first call may differ from the example. However, the amendments attached to the notice of meeting should not differ.

https://trac.ffmpeg.org/ticket/4401



Expert Tip: This repair tool scans the repositories and replaces corrupt or missing files if none of these methods have worked. It works well in most cases where the problem is due to system corruption. This tool will also optimize your system to maximize performance. It can be downloaded by Clicking Here

Scroll to Top