Author Topic: calculate delay  (Read 6061 times)

dorian

  • Newbie
  • *
  • Posts: 5
calculate delay
« 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

Agent_007

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3163
Re: calculate delay
« Reply #1 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.
I am away between 15th of May - 15th of June. (yes, I am playing D3)

dorian

  • Newbie
  • *
  • Posts: 5
Re: calculate delay
« Reply #2 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.

Agent_007

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3163
Re: calculate delay
« Reply #3 on: March 02, 2012, 06:07:46 PM »
How much offsync you get?
I am away between 15th of May - 15th of June. (yes, I am playing D3)

dorian

  • Newbie
  • *
  • Posts: 5
Re: calculate delay
« Reply #4 on: March 02, 2012, 06:16:11 PM »
for some movies it looks perfect
for others maybe 50/100 ms offsync

Agent_007

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3163
Re: calculate delay
« Reply #5 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.
I am away between 15th of May - 15th of June. (yes, I am playing D3)

dorian

  • Newbie
  • *
  • Posts: 5
Re: calculate delay
« Reply #6 on: March 03, 2012, 04:57:24 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.
« Last Edit: March 03, 2012, 08:09:18 PM by dorian »

dorian

  • Newbie
  • *
  • Posts: 5
Re: calculate delay
« Reply #7 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
« Last Edit: March 04, 2012, 01:40:35 PM by dorian »