Vegas Pro: Audio Shift in rendered video

  • When I render from Vegas Pro 17 with Voukoder/x264/AAC I see that in resulting file audio stream is ahead of video stream.

    If I render simple wav or using internal encoder audio and video are in sync.

    People in Vegas Pro forum mentioned that this is known issue and they have the same issue while rendering through frameserver + handbrake/x264/AAC: audio stream is 44ms ahead.

    Another option for render from Vegas using x264/AAC is Happy Otter Scripts and autor added workaround (ffmpeg option -itsofffset 0.0444) to deal with the issue.

    Is it possible to add option into Vegas connector to add audio offset (defaulted to 44ms) that can be used to deal with the issue?


  • I've already investigated this some months ago, and yes, if you extract the streams it looks exactly like this, but ...

    Each stream (audio, video and subtitles) has a timestamp associated with each frame, sample, sub, ... These timestamps are set during the encoding process. So when you extract all the streams (timestamps are ignored) and compare them, they might have different offsets, but once you are playing the file in a media player the demuxer "realigns" the streams and makes sure all timestamps are perfectly in sync. That's why it is perfectly okay for streams to have different offsets and it is fully within the specification - if the timestamps are correct, of course. (And if the demuxer is working correctly).

    So you can only compare and check this using a proper player (hardware or software). Like with the good old clapperboard.

    But I agree, when importing such a file in an NLE it should look correct, yes.

  • Vouk

    Added the Label In Progress
  • Vouk

    Set the Label from In Progress to Fixed
  • Vouk

    Set the Label from VEGAS Pro to Independent
  • Could you advice, how the filter can be used for fix the described issue when audio is ahead of video?

    If I specify Start (in s), the audio will be further ahead. Negative values not accepted.

    Stare/End samples do not work ar all: as soon as I finished enter value it reset to 0.

    P.S. Voukoder 4.1 and Vegas Connector 7.0

  • Could you please have a look at this:…

    In archive:

    - Source m2ts file

    - Simple project where I just dropped single file on timeline and delete all audio tracks but front one

    - Wav file that I rendered from the project

    - Two mp4 files rendered with Voukoder. One without atrim and one with atrim 0.044

    - Comparison project in which I dropped all these files


    atrim 0.044 audio shifted more ahead. This is predictable as if I understand correctly, atrim stand for Audio TRIM and so it is trimming a bit of audio at start and the rest of audio shifting ahead.

    For the project I need option to shift audio behind.


  • So you basically need to opposite of what i've shown above?

    Unfortunately this is a different filter "adelay". They could've really combined this in one filter.

    Maybe it doesn't really make sense to pass through FFmpegs filter 1:1. Maybe I need to put more logic in voukoder to make this more user friendly.

  • This is more a feature request than a bug report. But it not that easy to implement.

    The "adelay" filter works by modifying the PTS not by actually adding silence.