topleft topright

Closed Thread
Results 1 to 13 of 13
  1. #1
    Senior Member Array
    Join Date
    Jul 2004
    Location
    Israel
    Posts
    294

    Help - soundtrack and movie not in sync.

    When playing large files with Realplayer or windows player - 669MB for ex. , the movie and the soundtrack or not synchronised, the soundtrack moving ahead of the visual and te visual having a somewhat slow motion-ish feel.

    What can I do...?
    I Tan I Epi Tas

  2. #2
    Posting Hound Array Zilverzmurfen's Avatar
    Join Date
    Jul 2002
    Location
    Sweden
    Posts
    13,260
    Blog Entries
    50
    First off: I don't know much about this so this but I found this link. You might get something out of it.

    That said, wait for other people as they will most probably have better tips!
    Fencing is my only PvP.

  3. #3
    Senior Member Array
    Join Date
    Jul 2004
    Location
    Israel
    Posts
    294
    Hej,

    The link dosn't seem to open for me without error, can you copy paste the relevant lines?
    I Tan I Epi Tas

  4. #4
    Posting Hound Array Zilverzmurfen's Avatar
    Join Date
    Jul 2002
    Location
    Sweden
    Posts
    13,260
    Blog Entries
    50
    Quote Originally Posted by reposte
    Hej,

    The link dosn't seem to open for me without error, can you copy paste the relevant lines?
    Shalom!

    There's a lot of images on that page. I saved it as a *.mht (attached). Hope that works out for you.

    If not, PM me your e-mail address and I'll try something else!


    Edit: Argh, file's too big...hang on. Or better yet, PM me your address.
    Fencing is my only PvP.

  5. #5
    Posting Hound Array Zilverzmurfen's Avatar
    Join Date
    Jul 2002
    Location
    Sweden
    Posts
    13,260
    Blog Entries
    50

    Testing...

    Fixing Audio Synchronization Problems

    There are two major problems with audio either it is stretched or displaced. This can be illustrated thusly:

    http://nickyguides.digital-digest.com/pictures/Reel.gif

    When the synch is perfect both the audio and video will match, as seen in the first image above. Video frame1 matches to Audio frame 1 as does frames 2, 3 and so on. In the second picture it shows the audio as displaced, which means that both audio and video are correct length, but either the video or audio will start at different times causing displacement. In the third sinerio we have an audio and video sequence that are different lengths because one of them has become stretched somehow.

    To fix these problems you must check out the film very carefully. If the audio is equally out of synch at the start of the movie as it is the end of the film, then you have an Audio Displacement problem (see Fixing Audio Displacement below). If the audio is very close to correct at the beginning of the movie, but is quite badly wrong at the end of the movie (or vise versa) you probably have a Stretched Video problem (see Fixing Stretched Audio below). It is possible to have both problems of course ;-P. So if you are sure you have both I suggest you fix the Audio Displacement at the very start of the film first and then fix the Stretched Video problem once you know somewhere in the film is absolutely correct!

    Before I start here are the things you will need:
    VirtualDub 1.4c
    Terabits AVI Info 1.2a also get the Source Code Here
    Cool Edit (or simular audio editing tool)


    PART 1: Fixing Stretched Audio

    Stretched audio is the most common reason a video will be out of synch with a video. Luckly the first release of the Terabit AVI Info tool is now ready . Designed by yours truly and programmed by my own brother - all credit goes to him, though, for all his hard work. Terabits AVI Info tool is designed to make manual synching much easier and also to make easy some of those little things you'd like to do but do not know how. I will explain these other features at the end of this synching article though, so we can stay on track.

    Before we do anything I'd always recommend that you keep a back up of your original AVI file in case something goes wrong. Once installed you do not run AVI Info like most programs, it is more like an extension to Windows. Just find the AVI file you wish to synch and right-click with the mouse. Up will pop an option saying AVI Information - select that.

    http://nickyguides.digital-digest.co...s/avi-info.gif

    Note: For Windows ME or 2000 users the right-click option currently does not work. As a temporary work around for this you can use the Launcher.exe application bundled with this download to open your AVI files.

    Alternatively, you can use this replacement clickme.reg file to try and solve this problem under Windows ME or 2000. Special thanks to Jimbo for submitting this tip.

    Then the following box will appear. It is a convenient way of finding out all those little bits of information that neither Windows Media Player nor VirtualDub are tell us about our AVI files.

    http://nickyguides.digital-digest.co...nformation.gif

    Click on the Synchronize Audio tab and we get a preview of the video we want to correct, and the important part, a control pannel designed to correct the synching.

    http://nickyguides.digital-digest.co...avi-player.jpg

    Examine your movie carefully using the AVI Player. Preferably very close to the end of the movie to better see how far the audio is out. And also be sure to find a section where their mouths are large enough to see clearly. Locate the frame number of a part just before they are going to speak and put it in the 'From' box below (1). Then take note of the frame number from after they stop talking and enter that into the 'To' box (1). Great, now the movie will loop between these two ponts. This make life much easier because feedback is instant and we do not need to keep opening the file, finding the right place, guessing how much it is out, changing it, and then starting all over again like we need to do with all other synching methods! Oh, by the way you have to press the apply button or it wont start looping .

    http://nickyguides.digital-digest.co...es/synk-it.gif

    Take note of if the audio comes before their mouths move or if it comes after their mouths move.

    1. If the audio comes after they speak we must decrease the frame rate a little!
    2. If the audio comes before they speak we must increase the frame rate a little!

    It doesn't sound logical at first, so just to clarify: to make the video longer we decrease the framerate. To make the video shorter we increase the framerate. Imagine it like this: if you had a pack of cards and threw 5 cards onto the floor every second, it would take longer for you to finish the pack of cards than it would if you were to throw 10 cards onto the floor every second. In the same way, a movie will finish earlier if it shows more frames per second. This means a higher framerate makes a shorter movie.

    Now the synching is quite straight forward. Play your movie, if the audio comes after the mouth moves hit the -0.001 button (4) once, and try the movie again. If it is not correct, press the -0.001 button again, and again, and again etc., until it is almost perfect. Then use the fine tuning arrows (2) to get the final perfect audio. Conversly, if the audio comes before the mouth moves we must use the +0.001 button in the same way as already described.

    http://nickyguides.digital-digest.co...es/synk-it.gif

    If you want to make really huge changes you can use the slider bar (2) or the increase by a whole frame per second with the +1 and -1 Frame buttons (3). There is also the option to enter any framerate you like with the 'Enter Desired Frame Rate' option.

    But usually we will only change the framerate by avery small amount! I usually only use 0.001. So if my movie was 25.000 fps and I wanted to make it shorter I would change the framerate to 25.001. If that was too long I'd go to 25.002 then 25.003 and so on. If you want to make the movie longer I would try 24.998 then 24.997 and so on. Once it is almost perfect you can use even smaller amounts such as 0.0001. So imagine 25.007 is the almost perfect, but just needed slightly more. I would try 25.0071 or something like that. It shouldn't take long for you to become an expert.

    If you think you are totally out you can reset any section back to how it originally was by using the 'reset' button.


    To apply it or not to apply it, that is the question?

    Whether it be nobler to suffer the slings and arrows of outrageous framerates or not. If we apply it now, the movie will play correctly in Media Player and, in fact, on all PC players. But what if we were synching our AVI file not because it was a DivX movie but because we wanted to convert the AVI to Mpeg or SVCD etc? It is unlikely that the VCD we created would be in synch! This is because all VCD, SVCD and DVD files must be exactly 25 or 29.970 fps to play in a DVD player or a stand alone player! A framerate such as 25.998 will not work!

    Other synching tools offer to change the audio samplerate instead. Changing the audio samplerate may be able to put the movie in synch just as effectively as changing the framerate. But again this causes conversion problems. A VCD, DVD or SVCD will only take 44100Hz or 48000Hz respectively. Feeding an encoder 11025Hz will almost always end up with synch problems!

    For this problem Terabits AVI Info tool is the only utility so far that can offer a solution. Notice that, as you change the framerate to get the movie in synch, it offers a streach (stretch) amount (5).

    http://nickyguides.digital-digest.co...es/synk-it.gif

    So we use the framerate controls as usual to get the movie in synch but this time wedon't save the framerate changes! Instead write down (or copy and paste) the 'streach' number exactly. Now we will use this number to stretch the audio in Cool Edit. But before we do that we must extract the audio.

    Change to the 'Utilities tab'. Select a folder to save the wave, enter a name for your extracted wave file, and hit the 'Extract Audio To Wave File' button. Alternatively you can use VirtualDub to extract the Wave, but I see no need because this is basically the same thing.

    http://nickyguides.digital-digest.co...ct-to-wave.gif

    Open the extracted wave in Cool Edit and choose Time/Pitch > Stretch...

    http://nickyguides.digital-digest.co...me-stretch.gif

    Paste the stretch amount into the ratio box (encircled in red). I suggest you use 'Low Precision' option unless you wish to spend many more hours stretching the audio.

    http://nickyguides.digital-digest.co...hing-ratio.gif

    Note: The 'High Precision' uses interpolation to keep the audio higher quality, but after we have recompressed it, it will not make any audiable difference so choosing higher quality will probably just waste time.

    Cool Edit 2000 automatically converts the audio to PCM Wave for editing. So be careful because this takes over a gigabyte of space! If your are using another audio editing program then you may have to convert the wave to PCM first. Using Winamp is probably the easiest way so check out my 'Converting Audio' section for more info on this subject.



    Reintergrating the Audio

    Probably the most reliable method now is to save our newly stretched audio as PCM Wave and multiplex it back to our video file. Go to my Multiplexing section for details on this.



    PART 2: Fixing Audio Displacement

    Open your video in (you guessed it) VirtualDub. Choose a piece of the movie where people are talking. Their mouths should be clear so you can see easily when the synch is correct or not.

    Go to Audio > Interleaving

    http://nickyguides.digital-digest.co...terleaving.gif

    Up pops the box below. Leave everything as it is except the 'Delay audio track by' part. Look at the movie and see if the sound comes before or after the video. If the sound becomes before they speak we will use normal numbers to slide the audio forward. If the audio comes after they speak we will use minus numbers (-) to slide the audio backwards.

    http://nickyguides.digital-digest.co...elay-audio.gif

    1000 represents one second of time, 500 represents half a second, 250 represents a quarter of a second etc. Lets say the sound appears just after the person speaks. To solve this we must slide the audio to the left a bit. So we can put in minus 250 (ie. -250). Press OK and play the movie in VirtualDub. Is it correct? If not, does the sound come before the person speaks or after? Lets say it is much closer but still comes after the persons mouth moves, we could try increasing the delay by putting in -300. Press OK and check the movie again. Keep doing this until the audio slides into the perfect place!

    Now lets assume the persons mouth moves and then the audio comes after they speak. We do exactly the same thing except we no longer use the minus sign (-). So we start off small with 250 and press OK to see the results. Then, if its not right, try some more like 300 then 400 or 500 etc. Usually a movie will only be out by about half a second (i.e 500), but I have sometimes found movies to go out by six seconds (i.e. 6000) or more! But usually this is becase I made a mistake in the encoding by setting the wrong samplerate or something, so its easier to grab the audio again.

    When the audio is correct save the movie by choosing:

    Video > Direct stream copy

    http://nickyguides.digital-digest.co...tream-copy.gif

    Audio > Direct stream copy

    http://nickyguides.digital-digest.co...io-streamc.gif

    File > Save Avi

    http://nickyguides.digital-digest.co...s/save-avi.gif


    Fixing Audio Displacement and Stretching

    If you are really unlucky you will need to fix both problems! If this happens fix the audio displacement first and then the audio stretch. Just repeat steps 1 to 3 and you should be fine:

    1. Go to the very very start of the movie and find the first part where they speak. Use the displacement methods already described to get the audio starting in the correct place.

    2. Then go to the very very end of the movie and use the audio stretch fix method already described to put it back in place.

    3. Check the movie. It will probably still not be correct becase the audio stretch moved the start displacement to the wrong place again! So repeat steps 1 and 2 again .



    PART 3: The Quick Fix Audio Synch Method

    You could also try the "quick fix method" for audio synch by opening your movie in VirtualDub and choosing Video > Framerate

    http://nickyguides.digital-digest.co...frame-rate.gif

    Then choose the 'change so video and audio durations match'

    http://nickyguides.digital-digest.co...-framerate.gif

    This method sounds amazing but doesn't usually work =(.


    More about using the Terabit AVI Info Tool

    Finally this looks like a good place to add a few more details on the AVI Info tool we are designing. It isn't completely finished (as you probably guessed) and there are many thing on the cards for this tool. You already know how to extract a wave from an AVI with it and how to use its synching functions.

    Delay Audio

    We have put in a delay audio function (6) but it is only partially working so use it at your own risk. It can only delay the audio's start time and will not slide it to the left or right like VirtualDub. Therefore I suggest you use VirtualDub for audio displacement problems.

    http://nickyguides.digital-digest.co...es/synk-it.gif

    Change FourCC codes

    If we go back to the 'Utilities tab' we are given the option to change the Header code of the AVI file (A). As you probably realise Windows knows what codec to decode the AVI with by its FourCC codes.

    http://nickyguides.digital-digest.co...ct-to-wave.gif

    If, for example we wanted to join a High Motion DivX movie clip with a Low Motion DivX movie clip, it would be possible to do this (provided they were the same resolution) by changing one of them to the FourCC code of the other! So a Low Motion video which has:

    DIV3
    DIV3




    Can be changed into a Fast Motion video clip by changing it to:

    DIV4
    DIV3




    Once this change has been done you should be able to join them together in VirtualDub. Check out my 'Cutting & Joining' AVI files section for details on how to do this.

    Author Details

    Since our DivX method doesn't allow us to add author details to our movies like ASF files we wanted to make a tool for doing this. This tool doesn't work yet BUT you should be able to open a previously authored movie and change it. So you could take someone elses latest ASF movies and change their author details to 'made by joe bloggs' or something crazy like that =o).

    http://nickyguides.digital-digest.co...or-detailz.gif

    Again this will only work with a video file that already has someone else's information in it.
    Fencing is my only PvP.

  6. #6
    Senior Member Array Rapier_wit's Avatar
    Join Date
    Oct 2005
    Location
    Nashville, TN
    Posts
    683
    Quote Originally Posted by reposte
    When playing large files with Realplayer or windows player - 669MB for ex. , the movie and the soundtrack or not synchronised, the soundtrack moving ahead of the visual and te visual having a somewhat slow motion-ish feel.

    What can I do...?
    I've noticed that with windows media players, versus quicktime, it tends to slow the audio processing. When I had to play a movie project for a production class of mine on Realplayer (and later tried to switch to windows media), it screwed up the synchronization. My advice would be to just find a computer that has Quicktime or run it on a Mac. They're built specifically for large files and audio/visual communications.

  7. #7
    Senior Member Array
    Join Date
    Jul 2004
    Location
    Israel
    Posts
    294
    Sorry , nothing helps so far. Quicktime doesn't even display anything.

    Anyone?
    I Tan I Epi Tas

  8. #8
    Senior Member Array Rapier_wit's Avatar
    Join Date
    Oct 2005
    Location
    Nashville, TN
    Posts
    683
    Weird...well, then I'd just say scrap the PC and get a Mac.

  9. #9
    Senior Member Array RITFencing's Avatar
    Join Date
    Sep 2005
    Location
    Wherever I may roam
    Posts
    5,163
    Blog Entries
    32
    Quote Originally Posted by Rapier_wit
    Weird...well, then I'd just say scrap the PC and get a Mac.
    That's crazy talk! Don't listen to her!
    "If I were ever to challenge you to a duel, your best bet would be battle axes in a very dark basement." Misquoted from The Prisoner

    "Technical excellence is the antecedant of tactical creativity." - Nat Goodhartz

    But those things which belong neither to God nor to Caeser, feeleth free to writeth them off, for yea, they are deductable.

  10. #10
    Senior Member Array ReverseLunge's Avatar
    Join Date
    Oct 2002
    Posts
    3,151
    reinstall WM and Real Player.

  11. #11
    Senior Member Array Rapier_wit's Avatar
    Join Date
    Oct 2005
    Location
    Nashville, TN
    Posts
    683
    Don't listen to him! Get the Mac! Get the Mac!

  12. #12
    Senior Member Array RITFencing's Avatar
    Join Date
    Sep 2005
    Location
    Wherever I may roam
    Posts
    5,163
    Blog Entries
    32
    Quote Originally Posted by Rapier_wit
    Don't listen to him! Get the Mac! Get the Mac!
    Bah! You're leading them down the devil's path! Sure, Macs are nice machines, but there's no software, they cost an arm and a leg, and are a pain to upgrade. Build yourself a nice PC any day of the week, and save 500 to 1000 bucks.
    "If I were ever to challenge you to a duel, your best bet would be battle axes in a very dark basement." Misquoted from The Prisoner

    "Technical excellence is the antecedant of tactical creativity." - Nat Goodhartz

    But those things which belong neither to God nor to Caeser, feeleth free to writeth them off, for yea, they are deductable.

  13. #13
    Senior Member Array Rapier_wit's Avatar
    Join Date
    Oct 2005
    Location
    Nashville, TN
    Posts
    683
    Quote Originally Posted by RITFencing
    Bah! You're leading them down the devil's path! Sure, Macs are nice machines, but there's no software, they cost an arm and a leg, and are a pain to upgrade. Build yourself a nice PC any day of the week, and save 500 to 1000 bucks.
    True there's not a lot of mainstream software for Macs, but that's because they have more specialized programs such Final Cut Pro, Soundtrack, Adobe Photoshop, Maya, etc. They're editing and cinema viewing programs are designed to be processed at a higher rate than PCs. The gigahertz processors are made to be more compatible with the higher-end programs as well.

    Reposte: I guess purchasing a different computer would depend on what grade quality you're going for. If this is an ordinary file piece or a low-grade business product then go with a PC, but if this is professional-grade, go with a Mac.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30