Fix Audio Sync When Converting VOBs with FFmpeg

Converting VOB files with FFmpeg often results in audio and video drift due to non-continuous presentation timestamps (PTS), dropped frames, and multiplexing quirks inherent to DVD media. To eliminate this desynchronization, FFmpeg provides specific timestamp regeneration flags and synchronization filters that force the audio and video streams to stay aligned throughout the conversion process.

To convert a VOB file while maintaining perfect synchronization, use the following command structure:

ffmpeg -fflags +genpts -i input.vob -vf "fps=source_fps" -af "aresample=async=1000:min_hard_comp=0.100000:first_pts=0" -c:v libx264 -crf 18 -c:a aac -b:a 192k output.mp4

Essential Command-Line Arguments Explained

Handling Multiple VOB Files Correctly

A major cause of audio desync occurs when concatenating consecutive VOB files (e.g., VTS_01_1.VOB, VTS_01_2.VOB). Joining them individually without handling timestamp continuity causes the audio to drift at each file boundary.

To prevent boundary desync, concatenate the raw byte streams before processing rather than using the standard FFmpeg concat demuxer:

cat VTS_01_1.VOB VTS_01_2.VOB VTS_01_3.VOB | ffmpeg -fflags +genpts -i - -af "aresample=async=1000:first_pts=0" -c:v libx264 -c:a aac output.mp4

On Windows, use the equivalent binary append syntax:

copy /b VTS_01_1.VOB + VTS_01_2.VOB + VTS_01_3.VOB combined.vob
ffmpeg -fflags +genpts -i combined.vob -af "aresample=async=1000:first_pts=0" -c:v libx264 -c:a aac output.mp4

Combining -fflags +genpts on the input with the aresample audio filter guarantees that both video and audio streams share an identical timeline, regardless of defects in the original DVD source.