Welcome to Kametsu

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more!

This message will be removed once you have signed in.

zweeflol

MKV Tool Nix positive and negative delay

8 posts in this topic

I've noticed when you put a positive delay in MKV Tool Nix you can see this, but when entering a negative delay this "doesn't" happen:

so I took a video from FFF release (as an example) which had no delay, and applied the following

this is an example of a positive delay from 1000 milliseconds

this is an example of a negative delay from 1000 milliseconds

this is an example of a positive delay from 1000 milliseconds (added +1000 milliseconds from the negative 1000 milliseconds file)

because of this I have trouble re-muxing certain releases

why is this?

Share this post


Link to post
Share on other sites

Try actually listening to it after you mux it. Mkvtoolnix is in fact adding the -1000ms delay, but negative values cannot be displayed which is why you are seeing that +24. The reason you are getting that +24 is due to how mkvtoolnix is shifting the audio. When shifting to negative values, mkvtoolnix actually discards the data for the audio frames that are below 0 after the shift. And due to audio frames being a certain size, if you try to delay it by an amount that would cut an audio frame in half, it simply leaves that last frame there, hence there will be a small amount (in your case 24ms) of positive delay left over. Note, this shifting doesn't actually edit the audio file itself, it simply removes the frame data for audio frames falling before 0 from the header, meaning you can extract the audio later and still use the full track.

2 people like this

Share this post


Link to post
Share on other sites
10 hours ago, freeka said:

Try actually listening to it after you mux it. Mkvtoolnix is in fact adding the -1000ms delay, but negative values cannot be displayed which is why you are seeing that +24. The reason you are getting that +24 is due to how mkvtoolnix is shifting the audio. When shifting to negative values, mkvtoolnix actually discards the data for the audio frames that are below 0 after the shift. And due to audio frames being a certain size, if you try to delay it by an amount that would cut an audio frame in half, it simply leaves that last frame there, hence there will be a small amount (in your case 24ms) of positive delay left over. Note, this shifting doesn't actually edit the audio file itself, it simply removes the frame data for audio frames falling before 0 from the header, meaning you can extract the audio later and still use the full track.

alright, thanks for the information.

Share this post


Link to post
Share on other sites

Posted (edited)

One question I've had for some time now, is delaying the audio with mkvtoolnix the only method to sync audio and video? What would be an alternative method if there is any at all? Also, @zweeflol @freeka how do you determine the exact value needed for delaying or advancing audio?

 

My idea and practice was this: mux the video with its audio, watch it, notice audio/video delay, adjust audio with video player until  video and audio match, note down the amount, go back to mkvtoolnix, enter negative or positive delay for audio accordingly, remux, test video again. 

Edited by EljayFlintok

Share this post


Link to post
Share on other sites

Posted (edited)

6 hours ago, Moodkiller said:

 

Ha, thanks. Exactly what I was looking for. And thanks @Moodkiller @zweeflol for not telling me, "Well, why didn't you do a search first before asking?!". Kind people you are. :) Actually, I did search here and google but probably just did not get the keywords right. Or blindness got the better of me... O.o

Edited by EljayFlintok

Share this post


Link to post
Share on other sites
On 10/08/2017 at 2:21 AM, EljayFlintok said:

 

Ha, thanks. Exactly what I was looking for. And thanks @Moodkiller @zweeflol for not telling me, "Well, why didn't you do a search first before asking?!". Kind people you are. :) Actually, I did search here and google but probably just did not get the keywords right. Or blindness got the better of me... O.o

Haha, you are very welcome. I think Baal needs to add some more tags to that post, but yeah one of those things you need to have known was posted :) - Hopefully that helps you in your adventures of matching lipflaps to audio \o/

1 person likes this

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now