How To Convert A Multi-CD DivX/XviD With AC3 Audio To DVD-R

How To Convert A Multi-CD DivX/XviD With AC3 Audio To DVD-R
July 23, 2006 09:20:04

A series of ProCoder AVI conversion guides wouldn't be complete without one for DivX/XviD to DVD±R, so here goes.

It's easy to see the advantages of AVI to DVD±R compared to other conversion types: only a small drop in quality; 5.1 Dolby Digital soundtracks can be retained; 1 disc movies instead of 2 or more (no more getting off your sofa halfway through to change VCD!); and (in theory) compatibility with most, if not all, DVD standalone players. The only situation that beats this is if you happen to own a DivX/XviD compatible DVD player, since no re-encoding is necessary at all and you can view the AVI directly. However, as owners of such players will know, there are occasional AVI movies that will not play back (for a number of possible reasons), and that is when converting to DVD±R will still allow you to watch it on your TV.

If you've seen the resulting SVCD quality from a well-encoded AVI using ProCoder, then you will definitely not be disappointed with a DVD±R conversion either. Providing there is a good AVI to work in the first place, the quality is outstanding, even at lower bitrates, making ProCoder easily the best choice for transcoding those long 2 or 3-CD DivX/XviD movies.

This is not some kind of definitive ProCoder guide for AVI to DVD±R; it is simply what has produced good results for me. What follows is just one method out of many; you may have a preference for other encoding software, especially if you are used to VCD/SVCD conversions involving TMPGEnc Plus and/or Cinema Craft Encoder, in which case, there are excellent guides already out there.

Some of these are listed in the Video Help and Advice Section. Another point worth making here is that if you are the impatient type, who prefers fast results with as few clicks of the mouse button as possible, this guide is probably not for you.

Due to the nature of this kind of conversion, a certain amount of file editing is demanded right from the outset, mainly because of the fact that most movies with AC3 audio tracks span more than one 700 MB CD, and we need to be able to produce single AVI/AC3 files rather than multiple ones for the DVD±R to be conveniently authored as a single disc.

ProCoder can stitch multiple AVIs together and output them as a single file; unfortunately, it cannot output audio in the form of joined AC3 files - this must be done with separate editing software. Those not wishing to go to the trouble of joining the files of an AC3 movie should look for guides explaining how to author them as separate files.

To summarize then, this guide will demonstrate how to create a single audio track DVD±R movie (with chapters if desired) from the most common MPEG-4 file types (typically encoded as DivX/XviD @ 23.976 or 25 fps - for 29.970 fps, see Additional Comments & Tips at the end of the guide).

It will not cover how to incorporate subtitles. This is a separate authoring stage and has already been covered at length in other guides and so requires different software.

Required software:

Canopus ProCoder v1.5
http://anonym.to/?http://www.canopus.com/
Depending on your source file(s), you'll need at least one of the following to decode your AVI properly:
DivX5.1.1, or later
XviD, latest build
DivX3.11 alpha
AC3 Filter (this filter is required to playback and check AVI files containing an AC3 audio stream)
VirtualDubMod is essential software for this conversion; also handy for creating small test clips from your AVI file. Download it free from here

Other software tools you need for this guide:

GSpot. If you are unsure about which codec/filter to install, open your AVI file with this codec identification tool: http://anonym.to/?http://www.headbands.com/gspot/download.html

BitrateCalc. Assuming you have the necessary audio and video codecs installed, the other thing you need to use in conjunction with ProCoder is a Bitrate Calculator.

There is an online version here, which can also be downloaded for offline use (get the downloadable version for convenience).

AVI-Mux GUI, alternative muxing and AVI-joining software

BeSliced/BeSplit, quickly fixes problem AC3 files

TMPGEnc DVD Author, latest build

Nero Burning ROM, 5.5.10.54 or later

Before starting

Getting the best performance from ProCoder
While more CPUs and upgrading to faster CPUs and adding additional CPUs are the best ways to increase ProCoder's performance, there are a few optimizations that you can do to increase ProCoder's speed without hardware upgrades.

