View Single Post
Old 26th February 2003, 10:45   #8  |  Link
dvd2svcd
Moderator
 
dvd2svcd's Avatar
 
Join Date: Oct 2001
Location: On top of the world!
Posts: 1,837
Q70: DVD2SVCD can't convert my AVI file. (sync issues, audio extraction problems, CCE/TMPGEnc crashes...) Why?
A:
I do _not_ know why. But I know how to fix the majority of problems.[list=1][*]Download and extract VirtualDUB from http://www.virtualdub.org[*]Start VirtualDUB and load the problematic AVI file.[*]In the VIDEO menu select "Direct Stream Copy"[*]Save the AVI under a new name. In the FILE menu select "Save as AVI"[*]Load the newly saved AVI into dvd2svcd and start your conversion. Usually this will fix the problem with the AVI file.[/list=1]If the method above doesn't help, try this one:[list=1][*] Open avi in VDub and verify plays in sync.[*] In Video select Direct Stream Copy[*] In Audio:
--a> Select Full Processing Mode
--b> Select Compression><No compression (PCM)>
--c> Select Conversion and make sure 48k/16bit, Check High Quality
--d> Boost volume if you need to[*] Save new Avi off to HD (PCM audio will make it much bigger so make sure you have the HD space).[*] Load saved avi back into VDub and play. Check if audio is in sync. If so goto next (6), if not stop and go to interleaving tab in audio and try to make adjustments in the delay section until in sync and then re-save as in (4)[*] Encode this new Avi as normal in Avi2SVCD.[/list=1]Q71: How do I personalize my AviSynth script without having to edit the avs file each time?

A: There are several ini files present in the dvd2svcd folder and when you customize these files you can add plugins and other options to your AviSynth script (for example a smoother). Each of these three ini files are specific to the type of videos you want to create. The DVD2SVCD.ini file is the default ini. The SVCD.ini is almost the same as the DVD2SVCD.ini and the VCD-settings.ini has specific settings for making a VCD. Any of these can be modified, but always use a COPY and not the original. How it works is explained in the readme.txt file. To quote the most important:

