Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
|
Thread Tools | Search this Thread | Display Modes |
15th October 2011, 23:17 | #1 | Link |
Registered User
Join Date: Sep 2011
Posts: 241
|
DGIndex makes Video out of sync with Audio - please help!
I have an MPEG 2 with 2 channel AC3 audio. I demux with TS Muxer to get an MPV file and an AC3 file.
I then saved the MPV file in DGIndex to get a D2V file. I then ran the D2V file through HC Encoder to get my new MPV file. The original video is in sync however after I run the D2V file through HC Encoder (whether via an AviSynth script or not) the resulting M2V file once remuxed with the AC3 audio - the audio is out of sync. The audio is out of sync from about the 44th minute and onwards. Both the original video and the new video are exactly the same length: Original MPEG2 before I demuxed it to get MPV for HC Encoder gives: 1:17:44.11 (hours, minutes, seconds, frames) MPV (from HC Encoder) + AC3 TS file gives: 1:17:44.11 If I don't demux the MPEG 2 first via TSMUxer to get an MPV and AC3 file and instead use DGIndex to demux then the end result is that the whole file has the audio out of sync. It's definitely DGIndex that's causing the problem. The original MPEG2 file is DVD compliant because I could make a DVD from it in VideoRedo without re-encoding so I don't think it's the file that’s the problem. I even tried to use VideoRedo's Elementary Stream Multiplexer to mux the converted M2V file with the AC3 file but that just gives me a 30 second file of garbage. I suppose I could use an audio delay but how would that work if the audio is only out of sync from the 44th minute onwards? I would appreciate any help on how to get my video and audio in sync. Is there another program I could use to make a D2V file? |
16th October 2011, 00:57 | #2 | Link | ||
Guest
Join Date: Jan 2002
Posts: 21,901
|
Quote:
Quote:
a) demux with DGIndex b) apply the reported audio delay, either using an AC3 cutter like DelayCut, or using DelayAudio() in your script Last edited by Guest; 17th October 2011 at 20:07. |
||
16th October 2011, 05:00 | #3 | Link | |
Registered User
Join Date: Sep 2011
Posts: 241
|
Quote:
Code:
RAW July 07 1997 Edited.d2v RAW July 07 1997 Edited T80 2_0ch 192Kbps DELAY 0ms.ac3 RAW July 07 1997 Edited.mpv I then load my script in HC Encoder. This is my script: Code:
Mpeg2Source("I:\New\z = Encode\dgindex\RAW July 07 1997 Edited.d2v", CPU=6) DeGrainMedian(limitY=2, limitUV=3, mode=1, interlaced=true) DeGrainMedian(limitY=2, limitUV=3, mode=1, interlaced=true) AddBorders(8, 0, 8, 0) DelayAudio(0) Last edited by VideoFanatic; 16th October 2011 at 05:02. |
|
16th October 2011, 14:51 | #5 | Link | |
Guest
Join Date: Jan 2002
Posts: 21,901
|
OK, you have 0 delay, so no adjustment is necessary (but see the note below).
This is the process that should work: 1. Demux the audio with DGIndex while doing Save Project. Don't demux the video. 2. Serve your video via the script. 3. Open the script with HCEnc and encode the video. 4. Mux the audio and encoded video with an appropriate muxer (such as Imago Muxer or mplex). If that does not work for you, then please post a link to a sample from the beginning of the source stream. Just use DGSplit to cut the first 100MB of the original file. Upload that to mediafire.com and post the link here. Also, tell me what muxer you used. IMPORTANT NOTE: Here is one more thing to look at. Your source file may have some blank video at the start that messes up sync. Try opening the file in DGIndex and then doing > several times until video appears. Then hit [ to start the project there. Then Save Project, etc., as described above. This is pretty common on DVDs. This may result in an audio file with a non-zero delay, so you'll have to adjust for that with DelayCut on your AC3 file before muxing. Quote:
Last edited by Guest; 16th October 2011 at 14:58. |
|
16th October 2011, 14:54 | #6 | Link | |
Registered User
Join Date: Sep 2011
Posts: 241
|
Hi, sorry I made this post before you're above post. I will get back to you soon.
Quote:
When I demux an MPEG2 with DGIndex it gives an M2V file and an AC3 file which has "DELAY 0ms" in the title. I've just been told by someone else that I don't need to add a delay because HC Encoder is only working with the video file. Is that correct? Anyway with the AC3 file I got from DGIndex I opened it in DelayCut and ticked "Original Length" because the ac3 file had "DELAY 0ms" in the title. I then remuxed the files and I still had sync problems. Last edited by VideoFanatic; 16th October 2011 at 14:56. |
|
16th October 2011, 15:15 | #7 | Link |
Guest
Join Date: Jan 2002
Posts: 21,901
|
I suspect you need to skip some GOPs at the beginning of the project as I mentioned. If it does not work then please post a sample as described. This is a well-known scenario that can cause async. Its root cause is not DGIndex but rather the timestamp conditions at the start of the file.
|
16th October 2011, 16:59 | #8 | Link | |
Registered User
Join Date: Sep 2011
Posts: 241
|
Quote:
Do you want a 100MB sample from the orginal MPEG2 file which has no problems or do you want a sample from the TS file which I muxed from the DGIndex MPV and Ac3? |
|
16th October 2011, 18:15 | #9 | Link | |
Aging Video Hobbyist
Join Date: Dec 2004
Location: Off the Map
Posts: 2,461
|
Quote:
|
|
16th October 2011, 18:31 | #10 | Link |
Registered User
Join Date: Sep 2011
Posts: 241
|
Sorry, I misread it. Here's the 100MB file: http://www.mediafire.com/?6t8e0ov76k7w1ne
|
16th October 2011, 21:07 | #11 | Link | |
Guest
Join Date: Jan 2002
Posts: 21,901
|
Quote:
EDIT: Where did you get this source file? Last edited by Guest; 16th October 2011 at 21:16. |
|
16th October 2011, 23:37 | #12 | Link | |
Registered User
Join Date: Sep 2011
Posts: 241
|
I just used the Trim and Copy function of VideoRedo to save the first 100 MB of the original MPEG2 file - wasn't that what you wanted?. It muxes without re-encoding.
I use TSMuxer to mux the AC3 and M2V files from DGIndex. Quote:
RAW July 07 1997 Edited T80 2_0ch 192Kbps DELAY -41ms I then opened the AC3 file in DelayCut, ticked "Original Length" then entered "41" in the Start (msec)" box. It then gave a file like this: RAW July 07 1997 Edited T80 2_0ch 192Kbps DELAY -41ms_fixed I then muxed that AC3 file and the M2V file from DGIndex in TSMuxer but the audio is still out of sync. You said marking the file in DGIndex is precise yet I've still got my audio out of sync so isn't very precise! Unless I've done something wrong? Could you please point me to some of those discussions you mentioned. The source is from Wrestling footage recorded off TV onto VHS, transferred to DVD then dumuxed to an MPEG2. Could you please try saving the MPEG2 on your end with DGIndex and then doing the other steps needed to get the end result video file so I can see how you manage to get the audio in sync? |
|
17th October 2011, 19:04 | #13 | Link | |
Guest
Join Date: Jan 2002
Posts: 21,901
|
Quote:
Anyway, your uploaded stream has two missing audio frames. I have verified it by tracing and also with EAC3TO, which reports two audio gaps. Failure to account for those produces desync of 64 ms, which is easily perceptible. EAC3TO is able to replace the missing frames with copies of the previous frame. Manzanita Muxer, a $5000 professional tool, gives demuxed audio identical to that of DGIndex, i.e., it just demuxes what it sees and does not try to recreate any missing frames. So for this kind of corrupted stream, you should demux audio with EAC3TO. Then mux it with the re-encoded video and things should be fine. You won't be able to set a project start other than the very beginning, however, because then you cannot coordinate the start with EAC3TO. I'll surely look into adding similar gap processing to DG tools, as my handling for gaps between multiple M2TS files (and only for AC3 audio!) is a bit ad hoc, and a more general solution would address gaps anywhere, whether due to corruption, concatenation, editing, etc. It has to be done. Last edited by Guest; 18th October 2011 at 02:54. |
|
17th October 2011, 20:10 | #14 | Link | |
Guest
Join Date: Jan 2002
Posts: 21,901
|
Quote:
If so, what tools did you use for each step? I want to try to determine where audio frame loss could have occurred. If you did not do it yourself, where did you get the MPEG2 file? |
|
18th October 2011, 01:41 | #15 | Link |
Registered User
Join Date: Sep 2011
Posts: 241
|
I got the DVDs from someone else, I don't know what tools they used. All I know is that they recorded TV footage onto VHS then transferred onto DVD. I then got the DVD and demuxed with VideoRedo to MPEG2. I then used TSMuxer to demux the MPEG2 then I used AC3Tool to convert AC3 to WAV. Then I removed the background hiss with a WAV editor. I then converted the WAV back to AC3 with WAV to AC3 Encoder 5.0. Then I remuxed the AC3 and MPV in TSMuxer. I then make my cuts in VideoRedo but I don't think VideoRedo would cause the missing audio frames.
Once I removed the hiss and clicks, the audio sounds fine, however if you listen via headphones you may be able to hear the occasional artefact. So god knows how the videos were recorded from start (TV) to finish (DVD). In the VideoRedo options, within the Stream Parameters section there's an option for "Detect / resync missing frames". It has a default option of "Resync - Remove Audio Frames" selected. You can also select "Ignore" or "Resync - Insert Extra Video Frames". Could any of those options prevent the audio frame loss? Obviously the default option doesn't as that's what I used on the file I have a problem with. Could you please tell me how to use your choice of GUI for EAC3TO to do what you said. I just want to fix the ac3 file. I downloaded More GUI from http://forum.doom9.org/showthread.php?t=135095 but I can't get it working.
If I load an MPEG2 instead of an AC3 file it shows a percentage complete window but it just gives error messages and loads up TSMuxer at the end of it. Is there a foolproof guide which explains how to use More GUI. If not could you please tell me how to use it or another GUI that works. Thanks Last edited by VideoFanatic; 18th October 2011 at 02:06. |
18th October 2011, 02:11 | #17 | Link | |
Guest
Join Date: Jan 2002
Posts: 21,901
|
If you had posted what I asked for (a DGSplit of the original VOB), we could have determined whether the frame loss was there from the start or your process caused it.
Quote:
http://forum.doom9.org/announcement.php?a=36 Thank you for your understanding. I know it sucks to have this happen but there are ample warnings about these things and you should have taken note of them. @Asmodian That's right. "eac3to -demux file.mpg" hardly needs a GUI. Then again, nowadays many people don't know how to open a command window and set the PATH variable. It's like "Huh, what? Just give me a GUI." Hard to deny the point, though! Still, there are EAC3TO GUIs in abundance, so no need to panic. Last edited by Guest; 18th October 2011 at 03:01. |
|
Tags |
audio, dgindex, sync, video |
Thread Tools | Search this Thread |
Display Modes | |
|
|