Close other tasks

Close any other applications that are running. Any background applications will take CPU cycles from ProCoder and slow conversion.

Optimize drive speed

Defragmenting the source and target hard drive can significantly increase read and write speeds. Putting sources and targets on separate physical disks, or writing to a fast network drive will also improve ProCoder's performance to a certain degree.

Disable automatic scanning applications

Anti-virus software and recycle bin "protection" software can significantly increase disk and CPU loads. Consider temporarily disabling these types of software while ProCoder is running.

• If your AVI movie is already on CD(s), copy it to your hard drive first. Make sure you have ample hard disk space for this, plus the files that are going to be generated by ProCoder.
Steps
[1] Join the AVI files
[2] Extract the AC3 from the joined AVI file
[3] Fixing the AC3 file
[4] Load the AVI into ProCoder
[5] Configure ProCoder for DVD - PAL
[6] Configure ProCoder for DVD - NTSC
[7] Convert MPEG-4 to DVD MPEG-2
[8] Author the DVD±R
[9] Burn the DVD±R
[10] Additional Comments & Tips

Guide

[1] Join the AVI files
If you are already familiar with the methods described in [1] to [3], go to step [4].
Joining AVI files can be a hit-and-miss affair, so here are 2 methods. If A doesn't work try B. If neither work, see If all else fails.., in step [2].
Note: If you really, really don't want to join the AVIs together, they can be authored separately in TMPGEnc DVD Author using the Add file button. Bear in mind, however, that this means having to convert every AVI separately in ProCoder, and then you still need to demux the AC3 audio streams for each and every file and then fix them before authoring, so it's not exactly a shortcut, is it?

Method A

• Run VirtualDubMod. Go File > Open video file... and browse to the 1st AVI [CD1] of your movie and Open it. Just ignore the message: "BFRAME DECODER LAG NOTHING TO OUTPUT" if you see it.
• Now under the File menu, click Append segment... and Open your 2nd AVI (and so on if you have more). If you receive the message: "Cannot append segment: ...", try Method B below.
• Go Video and click on Direct stream copy (very important!).

• Go File > Save As... Type a name for your new file and Save.
• When the new file has been written, close VirtualDubMod.
Now that you have spliced the movie files together into one, it must be checked at the point where it was joined to see if the procedure was successful. Use an AVI media player to check the merge point of the files. If all went well, playback should be perfectly seemless at the join between CD1 and CD2 etc. If there is an audio problem, such as a loss of sound after the join, extract the AC3 file as explained in step [2] and then fix it as detailed in [3].

Method B

• Run AVI-Mux GUI. If your moive is on 3 CDs or more, click the settings button and look under the split section. Make sure maximum file size (MB) and max. nbr of files are both unchecked.

• Drag & drop your first AVI into the open files window (or right-click in the window and add it). Do the same for CD2 etc.
• Holding the Control key down, click on each file to highlight them all.
• Click add video source and hit start. Choose a name for the joined movie file and Save to begin the joining process. If this method also stalls, see If all else fails.., in step [2].
• Click OK and leave to exit AVI-Mux.

Now that you have spliced the movie files together into one, it must be checked at the point where it was joined to see if the procedure was successful. Use an AVI media player to check the merge point of the files. If all went well, playback should be perfectly seemless at the join between CD1 and CD2 etc. If there is an audio problem, such as a loss of sound after the join, extract the AC3 file as explained in step [2] and then fix it as detailed in [3].

[2] Extract the AC3 from the joined AVI file
Run VirtualDubMod again.
• Go File > Open video file... and Browse to your newly joined AVI file and Open it.
• Go Streams > Stream list and you should see the AC3 track on the left listed under Available streams.
• Click the Demux button on the right and type a name for your single AC3 track. Click Save and wait for the new file to be extracted.

