Software⏱️ 3 min read📅 2026-06-11

How to Fix: ffmpeg video cutting error: out of sync audio

FFmpeg video cutting error: out of sync audio fix

Quick Answer: Use the -ss and -t options with -c:vcopy to avoid re-encoding the video, or use -c:vlibx264 to preserve the original video codec.

When attempting to cut a video using FFmpeg in Linux, users often encounter an error where the audio and video tracks become desynchronized, resulting in a delayed audio playback.

This issue can be particularly frustrating for those who rely on FFmpeg for video editing tasks. In this guide, we will explore the root causes of this error and provide two primary methods to resolve it.

🛑 Root Causes of the Error

  • The primary reason for this error is due to the use of the `-c copy` option in conjunction with the `-ss` (start time) option. This combination can lead to a mismatch between the video and audio streams, resulting in desynchronization.
  • Another possible cause is related to the encoding settings used by FFmpeg. Specifically, when using the H.264 codec with AAC audio, there may be issues with the audio timing that can contribute to this error.

🔧 Proven Troubleshooting Steps

Using the `-ss` and `-t` options without `-c copy`

  1. Step 1: To resolve this issue, try using the `-ss` option alone to set the start time of the video, without specifying the `-c copy` option. This will allow FFmpeg to re-encode the entire video segment from the specified start time.
  2. Step 2: For example: `ffmpeg -i input.mp4 -ss 00:30:00 -t 00:30:00 output.mp4`. Note that this method may result in a larger file size compared to using `-c copy`.

Using the `-c:v` and `-af` options with audio filtering

  1. Step 1: Alternatively, you can use the `-c:v` option to specify the video codec, and the `-af` option to apply audio filters. This approach allows for more precise control over the audio timing.
  2. Step 2: For example: `ffmpeg -i input.mp4 -ss 00:30:00 -vcodec libx264 -af aresample=async=1 output.mp4`. The `aresample=async=1` filter helps to synchronize the audio with the video.

✨ Wrapping Up

In conclusion, the 'out of sync audio' error when cutting videos using FFmpeg in Linux can be resolved by using one of two primary methods. By adjusting the FFmpeg options and applying audio filtering, users can achieve a synchronized playback experience. Remember to always test your output files for quality before sharing them with others.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions