Log in

View Full Version : ONE CLICK Pal-->Ntsc conversion (with D2Sroba) *Here is how :)*


Gideon25
18th March 2004, 01:40
I had a LOT of PAL avi episodes (25fps) to convert to (23.976 fps) NTSC and have them ready to BURN to DVD and I KNEW there was a way to get it into basically a one click process or at worst a two part process with very little or no interaction once the process starts. Who wants to sit there and WAIT to edit the avisynth file MANUALLY? I will explain a way to do this using D2sRoba. I ALSO figured out a way with the help of a few folks here (thanks for the help!)to streamline a D2SRoba avi PAL-->NTSC BATCH process :) BACKUP ALL FILES YOU MODIFY!!!

First for the NON batch way:

USE D2sRoba- Its great and its what I used mainly because it always runs pulldown for you.

1. Select avi to SVCD in d2s OR avi to dvd. If you select the avi2dvd you will have to run besweet to change the audio from Pal 25fps to ntsc 23.976 and multiplex the files if you want an mpg. The quickest way is to set up a besweet batch file. EITHER WAY you can choose whatever bitrate and whatever resolution you want (I will show you how).

If you choose avi2svcd then you can use d2Sroba to encode the audio(choose encode audio after video) AND convert the audio from 25fps to 23.976 all at once! This makes it a ONE CLICK pal-->Ntsc process!

2. Create an .avs file and lets call it pal2ntsc.avs and place it in your dvd2svcd folder. My folder is "D:\Program Files\DVD2SVCD\"
Open it up and put this in it:

AssumeFPS(23.976)

then save the file.

3. Look in your dvd2svcd folder and EDIT the AVISYNTH.INI file (I use bicubic resize but I suppose you could use whatever)
and change the [AVISYNTH_BicubicResize] to read:


[AVISYNTH_BicubicResize]
0=BicubicResize(480,480,^b_value,^c_value)
1=AddBorders(0,^BorderTop,0,^BorderBottom)
2=Import(!Pal2ntsc.avs)
^b_value=0.0
^c_value=0.6
!Pal2ntsc.avs=D:\Program Files\DVD2SVCD\pal2ntsc.avs


Save the file. Add the import line just like I have and make sure the path is correct to your pal2ntsc.avs file.In dvd2svcd under the "Frameserver" tab choose Bicubic resize.
Now you can choose bicubic resize and it WILL ALWAYS change the video down to 23.976- NO MORE having to edit the file each time! see the 480,480 above? Change that to whatever ntsc size you want (720x480,etc.). So it does not matter that we chose avi to svcd we can do the same as the the dvd resolutions.

4. AUDIO. Make sure you use avi2svcd and tell D2Sroba to "encode audio after video." Go to your d2Sroba folder and find the "BeSweetLater.bat" file. Edit it and look for the ":save" line at the bottom like so:


:save
if '%output%==' goto exit
echo [BeSweet]> %output%.ini
echo args=%args%>> %output%.ini
echo !bitrate=%bitrate%>> %output%.ini
:exit


Change it to THIS:

:save
set args=%args% -ota( -r 25000 23976 )
if '%output%==' goto exit
echo [BeSweet]> %output%.ini
echo args=%args%>> %output%.ini
echo !bitrate=%bitrate%>> %output%.ini
:exit


Now THAT takes care of the audio conversion from 25fps to 23.976. Save the batch file! If you chose avi2svcd (which you
should )then you NOW, after these file changes, have a ONE CLICK avi pal-->ntsc conversion. You should finish with an ntsc mpg in-sync and ready to burn to dvd! Of course I was using 4:3 ratio files and I did not do any fancy border adding stuff but others here can probably explain how to do that!

In my next post here I will explain how to set up batch files for converting multiple Pal avi to ntsc mpg with D2sRoba. Everything up top has to be done but you just have to set up some .bat files.

Gideon25
18th March 2004, 02:03
Now, Lets BATCH encode several avi pals to ntsc mpgs ready to burn. Choose avi2svcd and do everything I said up above so its a one click process. Now create, oh lets start with 5 folders. I will name them 1,2,3,4,5. Like:
E:\DVDfiles\1\
E:\DVDfiles\2\
E:\DVDfiles\3\
etc..

Now fire up d2Sroba (make sure its in avi2svcd mode), select the file you want to encode and under "Misc" set the default output folder to your first folder you created. Mine is E:\DVDfiles\1\
Now load up your avi and start the conversion. STOP the conversion just after the audio is extracted. Close everything (including d2sroba)and start up d2sroba again. This time change the default output folder to your second folder you made. Mine was
E:\DVDfiles\2\
Select the NEXT avi you want to encode, start the conversion and stop it just after the audio is extracted. Repeat the above MAKING sure to change the default output folder each time for every avi you want to convert.

Lets create a batch file. Mine looks like this:


@REM DVD2SVCD Batch Control

"D:\Program Files\DVD2SVCD\Tylo\d2sroba.exe" -d2s:"E:\DVDfiles\1\dvd2svcd project file.d2s" -run -exit
"D:\Program Files\DVD2SVCD\Tylo\d2sroba.exe" -d2s:"E:\DVDfiles\2\dvd2svcd project file.d2s" -run -exit
"D:\Program Files\DVD2SVCD\Tylo\d2sroba.exe" -d2s:"E:\DVDfiles\3\dvd2svcd project file.d2s" -run -exit
"D:\Program Files\DVD2SVCD\Tylo\d2sroba.exe" -d2s:"E:\DVDfiles\4\dvd2svcd project file.d2s" -run -exit

etc...




Save it as d2srobabatch.bat or whatver.bat :)
Of course you will have to change the paths to the proper d2sroba.exe file file and of course the new folders you created. It is VERY important to have all the quotation marks correct and, well, just do it EXACTLY as I have done it (changing only the appropriate paths)and you should not have a problem :)

So not only can we now do pal-->ntsc in one click we can do BATCHES of them with dvd2svcd using CCE and D2sRoba! Sweet!

Gideon25
26th March 2004, 11:05
Soooo.. Has anyone tried this One process method for avi Pal->ntsc conversion yet? Anyway here is some more you can do:




If you prefer to use a different Resizer option other than Bicubic (such as Bilinear or Simple)then you simply replace the ^TargetWidth,^TargetHeight part in the avisynth.ini file with the resolution you desire (720x480 for dvd ntsc), add the import line and the path to the script imported(the pal2ntsc.avs file I decreibed in the first post). An example to change every resize option to FORCE all resize options to a specified resolution and intiate the 25fps to 23.976 fps conversion, your basic avisynth.ini file (loacted in the main dvd2svcd folder)would look like:



[AVISYNTH_SimpleResize]
0=LoadPlugin(!SimpleResize.dll)
1=ConvertToYUY2().SimpleResize(720,480)
2=AddBorders(0,^BorderTop,0,^BorderBottom)
3=Import(!Pal2ntsc.avs)
!Pal2ntsc.avs=D:\Program Files\DVD2SVCD\pal2ntsc.avs
!SimpleResize.dll=D:\Program Files\DVD2SVCD\Avisynth2.5 Plugins\SimpleResize\SimpleResize.dll


[AVISYNTH_BilinearResize]
0=BilinearResize(720,480)
1=AddBorders(0,^BorderTop,0,^BorderBottom)
2=Import(!Pal2ntsc.avs)
!Pal2ntsc.avs=D:\Program Files\DVD2SVCD\pal2ntsc.avs

[AVISYNTH_BicubicResize]
0=BicubicResize(480,480,^b_value,^c_value)
1=AddBorders(0,^BorderTop,0,^BorderBottom)
2=Import(!Pal2ntsc.avs)
^b_value=0.0
^c_value=0.6
!Pal2ntsc.avs=D:\Program Files\DVD2SVCD\pal2ntsc.avs


Now if your source is INTERLACED Pal you may get better results with using the standards conversion method in the dvdrhelp guides and Lanczos resize. It can easily be adapted to this method by knowing how to work with dvd2svcd and the avisyth file.You can add that avisynth script for interlaced by adding this to your avisynth.ini file:

[AVISYNTH_LanczosResize]
0=LoadPlugin(!MPEG2DEC.dll)
1=LoadPlugin(!SmoothDeinterlacer.dll)
2=LanczosResize(720,480)
3=Import(!PalInterlaced.avs)
!MPEG2DEC.dll=D:\Program Files\DVD2SVCD\MPEG2DEC.dll
!SmoothDeinterlacer.dll=D:\Program Files\DVD2SVCD\SmoothDeinterlacer.dll
!PalInterlaced.avs=D:\Program Files\DVD2SVCD\PalInterlaced.avs


