You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Delay or advance (shift/sync) individual tracks (+- seconds) #216
In the meantime, a workaround is to do it manually. For example if you want to sync an audio and video track:
Open the file containing the audio and video tracks.
Find your start-sync point of the audio, then cut off the excess from the beginning by creating a segmentand export.
Disable the video track from the "tracks"-panel.
Export the cut audio.
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.
Close the file in LosslessCut
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
Export
Reacted by chasylexus, Aaron Wolf, Mikael Finstad, Datisit, Jonas Letzbor, 손희준, Delerium, buster-blue, Alex, mediamixer and 6 more
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.
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.
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.
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
changed the title [-]Delay or advance (shift) individual tracks (+- seconds)[/-][+]Delay or advance (shift/sync) individual tracks (+- seconds)[/+]on Jan 3, 2024
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!
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!
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).
Activity
mifi commentedon Feb 11, 2020
Then we need to
-ssdifferently for audio vs video. Not sure if this is easy. Maybe something like this:https://stackoverflow.com/questions/55147398/how-to-specify-an-offset-and-a-seek-position-for-a-video-stream-of-a-mp4-contain
Update: https://wjwoodrow.wordpress.com/2013/02/04/correcting-for-audiovideo-sync-issues-with-the-ffmpeg-programs-itsoffset-switch/
zaza42 commentedon Feb 12, 2020
@mifi : Yes, this is what i exactly use.
Another solution with small tempfile: https://superuser.com/a/1307386/607525
chasylexus commentedon Jun 8, 2020
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
scaledbut this is not so common case I think.[-][feature request] audio delay[/-][+]Implement audio delay (+- seconds)[/+]mifi commentedon Dec 11, 2020
https://wjwoodrow.wordpress.com/2013/02/04/correcting-for-audiovideo-sync-issues-with-the-ffmpeg-programs-itsoffset-switch/
Binger-cn commentedon Aug 16, 2021
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.
[-]Implement audio delay (+- seconds)[/-][+]Delay or advance individual tracks (+- seconds)[/+][-]Delay or advance individual tracks (+- seconds)[/-][+]Delay or advance (shift) individual tracks (+- seconds)[/+]mifi commentedon Jan 11, 2022
FYI @gyarmish posted a manual workaround for adjusting individual tracks, see #929 (comment)
gyarmish commentedon Jan 11, 2022
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.
mifi commentedon Jan 12, 2022
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
[-]Delay or advance (shift) individual tracks (+- seconds)[/-][+]Delay or advance (shift/sync) individual tracks (+- seconds)[/+]Typhoon859 commentedon Oct 14, 2024
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!
mifi commentedon Oct 14, 2024
Not yet! But if AVIDemux can do it, maybe that's a workaround for now?
Typhoon859 commentedon Oct 14, 2024
Well sure, but... LosslessCut :(
mifi commentedon Oct 14, 2024
don't worry - this is one of the most popular feature requests, so i will definitely add it:)
Typhoon859 commentedon Oct 14, 2024
Awesome. That's great to hear man; thank you.
jauling commentedon Jan 11, 2025
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!
romanr commentedon Jun 4, 2025
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!
mifi commentedon Nov 11, 2025
In #2528 we've been testing
-itsoffset 0on 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 0is not supposed to do anything (-itsoffsetflag is supposed to add the specified differential offset to the existing offset, according to ffmpeg docs).implement delete tags and `-itsoffset`
mifi commentedon Jun 1, 2026
i've now added a basic
-tsoffsetoption per file in the Tracks panel (edit file metadata). can be tested in the next nightly build!