1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Video/Audio sync problem, please help

Discussion in 'DivX / XviD' started by Azzy, Aug 2, 2003.

  1. Azzy

    Azzy Member

    Joined:
    Aug 2, 2003
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    11
    I tried hunderds of times and combinations and variations but cannot get this right. It doesnt matter if I use xvid/divx/vdub/vdubmod/gknot and heaven knows what other encoding/decoding/muxing software, the result is always the same: in case of movies larger than, say, 300 Mbytes (I'm ripping extras off a dvd) the movie starts off fine, audio/video sync correct. If I search in the movie using the time-slider it goes out of sync. I've tried with wmp, radlight, bsplayer and have all the proper codecs installed. I've tried with ac3/wav/mp3 but all the same. I use dvd2avi, then vfapi then vdub for the ripping. Hard: Athlon 1200, 512 ram, sb16 sound card. As I've said, I've tried every combination imaginable but nothing works. I'm doing this for quite a few weeks now and its really getting on my nerves. In case of smaller movies (<300MB) everything seems to be OK. Please, any bit of info is strongly welcome!

    p.s.: sorry for the long post

    regards

    Azzy
     
  2. powerdup

    powerdup Regular member

    Joined:
    Mar 4, 2003
    Messages:
    978
    Likes Received:
    0
    Trophy Points:
    26
    Does the movie get back into sync, or does it stay out of sync until the end of the show?

     
  3. Azzy

    Azzy Member

    Joined:
    Aug 2, 2003
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    11
    Hi powerdub, thanks for the reply. The movie stays out of sync until the end, but I discovered something that might help: as I've said, this happens only in case of relatively large files. Now, as I'm ripping extras, these films are usually 10-60 minutes long. If the .vob I'm using contains two or more movies, the result will be out of sync. BUT: the first movie will always be fine and problems start when the second one starts. I was planning on splitting them with vdub, but then I should be able to split the audio tracks as well. So it seems I have to split it 'before' muxing and have to split the audio accordingly. Am I right? And if so, how do I split .ac3 tracks?

    Thanks

    Azzy
     
  4. Azzy

    Azzy Member

    Joined:
    Aug 2, 2003
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    11
    And one more thing: if I split and .avi, is it a must to have a keyframe both at the beginning and at the end? Because sometimes a movie just does't end near a keyframe.

    thanks

    Azzy
     
  5. powerdup

    powerdup Regular member

    Joined:
    Mar 4, 2003
    Messages:
    978
    Likes Received:
    0
    Trophy Points:
    26
    Its better if you split the movie after you mux in the audio.

    I believe it is a must to split the movie between keyframes. Read this article for a more in-depth look at why.
    http://www.divx.com/support/guides/guide.php?gid=14

    How many keyframes are you encoding within the video?

    So what youre saying is during the first movie when you fast forward the audio stays in sync but on the second movie desynchronization occurs?
     
  6. Azzy

    Azzy Member

    Joined:
    Aug 2, 2003
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    11
    Well, I dont know much about keyframes, I just follow the afterdawn article for ripping into xvid/divx.

    Yes, you are right. After encoding, I have an avi with, say, three shorter movies in it and the first plays well and I can fast forward it also, no problem. When the second one starts it is out of sync. If I watch the avi and doesn't ff, the result is the same: the second movie starts off out of sync.

    thanks

    Azzy
     
  7. Azzy

    Azzy Member

    Joined:
    Aug 2, 2003
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    11
    I just checked and in a 25 minute avi there 280 keyframes. Is this too much, too few, enough?
     
  8. sktron

    sktron Member

    Joined:
    Aug 3, 2003
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    11
    I have had the same problem with LiveCaptures of more than 10 mins. Audio gets progresively out of sync. After 40 mins it will be 2.5 secs.

    I have found the solution! :)

    In VirtualDub you can stretch the audio by a factor. In my example I esitmated the video delay to be 2.5 sec in a 40 mins video.
    Total frames @25 fps: 60000
    2.5 sec * 25fps = 62.5 frames (delay in frames)
    60062.5 / 60000 = 1.001041667
    Audio to be stretched by a factor of 1.001041667

    That's the value you need to set.
    Leave video processing at direct stream copy:
    Set audio processing at Full:
    Select [bold]use advanced filters[/bold], choose [bold]filter[/bold].
    First add [bold]input[/bold], then [bold]stretch[/bold] and then [bold]output[/bold]. It should connect the 3 filters with arrows.
    Select [bold]stretch[/bold] and hit configure. That will bring up the ratio box. Enter the value you calculated and hit ok.
    Save the AVI and your A/V sync problem should be sorted.

    Hope this will help. Any comments are very welcome. Will this impact audio quality... etc...!

     
  9. powerdup

    powerdup Regular member

    Joined:
    Mar 4, 2003
    Messages:
    978
    Likes Received:
    0
    Trophy Points:
    26
    Its really up to you how many keyframes you want to have in the final output. But like the article says, the more keyframes the larger the file size. In the second movie,
    When you use the divx codec, do you change the max keyframe interval or do you leave it at its default--300?

    Does the audio decrease gradually in the second video or does the desynchronization stay the same throughout?
     
    Last edited: Aug 3, 2003

Share This Page