Changelog: 02/26/06 - Updated the CCE Encoding section with version 2.70 CCE GUI images and descriptions. I also removed the PulldownBatchFE section, as that functinality has been incorporated into CCE version 2.70. If you choose not to use the CCE pulldown option, you can alternately use Donald Graft's DGPulldown tool to perform this function.
This guide, is intended to help you convert two of the most popular AVI's formats (XviD, DivX), to MPEG, although it will work with any AVI that is compatible with Video For Windows and DirectShow (DV, Huffman, XviD, DivX, MJPeg, Uncompressed, etc). The guide can be used by beginners, through expert, although you should have a good working knowlege of your PC, how to launch programs, working with folders on your PC, etc. Please note that there are many 'one-click' solutions out there that will do many if not all of these steps for you. If your not intersted in the gruesome details, then I would suggest you buy a pre-packaged solution. If your looking to see how it's done under the hood, you like the 'hands-on' approach, you don't like the shrink wrapped solutions, or your just bored, then read on...
The MPEG output from this guide will be MPEG-2 DVD compliant. This guide will be most useful for those who download AVI's from the net. I will also cover converting AVI files with 5.1 AC3 audio, and how to retain that 5.1 audio for your DVD MPEG in it's native AC3 5.1 format. This guide does not cover inverse telecine methods, or assume that you are converting a telecined 29.97 frame per second AVI to FILM. That is for another topic ;). It assumes your source files are either 25 FPS (PAL), or 23.976 FPS (FILM), although it will work for a 29.97 fps video. It will also show you how to convert between NTSC and PAL formats.
Note: If you spot a missed step, an error, a vague section, or even a typo, PM me and I'll get it corrected.
Tools you will need:
GSpot or AVICodec
AVISynth (version 2.5x)
VirtualDubMod (18.104.22.168 or higher)
Notepad (or any other plain text editor)
An MPEG-2 Encoder (I'll cover two popular encoders in this guide - CCE, and TMPGenc)
Bitrate Calculator ( https://www.videohelp.com/calc.htm )
Note: If your using CCE, you should be using CCE 2.70 or higher. Although you can use version 2.50 with this guide, the dialogs in this guide won't match your settings exactly. The basic text of the dialogs is very similar. You should be able to muddle through. ;)
If you are converting from PAL to NTSC or vice versa, and your AVI has AC3 audio, you will need these tools in addition to the ones listed above:
AC3Machine ( http://dspguru.doom9.org/ )
BeSweet.exe (version 1.4)
BeLight GUI can be used with BeSweet to make using BeSweet MUCH easier
All of these tools, except for your MPEG encoder are freeware, and can be found in the TOOLS section. If you can't find them there, check the Downloads section on www.doom9.org, or search http://www.google.com for them.
This guide assumes that your software is installed correctly and in good working order. It also assumes that all of the video, audio, and script files that we'll be working with, will all be in the same directory (referred to from here on out as your PROJECT DIRECTORY). Also, if you post a question that isn't related to the guide (i.e my BeSweetGUI isn't working, etc), I may ask you to post your issue in the main forum. I also assume no responsibility for your results. Your mileage may vary... ;)
The guide will walk you through 6 basic steps. The first step is required only if your AVI is split into multiple parts. This is common for many longer movies. The AVI is split at 700MB to ensure it fits onto a CD-R. This makes the AVI portable, but tends to irritate the person doing the conversion ;)
Step 1: Getting Started (Joining AVI Files)
Step 2: Extracting your Audio
Step 3: Repairing your AC3 audio
Step 4: Creating your AVISynth Script
Step 5: Encoding your MPEG.
Step 6: Preparing your MPEG for DVD
Things you should know:
Three things you will need to know, before beginning all of this. The aspect ratio of your AVI, and if your AVI audio is AC3, what bitrate the AC3 is. Last but not least, the duration of your AVI. You might want to jot these down somewhere so you can reference them when needed. We'll use GSpot to gather the info. There are other tools like AVICodec which can be used, but it tends to mis-report the Aspect Ratio.
Open the AVI with GSpot or optionally AVICodec
(note: this is only a sample clip...yours may report different info)
It should note the aspect ratio, as well as other useful information regarding codecs used, and whether or not you have all of the necessary codecs to properly decode the AVI (very useful tool). If you want to figure it out manually, just divide your AVI's width, by the height. If the AVI has AC3 audio, note the bitrate for later. Finally, note the Duration of your video. Remeber if your avi is split into multiple parts, that you will need to total up the durations from each part to get the total length. You also need to be aware that if you are changing the framerate of your video (from PAL to NTSC for instance), then your durations will change. Make sure you note the length of your video AFTER you have joined them, and changed the framerate (if applicable). Both CCE, and TMPGenc will report the total length (duration) of the input AVS script. Close GSpot.
Example: A typical AVI might report 640x272 as the resolution
To get the aspect ratio of this avi, we would divide 640 / 272 ( 640 / 272 = 2.35 ), so this AVI has an aspect ratio of 2.35:1.
A few common aspect ratios are: 1.33, 1.78, 1.85, and 2.35
For more information about aspect ratios, and a detailed explanantion, look here:
Now, on to the guide...
Step 1: Getting Started (Joining AVI Files)
If your source AVI is not split into multiple parts, you can skip ahead to Step 2.
The multi-part AVI files are joined with VirtualDub. We join them now to minimize chances of audio sync issues later on.
Launch VirtualDubMod, and drag and drop your first AVI onto it. If you receive a VBR MP3 error, note this for later and click OK or NO if prompted with a YES/NO dialog.
From the file menu, select FILE -> Append Segment
Repeat the FILE -> Append Segment for each AVI segment you have until all parts have been added.
From the FILE menu, select FILE -> SAVE AS -> AVI. Ensure that 'Direct Stream Copy' is selected, and name your new joined AVI File
Step 2: Extracting your audio
This step varies, according to the type of audio your AVI file has. To see what kind of audio is in your AVI, select STREAMS -> Stream List
Here we see my AVI has an AC3 audio stream. Yours should simularly list what type of audio your working with (AC3,MP3,MP2/MPA,WAV,OGG, etc). If your AVI has multiple audio streams embedded, you should select the ones you do not want to keep and then click the 'Disable' button so that only one audio stream is still enabled. If you want to retain all of the audio streams, then i would suggest you demux all of your audio streams and process them seperately (choose the AC3 option below after demuxing all streams). Search the forum if you have difficulty converting your various streams to a usable format.
Depending on what type of audio your AVI has, proceed with the following:
If you received a VBR MP3 error when loading your AVI into VirtualDub, then you will need to convert your audio to WAV temporarily:
If you are not viewing the AVI streams already, select STREAMS -> Stream List
Highlight your AVI, and click the SAVE WAVE button.
Input a filename for your wave ( we'll call ours "audio.wav" ).
Browse to your project directory, and click the SAVE button.
If your audio is MP3 and you received no error when loading your first AVI into VirtualDub, then you don't need to take any further steps with your audio. It will be converted by the encoder, or if you want to extract it as a WAV file, then click the SAVE WAV button, type in a filename, and save it to your project folder.
Alternate VBR MP3 Audio method:
If you received an error when dropping your AVI onto VirtualDub, and your having audio sync problems, you can try working with the audio directly in the AVI. To use this method, take no further action in VirtualDubMod. Just skip to Step 4 below, and select the Choice #4 in that section.
MP2 or MPA Audio:
This audio type can be left in this format if you desire, although I would suggest you convert it to AC3 to be completely compliant. If you want to convert it to AC3, then click the SAVE WAV button. Otherwise, click the DEMUX button, type in a filename, and save it to your project folder.
If your audio is AC3, we'll need to extract it. For this guide, we'll assume you want to keep the audio as AC3 (for those of you who want to convert it, see the BeSweet guides in this forum). If you do want to convert it to another format, highlight it, and click the SAVE WAVE button.
If you are not viewing the AVI streams already, select STREAMS -> Stream List
Highlight your AVI, and click the DEMUX button.
Input a filename for your AC3 (well call ours "audio.ac3" )
Browse to your project directory, and click the SAVE button.
If your audio is OGG, you'll need to convert it to WAV (we'll convert the WAV to AC3 later). Highlight your AVI in the STREAMS window, and click the SAVE WAV button. Type in a filename, and save it to your project folder.
When you are done extracting your audio, you will have either a WAV file, and AC3 file, or no additional audio file.
To manually convert your WAV File to AC3, I would suggest you use AC3Machine. See the GUIDES section for more info on these applications. You can find AC3Machine by searching google.com, or www.doom9.org in the downloads section. If you convert your WAV to AC3, then you are done with your audio until the actual DVD authoring step, where it will be imported directly. Otherwise, leave your audio as WAV and continue on with Step 4.
Step 3: Repairing your AC3 Audio
If your audio is not in AC3 format, you can continue on to Step 4.
If your AVI was NOT split into multipe parts, you can continue on to Step 4
If your AVI was split into multiple parts, or you just want to ensure your AC3 has no corruption, then this is where you will repair it.
IMPORTANT TIP: If your working with AC3 audio from a split AVI, you MUST perform this step, or your audio will be out of sync in the final product.
Ensure that AC3FIX.EXE is either in your PATH (in your Windows directory for instance), or in the project directory. I'd suggest you just copy the AC3FIX.EXE to your WINDOWS or WINDOWS\SYSTEM32 directory. The format for the command is simple
AC3FIX.EXE "file to fix.AC3" "fixed filename.AC3"
The quotes are necessary if any of the path to the AC3 file has a space in it (C:\Program Files\ for instance). The 'fixed' filename is simply the fixed AC3 filename that will be generated. Both paths in quotes should contain the FULL path to the AC3 file (both input and output). If you do not include the full path, AC3Fix.exe may fail, or it may create the fixed file wherever your AC3FIX.EXE file is located. Since my audio source is AC3, and my example AVI was split into two pieces, I would specify the old audio file and the new audio output file like so:
AC3Fix.exe "c:\project folder\audio.ac3" "c:\project folder\fixed.ac3"
You would, of course, replace the above paths in quotes with your own project folder path and filenames. When the program runs, it SHOULD report a bad frame or two for AC3 from a split AVI file. This is normal and expected.
(example of an AC3 with an error)
If it does not report any bad frames, then your source AC3 is fine, and the "fixed" file can be deleted. This should produce a new file in your project folder called "fixed.ac3", or whatever output filename you gave it ;).
Step 4: Creating your AVISynth Script
At this point you should be done with VirtualDubMod. Just close it. Now we'll go ahead and create our AVISynth script.
I'm going to explain each of the commands in the script, rather than just throwing a pre-written script at you. In part because there are mutliple choices that you can make, depending on your source, and because it may hopefully give you some insight on how to use AVISynth for yourself. I'm not doing this to tortue you unecessarily ;)
The first thing we'll do with our script is plug in the AVI file. Open NOTEPAD (we'll use NOTEPAD to type in our script text, or optionally, you can use any other text editor you prefer. Just make sure it saves your output in plain text. If in doubt, use NOTEPAD).
We access our AVI file with AVISynth, using one of the three choices listed below.
If you did not have to extract your audio (AVI Contained error free MP3): Use the #1st Choice below
If your extracted your audio to WAV: Use the #2nd Choice below
If your joined, or single avi has AC3 audio: Use the #3rd Choice below
If your using the Alternate VBR MP3 method: Use the #4 Choice below
# 1st Choice:
# 2nd Choice:
# 3rd Choice:
# 4th Choice (alternate VBR MP3 Audio method):
You would of course replace the references to "Input.avi" and "audio.wav" above with whatever filename your AVI and/or audio has. The 3rd choice (AC3 Audio) will be processing our audio seperately so no reference to audio is necessary.
The next step, is to resize the AVI to a standard DVD resolution. You should have figured out what aspect ratio your AVI is using with GSpot at the beginning of this guide.
IMPORTANT: All vertical resolutions will be reported using NTSC values (480). If you are converting to PAL, substitute all vertical references with PAL resolutions ( i.e. 480 = 576). The tables found here ( https://www.videohelp.com/forum/viewtopic.php?t=174200 ) will show you how to determine your target vertical resolutions for either standard. See TABLE 1 and TABLE 2.
If your source AVI had a 1.33 aspect ratio (also known as 4:3), enter this text in Notepad as the next line of your AVISynth script:
If your source AVI had a 1.78 aspect ratio (Also known as 16:9), enter this text in Notepad as the next line of your AVISynth script:
If your source AVI had a 1.85 aspect ratio (anamorphic widescreen), enter this text in Notepad as the next two lines of your AVISynth script:
If your source AVI had a 2.35 aspect ratio (anamorphic widescreen), enter this text in Notepad as the next two lines of your AVISynth script:
If your soure AVI had a custom resolution that is close to one of these aspect ratios, then you can usually select the one that's closest. If it's not a close match, or seems to be in between one of these standard aspect ratios, the you might want to visit the Aspect Ratio's and Resolutions guide to see how to best handle the situation ( https://www.videohelp.com/forum/viewtopic.php?t=174200 ).
Please note that an AVI using a 1.85:1 or 2.35:1 aspect ratio is not the same as 16:9. These aspects are actually wider than a 1.77 (16:9) aspect ratio. They are known as Anamorphic Widescreen. Also note that the first two LanczosResize commands shown above, for the 1.33 and 1.77 aspect ratios, are exactly the same. They are different only because of the DAR (aspect ratio flag) that is placed on the MPEG is different when they are encoded (more on this later).
If you are converting your output between PAL and NTSC standards, you should include one of either of these commands. If you are NOT converting between these two standards, skip the following PAL/NTSC Conversions steps.
If you are converting from PAL to NTSC:
If you are converting from NTSC to PAL:
And now for the last line...
If your encoder supports YV12 input (check the encoders documentation for the version you are using), your done with the AVISyth portion. Select FILE -> SAVE, and name your AVISynth script "movie.avs". Place it in your Project Folder.
By default, AVISynth outputs video using the YV12 color space, which is very fast. If your encoder does not support YV12, or you don't know, then place this line as the last line of your AVISynth script, and save it as "movie.avs" in your Project Folder:
YUY2 is also very fast, although not as optimal as YV12. Most encoders support YUY2.
NOTE: CCE versions prior to version 2.70 are compatible with either RGB or YUY2. Versions higher than 2.70 support YV12. TMPGenc currently requires RGB input, so you would use the RGB command listed below.
In some cases, an encoder will only accept RGB input as is the case with TMPGenc. If you receive an error regarding RGB colorspace when using the ConvertToYUY2() command as the last line of your AVS Script, then substitute the above YUY2() command with this one:
Save your file in Notepad as "movie.avs" in your Project Folder.
An example script might look like this:
Remember that this is only an example of what your script may look like. Depending on the choices you made above, your script may look different.
You are almost ready to go on to the encoding step, but first, we want to preview our work. We can do so using VirtualDubMod. Just drag and drop your "movie.avs" file onto VirtualDubMod. From the FILE menu, select FILE -> FILE INFORMATION
Note the Frame Size, and Frame Rate. Ensure they are correct for your location or your desired output (23.976 or 29.97 fps for NTSC, and 25 fps for PAL). Frame Size should be 720x480 for NTSC, and 720x576 for PAL. If this is not the case, your script's LANCZOSRESIZE line is incorrect. Correct it, resave the .AVS file and drag and drop your AVS script back onto VirtualDubMod to verify again. Depending on your audio configuration, you may or may not see audio information displayed. Click OK, and then click the PLAY button at the bottom of the VirtualDubMod window. Your .AVS script should play just like an AVI. Please be aware that the video being played may look a little 'tall'. This is normal for wide aspect ratios like 1.78, 1.85, or 2.35. They will play back normally when encoded to MPEG-2.
Assuming everything is in order, we'll move on to the next step.
Step 5: Encoding your MPEG
I'll cover two encoders here, due to their popularity. CCE (Cinema Craft Encoder), and TMPGenc. If you use another encoder, you'll have to refer to an encoder specific guide for this step, as these are the only two I'm comfortable enough with to write a guide on (check the GUIDES section if you use another encoder).
First things first. We'll find out what birate setting we'll be using. These numbers can be plugged into any encoder.
Launch your bitrate calculator. I would suggest you use this one: https://www.videohelp.com/calc.htm but any bitrate calculator should work for this step.
Input the length of your video in hours, minutes, and seconds. You should have noted the Duration when you had the AVI open in GSpot at the beginning of this guide.
Input the bitrate of your audio. If your audio was AC3, then you should have noted the bitrate using GSpot or AVICodec at the beginning of the guide. If your audio was MP3 or you demuxed it to WAV, then we'll be encoding this to 224 KBps, so we'll choose 224 here..
VERY IMPORTANT: Do not guess here. If your audio was AC3, then verify it's bitrate using GSpot or AVICodec. If you guess wrong, your project may not fit onto a DVD as a result!
The CALCULATED BITRATE value will be used later on. Note it and continue.
Note: Since our AVISynth output will be standard D1 (DVD) compliant, the settings shown here will reflect that. Don't try these settings for SVCD, or CVD, as they are not optimized for those formats.
Cinema Craft Encoder (CCE):
(note: If your not encoding your MPEG with CCE, skip ahead to the TMPGenc section)
CCE is still the fastest software encoder on the street IMHO, which is why it is my preferred encoder. It also produces excellent quality. It is not, however, very user friendly ;).
To get started, drag your AVISynth .AVS file and drop it on the main AVISynth window.
Note the Duration in Hours, Minutes, and Seconds (round the seconds up).
Double-click the text circled in red above, and you should see the encode settings for that .AVS script.
Starting from the top right of the GUI, and going down through each hilighted section:
The first thing we're going to change is the Video Setting Mode (top right of the gui).
Video Setting Mode: MPEG-2. Make sure "for DVD" is selected
Select Multipass VBR.
Pass: Set this value to 1 (the encoder will actually make 2 passes total)
Note: Depending on your version of CCE, you can set this to more. More = better = more passes and more time to encode. I would suggest Pass = 1 for any DVD rip AVI). No more than 2 as the gains returned in quality for each pass decrease significantly after 3 passes (3 passes = a setting of 2).
Frame rate: This should already equal your AVISynth input framerate. In my example here my input AVI was 23.976
Bitrate (kbits/sec) setting: Input the [Avg], [Min], and [Max] bitrate values as reported to you by the Bitrate Calculator in the previous step. If your bitrate calculator only gives you an "AVG" or "Calculated Bitrate" value, then use 2000 for the Min value and 9500 for the Max value.
Note: For the [Avg] setting: Set this to the CALCULATED BITRATE you figured above using the bitrate calculator under the SETTING BITRATE section above.
Multipass VBR setting: "Create New File"
Pulldown: This will be checked by default if "for DVD" was checked up in the MODE setting above if your source is 23.976. If your source is PAL (25 fps) or higher (29.97/30 fps), this option will be unavailable.
Aspect Ratio: (16:9 or 4:3) - Set this to 16:9 if your source AVI's aspect ratio is higher than 1.33 (example, 1.78, 1.85, 2.24, 2.35, etc). If your source AVI was 4:3 (1.33) then set this to 4:3
Click the ADVANCED button (lower right of the GUI)
Ensure your settings match the above example. Unless otherwise specified below, all checkboxes should be unchecked except the following:
M=3, N/M = 4 (note: if your source is 29.97 fps you can set this to 3 and 5 respectively, although 3 / 4 will work with 29.97 video as well). I suggest leaving this at 3 / 4 for best compatability with PAL players.
Add Sequence End Code: Checked
Close All GOPS: Check this if your DVD Authoring software complains about open GOPS. If in doubt, check it.
Output top field first stream: Checked
Offset Line: If your source AVI is top field first, set this to 0. In almost all cases, your video is probably top field first. If your encoding bottom field (B) first video (like DV Cam video), change this to 1. If your not sure, leave it at 0.
Luminance level: 16 to 235
Quantization scale type: Nonlinear
Packet size: 2,048
Click the Quantization Matrices button and set the PRESET option to "Standard" for non-animation, or set it to "Smooth (CG)" for computer generated films like Toy Story, or anime/cartoons
Audio Setting: (Bottom Left of the Encoder Settings GUI)
If your AVI had AC3 audio that you demuxed earlier with VirtualDubMod, then uncheck the 'Audio File' checkbox, and proceed to the QUALITY section below.
Bitrate: 224 kbits/s
Mode: Joint Stereo
Sampling Frequency: 48,000Hz
Enable CRC: Checked
Picture Quality: (This button is in the very bottom right of the GUI under the "Advanced" button)
Simple setting: Leave this set on "Natural". It will deselect automatically when we change the following settings.
Detailed Setting: Uncheck "Low" and "High"
Vertical filter: Unchecked
Dithered quantization: Unchecked
Quantizer characteristics: Set this to 16
Fades on a static scene: Unchecked
Black screen: Unchecked
Intrablock DC Precision: 10
Block Scan Order: If you know whether your source AVI is progressive or interlaced: set this to ZigZag if your source is progressive, Alternate if it's interlaced, or Auto if you don't know
Progressive frame flag: Check this if your source AVI is progressive
Monochrome: Check this if your source AVI is Black & White (non-color)
Quick Tip: If your using the INV 3:2 Pulldown Detection (this is not the same as 2:3 Pulldown) on the main settings page, and your source AVI/AVS file is 29.97 frames per second, and your source file contains letterboxing, you can select letterboxing on this property page. This will help the encoder to detect the 3:2 pulldown pattern in your AVI. This would apply only to source AVI's that were telecined AND the avi has letterboxing. If this is the case, you can put a check in the Letterbox option and specify how much letterboxing the AVI contains (you should know this from setting up your AVISynth Script). Most of your source AVi's will be 23.976 or 25 fps, so this setting would normally be UNCHECKED.
We should now be ready to encode. Click the ENCODE NOW button, or click OK, and then click the ENCODE button. When you encode is finished, CCE should have proceded an MPV or M2V file, and if your audio was NOT AC3, it should have produced an MPA audio file as well. These can be imported into your DVD Authoring application of choice.
TMPGenc is very popular with beginners, as well as seasons video hobbiests. Although it is a bit slower in the encoding process, it is very easy to learn (read: newbie friendly ;)). TMPGenc doesn't perform as well in quality on lower bitrate formats like VCD, and SVCD/CVD, but it can give excellent results for higher bitrate formats like DVD. Just be aware that it is slower than most of the newer encoders. (note: these are my opinions only, and should be taken as such. If you prefer one encoder over the other, than stick with it...these are just observations I've made over the years).
Launch TMPGenc. You should be presented with the main GUI:
Use the BROWSE button to browse to your .AVS script, which should be in your project folder.
Note the FPS (frames per second) value. In my example, it reports (MPEG-2 720x480 23.976fps). My input framerate is 23.976. You'll need this info for the VIDEO tab settings below.
Note: If your audio is AC3 and your using TMPGenc DVD Author, you will need the AC3 plugin for TMPGenc.
Use the BROWSE button next to theAudio Source section and browse to your audio file (note: if your audio is AC3, skip this step)
TMPGenc should give a default Output filename.
Ensure Stream Type is set to 'System (video + audio)'
Click the Setting button. Rather than pasting 4 different graphics, I'll list the settings for each tab.
Stream Type: MPEG-2 Video
Size: 720 x 480 (replace 480 with 576 for PAL video)
Aspect Ratio: Set this to match the aspect of your input video. Either 4:3 or 16:9
Frame Rate: Set this to your .AVS input files' frame rate. If your input was:
If your input is 25fps: Set this to 25 fps.
If your input is 23.976fps: set this to "23.976 fps (internally 29.97fps). ( IMPORTANT: This setting will not be available until you first set the "Encode Mode" setting further down the Video Tab settings to "3:2 Pulldown when playback".)
If your input is 29.97fps: 29.97 fps
Rate Control Mode: 2-pass VBR(VBR). Click the SETTING button next to this, and input the following:
Average bitrate: Input the CALCUATED BITRATE value the Bitrate Calculator gave you here
Maximum bitrate: 9500
Minimum bitate: 2000
Max pass: 2 pass
Enable padding: Checked
P picture spoilage: 0
B picture spoilage: 20
Click OK to return to the VIDEO tab
VBV buffer size: 0 ( TMPGen's 'Automatic' setting )
Profile & Level: Main Profile & Main Level (MP@ML)
Video format: NTSC or PAL
for PAL sources, set this to Interlaced or Progressive according to your input AVI
for 23.976 fps video, set this to 3:2 pulldown when playback
for 29.97 fps video, set this to Inverse 3:2 pulldown
YUV format: 4:2:0
DC componet precisoin: 10 bits
Motion Search Precision: Normal or slower suggested
Video source type: set this according to your input AVI type. Non-interlace or Interlaced
Field order: Most DVD rips that are converted to AVI are top field first. TMPGenc will attempt to auto detect your input. If in doubt, leave it at it's default.
Source Aspect Ratio: Set this to either 4:3, 16:9, depending on what your input AVI's aspect ratio was. 1.77, 1.85, and 2.35 should be set to 16:9. 4:3 (1.33) should be set to 4:3.
Video Arrange Method: Center (keep aspect ratio)
Uncheck all filters.
Click the GOP Structure tab
GOP STRUCTURE tab:
Leave all defaults on the GOP settings. If your defaults have been changed, I would suggest the following for maximu compatability with various input types:
Number of I pictures: 1
Number of P pictures: 4
Number of B pictures: 2
Output interval of sequence header: 1
Uncheck everything except for 'Detect Scene Change', which SHOULD be checked.
Click the Auantize Matrix tab
QUANTIZE MATRIX tab:
Set the Quantizer Matrix to "MPEG Standard".
Output YUV data as Basic YCbCR not CCIR601: Unchecked
Use floating point DCT: default
No motion search for still picture: Unchecked
Soften block noise: Unchecked
Click OK to return to the main screen
Click the START button. When TMPGenc completes, you should have an MPEG file, that can be dropped into any DVD authoring software.[/b]
Our website is made possible by displaying online advertisements to our visitors.
Please consider supporting us by disabling your ad blocker or buy PlayOn and record Netflix! :)
Please consider supporting us by disabling your ad blocker or buy PlayOn and record Netflix! :)
+ Reply to Thread
Results 1 to 30 of 675
Impossible to see the future is. The Dark Side clouds everything...
Great guide, this is the same method as I'm using.
I think you made one little mistake. The avisynth script for a 1.85 aspect ratio should not be:
but something like this.
I would also add the following line to avoid an edge in the middle of an mpeg encoding block.
Indeed, very nice guide. I have been using this method also. I discovered it only 2 days ago with a little help from your previous guide on how to convert SVCD to DVD.
I am curious though about something and since i ended up here anyways, might as well ask:
What does tis setting in CCE Video Quality mean?
GOP Sequence N=3 N/M=4
I noted in your SVCD->DVD guide that you used a setting of:
GOP Sequence N=3 N/M=5
Now i've been using this setting to convert Avi to DVD also and it seems to play in my DVD player. So i was just wondering if it affects compliancy.
That sets the length of the GOP. When you encode to 23.976fps (with pulldown so it plays back at 29.97fps) you should use a GOP setting of N=3 N/M=4. This results in less frames per GOP and is required for DVD compliancy. When you encode to 29.97fps you can get away with a longer GOP length since you have more frames, so you can use N=3 N/M=5.
N=3 N/M=4 would still be compliant for 29.97fps footage, its just not as efficient as with the longer GOP setting. The longer the GOPs are the better the quality at the same bitrate, but of course the DVD standard only supports a maximum of 18 frames per GOP when using NTSC.
So what you are saying is, when i encode to 23.976 fps, it is best to use N=3 N/M=4 setting and if i were to encode to 29.97 then a setting of N=3 N/M=5 would be better ?
i tried visiting www.lukesvideo.com but it seems the page is not there. I keep getting some kind of search/index page. Either way, thank you for shedding some light on the matter Adam.
Yes that's exactly right.
Thanks again Adam
Nice catch knoertploert! The 384 I listed was for a 4:3 aspect ratio, and not a 2.35. That's the second time this week.
Adam is correct. I listed the N=3 N/M=4 sequence for maximum compatability, as it is most efficient for the type of files this guide mainly covers.
I'm off on vacation until next week.
I'll answer any pending posts when I get back.
Cheer!Impossible to see the future is. The Dark Side clouds everything...
can it be that you forgot the dvd-authoring . I have problems to produce the a dvd with the right audio.
I, how can i know if my source is progressive, or interlaced.
i have a file those are aspects
runtime = 01:59:35 (215,020 fr)
x:y = 448x240 (1.87:1) [=28:15]
Bitrate = 1422 kb/s
FPS = 29.970
Qf = 0.441 bits/pixel
Chances are, your source is progressive. Since the height is 240, it was probably resized from a 480 (vertical) NTSC video. By reducing the size to 240, they de-interlace it as a result. Your video cannot be converted to 23.976 at this point. Just encode it as 29.97 fps progressive.
new_r82, just check the GUIDES section for a DVD Authoring guide. You can find one specific to the software you use. There are far too many to cover in a general conversion guide.Impossible to see the future is. The Dark Side clouds everything...
I don't get it. I followed all the instructions. I even encoded it with both encoders. Everything ended up purple, and only 3 minutes were encoded. (And I paid for TMPGenc, it's a full version.)
The video was encoded at 25 fps, and I was trying to code it up to 23.976 so it would play on NTSC systems. I even extracted the audio to WAV, since it is the only way in my experience to assure audio sync.
I ended up doing the whole thing on VCD, since I know that process works, and it works without Avisynth, but it's sure disappointing. Is there anyone, ANYWHERE, who knows how this Avisynth thing works and can write a guide with a simple script that works? I know there's an Aviscript automated script-writing thing out there, but it costs too much for us civilians.Animation and geeky reviews and podcasts at
Cartoon Geeks (http://www.cartoongeeks.com)
What was your source? This sounds like a decoding problem. I've heard of the anglepotion codec causing these types of problems. Make sure you don't have any unnecessary codecs installed. If you installed one of those codec packs, then it is almost surely your problem.
As for avisynth, I've never heard of a commercial gui for it. There are several free ones though. You can find some simple guides on scripting on avisynth.org.
Jst wondering. I've tryed this method and I like it.. But the vid's keep coming out 2 large for dvd authoring. I thought this was what the calcultaed bit rate did.. I did calculate the bitrate, I'm wondering If maby the max and min is 2 high I got the max at 8000 using tmpgenc.. If ya need more info lemme know. Jst need to make final product smaller?? Thx in advance..
The Min and Max settings have no effect on the output size of your MPEG. Only the AVG setting affects size. Chances are it's the audio that is throwing off your final size. Make sure you know the bitrate of your audio. Most AC3 audio is 448 or 384 kbps. If your just not sure, use 448 in your bitrate calculator. I just open my AC3 audio in WinDVD, and then look at the file info to see the bitrate.
If you are encoding video only in TMPGenc, then yes, you should select the Video Only option.
tomreedtoon, AVISynth isn't that difficult. The guide above shows you the very basic AVISynth steps for importing the video, and resizing to your output. The fact that you can encode only three minutes tells me that your script probably works fine, but your source is probably corrupt. Try running it through VCDGear first using the 'MPEG to MPEG option, and the 'Fix MPEG' option, and see if it reports any problems. What kind of source are you working with? MPEG1? MPEG2? Is it a DVD Rip or from something else?Impossible to see the future is. The Dark Side clouds everything...
Ok I figured the script out, but I have one more question. My aspect ratio is 352x240 which is 1.47, I don't see this option up above anywhere, how should I write this in the script?
Thx for the reply.. My sound is 224 kbp, it is mpeg layer 1 sound converted to ac3.. I've tried putting the settings 2 224 and 448 in the bitrate calculator and both have produced a final product 2 big to put on a dvd... I'm jst gonna reduce the bitrate for the movie and do it again then it should work.. Jst wondering if ya know what may be throwing it off... But thx again for the reply..
If your putting in the length of the movie correctly, and the correct bitrate for your audio, it should fit perfectly every time. What bitrate calculator are you using?
brandensky8, 352x240 was created as half the resolution of 704x480. It's aspect is a bit wonky, like so many of the 'standards' out there. You can treat it as 4:3 aspect ratio, or if it's letterboxed, you can convert it back to widescreen. As to your script, what resolution are you trying to convert it to? Here is a very basic script, with the output resized to half D1 (352x480), and the audio resampled to DVD's 48Khz frequency.
It's just that simple.Impossible to see the future is. The Dark Side clouds everything...
Well thats weird... I'm using the reg html bitrate calculator.. I have tried 2 dif movies as well both where 2 large although 1 of them did fit.. I reduced the bitrate by 500 and was goin 2 try again woke up with an error reading video stream for tmpgnc.. But I'll figure that one out.. I guess the only other question I would have is is there anything other than the calculated bitrate size that affects how large ur final product will be?? Thx...
I'm gonna post the specs..
This the script I'm using.
AVISource("C:\Documents and Settings\Bizzo\Desktop\New Folder\dates.avi",false)
It's for a movie.
Mpeg layer 1 converted 2 ac3 224kbs
Res 576x240 (2.40:1) [=12:5]
Calculated bitrate 5926
Stream type video only
And all ur settings verbatim..
As far as I know all is right.. Course lemme if it's wrong..
Not to be annoying but I droped the calculated bitrate by 500 and the final product was still the same size??
The only things that affect size are your video bitrate (Average) + your audio bitrate (average). If both are keyed in correctly, and the length of your video is correct, then you should always get the same size video out.
The script looks fine, assuming your going to mux in your audio later.
Your average bitrage should be 5926. If you dropped your average bitrage by 500, the size should definately be smaller. You are dropping the Average bitrate setting, and not the Maximum bitrate setting, right? The Minimum Bitrate, and Maximum Bitrate setting will have no effect on the output size of your MPEG. Only the Average setting will affect the size.Impossible to see the future is. The Dark Side clouds everything...
Got it man.. Yeah I will be adding the audio ltr.. Stupid user mistake.. Changed the setting in tmpgenc on front page but did not change the setting under the tab as well.. So yeah, oops.. But thx for the info did learn some.. Should be fine now..
Ive tried other methods for downloaded avi files and always got a slight jerky effect. Couldn't tell ya what's dif here but the final result is very smooth and nice. So after weeks of trying diff things I'm glad to have stumbled upon this method of doing things.. aka good work... ltrz for now..
Glad to hear it worked out.Impossible to see the future is. The Dark Side clouds everything...
Got another question.. This is kinda strange.. The one peice movies have been working great for me.. I tried a new movie and it's a 2 peice so I attached them using virtualdub verbatim.. After encoding I play the mpeg 2 see how it came out.. The results that I got were jerky, step by step kinda playback... The weird thing is If I change the rate control mode from 2 pass like u say to constant bitrate it fixes the jerky playback.. And the one peice movies work better with the 2 pass.. The frame rate is the same for both movies 23.976.. I guess if ya know what might cause that I'd love 2 hear it. How does 2pass compared to constant bitrate affect smoothness of a final product.. Well thx again for all ur tips.. Again if ya need more info lemme know..
The number of passes should have no effect on whether or not a video is jerky. Check the field order. If you get it wrong, the video will appear jerky, especially on panning and high motion shots. Try encoding a small clip with the field order reversed and see if that is the cause of your jerky problem. You can use the TRIM command to slice out any portion of your video for a test encode. The sytax looks like this: TRIM(startframe,endframe). I usually grab about 5,000 frames for a test encode, so mine would look like this:
Just stick that command on the end of your AVS script, and encode it with the field order reversed. Just remember to remove it before encoding your final product.Impossible to see the future is. The Dark Side clouds everything...
Yeah I had actually reversed the feild order and burned the whole peice last night.. Got the same affect but I burned the movie to dvd and played it and I guess the authoring staightend it out or som. The mpeg was jerky but when placed on dvd and played on tv the final result was again very impressive.. So yeah again very pleased with this method. Muahahahah..
Hmm..I suppose it could be a PC thing, heavily fragmented file, or somesuch. As long as it plays fine though, I suppose it doesn't matter.Impossible to see the future is. The Dark Side clouds everything...