Advanced Ripping and Video Encoding
i start this guide by talking about what you should install and how much space you should have before you start ripping; i then begin to show how I rip a DVD(if your method works for you keep using it); i then explain how to process your ripped DVD with, and how to use, DGIndex; then i show how to create a simple Avisynth script and encode with meGUI. i finish this tutorial with some important notes i feel need to be adressed in terms of ripping and encoding, they're not necessary but they might provide you some insite on DVD ripping and processing.
Pre-encoding tasks.
before you start i recommend having at least 8gb free on your system. but i'd really recommend having a good 15gb free.
tools you'll need for the job:
RIPPING TOOLS
AnyDVD: this program functions best as a driver which is used to remove copy protections such as CSS, ARccOS, etc.
NOTE: other than AnyDVD, everything else is Freeware, so just search for everything else in google(if you're looking for an all in one site, i recommend:
Tools - Video software and downloads - VideoHelp.com
DVDshrink: this is what we're going to be using to rip the DVD because it will give us a lossless DVD.
(NOTE: don't just use DVDshrink because it doesn't remove CSS and other types of copy protections which could give you errors when ripping)
ENCODING TOOLS
Avisynth: Avisynth is a powerful programming language that gives you lots of flexibility when processing your video files. Avisynth is essential for encoding and i'd recommend instaling this first before you install anything else.
meGUI: this will be our main GUI which we will be using to utilize all of our tools(x264.exe, MP4box, etc)
DGIndex: this is what we're going to be use to process the ripped DVD. this comes bundled with meGUI so you don't have to install it but if you want you can get it from: DGMPGDec MPEG1/2 Decoder and Frame Server
NOTE: make sure to use DGIndex, and NOT DGAVCIndex(which now also comes installed with MeGUI) as DGAVCIndex was meant for Bluray/264 while DGIndex was meant for DVD/mpeg2
microsoft .netframework 2.0: you'll need to download and install this or you'll get errors with MeGUI
NOTE: you should have everything stated above before you continue. make sure to run all the programs to verify that they work(you can't run Avisynth, it's a script language) so just make sure that AnyDVD, DVDshrink, meGUI, and DGIndex all run properly before continuing(note: if you didn't download DGIndex from the above link it should be located in "C:\program files\meGUI\tools\dgindex" i'd recommend making a shortcut to DGIndex.exe)
MISC TOOLS
VLC: i HIGHLY recommend installing VLC, or using some other programs that can play individual vob files. make sure it doesn't try to play the movie from beginning to end(as window media player does) if you choose to use a program that isn't VLC
K-lite codec pack: you might think that you don't need a codec pack because you're using VLC, but codecs are also used for encoding video. there will always be the feud between K-lite and CCCP, and they're both good for different things; CCCP is all about efficiency, giving you the most compatability with the least amount of codecs to decrease the likeliness that your codecs will clash with one another; K-lite on the other hand is about giving you the right tool for the job, K-lite is much better to use if you're looking to get into encoding like this, and you may even need K-lite or have problems with Avisynth. it's possible that the settings in CCCP just need to be altered to work properly with Avisynth, and if you're having no errors with CCCP, i'd recommend keeping it. but if you're having problems, just get the full version of K-lite and you should be fine.
1) Ripping
after you've inserted your DVD, Run AnyDVD. what AnyDVD does is it scans your disc and removes all copy protection without having to actually rip it. you might see a balloon pop up saying that AnyDVD is scanning your disc in your system tray.
when this goes away(should only be a few seconds), your DVD should be ready to rip with DVDshrink (note: DO NOT stop anyDVD)
Run DVDshrink. click the "open disc" button. click ok if it looks like it's the DVD you've inserted(note: if you have more than one drive, such as a virtual drive, you may have to manually select the correct drive; also, you may get a warning that the region is not set if you do, just select whatever region is applicable to you, in my case it was region 1: us; canada and continue) DVDshrink may do an analysis of your DVD. wait until it is finished, and then continue.
after analysis has finished, click the "full disc" button. under video, where it says "compression" click "no compression." after you've done this click the "Backup!" button. if the DVDshrink warns you "target size is exceeded" and asks you if you want to continue, just click yes.
this is fine because we aren't planning on reburning the rip to a DVD for our purposes. in the "Backup DVD" prompt, make sure that "hard disk folder" is selected instead of ISO. you can use an ISO too but you'll have to mount it everytime you need to use it which could get annoying. lastly click OK and DVD shrink should start ripping
NOTE: you should NOT use your computer when you're ripping as this could cause errors with the ripping process; the same goes for encoding. this means don't surf the web, play games, IM, etc when you're ripping.
After DVDshrink is done ripping(NOTE: default directory should be the "my documents" folder) you'll need to process the rip with DGIndex.
2) DGIndex
run DGIndex. click file> open and find the DVD you ripped with DVDshrink. go to the Video_TS folder. now you'll have to find the first vob file with video on it. as a rule of thumb, the first movie vob file is the first video file that's about 1gb in size(or 0.99gb) so as you're hovering over your files you can see how big they are. files might be ordered like:
1_0.vob
1_1.vob
2_0.vob
2_1.vob
2_2.vob
2_3.vob
2_4.vob
2_5.vob
3_0.vob
etc.
now, i can't tell you which vob the first data of the movie file will start with because it depends on who created the DVD and how that person decided to create the vobs. at this point, if you have it installed, you can start right-clicking a vob file and hit "play with VLC media player" to see if the file you're playing is either the first episode on the DVD or the first part of the movie. you'll have to do this for each individual part of the movie until you find the last movie scene/ last episode. after you find all the files, you can hold "ctrl" and individually select each parts of the vob file(using left click) and then hiting ok with DGIndex.
if you're adding a TV show or an Anime series, it's likely that episodes are encoded on one vob file but can be encoded on multiple vob files as well(i've seen a1024 19min vob and one 100mb 3min vob, both part of the same episode, so keep your eyes open.) make sure to play the vob so you know exactly what's on it BUT it's possible that multiple episodes are encoded on one vob file(i've seen 3+ episodes encoded on one vob, so again, keep your eyes open.)
after you've added all the vob files, we'll need to play the video files so that we can get some basic, but essential, information from DGIndex. before you preview, make sure your settings are as they are below
click on the "video" button(it's on the same row as "file")
Video
make sure iDCT Algorithm is set to "IEEE-1180 reference"(if it is there should be a check next to it)
make sure field operations are set to "honor pulldown flags"(if it is there should be a check next to it)
make sure YUV->RGB is set to "PC scale"(if it is there should be a check next to it)
to preview, hit File>preview(or F5)
leave it previewing for about five minutes, what we're concerned about is the information on the side panel, namely the video percentage. if the percentage is 95% or higher, switch from "honor pulldown flags" to "force film." in the example above, the video is 74%, so honor pulldown flags would be used. however, in this example:
the film is 99%, so Force Film would be used instead of Honor Pulldown Flags. (thanks to Asterastrip for pointing this out!)
after you figure out which one to pic, you need to fix the settings for the audio
Audio
in Audio make sure output method is set to Demux all tracks(if it is there should be a check next to it)
the rest of the options can be left as is. you may have noticed that there are four buttons on the bottom. there can be extremely useful if multiple episodes are encoded on a single VOB file or you just want to make a sample. if you have no need to use the buttons explained below(even though i'd recommend learning what they do) them just click "file>save project" and name your .d2v file, and continue to MeGUI
NOTE: as with ripping, don't use your computer when making your D2V file. this means don't surf the web, play games, IM, etc when you're ripping.
NOTE: when making a D2V file, you may get an error telling you about problems with field transitions
if you get this error, you can just select YES and DGIndex will give you the original file as well as the corrected file. unfortunately it's hard to tell which is the good one and which is the bad one, but i usually just use the fixed one
NOTE: the bad D2V file is given the .bad extension, such as blah.D2V.bad
Quote:
*the "[" button allows you to set a start point. so if you want to set the start point to a specific scene, drag the slider bar to where you want it and click the "[" button.
*the "<" button is used to go back in frames. this can be useful because it's more accurate than the slider alone.
*the ">" button is to go forward in frames. this can be useful because it's more accurate than the slider alone.
*the "]" button allows you to set an end point. so if you want to set the end point to a specific scene, drag the slider bar to where you want it and click the "]" button.
i HIGHLY reccomend utilizing these commands to make short D2V files for test encodes. encoding something that's maybe 30 seconds will take like 5 min, as opposed to two hours, or longer depending on your settings, for a full encode. in the end if you have a problem with your final result, it will be much less frustrating if you made a short clip with DGIndex, than if you made a full D2V file.
wherever you saved your D2V file, once you go in there you may have multiple audio files. the other audio files may be director commentary or other commentary. DGIndex aranges audio files such as:
Quote:
Blah T80 2_0ch 192Kbps DELAY 0ms.ac3
Blah T81 2_0ch 192Kbps DELAY 0ms.ac3
Blah T82 2_0ch 192Kbps DELAY 0ms.ac3
the first one, 80, is ususally the main movie audio while any others are commentary, other languages(as with anime encodes). you may want to play them to view the differences. the above is meant as an example, your files might have delays in them.
NOTE: dvds may only include one audio track. when you selected demux all tracks earlier, DGIndex extracted every single audio track on there. so in the end everything that DGIndex gives you is everything that's on the DVD.
3) MeGUI
run meGUI. when you first run meGUI, you may get prompted that meGUI has updated files. if it asks you if it can update you should select yes because updates usually contain fixes from older versions or just better programs. you'll get prompted to add certain x264 and xvid profiles. just add all of them and move on(right click> select all). you may also get prompts for audio profiles. again, add them all, and move on.
in meGUI click the "tools" button(it's in the same row as "file") and select "AVS script creator"(or CTRL + R).
AVS Script Creator
in video input, hit browse and find your .D2V file that we made earlier. next is another important aspect of encoding: cropping
Cropping
as i said, properly cropping is pretty important. in the end it all comes down to you, but i wouldn't want to have a full screen (4:3) have ugly black bars on the sides(as opposed to on the top and bottom) when playing on a wide screen monitor. but it may be difficult to figure out how your video looks in a widescreen monitor if you don't have one. the best way to experiment with cropping is to follow these steps:
1) uncheck "on save close and load to be encoded" near the bottom.
2) uncheck "apply auto preview" if it's enabled.
3) click the button with the down arrow on it(on the same row as "Input DAR") after and select 16:9(NTSC or PAL should be the same but i'd recommend using NTSC if your original DVD was NTSC and PAL if it was PAL) if 16:9 is already selected, leave it alone
4) click the browse button in the video output tab and select an area where you'll have easy access to your AVS file(you can save wherever you want but i recommend your desktop or my documents.) give it a name to verify that you're using it for test purposes(e.g. test.avs)
5) check the crop tab and apply a vertical(the top and bottom "0" boxes) crop(the first time you do this keep your crop at zero on all sides.).
6) hit save.
7) right click your avs file and hit "play" and it should open with the player avisynth bundled with it. after the file plays, right click and hit "enable fullscreen(or alt enter)" to go to fullscreen mode. and if you have a widescreen monitor and see the black horizontal bars, keep cropping until those horizontal bars are gone. if you have a fullscreen monitor, you're a bit more limited in your cropping ability but just keep adding to the horizontal and vertical values until they feel right.
now supposedly perfect 1080p cropping on a NTSC DVD is value of about 7XX by 396(an up value of 42 and down value of 42) i haven't tested this yet, but i'll do my best to test it soon.
NOTE: every time you add to the crop value some data is lost. anamorphic encoding is another option, but at this point i'm not covering it(i might later though) i'll discuss the advantages or disadvantages of anamorphic encoding vs traditional cropping in the discussion at the end of this tutorial.
if you have issues with avisynth's bunded player or didn't install it, you can also play the files with windows media player or media player classis(should have come with CCCP or Klite)
after you've verified that your file plays fine, start again from step 4 and continue until the video feels right. when it does just use those values. and continue creating your avs script
filters
in the filters tab, click the Analyze button. this will tell you what the movie is composed of, whether it's film, hybrid, etc. after you've done that click the save button. also make sure to check the "source is anime" box if your source is anime.
you can leave the advanced tab alone.
profiles
in meGUI, under "encoder settings" select the recommend selecting the "DXVA-SD-HQ." once the profile is selected go click the "config" button. in bitrate i'd recommend changing the value from 1000 to something like 1500 or higher(note: the higher the bitrate the better quality the video will be but the bigger the filesize will be and it might take longer to encode too; bitrate should not be higher than 5000 imo)
click the "update" button if you want to update the profile. if you want to make a new profile, select the "new" button and after you've made it select the update button.
UI settings
after you've made your profile/specified a bitrate, go to file format. in "file format" select RAWAVC
next click the QUEUE tab(located between "INPUT" and "LOG") and make sure no entries are in here(in case you accidently told meGUI to autoload the avs script) if there's anything in here click the "clear" button to delete it.
next click the INPUT tab again and click the "enque" button. click the QUEUE tab once again and click the "start" button to start encoding your video file.
NOTE: make sure to not be running any other processes on your computer while running as this could mess with the encode
NOTE: encoding could take several hours depending on your computer's hardware and the bitrate you've put in. i recommend encoding before going to sleep or before going to work or school or something.
after your video is done encoding, the next thing we need to do is mux the audio and video files together so we could get one nice final container file that contains our audio and video streams.
MUXING
before you start muxing, make sure go to your Queue tab and make sure no jobs are there. if there are, clear them.
in meGUI go to tools, muxer, adaptive muxer.
(note: if you're really adamant about using AVI, for whatever reason, you could use AVC[x264] to AVI muxer and encode the audio to an mp3. i HIGHLY recommend using MKV though)
in Video Input, click the video button and find your .264 stream(NOTE: if you don't have viewable file extensions enabled, you might not be familiar which file is the video file. you can easily open the .264 file in VLC to verify that it's the video) in the name section, you can give a specific name to the video stream(although for video streams this is kind of useless imo)
in Audio, in the Input section, find your first AC3 file(remember blah blah blah 80, blah blah blah 81, etc) and add it as the input. in the name box you can name the audio track, this is useful in defining which audio track is the main movie audio, or commentary. or in anime encodes, which audio stream is english and which one is japanese.
if you want to use multiple tracks, you can right click where it says "audio 1" and click "add new track" to add as many new tracks as you need.
skip the subtitle section as i didn't specify how to use vobsub(will do later)
skip the chapters section as i didn't specify how to use a chapter extractor(will do later)
in container format select MKV, and make the splitting box is set to "no splitting"
after that's done, select the "queue" button. click the QUEUE tab(located between INPUT and LOG) in your main GUI and click start.
after muxing is done, your video file should be ready to play. try playing it and see how all of your hard work has paid off. i recommend viewing your file in VLC.
these is the basics of advanced video encoding, there's still a long way to go from here. if you really want to become a very skilled encoder, i'd recommend learning Avisynth:
http://avisynth.org/mediawiki/Main_Page
now, as was requested of me, let me give a brief introduction on how to encode audio within meGUI and what advantages and disadvantages come from using mp3 as opposed to Aac.
Audio Encoding:
for mobile formats(zune, ipod, PSP, etc), you'll have to do some encoding with audio(namely to .AAC format) Nero Digital Audio(google) is recommended for encoding to AAC format. i'll update how to do this later. (NOTE: every time you encode the audio you'll lose quality.) also, certain mobile formats may only work with the .MP4 container, so take that into consideration when muxing.
first thing's first, what format are you looking to encode to? the only formats i'm going to be covering are MP3 and AAC. a similar process should work for OGG though.
if you want to encode to mp3, meGUI should have already installed LAME for you, so you shouldn't have to do anything.
if you want to encode to AAC, it's recommended that you download neroAacEnc.exe which comes in Nero Digital Audio(which is free to download) you can get Nero Digital Audio here:{ Nero - Nero AAC Codec } after it's done downloading, you need to place neroAacEnc.exe somewhere(i recommend C:/program files/meGUI/tools and inside tools make a folder called "neroaAacEnc"(without quotes) or something like that. place the neroAacEnc.exe inside of it. your next step is to run meGUI and point meGUI to the exe file.
run meGUI, go to options > settings. once inside settings, click the "program paths" tab. inside the programs paths tab, click the "audio" tab, click the browse button next to neroAacEnc and find wherever you put the exe file(if you followed my directions, it'll be in "C:/program files/megui/tools/neroaAacEnc"
after you're done pointing meGUI to the correct aac file, click save.
now let's start encoding:
in the audio section of meGUI's main GUI, click the audio input and find the audio files that you demuxed with DGIndex. you might want to play the audio file first to make sure you have the proper track.
in encoder settings, pick the profile you'd like to use. you can adjust things like bitrate in any profile. in mp3, the max is 320; in Aac, the max is 640. if you're missing profiles, you can probably go to settings > update and import any profiles you might need.
which one is better? you can get the same quality file as an mp3 with an aac file, except the Aac file will usually be much smaller. why use mp3 then? to use Aac, people need to have codec packs installed or something with internal codecs like Vlc. if they don't have either of those, the video file won't play properly. this Tut was written with x264 in mind, and AC3, but you can easily convert the audio to Aac if you want to put it on your ipod/psp.
OTHER NOTES:
advanced users recommend usign AvsP instead of MeGUI's AVS script creator. i find this to be much harder to use though, but if you want to learn how to use AVsP for better encodes, give it a shot.
DVD Decrypter: this is a very outdated software, why people still use it i have no clue, some people just use the logic "if it aint broke don't fix it" either way i don't recommend using it because it can't handle protections like ArcCos and other newer protections that can be handled by AnyDVD and DVDfab(which are both constantly updated) if you're adamant about using DVD decrypter however, i recommend using it in unison with Ripit4me; Ripit4me is a GUI that uses DVD Decrypter to rip DVDs and it can handle some of the newer protection that DVD decrypter cannot. if you do use DVD decrypter, make sure to disable the options to join all the vobs as one, it's a bad habbit and isn't good when you're ripping TV shows.
DGIndex Vs DGDecode: i talk about using DGIndex and it's what i recommend. you might be tempted to using DGDecode, and there are advantages to using both; DGIndex gives you A LOT of control with it's GUI interface; DGDecode works better with filters and can be run directly from an Avisynth script. An advantage to using DGIndex is that you can manually select which vob file you want to create a D2V file for, whereas it would be much more difficult to do with DGDecode. you might be thinking at this point, "why would i want to select an individual vob file if each is a part of the movie?" it's a bad habbit to think that DVDs purely hold movies, TV shows, including anime, usually come encoded individually on multiple vobs so by not being able to select which vobs you want, you'll have to split the files at the end which is wasteful imo. you could also use DGIndex to add start and end markers in one vob file but again, i'd say it's wasteful. there are several other reasons i recommend using DGIndex such as the ability to specify which audio track is selected, but in the end the decision is yours.









4Likes
LinkBack URL
About LinkBacks

Reply With Quote


