VideoHelp Forum




+ Reply to Thread
Results 1 to 22 of 22
  1. Hi,

    I'm capturing to AVI using HuffyUV (or Morgan MJPEG) at around 29.97fps (this seems to vary). This file plays perfectly as an AVI, with no sync problems at all. However, after I convert the video to MPEG1 using TMPGEnc the audio goes out of sync, to the point where there will be a 1/2 to 1 second gap (or more) between the sound and video. It almost seems like I'm missing a setting in TMPGEnc because I can't see how it would go out of alignment if it's an AVI.. how can it? I thought the audio and video were mixed together in an AVI.

    I got a newer version of TMPGEnc (2.54.37.135) and that didn't seem to make a difference. I've used VirtualDub (1.4.10) for capturing (tried with sync a/v either on or off, set to 29.97 fps), and also Conexant AMCAP at 29.97 and 30fps.. all these settings produce great AVI's, but after conversion the audio wanders off.

    Thanks for any suggestions!
    calamari
    Quote Quote  
  2. Member
    Join Date
    Apr 2002
    Location
    Sydney, Australia
    Search PM
    Hi......looking forward to the answers on this. I have exact same problem. I have also read that Tpgenc does not like compressed audio in the AVI. I'm quite sure mine wasn't but I will need to do some further checking.
    Cheers....Jeff
    Love makes the world go round
    Quote Quote  
  3. My audio is uncompressed 44100Hz, 16-bit, Stereo.. I think I'll experiment with that and see what happens.

    calamari
    Quote Quote  
  4. Just found a possible fix for this on Google Groups.. I am not in front of my computer ATM though so I cannot verify that it works:

    http://groups.google.com/groups?selm=v5Ms8.28734%242J2.7780123%40typhoon.southeast.rr....&output=gplain

    If that fixes it for you, PLEASE let me know.

    Thanks
    calamari
    Quote Quote  
  5. Well checking "do not frame rate conversion" actually made it a little worse .. heheh. I checked the reported FPS on my AVI's: 29.978 and 29.990. I tried 29.97 and 30.0 fps for the 29.99 video. Is it possible to specify an exact destination framerate with TMPGEnc?

    I also extracted the audio as a WAV using VirtualDub.. that didn't seem to make much of a difference either.

    Any suggestions on fixing this problem are welcome.

    Thanks,
    calamari
    Quote Quote  
  6. Member
    Join Date
    May 2002
    Location
    Rainy City, England
    Search Comp PM
    It must be an uncompressed wav, not just a wav!
    Quote Quote  
  7. Yep, it is a plain CD quality WAV.. not using any audio compression codecs.

    I've tried syncing to video, to audio and no sync. It is strange, every time the MPEG is out of sync the same way.

    I am going to try to find another conversion app to see if it makes any difference... maybe TMPGEnc is faulty?

    calamari
    Quote Quote  
  8. Member
    Join Date
    May 2002
    Location
    Rainy City, England
    Search Comp PM
    Originally Posted by calamari
    Yep, it is a plain CD quality WAV.. not using any audio compression codecs. calamari
    You don't have to use an audio compression codecs to get a compressed wav. The wav will be compressed UNLESS you choose Audio>>Full Processing Mode.

    Maybe you have, but you haven't made this clear - and it is a common mistake.
    Quote Quote  
  9. OIC, yeah.. I did do full processing mode, so that's cool. I think I've gotten a little closer to success, though! In Virtualdub, Video menu : Frame rate, it gives the frame rate for the audio as well as the video. I modified the header of my AVI to the FPS of the audio using avifrate and the video seems to be pretty well synced now (just used standard TMPEnc options). I need to do some additional testing with other clips to make sure, though.

    Thanks,
    calamari
    Quote Quote  
  10. Sometimes I have had luck simply by reencoding the audio alone and then muxing it together...
    Quote Quote  
  11. You mean change it so it matches 29.97 fps? Doesn't that make it sound horrible? If not, how did you do this audio re-encode?

    Thanks,
    calamari
    Quote Quote  
  12. Member
    Join Date
    Apr 2002
    Location
    Sydney, Australia
    Search PM
    Hi Calamari

    did you see the FAQ topic "How to fix audio sync in an mpg". Looks like it can be fixed in TMPGenc by checking the 'source' box under the advanced tab and then double clicking on it to change the audio/video delay.
    Cheers
    Love makes the world go round
    Quote Quote  
  13. jeffoz1:

    The audio drifts off linearly, it's not a constant mismatch. By the end of a 1 hour video the actors lips can be off by 2 seconds or more from the audio I discovered the reason using VirtualDub. My audio and video rates don't match exactly.. so just shifting the audio might fix it good enough in a certain range of the video, but it will still be off in other places.

    I am going to record an hour long show to see if this new method does the trick. If it does, I'll go ahead and post a guide here.

    calamari
    Quote Quote  
  14. Member
    Join Date
    Apr 2002
    Location
    Hong Kong
    Search PM
    Hi calamari, i got my audio sync problem fixed! same method in Virtual Dub. but i still got one unresolved problem. when i playback the encoded mpeg 1 from an .AVI clip, it just stop at a certain point (only 22 mins) it keeps on playing but the video is freezed up to the last minute. and file size is quite normal for a 1hour20 mins. clip. i try experimenting TMPGenc settings but never found what causes mpeg1 plays only few minutes. any good idea? thanks in advance!



    rommel
    Quote Quote  
  15. I'm glad that method fixed the sync for you! It did not work for me, unfortunately.

    There are a few things that I would really like to know about AVI's:

    Does an AVI store information about the duration of each frame, or is it all based on the header info? If each frame has it's own info, is there a program that I can use to view detailed info about each frame? Maybe my capture card is not delivering the frames at a constant rate. Either that or my sound card is not capturing at an accurate rate. I suppose that's possible, but it doesn't seem likely.

    I had assumed that in an AVI the audio and video were weaved together, but from what I've been able to tell (I've been researching the AVI format on msdn.microsoft.com), it is also possible to store the audio and video seperately in large blocks. Does anyone the way VirtualDub stores the data inside the AVI? If the info is weaved together, is it per frame, per second, per key frame, or does it depend on the codec? If it depends on the codec then maybe the codec used could have something to do with the sync issues.

    calamari
    Quote Quote  
  16. I think I was able to answer my own question:

    From http://www.jmcgowan.com/avitech.html#AVISpec :
    "The audio and video chunks in an AVI file do not contain
    time stamps or frame counts. The data is ordered in time sequentially as
    it appears in the AVI file. A player application should display the
    video frames at the frame rate indicated in the headers. The
    application should play the audio at the audio sample rate indicated
    in the headers. Usually, the streams are all assumed to start at
    time zero since there are no explicit time stamps in the AVI file.

    The lack of time stamps is a weakness of the original AVI file
    format. The OpenDML AVI Extensions add new chunks with time
    stamps. Microsoft's ASF (Advanced or Active Streaming Format), which
    Microsoft claims will replace AVI, has time stamp "objects".

    In principle, a video chunk contains a single frame of video. By
    design, the video chunk should be interleaved with an audio chunk
    containing the audio associated with that video frame. The data
    consists of pairs of video and audio chunks. These pairs may be
    encapsulated in a 'REC ' list. Not all AVI files obey this simple
    scheme. There are even AVI files with all the video followed by all
    of the audio; this is not the way an AVI file should be made."

    I will post more info as I find it.
    calamari
    Quote Quote  
  17. I also used to have A/V sync problems with VirtualDub/TMPEG when I used the captured or the edited AVI file to load to TMPEG. Then I discovered that these problems vanished completely when I used VirtualDubs frame server.


    M!chael
    Quote Quote  
  18. Member
    Join Date
    Dec 2001
    Location
    israel
    Search PM
    here is the answer to u prob/
    after converting few 100 avi files i have thath few staps must be made first.
    convert the audio to 44100 uncompresd file.
    open tmpgenc goto:

    option>envaurmental setting>vfapi plug in>directshow multimedia file.
    make it +1 insted of -1 by right clicking on it & up praurity.
    thath fix all out of sync prob.
    Quote Quote  
  19. That's an interesting fix... unfortunately that fix is not usable by people that also want to use AVISynth... to use .avs files, that filter must be turned off. Argh!
    Quote Quote  
  20. Hi. I had a couple sync problems like this when I was editing some captured TV shows (using PIC mjpeg codec in virtualdub). What I noticed is that when I edited the commerical breaks out, the sync in the segment following the edit would be thrown off and that just continued through the show. This problem mainly popped up on video segments that had been captured seperatly. A show that got captured as one continuous file seemed okay.

    What I did was open my captured video and mark out each segment (of the show) in Virtualdub and did a Direct stream video/audio copy of each segment, then joined (or append as it's called in Vdub) the segments back together in Virtualdub. Then I did a final direct stream copy to create the entire AVI ready for processing. Extra work, but at least it doesn't take too long.

    Another thing that caused a sync error during compression was that the original audio source wasn't true stereo, but I had stereo selected as the final audio output in my finishing compressor. Trying to force a mono source to be stereo will downsample the audio and throw it out of sync. If the source audio (TV channel in my case) is in mono, capture and process in mono (or dual channel).
    Quote Quote  
  21. I have a similar problem where the audio drifts progressively further out of synch. After 30 minutes it is quite noticeable.

    I have captured with different formats MJPEG, AVI, MPEG1 and MPEG2. Each one seems fine from the original capture but after it gets re-encoded to make it compatible with VCD or SVCD, the audio synch problem occurs.

    It does not matter if it is Pinnacle Studio 7 doing the conversion, TMPeng or Nero. They all end in synch problems. It has me beat.

    I did not have this problem until more recently but I do not know what is different.

    Anyone have any further thoughts on this?
    Quote Quote  
  22. Yeah if you are using Avisynth you might be in trouble, but then again maybe not. Have you tried naming your avisynth scripts video.avi instead of video.avs?

    You may then be able to open it in TMPGEnc without having to disable the DirectShow filters. Have not tried it yet, it s just a suggestion.
    It does work for VirtualDub framserver files which normally should be named vdr. If you call them avi, TMPGEnc picks it up beautifully, and no need to disable the filter.

    And I do confirm that promoting the DirectShow filter (I have it at a priority of 4) does solve the synching problems when converting divx to vcd.
    Quote Quote  



Similar Threads

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