Hi,
I've got an audio out-of-sync problem. Here's how it occurred:
A DVD of mine has no English subtitles so I downloaded them so I could re-author the DVD with the subtitles.
1) VobEdit - I de-muxed the DVD, resulting in a m2v file and an ac3 file.
2) Converted the downloaded srt subtitle file to sup, using srt2sup.
3) I used IFOEdit to re-author the DVD, using the ORIGINAL m2v & ac3 files, and adding the sup subtitle file that I had created.
4) The resulting DVD has the audio slightly out of sync, the audio arrives slightly too early. I re-authored again using DVD Author, just to check that it was not IFOEdit that was causing the problem, and that version also has its audio out of sync.
The original DVD's audio is perfectly in sync, and I didn't modify the m2v and ac3 files at all.
According to Procoder 2:
The m2v file has a length of 01:50:49:23
The ac3 file has a length of 01:50:49:00
Isn't this discrepancy the wrong way around? (If the audio's too early wouldn't the audio file be longer?)
What I need to know is how to work out from the VOB or IFO files, what the audio delay is, so that I can plug it into IFOEdit and get the audio back in sync. Can someone explain how this is done please? [Also when setting the audio delay in IFOEdit, there is a choice of 'ms' or 'pts', I don't know what 'pts' is (other than it stands for 'Presentation Time Stamp'), so if that needs to be used instead of ms can you tell me so please.]
Many, many thanks.
+ Reply to Thread
Results 1 to 10 of 10
-
-
-
Originally Posted by Baldrick
Thanks and night. -
Originally Posted by Bjs
Thanks and night too. -
Thanks for the suggestions guys.
I've had another crack at this and still have problems.
Originally Posted by Bjs
Originally Posted by Baldrick
I saw a post in a web search I did, that DVD Decrypter can sometimes result in a -80ms delay (a negative number delay meaning the audio arrives too early), so hoping (foolishly) that this might be the problem, I re-authored yet again using -80ms as the audio delay in IFOEdit. This was not enough the audio still arrives too early.
Using guess work is just too time consuming. It takes my system 10 mins (at least) for IFOEdit to re-author this DVD, and since I've got to get the ms exactly right, it could take a long time; more than I am prepared to invest in fixing this.
I noticed in IFOEdit's log when I did the re-author based on the dgindex demux, in other words I did not set IFOEdit to use a user specified audio delay, that it specifies a video start, an audio start, and various stream delays. But I don't know how these values can be used to work out what delay I might manually enter to fix my sync problem (if indeed they can be used to fix this). IFOEdit's log display can't be copied'n'pasted nor saved, so I was forced to make a screen capture of it, actually 2 which I then combined into one image (the last line of the top part is the first line of the second, you'll see what I mean), here's the image as a clickable thumb:
Can anyone tell me if these numbers can be used to solve the sync problem?
Also is there some video playing software that lets you specify a video stream and an audio stream and to set a delay on the audio? That way I could fiddle around with the ms of the delay until I hit the right value and then re-author using that delay in IFOEdit.
Many thanks, and regards, etc.. -
Originally Posted by Midzuki
Answers:
1) The m2v contains just the video stream. BUT when re-authoring the VOBs contain the 1 video, 1 audio, and 1 subtitle. But the m2v does not contain the subtitle stream, this is stored in a sup file.
2) Not tried Muxman. I've used IFOEdit and DVD Author and both resulted in the audio out of sync problem. I'll try it if you think it will make any difference, but is it likely to?
Thanks again. Regards, etc.. -
Thanks for all your replies.
I resolved the problem with help in another forum and for the sake of completeness and for others searching the forum for this kind of problem, here's the solution.
My audio out of sync problem turned out to be a well known 'leading black GOPs with no audio' problem. That is to say, some frames at the start of the DVD vob title set have no audio in them, but when de-muxed the audio starts at the same time as the video (including the no-audio video frames), meaning your audio starts fractionally too early, knocking it out of sync with the video.
To fix:
NOTE: If your audio is arriving too late and not too early then this fix is not for you, as you do not have the 'leading black GOPs with no audio' problem.
Get a copy of the software DGMPGDec aka DGIndex, here's the URL:
http://neuron2.net/dgmpgdec/dgmpgdec.html
You need to use DGIndex to de-mux the DVD's streams.
Load DGIndex, and use File-->Open to load the first vob file in the movie title's vob set (in my case the movie title's set starts with VTS_11_1.vob). This brings up a 'File list' dialog, use 'Add' to add all the rest of the vob files from the set, EG. VTS_11_2.vob, VTS_11_3.vob, VTS_11_4.vob, VTS_11_5.vob. Obviously they must be in the correct order. Click 'OK'.
Them use the '>' button to skip a few I frames (each press skips not a single frame but on to the next I frame), I needed to press '>' 3 times. HINT: Skip until you see the first video frame displayed and then go back once using '<', but if this (later) does not give you an audio delay number then skip to the 1st video frame and don't go back 1. Then click on the '[' button to mark this I frame as the new start point, in so doing you're skipping the frames that have no audio.
Now just select File-->Save Project And De-Mux Video. This will de-mux your vob file set's streams. The audio stream's file name will contain the out of sync value in ms - if this says 0, cancel and try moving on an I frame or more, as suggested in the previous paragraph, don't forget to use '[' again to mark the new I frame as the new starting point.
Once de-muxing has finished, you can use IFOEdit (or whatever re-mux software you want) to re-author the DVD, using the value given in the audio file name to get your audio back in sync (don't forget the minus sign or you'll be making it exactly twice as badly out of sync!!).
OR... if you are using Avisynth, use a script SOMETHING like this:
LoadPlugin("path...\DGDecode.dll")
video=MPEG2Source("path...\filename.d2v")
audio=nicac3source("path...\filename.ac3").delayau dio(-0.128)
AudioDub(video,audio)
Replacing the delayaudio value of -0.128 with your out of sync value, converted to a fraction of 1000 (1000 ms = 1 sec), EG. -128 becomes -0.128, -64 becomes -0.064. If you're not sure about this simply divide your value by 1000, EG. 64 / 1000 = 0.064.
Hope this helps. -
THANKS MAN! That worked! Audio went from no delay ( which was wrong), to -90ms when it came out of DGIndex after skipping the blank GOPs (aka I frames).
I just muxed the resulting .m2v (video file) with the audio into an .mkv file, and everything was in sync.
THANKS A MILLION! Hope it works for the rest of my videos.
This thread may be old, but the technique STILL WORKS!
Similar Threads
-
audio sync problem, how to work out progressive audio sync delay
By jolt321 in forum Newbie / General discussionsReplies: 13Last Post: 10th Apr 2012, 21:09 -
Video scattering , audio sync variable delay in MKV files
By prabhakarlad in forum Software PlayingReplies: 13Last Post: 22nd Apr 2011, 14:55 -
Audio with delay making the proper sync
By ranosb in forum AudioReplies: 1Last Post: 25th Jul 2009, 21:09 -
Audio Delay and other potential A/V sync Issues?
By rkr1958 in forum AudioReplies: 1Last Post: 2nd Dec 2007, 14:33 -
Audio delay in avi file calculation article is needed
By AleksandrIgnatov in forum ProgrammingReplies: 0Last Post: 19th Jun 2007, 20:53