• Close VirtualDubMod.
If all else fails, try this for each part of your movie:
• Use VirtualDubMod to create Video-only (no audio) AVI files using the Disable button on the Available streams screen (remember to use Direct stream copy).
• Extract each separate AC3 file, this time using the Demux button, again located on the Available streams screen.
• Use Append segment... as described in Method A to join all the Video-only files together that you just made. They should join easily now because there are no dodgy audio streams fouling things up.
• Use the following command line format and hit Enter to join your AC3 files:
copy /b cd1.ac3+cd2.ac3 joined.ac3 (for a 2-CD movie), or
copy /b cd1.ac3+cd2.ac3+cd3.ac3 joined.ac3 (for a 3-CD movie)

• Run the joined AC3 file through BeSliced, as described in step [3] below.
You now have a continuous movie file to load into ProCoder to create your DVD video stream (it doesn't matter that it has no audio), and you also have an AC3 track, which will be used after the conversion as part of the authoring process.

[3] Fixing the AC3 file
This short step should fix any glitches in the joined AC3 file and is worth doing even if everything went fine in VirtualDubMod or AVI-Mux.
• Run BeSliced and simply drag your AC3 file onto its interface (a man's portrait) and choose Fix File!

A few moments later and a new, fixed AC3 file is written. Make sure BeSliced and BeSplit are in the same folder, or else it will not work.

[4] Load the AVI into ProCoder
Run Canopus ProCoder (not the ProCoder Wizard).
• You will now be at the Source selection screen. Click the Add button and browse to the location of your joined DivX/XviD movie. Open it.
• First, make a note of the Aspect Ratio entry. In the example below it reads Video: [40:17], Pixel: [1:1].
• Look along the Interlacing line. Make sure Non-Interlaced is selected (very important!).

Don't close ProCoder, but open the movie in GSpot and under the Video section, check out the x:y line. In this example, it should say x:y -> 640x272 (2.35:1) [=40:17]. If this doesn't match with ProCoder's values, go back to Source Parameters and click the [...] button to bring up the Aspect Raio Configuration dialog. In the 2 boxes for Source Video Aspect Ratio, enter the the correct ratio you got from GSpot. The Source Pixel Aspect Ratio underneath should change automatically to Preset: Square Pixel and Source Pixel Aspect Ratio: 1:1. This should be OK now.

• Now onto the other AVI file details in the Source Parameters window. Make a note here of the total movie Length, located under the Source File name (the format is 00:00:00,00 - ignore the figure after the comma, we only need hour:minutes:seconds). Also note the Frame Rate(fps).
• Keep ProCoder open and run BitrateCalc.
• Enter the total movie length (as indicated in the previous step) in the Video length boxes.
• For Type, select DVD (it should already be selected by default).
• DVD:s can be left at 1 x 4.37(DVD5) GB since that is what we are making in this guide.
• If you are not sure of the Audio Bitrate, simply open the AVI in GSpot. 5.1 Dolby Digital soundtracks are usually 384 or 448 kbit/s. The other type are 2.0 Dolby Digital soundtracks, and these are usually 192 or 224 kbit/s. Choose the appropriate figure from BitrateCalc's dropdown box.

• Now make a note of the Calculated Bitrate.
• Close BitrateCalc.

[5] Configure ProCoder for DVD - PAL
Meanwhile, back in ProCoder, click the large Target button and hit Add. The Add Target dialog will now appear.
• Click on the CD/DVD tab. You will see 2 entries for DVD: MPEG2 - DVD - NTSC and MPEG2 - DVD - PAL.
If the source AVI Frame Rate(fps) is 25 in the previous Source Parameters window, choose MPEG2 - DVD - PAL and read on.
If the source AVI Frame Rate(fps) is 29.97 in the previous Source Parameters window, choose MPEG2 - DVD - NTSC and see [10] (i) Additional Comments & Tips at the end of the guide.
If the source AVI Frame Rate(fps) is 23.98 in the previous Source Parameters window, then select MPEG2 - DVD - NTSC and now GO STRAIGHT TO STEP [6].
• Under Destination, you can select a Path of your choice for the converted file by clicking the [...] button.
• Make sure that, in Basic Settings, the Stream Type is MPEG2 Video + Wave file (it should be the default selection).
• Look down to the Video-Basic section. Interlacing should be left at the default Upper/Top Field First.
• Aspect Ratio depends on the AVI. If it runs in Windows Media Player fullscreen with no borders, stay with the default setting of Video: [4:3], Pixel [16:15]. If the AVI plays fullscreen with black borders top & bottom (most of them do), then click the [...] button to bring up the Aspect Ratio Configuration dialog. Change the top Preset: to 16:9 and click OK.

• Also in the Video-Basic section you will see Speed/Quality Mode. These are self-explanatory: the default is High-Speed, the fastest mode; Highest-Quality will give the best results, but at the expense of a longer transcoding time, and High-Quality is a compromise between the two. [Mastering-Quality is the ultimate setting, but whether you will actually notice a difference is another matter and it obviously has the longest trancsoding time of all]. If you want to squeeze the very best out of ProCoder (and you are not in a hurry), use Highest-Quality; the results are definitely worth it.

• Change the Video Bitrate(kbps) value to the Calculated Bitrate figure you got from BitrateCalc (just double-click or highlight the current figure to edit it). Don't worry if the figure changes slightly once entered; ProCoder only uses even numbers.

• In the Video-Basic section again, there are 3 choices of encoding methods, selectable from CBR/VBR Type. 2PASS_VBR is the recommended choice here and gives the highest quality results for this type of conversion where we want the most efficient bitrate allocation. This is particularly the case with long movies. However, CBR is faster, so the choice is yours. Just bear in mind that the longer the movie, the stronger the argument for using 2PASS_VBR because the encoder will balance low-complexity areas with those that need more bits. CBR mode is not able to handle those areas in the same way, and this will impact on quality at lower bitrates. 1PASS_VBR does not use the same optimized encoding strategy as 2PASS, so this setting does not really offer any advantage over the other two.

• If you choose 2PASS_VBR (recommended), click OK to get rid of the "Are you sure...?" warning message about File Splitting and for Max Bitrate(kbps) enter 8000 (unless your movie's duration totals less than 75 minutes, in which case leave it at 9000).
• All the other settings on this screen can be left at the default. Do not change anything else unless you know exactly what you are doing!
• Now hit the big Convert button to take you to the main Convert interface and jump to step [7].

[6] Configure ProCoder for DVD - NTSC
If the Frame Rate(fps) of your AVI is 23.98 (or 23.976 - and most of them are), ProCoder will produce terrible results if left with the default settings for DVD; it therefore needs some serious tweaking.
• Under Destination, you can select a Path of your choice for the converted file by clicking the [...] button.
• Make sure that, in Basic Settings, the Stream Type is MPEG2 Video + Wave file (it should be the default selection).
• Look down to the Video-Basic section. Interlacing should be left at the default Upper/Top Field First.
• Aspect Ratio depends on the AVI. If it runs in Windows Media Player fullscreen with no borders, stay with the default setting of Video: [4:3], Pixel [8:9]. If the AVI plays fullscreen with black borders top & bottom (most of them do), then click the [...] button to bring up the Aspect Ratio Configuration dialog. Change the top Preset: to 16:9 and click OK.

• Also in the Video-Basic section you will see Speed/Quality Mode. These are self-explanatory: the default is High-Speed, the fastest mode; Highest-Quality will give the best results, but at the expense of a longer transcoding time, and High-Quality is a compromise between the two. [Mastering-Quality is the ultimate setting, but whether you will actually notice a difference is another matter and it obviously has the longest trancsoding time of all]. If you want to squeeze the very best out of ProCoder (and you are not in a hurry), use Highest-Quality; the results are definitely worth it.

• Change the Video Bitrate(kbps) value to the Calculated Bitrate figure you got from BitrateCalc (just double-click or highlight the current figure to edit it). Don't worry if the figure changes slightly once entered; ProCoder only uses even numbers.

• In the Video-Basic section again, there are 3 choices of encoding methods, selectable from CBR/VBR Type. 2PASS_VBR is the recommended choice here and gives the highest quality results for this type of conversion where we want the most efficient bitrate allocation. This is particularly the case with long movies. However, CBR is faster, so the choice is yours. Just bear in mind that the longer the movie, the stronger the argument for using 2PASS_VBR because the encoder will balance low-complexity areas with those that need more bits. CBR mode is not able to handle those areas in the same way, and this will impact on quality at lower bitrates.

1PASS_VBR does not use the same optimized encoding strategy as 2PASS, so this setting does not really offer any advantage over the other two.
• If you choose 2PASS_VBR (recommended), click OK to get rid of the "Are you sure...?" warning message about File Splitting and for Max Bitrate(kbps) enter 8000 (unless your movie's duration totals less than 75 minutes, in which case leave it at 9000).
• Now click the Advanced.. button. Go to the Video-Advanced section and let's take a look at these settings:
• Used Closed GOP. This can be left unchecked, which is the default.
• Number of Frames in a GOP. This must be lowered. 12 or 13 is fine. If left at 15 with the other settings used here, the MPEG-2 file created will be non-compliant by DVD standards and TMPGEnc DVD Author (for example) will let you know about it!
• Distance Between I/P Frame. Can be left at automatic but 3 Frames gives good results too. Experiment if you're feeling adventurous; it doesn't seem to make a lot of difference.
• DVD Compatibility mode. No need to change this at all, so leave it checked.
• 3-2 pulldown. Select 23.976 here, unless you like horribly blurry video. This sets a flag so that your DVD player knows to use the correct framerate. It can be done separately after the conversion, but ProCoder has now incorporated it.
• Picture Structure. Leave this at Always Frame Structure if you want it to play in your standalone.
• DC Precision. The default 9 is fine but a lot of people report better results using 10, especially for fast-action movies, so it may produce smoother video.

Click Close... and you're done with the Target Parameters screen.

[7] Convert MPEG-4 to DVD MPEG-2
Click Convert to begin the transcoding process. The Preview window shows ProCoder's progress; this window is also a good indicator of the aspect ratio being delivered in the output file. The conversion can take some considerable time, particularly on the Highest-Quality setting, so you might want to run the process overnight.

At the end of the conversion process, playback your .m2v (MPEG-2) file to check that everything went OK. There will be no audio yet because Procoder generates separate video and audio files in this DVD mode. That's why, in addition to the .m2v file, you will notice that a large .wav file has been created. Since we already have our audio stream as AC3, this .wav fle is not required and can be deleted. The .m2v and .ac3 files are now ready to be authored.

[8] Author the DVD±R
• Run TMPGEnc DVD Author. Click the Create New Project button. Click Add file on the Source setup screen and Open your .m2v file.
• Click the Audio settings button and Open your joined
.ac3 file.
• Click the Chapters cut edit button (located along the top) and cl-ick the Add button.
• On the Add chapter dialog, decide how you want the chapters to be arranged. Since the source was AVI, we'll simply choose Automatically insert chapters with the selected interval. Just enter whatever you like; an interval of 10 minutes between chapters seems fine. click OK and you'll see the chapter points being added in the form of frames on the Add clip screen. When it's done, click OK.

• If you like, you can create a menu, and control when it is displayed. click the Create menu button on top. In this example, let's choose No Menu and have the Firstplay action to be Play all tracks. The DVD±R will then autoplay on insertion, but you will still be able to access chapters via your remote control.
• Now click the Output button. You can see at the bottom how your 'project' fills a blank DVD±R.

Create DVD folder should be checked by default, so choose a destination folder and hit Begin output. After the DVD±R has been authored, close the program and it will ask if you want to save the project. Click Yes and Save it.
• Go and look at your DVD folder now and there should be a VIDEO_TS folder containing .IFO, .BUP and *.VOB files. AUDIO_TS will be empty but is required for DVD compliance so DO NOT delete it!
• Playback and chapters etc. can be checked in WinDVD by double-clicking on VIDEO_TS.IFO.

[9] Burn DVD±R
This is well-documented elsewhere, but here goes for the sake of completion:
• Run Nero and cancel the wizard if it appears. For the New Compilation choose DVD-ROM (UDF/ISO).

Enter a Volume Label on the Label tab.
• Everything can be left at the default settings but on the UDF tab, check Force DVD-Video compatibilty mode (required for Xbox TM) if that is how you will play the DVD±R. Click the New button.
• Browse to the VIDEO_TS and AUDIO_TS folders and drag them across from the right pane to the left as shown.

• Click the Write CD button and select the desired speed according to the drive/media rating used. Slower speeds are safer. A full DVD±R takes about 14 minutes at 4x speed. Hit Write.
• When the burn process is complete, run the movie in your standalone DVD player and enjoy!
 

[10] Additional Comments & Tips
Amongst other things, this section will deal with the more uncommon transcoding scenarios. If you download AVI material all the time, you're bound to run into some of these sooner or later. This part of the guide may be updated from time to time.
(i) What to do if the AVI Frame Rate is 29.970 fps

If your AVI Frame Rate(fps) is 29.97, proceed exactly as described in the main guide until step [5], then make sure that you do the following:
Click the large Target button and hit Add. The Add Target dialog will now appear. Select MPEG2 - DVD - NTSC.
• Under Destination, you can select a Path of your choice for the converted file by clicking the [...] button.
• Make sure that, in Basic Settings, the Stream Type is MPEG2 Video + Wave file (it should be the default selection).
• Look down to the Video-Basic section. Interlacing should be left at the default Upper/Top Field First.
• Aspect Ratio depends on the AVI. If it runs in Windows Media Player fullscreen with no borders, stay with the default setting of Video: [4:3], Pixel [8:9]. If the AVI plays fullscreen with black borders top & bottom (most of them do), then click the [...] button to bring up the Aspect Ratio Configuration dialog. Change the top Preset: to 16:9 and click OK.

• Also in the Video-Basic section you will see Speed/Quality Mode. These are self-explanatory: the default is High-Speed, the fastest mode; Highest-Quality will give the best results, but at the expense of a longer transcoding time, and High-Quality is a compromise between the two. [Mastering-Quality is the ultimate setting, but whether you will actually notice a difference is another matter and it obviously has the longest trancsoding time of all]. If you want to squeeze the very best out of ProCoder (and you are not in a hurry), use Highest-Quality; the results are definitely worth it.
• Change the Video Bitrate(kbps) value to the Calculated Bitrate figure you got from BitrateCalc (just double-click or highlight the current figure to edit it). Don't worry if the figure changes slightly once entered; ProCoder only uses even numbers.

• In the Video-Basic section again, there are 3 choices of encoding methods, selectable from CBR/VBR Type. 2PASS_VBR is the recommended choice here and gives the highest quality results for this type of conversion where we want the most efficient bitrate allocation. This is particularly the case with long movies. However, CBR is faster, so the choice is yours. Just bear in mind that the longer the movie, the stronger the argument for using 2PASS_VBR because the encoder will balance low-complexity areas with those that need more bits. CBR mode is not able to handle those areas in the same way, and this will impact on quality at lower bitrates. 1PASS_VBR does not use the same optimized encoding strategy as 2PASS, so this setting does not really offer any advantage over the other two.
• If you choose 2PASS_VBR (recommended), click OK to get rid of the "Are you sure...?" warning message about File Splitting and for Max Bitrate(kbps) enter 8000 (unless your movie's duration totals less than 75 minutes, in which case leave it at 9000).

As you can see, the default DVD - NTSC ProCoder template is already set up for you and requires no messing around with the Advanced... screen (unless you know what you're doing in there and have a good reason to change something). Proceed as detailed in the main guide.