The special chars (^ ! § ?) is used to define what type of parameter you want, and remember each paramter must have a unique name (don't use ^threshold in two commands):
^ = Numeric Field
! = File field
§ = String Field
? = Boolean field (true / false)

This looks complicated but if you open dvd2svcd.ini in notepad you will see the following at the end:

[AVISYNTH_BicubicResize]
0=BicubicResize(^TargetWidth,^TargetHeight,^b_value,^c_value)
1=AddBorders(0,^BorderTop,0,^BorderBottom)
^b_value=0.0
^c_value=0.6

You don’t need to define the values for ^TargetWidth, ^TargetHeight, ^BorderTop and ^BorderBottom, which is done for you by DVD2SVCD.

Suppose you want to add the smoother Convolution3d (it is a Spatio-Temporal Smoother to be more precise), make sure that you download this plugin (links to this and other plugins are located in the AviSynth Q&A). The Convolution3d plugin (as can be seen in the documentation of that plugin) has one argument which must be a string, implying that we must use the section sign “§” for that (which I can’t find on my keyboard ?). Returning to your dvd2svcd.ini file: make a new section below the BicubicResize section (with the tag “Movie” or which name you prefer). First all the plugin must be loaded (the plugins can be given arbitrary names but they must begin with a “!” and will be defined later) and numbered (starting with zero) before they are used:

[AVISYNTH_Movie]
0=LoadPlugin(!Convolution3d)

Then the plugins are called in the right order (best is to smooth before any resizing):

[AVISYNTH_Movie]
0=LoadPlugin(!Convolution3d)
1=Convolution3d(§preset)
2=BicubicResize(^TargetWidth,^TargetHeight,^b_value,^c_value)
3=AddBorders(0,^BorderTop,0,^BorderBottom)

Then the paths of the plugins are defined:

[AVISYNTH_Movie]
0=LoadPlugin(!Convolution3d)
1=Convolution3d(§preset)
2=BicubicResize(^TargetWidth,^TargetHeight,^b_value,^c_value)
3=AddBorders(0,^BorderTop,0,^BorderBottom)
!Convolution3d=E:\Corrs\Convolution3D.dll

Finally the fields must be given they values (in order order how they are used):

[AVISYNTH_Movie]
0=LoadPlugin(!Convolution3d)
1=Convolution3d(§preset)
2=BicubicResize(^TargetWidth,^TargetHeight,^b_value,^c_value)
3=AddBorders(0,^BorderTop,0,^BorderBottom)
!Convolution3d=E:\Corrs\Convolution3D.dll
§preset=movieHQ
^b_value=0.0
^c_value=0.6

Save this file and keep a copy somewhere. When using DVD2SVCD you should load this file in the Misc. tab. Other examples can be found in this thread.

If you have done this right, you will be able to select this profile (which I called “Movie” here) in the Framerserver tab.

For making a DVD file often no filtering or resizing is wanted for this use the very simple blank. Put nothing in the options. The Brackets "[]" identify each section as new. So you can have other scripts after the blank one.
[Avisynth_DVD]

Q72: How do I resize to CVD?
A:
Misc. tab:
Select “Advanced (D)” in the DVD2SVCD level box.
Framesever tab:
Select “CVD (352 x 480/576) in the “Resize to” box. If you didn’t select “Advanced” in the Misc. tab you won’t see this box.


Q73: How do I make a batch file to do multiple conversions from AVI sources?

A: Thanks to ChickenMan for this superbly concise explanation over in the advanced forum:

Load in your AVI in the Conversion tab of DVD2SVCD. Set it up the way you want. Start the encode. With an AVI, the first thing it does is extract the Audio track. Wait until this is finished and shut DVD2SVCD down. Reopen it and load the next AVI in, set to a different output folder, set it up and start it also. Then shut DVD2SVCD down just after the audio is extracted.

Then make a Batch file ( I call mine BATCH.BAT ) in Notepad to read something like :

@ECHO OFF
REM DVD2SVCD Batch Control

"C:\Program Files\DVD2SVCD\DVD2SVCD.exe" -d2s:"C:\TEMP1\dvd2svcd project file.d2s" -run -exit
"C:\Program Files\DVD2SVCD\DVD2SVCD.exe" -d2s:"C:\TEMP2\dvd2svcd project file.d2s" -run -exit
"C:\Program Files\DVD2SVCD\DVD2SVCD.exe" -d2s:"C:\TEMP3\dvd2svcd project file.d2s" -run -shutdown

Naturally, if you installed DVD2SVCD elsewhere, change the C:\Program Files\DVD2SVCD\DVD2SVCD.exe to wherever you installed DVD2SVCD and the C:\TEMP1, etc to the folders you used where DVD2SVCD saved the files for each AVI. Dont forget to include the quotes "". -Shutdown on the last line instead of -Exit will shut the PC down when all is done.

NB. Please note that this only works with internal resizing up to and including version 1.2.2 Build 3. So you may not use resizing plugins such as AutoFitCD or FACAR.

It does, however, work with D2SRoBa, but instead of setting the path ion the batch file to DVD2SVCD.exe, set it to D2SRoBa.exe.
ie for a typical installation,
"C:\Program Files\DVD2SVCD\DVD2SVCD.exe" becomes
"C:\Program Files\DVD2SVCD\Tylo\D2SRoBa.exe" on each line.

Q74: If I have an AVI file with AC3 audio, can I retain it in AVI2DVD?

Yes, as of DVD2SVCD 1.2.2.B3 you can select "use source audio" in the Audio tab. If you choose to do this you are on your own and support will not be forthcoming in the event of problems. It is therefore up to you to determine that for each AVI you convert, the audio is compliant with DVD-video specifications. If it is not (eg MP3 audio) you may encounter problems with playback.

As this is a new feature in DVD2SVCD, I shall leave the old workaround method here until reports come in as to the success of the "use source audio" feature.

Clearly this will only work for DVD output since (S)VCD does not support AC3 audio.

For this guide you will need BeSliced

1. Launch DVD2SVCD, uncheck "use source audio" in the audio tab and otherwise configure as normal, ie load up your avi file, select any subs streams etc etc. Hit Go and allow audio extraction to take place.

2. When BeSweet launches, right click it on the taskbar and shut it down. Let your chosen video encoder launch, then immediately close this down and close DVD2SVCD.

3. Launch BeSliced. A small window opens with a face in it. Drag and drop the file "Extracted_Audio_1.ac3" from your movie folder onto the face. Select "Fix" from the menu which appears. This creates a fixed AC3 file in your movie output folder.

4. Open the file "dvd2svcd project file.d2s" using Notepad. Very near the top (hit your cursor down button 5 times ) you will see the variable "MP2FileName0=". Change the filename from "Encoded_Audio_1.mp2" to "Extracted_audio_1_Fixed.ac3".
NOTE: It is critically important that you get this filename exactly correct.

About the 60th line of the project file, you will find a variable "AudioBitrate0=". Change the number after this to the bitrate of the AC3 file. If you do not know this you can check it in VDubMod - open the AVI file and select "File Information" from the file menu. Alternatively it can be calculated by right-clicking the Fixed AC3 file and selecting Properties. Find the size in bytes.

(size in bytes*8) / (movie length in seconds*1000) = bitrate

Note this is formula is engineered to slightly overestimate, preventing oversizing of the video. If using a figure from VDubMod you way wish to up it a little (say 2%) for the same reason.

Now quit Notepad, saving the changes to file.

5. Relaunch DVD2SVCD. Go to the Misc tab and crash recover from video encoding. It should work from there.

Last edited by Nick; 11th September 2004 at 11:38.
dvd2svcd is offline