Frenchy
11-29-2008, 04:11 AM
Ok Here's a new tutorial one How to encode to XViD format from a MPEG-2 or Lossless .avi Capture.
This tutorial is using meGUI, 2 pass XViD encode and MP3 Audio, and Muxing in nandub.
Note this tutorial isn't easy, spare some time, double check your scripts and you will have a good encode
Programs required:
meGUI
DGMPGDec aka, DGIndex aka, DVD2AVI (Included with meGUI install)
AviSynth (Included with meGUI install)
nanDUB
Optional filters:
YADIF (Regular deinterlace filter included in meGUI)
Restore24 (Best PAL field blend to 23.976fps, VERY HARD TO SETUP)
mrestore (Similar to Restore24, not as good results but faster and easier to setup)
TIVTC (Inverse Telecine Filter for NTSC video to NTSC Film frame rates)
Step 1:
Ensure the video is indexed, .avi captures skip this step (it's already indexed),
to Index an .mpg capture,
Run meGUI, Select Tools, D2V Creator.
Load your MPG video stream, check "No Audio demux".
We want to use our .wav saved from Cool Edit with CD or Edited Live Mix.
http://img372.imageshack.us/img372/4793/45080015hu4.png
Select Queue, and close the D2V creator Window.
Select the Tab "Queues" in meGUI and Press Start to create the D2V.
Step 2:
Now we have an indexed video we can begin an AviSynth Script.
This script is used to Import Video, Add Logo, Dinterlace, Crop, Resize, Noise reduction, Sharpen etc.
To make a basic Script in meGUI.
Select Tools, AviSynth Script Creator.
This is a GUI which fills in basic functions into the AviSynth Script.
We want to open our Indexed videos to create at Script.
Start by opening your .d2v or .avi in "Video Input"
Ensure the correct DAR is selected, eg NTSC or PAL 4:3, 16:9 etc.
Click Autocrop,
Resize the video,
To Calculate the Highest Resolution without Upscaling,
Tick Resize and Suggest Resolution, My Example is 720 Horizontal pixels.
Subtract what is Cropped from left and right and input this value in the Box where input is enable
(make sure its dividable by 16 and click up and down arrow so the GUI knows the new value has been added)
Refer to Screenshot on how this works.
http://img291.imageshack.us/img291/2879/91854437tu6.png
Step 3:
Deinterlacing in AviSynth.
Ok This is made easy by the Analysis button which Automatically determines whether the video is Interlaced, or 3:2 pulldown and the video's field order.
For this example I'm using Yadif as my video is completely interlaced (50 different fields a second)
I'll add an extenstion to this Tutorial on other Methods later.
Finally after this has been done save your script.
The Screenshot is an Example,
Edit your Values depending on your video.
http://img175.imageshack.us/img175/7425/73623301kn5.png
Step 4:
Adding a Logo.
Load your now saved .avs Script in Notepad.
It should look Similar to this screenshot
http://img165.imageshack.us/img165/3507/60032748nk7.png
To add a logo,
This requires Donald Graft's VirtualDub Logo Filter
function VD_Logo(clip clip, int "x", int "y", int "alpha", bool "transparent",
\ int "xr", int "xg", int "xb", int "tolerance", string "filename",
\ bool "animate", int "start", int "duration", int "loops",
\ int "fadeinlen", int "fadeoutend", int "fadeoutlen")
{
LoadVirtualdubPlugin("C:\virtualdub mod\plugins"
\ +"\logo.vdf", "_VD_Logo", 1)
return clip._VD_Logo(default(x,0), default(y,0), default(alpha,128),
\ default(transparent,true)?1:0, default(xr,0), default(xg,0),
\ default(xb,255),default(tolerance,0), default
\ (filename,""),
\ default(animate,false)?1:0, default(start,0), default(duration,0),
\ default(loops,0),default(fadeinlen,0),
\ default(fadeoutend,200), default(fadeoutlen,0))
}
ConvertToRGB()
VD_logo(382,435,240,true,0,0,0,10,"C:\Capture\watermark720x576-Frenchy.bmp",false,1067,0,0,30,1419,13)
ConvertToYV12()This is the logo part of the script i used in the example encode
anyway the line "LoadVirtualdubPlugin" the directory needs to match where your VirtualDub Filters.
The Line "VD_logo(382,435,240,true,0,0,0,10,"C:\Capture\watermark720x576-Frenchy.bmp",false,1067,0,0,30,1419,13)"
is all the values used to logo the video.
A easy way to fill in these values is to Add your logo as you would for A TMPGEnc Encode.
Then save the Processing Values from Virtual Dub.
Open the .vcf File in Notepad,
Scroll Down to a line which looks like this.
VirtualDub.video.filters.instance[0].Config(382, 435, 240, 1, 0, 0, 0, 10, "C:\\Capture\\watermark720x576-Frenchy.bmp", 0, 1067, 0, 0, 30, 1419, 13);Translates to
VD_logo(382,435,240,true,0,0,0,10,"C:\Capture\watermark720x576-Frenchy.bmp",false,1067,0,0,30,1419,13)In the AviSynth Script Logo.
Ok This script will do.
Step 5:
Encoding
Import the Profile I exported
** Check the attached zip file
Import this meGUI profile by selecting File Import Presets and opening the .zip you downloaded.
Ok load your .avs in the AviSynth Script Column,
Select your output .avi in the next column,
Ensure the profile "XviD: VP XviD" is selected,
Click "Enqueue" in the video Encoding Section.
Load your finished .wav in Audio Input,
Select the output .mp3,
Ensure the profile "LAME MP3: VP mp3" is selected,
Click "Enqueue" in the audio Encoding Section.
Now go to the Queues tab and Select Start.
The video and audio will now encode to XViD and mp3 respectively.
Step 6:
Muxing.
Easy Step,
Load your encoded XViD .avi in nanDUB,
Go To Video, Direct Stream Copy.
Go To Audio, (VBR) MP3 Audio and load your encoded .mp3 from meGUI.
Go File, Save As AVI.
Make sure a different file name from the source .avi is selected,
Click ok and In a few seconds You're Done!
Congrats!
Any Questions?
I'll add more deinterlacing fuctions include TIVTC and Restore24 soon.
** Admin Note, url removed & file zipped and attached to post for ease of use.
This tutorial is using meGUI, 2 pass XViD encode and MP3 Audio, and Muxing in nandub.
Note this tutorial isn't easy, spare some time, double check your scripts and you will have a good encode
Programs required:
meGUI
DGMPGDec aka, DGIndex aka, DVD2AVI (Included with meGUI install)
AviSynth (Included with meGUI install)
nanDUB
Optional filters:
YADIF (Regular deinterlace filter included in meGUI)
Restore24 (Best PAL field blend to 23.976fps, VERY HARD TO SETUP)
mrestore (Similar to Restore24, not as good results but faster and easier to setup)
TIVTC (Inverse Telecine Filter for NTSC video to NTSC Film frame rates)
Step 1:
Ensure the video is indexed, .avi captures skip this step (it's already indexed),
to Index an .mpg capture,
Run meGUI, Select Tools, D2V Creator.
Load your MPG video stream, check "No Audio demux".
We want to use our .wav saved from Cool Edit with CD or Edited Live Mix.
http://img372.imageshack.us/img372/4793/45080015hu4.png
Select Queue, and close the D2V creator Window.
Select the Tab "Queues" in meGUI and Press Start to create the D2V.
Step 2:
Now we have an indexed video we can begin an AviSynth Script.
This script is used to Import Video, Add Logo, Dinterlace, Crop, Resize, Noise reduction, Sharpen etc.
To make a basic Script in meGUI.
Select Tools, AviSynth Script Creator.
This is a GUI which fills in basic functions into the AviSynth Script.
We want to open our Indexed videos to create at Script.
Start by opening your .d2v or .avi in "Video Input"
Ensure the correct DAR is selected, eg NTSC or PAL 4:3, 16:9 etc.
Click Autocrop,
Resize the video,
To Calculate the Highest Resolution without Upscaling,
Tick Resize and Suggest Resolution, My Example is 720 Horizontal pixels.
Subtract what is Cropped from left and right and input this value in the Box where input is enable
(make sure its dividable by 16 and click up and down arrow so the GUI knows the new value has been added)
Refer to Screenshot on how this works.
http://img291.imageshack.us/img291/2879/91854437tu6.png
Step 3:
Deinterlacing in AviSynth.
Ok This is made easy by the Analysis button which Automatically determines whether the video is Interlaced, or 3:2 pulldown and the video's field order.
For this example I'm using Yadif as my video is completely interlaced (50 different fields a second)
I'll add an extenstion to this Tutorial on other Methods later.
Finally after this has been done save your script.
The Screenshot is an Example,
Edit your Values depending on your video.
http://img175.imageshack.us/img175/7425/73623301kn5.png
Step 4:
Adding a Logo.
Load your now saved .avs Script in Notepad.
It should look Similar to this screenshot
http://img165.imageshack.us/img165/3507/60032748nk7.png
To add a logo,
This requires Donald Graft's VirtualDub Logo Filter
function VD_Logo(clip clip, int "x", int "y", int "alpha", bool "transparent",
\ int "xr", int "xg", int "xb", int "tolerance", string "filename",
\ bool "animate", int "start", int "duration", int "loops",
\ int "fadeinlen", int "fadeoutend", int "fadeoutlen")
{
LoadVirtualdubPlugin("C:\virtualdub mod\plugins"
\ +"\logo.vdf", "_VD_Logo", 1)
return clip._VD_Logo(default(x,0), default(y,0), default(alpha,128),
\ default(transparent,true)?1:0, default(xr,0), default(xg,0),
\ default(xb,255),default(tolerance,0), default
\ (filename,""),
\ default(animate,false)?1:0, default(start,0), default(duration,0),
\ default(loops,0),default(fadeinlen,0),
\ default(fadeoutend,200), default(fadeoutlen,0))
}
ConvertToRGB()
VD_logo(382,435,240,true,0,0,0,10,"C:\Capture\watermark720x576-Frenchy.bmp",false,1067,0,0,30,1419,13)
ConvertToYV12()This is the logo part of the script i used in the example encode
anyway the line "LoadVirtualdubPlugin" the directory needs to match where your VirtualDub Filters.
The Line "VD_logo(382,435,240,true,0,0,0,10,"C:\Capture\watermark720x576-Frenchy.bmp",false,1067,0,0,30,1419,13)"
is all the values used to logo the video.
A easy way to fill in these values is to Add your logo as you would for A TMPGEnc Encode.
Then save the Processing Values from Virtual Dub.
Open the .vcf File in Notepad,
Scroll Down to a line which looks like this.
VirtualDub.video.filters.instance[0].Config(382, 435, 240, 1, 0, 0, 0, 10, "C:\\Capture\\watermark720x576-Frenchy.bmp", 0, 1067, 0, 0, 30, 1419, 13);Translates to
VD_logo(382,435,240,true,0,0,0,10,"C:\Capture\watermark720x576-Frenchy.bmp",false,1067,0,0,30,1419,13)In the AviSynth Script Logo.
Ok This script will do.
Step 5:
Encoding
Import the Profile I exported
** Check the attached zip file
Import this meGUI profile by selecting File Import Presets and opening the .zip you downloaded.
Ok load your .avs in the AviSynth Script Column,
Select your output .avi in the next column,
Ensure the profile "XviD: VP XviD" is selected,
Click "Enqueue" in the video Encoding Section.
Load your finished .wav in Audio Input,
Select the output .mp3,
Ensure the profile "LAME MP3: VP mp3" is selected,
Click "Enqueue" in the audio Encoding Section.
Now go to the Queues tab and Select Start.
The video and audio will now encode to XViD and mp3 respectively.
Step 6:
Muxing.
Easy Step,
Load your encoded XViD .avi in nanDUB,
Go To Video, Direct Stream Copy.
Go To Audio, (VBR) MP3 Audio and load your encoded .mp3 from meGUI.
Go File, Save As AVI.
Make sure a different file name from the source .avi is selected,
Click ok and In a few seconds You're Done!
Congrats!
Any Questions?
I'll add more deinterlacing fuctions include TIVTC and Restore24 soon.
** Admin Note, url removed & file zipped and attached to post for ease of use.