AC3 to MP2 Encoding

Discussion in 'DivX / XviD' started by doodoo, Feb 27, 2003.

  1. doodoo

    doodoo Member

    Joined:
    Feb 26, 2003
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    11
    I am trying to convert a DivX to VCD but the DivX is using ac3. I was trying to rip the sound by converting my .ac3 to a .mp2 with BesweetGUI. I am trying to convert it and I get this error.


    BeSweet v1.5b16 by DSPguru.
    --------------------------
    Using azid.dll v1.8 (b825) by Midas (midas@egon.gyaloglo.hu).
    Using Shibatch.dll v0.24 by Naoki Shibata & DSPguru (shibatch.sourceforge.net).
    Error 41: Unable to get MP2enc interfaces
    Quiting...
    [00:00:00:000] Conversion Completed !
    Logging ends : 02/26/03 , 19:08:02.

    Can someone tell me how to convert to MP2?
     
  2. spike1050

    spike1050 Regular member

    Joined:
    Jan 2, 2003
    Messages:
    105
    Likes Received:
    0
    Trophy Points:
    26
    convert it to VCD either use tmpgenc or just create a VCD with nero and let nero do the rest
     
  3. doodoo

    doodoo Member

    Joined:
    Feb 26, 2003
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    11
    I already converted it to VCD with TMPGEnc, but there's no audio. The DivX file has ac3 audio, so I have to go through all these processes so I can make the audio into a .mp2 and then Multiplex it into the VCD.
     
  4. Shoey

    Shoey Guest

    Try this method. Guide provided by ChickenMan.

    How to Fix Audio& Video Synchronization
    Unfortunately not all conversions go 100% smoothly and some result in the Audio and Video out of synchronization. This can be due to many reasons with the primary problems being the original movie source and software/codec clashes. More importantly, how can they be overcome or fixed.

    If you are consistently getting A/V sync problems, I would suggest looking at using an alternative procedure and/or software for conversion. Software and Codec clashes are common causes for these problems.

    There are main ways the Audio and Video can be out of sync.

    1. The Audio can be in front or trail the video by the same amount from the start of the movie to the end.

    2. The Audio can be in sync at the start of the movie but progressively gets further in front or trails the Video as the movie is played.


    The first problem here is the most common and also the easiest to fix. The second problem is normally associated with DivX conversions and can be somewhat time consuming to fix. Some conversions can have both problems!

    Here are the solutions I have found to fix the problems that work 100% every time for me and the software that's needed. It also assumes that the MPG file your trying to fix is a proper MPEG1 or MPEG2 file and not an AVSEQ0x.DAT or AVSEQ0x.MPG on a VCD or SVCD disk. These need to be converted to a proper MPG file first, I recommend using Isobuster for this.


    1. TMPGEnc Plus 2.58 or later ( d/l from _http://www.tmpgenc.net )
    2. Wombles MPEG2VCR 3.12 or later ( d/l demo from _http://www.womble.com )
    3. Isobuster 1.1 or later ( d/l from _http://www.isobuster.com )
    4. Goldwave 4.26 or later ( d/l demo from _http://www.goldwave.com )


    Audio is out by a constant amount throughout the movie.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ~~~~~~~

    1. This works for both VCD's and SVCD's. The basic principle is to De-multiplex the MPG file and Re-multiplex with MPEG2VCR applying an audio offset.

    2. Run TMPGEnc, click on File and select MPEG Tools. Select Simple De-multiplex tab and for Input, browse to your problem MPG. Video and Audio output names will be automatically generated. The Audio being *.MP2 and video being *.M1V or *.M2V. Click Run and wait until its finished. Exit TMPGEnc.

    3. Run MPEG2VCR and under Tools, select MPEG System Multiplexor. Browse for the Video *.M1V/*.M2V file after changing Files Type to All(*.*). Do the same for the Audio *.MP2 file. Now select MPEG-1 System Stream VCD or MPEG-2 Program Stream SVCD depending if its a VCD or SVCD that your trying to fix. Enter an output file name and click on AV-Sync button. Here you have to be able to estimate the amount of time the A/V sync is out. Look for people speaking, Gun fire, door slamming, etc where it is easier to match the sound to the event. If the Audio comes before the Video, then move the slider in +'ve direction to the amount you have estimated. Click on Done, then click Save. In a short time you will have a new MPG file, do NOT shut down MPEG2VCR. Now play the movie, preferably with WinDVD, to check if the sync is correct. If a small adjustment needs to be done (I never get it right first time!) then jump back to MPEG2VCR and adjust the slider a bit more in the direction that's needed. Hit Save again and when done, re-check the file. Repeat until it is fixed.

    4. Sometimes just a simple De-multiplex with TMPGEnc and a Multiplex with MPEG2VCR with NO audio offset applied can fix A/V sync problems. This is particularly true if using the FlaskMPEG/Panasonic Plug-in method for creating the MPG.

    5. If you now have the A/V sync correct at the start of the movie but is out near the end, then move onto the next solution.



    Audio is in sync at start but progressively goes further out as you play the movie.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1. I have never seen this problem in a SVCD but should work for them, definitely works for VCD's. The basic principle involved here is to strip out the Audio file (de-mux) then stretch or compress the audio frequency, 44.1kHz, and re-sample to 44.1 Then convert to *.MP2 format and re-multiplex with video stream.

    2. Demux the MPG file so we can manipulate the Audio file. Run TMPGEnc, click on File and select MPEG Tools. Select Simple De-multiplex tab and for Input, browse to your problem MPG. Video and Audio output names will be automatically generated. The Audio being *.MP2 and video being *.M1V or *.M2V. Click Run and wait until its finished. Exit TMPGEnc.

    3. We now have to estimate the approx time, in seconds, that the audio is out of sync and nearest to the end of the movie as possible. Simply play the original movie with WinDVD or similar player. Windows Media Player is not recommended as it can A/V sync problems of its own. Move slider to near the end of the movie and look for speech, gun fire, explosions, door slamming, etc where you have a precise Audio to Video match up. Estimate the time difference and not the length of the movie. Lets say we find the Audio trails the Video by about 1 second and the movie length was 48 min or 2880 sec (the door slams and about 1 sec later we hear the thud).

    3. Run Goldwave and load in the *.MP2 file. Its also best to turn OFF the Undo feature to speed up the conversions (in Options / File...) Click on Effects and then Playback Rate. We need to change the 44100 Hz to sync the movie, use these formulae:

    New Hz (Audio trails Video) = (Movie length in sec + Out of Sync in sec)/(Movie length in sec) * 44100

    or

    New Hz (Audio precedes Video) = (Movie length in sec - Out of Sync in sec)/(Movie length in sec) * 44100

    So for our example, we have:

    New Hz = (48x60 + 1) / (43x60) * 44100 = 44115

    So change the Rate from 44100 to 44115 (or the number you calculated) and hit OK. Now click Effects again and select Resample. Change the 44115 (or what ever figure you have) back to 44100 and hit OK. Once the conversion is finished, hit Save. For Type select Wave (*.wav) and Attributes as 16bit, Stereo, Signed. Change File name if needed and hit Save. When it finish's answer No and exit the program.

    4. We now need to convert our WAV file back to an MP2 form. TMPGEnc is the simplest to use for this. Run TMPGEnc, and click File, then New Project to clear out old settings. For Stream Type select Audio Only and for Audio Source, browse to our new WAV file and Open it. Rename the Output file name to something different than the original MP2 file. Now click Settings and change the Bitrate from 192 to 224, this is ESSENTIAL for a VCD. Do NOT change any other settings except Normalize in Setting button (do this only if the audio appears low in volume). Then click OK and finally click Start. When done, exit TMPGEnc.

    5. Run MPEG2VCR and under Tools, select MPEG System Multiplexor. Browse for the original Video *.M1V/*.M2V file after changing Files Type to All(*.*). Do the same for the new fixed Audio *.MP2 file. Now select MPEG-1 System Stream VCD or MPEG-2 Program Stream SVCD depending if its a VCD or SVCD that your trying to fix. Enter an output file name (different from the original) and click Save. When done, play the new MPG file in WinDVD and check that A/V sync has been fixed. If its still out a bit, you need to start all over again from Point 3 changing the frequency Rate a bit higher or lower. Repeat until its fixed.

    6. It normally takes me 2 tries to get it right, but luckily I rarely have A/V sync problems.


    ChickenMan (c)2002

    ChickenMan is a moderator at many forums and is the author of Eazy VCD: http://members.eezi.net.au/~phatjeff/

    Shoey


     
  5. Dela

    Dela Administrator Staff Member

    Joined:
    Aug 25, 2002
    Messages:
    8,895
    Likes Received:
    3
    Trophy Points:
    118
  6. Shoey

    Shoey Guest

    My error for posting a wrong tutorial, and thanks Dela for reminding about the AC3 Decoder.

    Shoey
     
  7. VCDjunkie

    VCDjunkie Moderator Staff Member

    Joined:
    Sep 11, 2002
    Messages:
    511
    Likes Received:
    0
    Trophy Points:
    26
    Shoey, thanks for all the help in the forums.. just a thought to make your posts more "readable".. could you possibly provide links instead of copy/paste so much, or possibly only copy/paste the part of the text that pertains to this thread.

    Thanks ;-)
     
  8. Dela

    Dela Administrator Staff Member

    Joined:
    Aug 25, 2002
    Messages:
    8,895
    Likes Received:
    3
    Trophy Points:
    118
    Shoey, No Problem

    VCD, Hello VCD :) lol

     
  9. Shoey

    Shoey Guest

    ChickenMans guides for DivX, VCD, SVCD, and more. Chickenman is also the author of the great program Eazy VCD and provides the best guides for all types of movie editing, encoding, so forth, so on. I'm NOT endorsing CD-Freaks forum by posting this link nor held responsible for any wrong doing? Maybe the administration can make this link a "sticky" thread?
    Guides and tutorials:http://forum.cdfreaks.com/forumdisplay.php?forumid=66&s=358ef0c8781d568de762d8338c7cc7bb

    Shoey
     

Share This Page