Now I have different paths of course for my .dll files so make sure the paths are correct for your dlls. You will also have to have the correct versions of the dlls depending on what version of of avisynth you are using (or that dvd2svcd is using).Now create a file and name it PalInterlaced.avs open it and put this in it:

SmoothDeinterlace(doublerate=true)
ChangeFPS(59.94) # or ConvertFPS(59.94)
SeparateFields()
SelectEvery(4,1,2)
Weave()
ConvertToRGB()

Then save it.
I have not tried that but it should work. Oh and since you are going from 25fps strait to 29.97 fps for interlaced stuff you may have to convert the audio so change the BeSweetLater.bat file in the D2sRoba folder (at the "save" part like in the first post)to :

:save
set args=%args% -ota( -r 25000 29970 )
if '%output%==' goto exit
echo [BeSweet]> %output%.ini
echo args=%args%>> %output%.ini
echo !bitrate=%bitrate%>> %output%.ini
:exit


So that would take care of the frame rate conversion for interlaced as well as the audio conversion in ONE process. Of course none of that lanczos stuff is necessary if your source is NOT interlaced though so if its progressive I would just stick to the bicubic as its FAR simpler.
By using/adding entries to the avisynth.ini file and passing arguments to avisynth via importing another file with the appropriate settings you want one can use this method with pretty much ALL the power of avisynth. Anyone using a special script should be able to adapt it to suit thier needs. Its still a one process shot and as far as I know its the ONLY one that exists for avi pal->ntsc using CCE.

I have used this method to convert about sixty 45minute avi PAL episodes to NTSC and EVERY SINGLE ONE gave me an IN SYNC ready to burn to dvd MPG.
Batch processing of avi files is NOW a breeze with D2Sroba. For instance I have setup 20 episodes to process tonight as I sleep. I can do about 2 and 1/2 episodes per hour so when I wake up I will have converted 20 avi PAL episodes to ready to burn IN SYNC excellent quality NTSC mpg.

Considering I probably have at least 50 more PAL episodes to convert life is SWEET!

Anyway if someone else could try this out and CONFIRM that these instructions are accurate I would appreciate it! Thanks!

lordkinbote
28th April 2005, 01:41
I'm trying to get this method to work with AutoFitCD but the first attempt I tried had the result still in 25.00fps because AutoFitCD changes the FitCD part of the Avisynth.ini every time you use it. I'm trying to figure out if there's a way to do it automatically so I don't have to edit the Avisynth script and then put the parameters for the pal2ntsc.avs in the Frameserver tab every single time. I'm trying it manually to see if it works FIRST and then perhaps you and I can try to figure out if there's a way to make it automatic. My level of knowledge of this stuff I'd consider low intermediate so don't expect a whole lot from me. ;)

lordkinbote
28th April 2005, 02:30
Don't know why it didn't do it but D2SRoba didn't do pulldown for the Pal AVI I used. If you have any ideas, I'd greatly appreciate it. I will try another one unchecking PAL on both source and output to see if that gets it to run pulldown and I'll print the D2SRoba.log after.

huntington
17th May 2005, 23:44
D2sroba didn't run pulldown on my video file. Have you figured out why this is yet? Thanks a lot.

Mike

tylo
13th June 2005, 21:11
I know this is maybe a little late, but d2sroba checks the .d2s project file VideoFormat=NTCS key under [MovieInfo] section. It then only does pulldown when the framerate is < 25 - i.e. 23.297, but not 29.97.

I 've forgot whether the [MovieInfo] sections describes the source or the target video, but I suppose it is the source (?). Anyway, that would explain why no pulldown was done. The .d2s file is updated by D2S during the conversion.

On a different matter, I must admit I find it difficult to use more time on this plugin, as dvd2svcd has stopped development. Oh well.

lordkinbote
14th June 2005, 02:22
Aw man, that SUCKS! I LOVE D2SRoba.

Kika
14th June 2005, 09:07
SmoothDeinterlace(doublerate=true)
ChangeFPS(59.94) # or ConvertFPS(59.94)
SeparateFields()
SelectEvery(4,1,2)
Weave()
ConvertToRGB()

Um, still this old error...

SelectEvery(4,0,3) <- That's the correct line.
And SmoothDeinterlace should be replaced by KernelBob()