Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
zaza42 opened this issue Nov 4, 2019 · 8 comments
Open

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

zaza42 opened this issue Nov 4, 2019 · 8 comments

Comments

@zaza42
Copy link

zaza42 commented Nov 4, 2019

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:

@mifi
Copy link
Owner

mifi commented Feb 11, 2020

@zaza42
Copy link
Author

zaza42 commented Feb 12, 2020

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

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

@chasylexus
Copy link

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.

@mifi mifi changed the title [feature request] audio delay Implement audio delay (+- seconds) Aug 29, 2020
@Binger-cn
Copy link

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.

@mifi mifi changed the title Implement audio delay (+- seconds) Delay or advance individual tracks (+- seconds) Sep 17, 2021
@mifi mifi changed the title Delay or advance individual tracks (+- seconds) Delay or advance (shift) individual tracks (+- seconds) Jan 11, 2022
@mifi
Copy link
Owner

mifi commented Jan 11, 2022

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

@gyarmish
Copy link

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
Copy link
Owner

mifi commented 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

@mifi mifi mentioned this issue Feb 7, 2023
4 tasks
@mifi mifi changed the title Delay or advance (shift) individual tracks (+- seconds) Delay or advance (shift/sync) individual tracks (+- seconds) Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants