Skip to content

Delay or advance (shift/sync) individual tracks (+- seconds) #216

Open

Description

@zaza42

Please add an option for setting audio delay, a.k.a. changing a/v sync!

Edit by @mifi :

Seems this can be done with -itsoffset:

In the meantime, a workaround is to do it manually. For example if you want to sync an audio and video track:

  1. Open the file containing the audio and video tracks.
  2. Find your start-sync point of the audio, then cut off the excess from the beginning by creating a segmentand export.
  3. Disable the video track from the "tracks"-panel.
  4. Export the cut audio.
  5. Then you do the same to the video: delete the segment from the timeline, disable the audio track and enable the video track, find the start-sync point of the video, export.
  6. Close the file in LosslessCut
  7. Take the exported video and audio files and drag them into losslesscut, one by one, and when asked, include the track from the second file
  8. Export

Activity

  1. mifi commented on Feb 11, 2020

    @mifi
    Owner
  2. zaza42 commented on Feb 12, 2020

    @zaza42
    Author

    @mifi : Yes, this is what i exactly use.

    Another solution with small tempfile: https://superuser.com/a/1307386/607525

  3. chasylexus commented on Jun 8, 2020

    @chasylexus

    Searched exactly the same.
    My use case:
    I have screencast without audio and audio corresponded to screencast. Audio begins with several seconds of silence and should be synced with video before merging. It will be super-nice to have this feature.
    Sometimes audio also have a little bit high speed that video (several seconds after several hours) and should be scaled but this is not so common case I think.

  4. changed the title [-][feature request] audio delay[/-] [+]Implement audio delay (+- seconds)[/+] on Aug 29, 2020
  5. Binger-cn commented on Aug 16, 2021

    @Binger-cn

    I need this option very much !
    I often shot badminton matches, each time result in mp4 files usually 40GB+ per file. However, I used bluetooth audio devices, so that audio is 200ms later than video. And I need to cut each file into 200+ segments for later use.
    I used LosslessCut to cut the original file, but in each segment the audio is still delayed 200ms. The solution I'm now using is that first I use mkvtoolnix to create a temp file, also 40GB+, and cut the mkv file in LosslessCut. This procedure really costs too much time and disk space.
    So I wish LosslessCut could provide an option to delay an audio track some miliseconds, with a positive or negative number.

  6. changed the title [-]Implement audio delay (+- seconds)[/-] [+]Delay or advance individual tracks (+- seconds)[/+] on Sep 17, 2021
  7. changed the title [-]Delay or advance individual tracks (+- seconds)[/-] [+]Delay or advance (shift) individual tracks (+- seconds)[/+] on Jan 11, 2022
  8. mifi commented on Jan 11, 2022

    @mifi
    Owner

    FYI @gyarmish posted a manual workaround for adjusting individual tracks, see #929 (comment)

  9. gyarmish commented on Jan 11, 2022

    @gyarmish

    Thanks for that mention mifi.

    In addition to its usefulness - part of the reason for the post was to show how it can be implemented in a new release - its quite tedious manually but it can be automate this behind the scenes using the standard lossless functions.

    Imagine having to do that for multiple short videos. It will get done but but if those steps can be programmed in it would be very useful.

  10. mifi commented on Jan 12, 2022

    @mifi
    Owner

    Yes if I cannot find a way for ffmpeg to shift the offsets, then extracting, cutting and re-importing individual tracks like you outlined could be a workaround however I would imagine that it's much slower (more CPU/resources) than letting ffmpeg do it internally

  11. changed the title [-]Delay or advance (shift) individual tracks (+- seconds)[/-] [+]Delay or advance (shift/sync) individual tracks (+- seconds)[/+] on Jan 3, 2024
  12. Typhoon859 commented on Oct 14, 2024

    @Typhoon859

    Has this feature been added? I can see that the program is well written and I appreciate all the work that's been put into it. This ability to shift/synchronize the audio is a must however. On AVIDemux, there's a simple option for the audio to enter a ms delay amount (+ or -) and it's always worked great. Any word on how to achieve this simply and easily using LosslessCut? Thanks in advance!

  13. mifi commented on Oct 14, 2024

    @mifi
    Owner

    Not yet! But if AVIDemux can do it, maybe that's a workaround for now?

  14. Typhoon859 commented on Oct 14, 2024

    @Typhoon859

    Not yet! But if AVIDemux can do it, maybe that's a workaround for now?

    Well sure, but... LosslessCut :(

  15. mifi commented on Oct 14, 2024

    @mifi
    Owner

    don't worry - this is one of the most popular feature requests, so i will definitely add it:)

  16. Typhoon859 commented on Oct 14, 2024

    @Typhoon859

    don't worry - this is one of the most popular feature requests, so i will definitely add it:)

    Awesome. That's great to hear man; thank you.

  17. jauling commented on Jan 11, 2025

    @jauling

    Adding this functionality would also improve the workflow when adding music to a clip. Often the audio I want to add is only a snippet of an entire track. Being able to seek and find the right starting point would be killer, thanks!

  18. romanr commented on Jun 4, 2025

    @romanr

    Thank you @mifi for the wonderful app. Been using it for years and this is the first time the issue I'd like to vote for!

  19. mifi commented on Nov 11, 2025

    @mifi
    Owner

    In #2528 we've been testing -itsoffset 0 on files that have a start_time offset between the audio and video track (e.g. audio delay), and for some files it removes (most of the) time offset. I don't quite understand it, because -itsoffset 0 is not supposed to do anything (-itsoffset flag is supposed to add the specified differential offset to the existing offset, according to ffmpeg docs).

  20. added a commit that references this issue on Jun 1, 2026
  21. mifi commented on Jun 1, 2026

    @mifi
    Owner

    i've now added a basic -tsoffset option per file in the Tracks panel (edit file metadata). can be tested in the next nightly build!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions