How to Sync Subtitles with Audio in mpv?

Achieving perfect synchronization between subtitles and audio in the mpv media player is a straightforward process that can be done entirely via quick keyboard shortcuts or precise configuration settings. Whether your subtitle file is lagging behind or appearing too early, mpv allows you to shift the text timing on the fly in 100-millisecond increments. This guide covers the essential hotkeys for real-time adjustments and explains how to make permanent or ultra-precise timing changes so you can enjoy a seamless viewing experience.

Essential Keyboard Shortcuts for Real-Time Sync

The fastest way to fix out-of-sync subtitles while a video is playing is by using mpv’s built-in hotkeys. These keys shift the subtitle timing forward or backward relative to the audio track.

Whenever you press these keys, an On-Screen Display (OSD) message will appear in the top-left corner of the video window, showing the total current delay (e.g., Sub delay: 200ms or Sub delay: -300ms).

Exact Subtitle Adjustments via Command Line

If you already know the exact time discrepancy before opening your media file, you can launch mpv from your terminal or command prompt with a specific delay parameter.

Use the --sub-delay option followed by the desired time offset in seconds:

mpv --sub-delay=2.5 video.mpk

Making Subtitle Adjustments Permanent

If you find that you consistently need to adjust subtitles for a specific file, or if you want a default delay applied to all videos, you can modify mpv’s configuration file (mpv.conf).

  1. Locate your mpv.conf file (typically found in ~/.config/mpv/ on Linux/macOS or %APPDATA%\mpv\ on Windows).
  2. Open the file in a text editor.
  3. Add the following line to set a permanent default delay (replace 0.5 with your preferred number of seconds):
sub-delay=0.5

For files where the timing drifts progressively over time rather than staying at a constant delay, you may need to adjust the subtitle frame rate instead. This can be toggled in real-time by pressing Ctrl+[ and Ctrl+] to scale the subtitle speed up or down.