Avidemux Forum

Avidemux => Stable branch (2.5) discussion => Topic started by: dorian on March 01, 2012, 10:02:11 AM

Title: calculate delay
Post by: dorian on March 01, 2012, 10:02:11 AM
hi.
my goal is to use avidemux to calculate delay between two video tracks.

in short:
I own both national and usa version of a blu-ray movie but usa version has a higher bitrate.  Delay between two tracks is costant (due to different logos at the beginning). 
With tsmuxer I mux a little part of both video only tracks (changing fps if needed on the usa video to match national video).
After that, I open both tracks with avidemux, set correct fps, then I choose a video frame that match perfectly on both tracks.
At this point delay is calculated with a simple time subtraction.

my question is:  how much is this method accurate?  Am I missing something?  I ask this because it looks too easy and asking on other forum tips about calculating delay bring to manual ways (using vlc and setting delay trying to lip sync) or difficult ways (using audio editors).
Any opinion would be really appreciated
thank you very much
Title: Re: calculate delay
Post by: Agent_007 on March 01, 2012, 05:44:15 PM
If you just want to know time difference between start frames, your method works. You could actually automate that with AVIsynth, if you have to do that multiple times.
Title: Re: calculate delay
Post by: dorian on March 02, 2012, 08:23:43 AM
well, I want to use that time difference like delay for national audio track.  I have tried this method and I have noticed result is not perfect like expected (still audio stays in sync since delay is costant).   Just wondering why.
Title: Re: calculate delay
Post by: Agent_007 on March 02, 2012, 06:07:46 PM
How much offsync you get?
Title: Re: calculate delay
Post by: dorian on March 02, 2012, 06:16:11 PM
for some movies it looks perfect
for others maybe 50/100 ms offsync
Title: Re: calculate delay
Post by: Agent_007 on March 03, 2012, 01:34:31 PM
One thing that might happen is that the audio track in the muxed file doesn't start from zero, but during authoring some small offset has been set for it. And if you demux and mux, that offset info is gone.
Title: Re: calculate delay
Post by: dorian on March 03, 2012, 04:57:24 PM
Quote from: Agent_007 on March 03, 2012, 01:34:31 PM
One thing that might happen is that the audio track in the muxed file doesn't start from zero, but during authoring some small offset has been set for it. And if you demux and mux, that offset info is gone.

correct me if I'm wrong, but in this case I would notice delay demuxing and muxing audio with the original national video track too?
also, is there a way to know if audio track in the muxed file doesn't start from zero?
thanks for your help

edit:  for demux audio track I use eac3to and according to documentation, it reports delay fix if it occurs.
Title: Re: calculate delay
Post by: dorian on March 04, 2012, 02:39:52 AM
I have just tried the same thing using avidemux 2.6 revision 7740 and I have noticed a 125ms diff compared to avidemux 2.5.6
so.. which one is more accurate about timing?

edit:
it seems the diff 125ms is only for that movies that I noticed out of sync.  so it seems 2.6 is more accurate than 2.5.6.  Still I have noticed that 2.6 crash with vc-1