VideoHelp Forum




+ Reply to Thread
Results 1 to 14 of 14
  1. Member
    Join Date
    Dec 2005
    Location
    europe
    Search Comp PM
    Hello,

    I had a look throught some of other topics but I am still unsure about my issue(if you could call it that)

    I have an avi file on my computer,its over 1GB in size,split into two files,the first files audio and video length match perfectly however the second files audio length is less than the videos length.The audio is AC3,I'm assuming that the split caused this delay,but I'm just guessing.When I open this file in Goldwave the audio length reports as 01:05:16.4160 however upon checking file information in virtual Dub the Audio length reports as 1:05:16:43.Gspot reports the video length as 01:05:19 and avicodec -video duration is 1:05:18 xvid 25fps 1116kbps.My question would be out of all these results how would I determine which length to stretch the AC3 to match the video length.When I play this avi on my computer there is no sync issue that I can detect,but I have a gut feeling that if I encode this file and burn to disc I will have a sync issue.

    I have made posts here in the past regarding sync issues and I did resolve those issues by cutting bad frames,but this time I when I checked the avi(part2)for bad frames it reports no bad frames.

    thanks for any help.
    Quote Quote  
  2. Hi-

    My question would be out of all these results how would I determine which length to stretch the AC3 to match the video length.

    Why stretch it at all? Maybe the audio just ends before the video. It's in synch now you say? Then stretching would be the worst possible thing to do. At most you may have to adjust the delay. Why create a problem for yourself before you're even sure you have one?
    Quote Quote  
  3. Member
    Join Date
    Dec 2005
    Location
    europe
    Search Comp PM
    thanks for the reply manono,I took a chance on it,encoded it using CCE but end result was out of sync on my dvd player.I also ran ac3fix to check for errors but non were reported.It plays fine on my PC,althought it did freeze up in windows media player for a sec or two yesterday but hasnt today.
    Quote Quote  
  4. Mod Neophyte redwudz's Avatar
    Join Date
    Sep 2002
    Location
    USA
    Search Comp PM
    Which kind of sync error? Where it gradually gets worse as the video plays or is the error the same the length of the video? The first type is usually related to the length difference of the audio and video and the second could be from a bad join or split and can be fixed by adding a offset. Check the first clip to make sure the audio doesn't end early or late. The problem may be there, not the second file.

    If you are splitting the files yourself, not really a good idea if you can avoid it. If they are already split, maybe save out both the audios with VD to WAVs, then you could try rejoining them as WAV audio and AVI in VD to get back to the original 1GB file. If the sync is OK after that, then you could re-encode the full length audio back to AC3 with ffmpeggui and encode the video again if needed. And let your authoring program join the the audio and video.

    This will result in some quality loss to the audio, but it may help with the sync problem.
    Quote Quote  
  5. Member
    Join Date
    Dec 2005
    Location
    europe
    Search Comp PM
    I hope its ok to post imageshack pictures,if not then I apologise.

    http://img242.imageshack.us/img242/9239/avi1at3.jpg <<AVI 1
    http://img242.imageshack.us/img242/3285/avi2up3.jpg <<AVI 2

    thanks for the reply redwudz,its an issue where the audio seems to slip out of sync with the video,as I stated above it plays fine on my PC but not on my home dvd player.I did not split the file myself.The first clip is fine I have checked it from start to finish and there is no sync issue with avi 1,the 2nd avi is the one effected.I burnt 2 cds,first disc played fine no issues,switched to the 2nd disc and about 20 mins into the movie I noticed it was off.I will take your advice and manonos about adding an offset.

    I have thought about joining the entire avi but its well over 1gb in size,will this effect quality a lot?
    Quote Quote  
  6. Hi-

    You haven't yet said what you're doing and how you're doing it. You mentioned both CCE and CDs. So you're making an SVCD? And how are you getting the video into CCE? And how are you handling the audio conversion. Details man, we need details.

    I have thought about joining the entire avi but its well over 1gb in size,will this effect quality a lot?

    Again, it depends on what you're doing. If for SVCD, there's certainly nothing wrong with encoding the whole thing at once and muxing the audio and splitting afterwards. If anything, the quality will be better, as you'll have more even quality across the entire movie.

    Have you considered using an all-in-one app to do this for you? How about the AVI2SVCD portion of DVD2SVCD?:

    http://www.doom9.org/mpg/dvd2svcd-avi.htm
    Quote Quote  
  7. Member
    Join Date
    Dec 2005
    Location
    europe
    Search Comp PM
    Hi,

    Sorry about the lack of details.I am using DVD not CD's(typo)I used AviSynth script to get the Movie into CCE,yesterday I had to convert my audio to wav (2 channel) and then convert it back to AC3 because the original audio is AC3(6 channels)and Tmpgenc dvd author won't accept 6 channel.The reason I asked would the quality be ok is because I will be encoding a 1gb+ avi xvid to dvd.It will have a lower bitrate.The AC3fix reports no errors on the second part of the avi,virtualdub reports no video errors either,so I don't how to track down where the audio slips of out sync.

    thanks
    Quote Quote  
  8. So you're converting the audio twice just so you can use TDA? Sounds screwy to me, and a possible source of your problem. Have you checked the AC3 lengths before and after? You might try something. Do a simple author using Muxman and the good video you made and the original 6-channel AC3. If it works, then that might tell you something.

    The reason I asked would the quality be ok is because I will be encoding a 1gb+ avi xvid to dvd.It will have a lower bitrate.

    Which will have the lower bitrate? The AVI? Yes, of course. The DVD? It had better not. It should have a much higher bitrate.
    Quote Quote  
  9. Member
    Join Date
    Dec 2005
    Location
    europe
    Search Comp PM
    Today I joined the avi's,demuxed the AC3(left the AC3 in its original form),encoded the joined avi using CCE,authored using muxman(great program btw)and burnt to disc..popped it in my dvd player and still the audio is out of sync,so its either file 1 or file 2,having said that I did burn a disc last night part 1 ..which is 1:09 mintues in length and the audio did not go out of sync which leads me to believe that avi 2 is the problem.I did check the lenght of disc 1 last night and the audio did match the video length.However today I checked the joined avi /before and after author and both returned the same results,the audio is 2 seconds shorter than the video(or there abouts).

    I did not want to have to convert the audio to wav,I would have prefered to have kept the 6 channels,but at the time I wasnt aware of muxman,so thank you for informing me.Incidently yes I have tried other authors that do support dolby 5.1 but I found tmpgenc easier to use.
    Quote Quote  
  10. Hi-

    Why are you wasting all these DVDRs? Can't you do your testing on the computer using PowerDVD or some such? And if you do test burns for your standalone, maybe you'll save some money in the long run by buying yourself a DVD-RW.

    Is the audio going out of synch at the join? That is, after the DVD is made, is the 2nd half out of synch? What about after you joined the 2 AVIs? Is the 2nd half, the entire 2nd half, out of synch by the same amount? If so, I can give you instructions how to fix that. Also, if the entire DVD is out of synch by the same amount, that can be easily fixed also. Sorry, but I'm still a bit unclear about exactly where the problem is.

    Oh, and how did you demux the AC3 audio after joining the 2 AVIs?
    Quote Quote  
  11. Member
    Join Date
    Dec 2005
    Location
    europe
    Search Comp PM
    Hi,

    They are dvd-rw discs,verbatim,I'm not wasting discs.

    I checked the length of avi 1,video and audio lengths matched..I used virtualdubmod to demux the ac3,and then saved the avi 1(no sound)to my hard disk.I then wrote a AviSynth script for avi 1 -pal output 16:9..loaded the script in CCE and encoded.After encoding was finished I had an mpv file and the AC3 i demuxed earlier.I loaded the mpv into tmpgenc dvd author and loaded the orginal AC3,but it would not accept the 6 channel AC3,so I converted this AC3 to wav and then back to AC3(2 channel).I then authored this as normal-tested the dvd files using powerdvd an there was no audio sync issue.I burnt it to dvd-rw and put it in my dvd player and it played fine also with no audio sync issue.

    Next :

    I checked the length of audio and video on avi 2,this is where my confusion started,many of the video information programs i used stated different video lengths,but they all stated that the audio was shorter than the video by roughly 2 seconds(the reports were for the original AVI 2 file),you said to me yesterday,perhaps the audio ended before the video,so I took your advice and didnt tamper with the length of the ac3,however I did convert this ac3 from 6 channel to 2 channel so that tmpgenc dvd author would accept it,(using tmpgenc sound plugin).I encoded the avi 2 file using the same script as before and loaded it in CCE and got an mpv file.I authored as normal using the mpv and ac3 and later burnt to dvd-rw disc(assuming it would turn out ok because it played fine on my media player and yes I was wrong to do this because I knew in advance the audio was shorter than the video).I played it on my home dvd player and about 20 minutes in I noticed the audio was out of sync with the video).

    Today:

    I joined avi 1 and avi 2 using virtualdubmod (append segment)and then I set the video to direct stream copy...next I went to stream list and clicked demux,and saved the AC3 to my hard disk,I then disabled the audio for the avi joined and saved this joined avi to my hard disk,the resulting avi was well over 1gb in size but had no audio.I then created an avisynth script,loaded up CCE and added this script to it,I encoded this joined avi and got an mpv file,I loaded the mpv and AC3 into muxman and authored,this time I did check the resulting files using powerdvd and found there was a sync issue /audio sync issue,I checked the length of the original joined avi files (video/audio) against the entire dvd and both stated the audio was 2 seconds less than the video.

    Whoever split the avi's into two prob caused the audio to fall out of sync with the video,that is I think the sync issue starts on the second avi -AVI 2 - roughly 20 mintues into part 2 of the movie.As I said before I have scanned the avi 1 AC3 using AC3fix and it reported no issues with the AC3 , I then scanned AVI 2 with AC3fix and that also reported no errors,I checked the joined avi's demuxed AC3 using AC3fix,that also reported no errors.The Joined avi 1 and avi 2 reported that the audios length was 2 seconds short of the video,the entire dvd(resulting dvd from joined avi)reported the same,the audio was off by 2 seconds.

    So in answer to your question yes I believe the second part(2nd avi)AC3 is the issue here.I know I didnt detail my steps in the past and hopefully all this might give you some insight as to what I've been doing.

    thanks.
    Quote Quote  
  12. Well, I guess that's clear enough. Thanks for the detailed reply. It seems you're doing everything correctly. Have you considered just buying a DVD/MPEG-4 player that'll play the AVI, and be done with it? And I forgot to ask a couple of more questions. At about the 20 minute mark of the 2nd part where it begins to go out of synch, just how far does it go out of synch? Not by the full 2 seconds, is it? And does the sound play before or after the video beginning at that point?

    OK, it's fixable if, when it begins to go out of synch, it goes out suddenly and by the same amount the rest of the way through. You'll need to know 2 things to fix it. One is the exact place where it begins to go out. It'll be better if it's at or near a place where there's some black frames and silence. I'll leave you to find that. After you've found it, open the script in VDubMod and find the exact 23.976fps frame number and time, or close to it, where this happens.

    The other is the amount of the asynch. To find that, open a vob near the end of the movie. Open it in Media Player Classic. Right-click the screen and go Options->Filter->Audio Switcher->check the "audio time shift" box, and fill in an estimate of the amount of asynch. Hit "Apply" and test it out. Negative values are to make the audio play earlier. 1000 ms= 1 second. Resume playback. Adjust until you get it right. At that point you'll know how much the audio is out of synch.

    There are 2 ways to fix it, one by adjusting the video and the other by adjusting the audio. To adjust the video, if the audio plays early, then you can add duplicate frames via the Loop command (one reason I said it would be better if the asynch began at or near some black frames). If the audio plays late, and a negative delay fixes it, then you remove frames. One way to do that is via the Trim Command. Say the asynch begins at the 10000 frame mark and you want to remove 1 second (1000 ms) of video (24 frames):

    A=Trim(0,9999)
    B=Trim(10023,0)
    A+B

    http://www.avisynth.org/Loop
    http://www.avisynth.org/Trim

    Open both the "Before" and "After" scripts in VDubMod and go File->File Information and compare the frame counts to be sure you did what you wanted to do. Go to the place in the script where this is happening and make sure you did what you wanted to do at the place you wanted to do it. Reencode.

    Easier and maybe better, since you're maybe sick of reencoding, is to fix the audio. Cut the complete AC3 into 2 pieces, one before the asynch place and the other after. I find the best way to do this is with HeadAC3he. Open it, set Destination Format for "Source", and adjust the Start and End frames (but make sure you really do it by time, as audio frames aren't the same as video frames). Save Part1 and Part2 AC3 tracks. Leave the Part1 alone. Add silence to Part 2 to lengthen it, or cut it to shorten it, depending on the delay you discovered. You can do this using Delay Cut. If the 2nd part is going to be cut, you can do that in HeadAC3he by having the 2nd part start the right amount after Part1 ends. Is that at all clear? So, you get 2 audios which you'll rejoin during the authoring with Muxman. When you Add the audio in Muxman, a new screen opens up. Hit the Add button and add in the 2nd audio. There's a chance you'll get a slight "pop" at the join. Better than asynch audio the rest of the way through. Author and test.

    Good Luck.
    Quote Quote  
  13. Member
    Join Date
    Dec 2005
    Location
    europe
    Search Comp PM
    Hi,

    Thank you very much for the detailed reply,using the script in vdmod I located the exact starting point of the audio issue 0:19:36.242 frame 35252 (obviously I was wrong about the 20 minute mark)and this audio sync continues throughtout the rest of the movie.The audio plays before the video at this point-0:19:36:242.

    Using your window media player steps I adjusted and ended up with a value of 1.85 seconds or 1850 milloseconds-positive(again not 2 seconds)and it matched the video.I determined this mainly by checking lip sync and ran the rest the movie in windows media classic until the end and it matched fine.

    I then used the loop command(unfortuntely the audio sync issue did not start near black frames,but happened during an action sequence)and duplicated frames in order for the video to match the audio.No big deal though.After all this I rechecked the before and after scripts and everything looked ok.So I re-encoded and checked the results using powerdvd,everything worked perfect,no audio sync,but obviously I had duplicated frames.

    Thanks for been so patient with me and thanks for the very helpful information,as for the DVD/MPEG-4 player I will certainly have a look into that and again thanks for spending this much time helping me,I have learned a lot from this.
    Quote Quote  
  14. Thanks for reporting back. I knew after you reported that there was nothing wrong with the audio that there had to be something wrong with the video, although I don't know why it would play fine as an AVI, but skip the encoding of nearly 2 seconds of video, messing up the audio synch. I guess that there's a pretty obvious jump in the action at that place in the DVD. I'm surprised that you decided to go with extending the video with duplicate frames, rather than cutting the 2nd part of the audio to shorten it and match the video. I think I would have gone with the audio fix.

    You're welcome. Diagnosing problems and passing instructions via text is difficult, but you're an obvious quick study, and I found it a nice challenge. Good luck.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!