I started to encode a lot more videos than before lately which started to take too much of my time since I didn't want to compromise on the quality of my post.
To remediate this problem, I wrote a bunch of .bat files to automate as much of my posting process as possible while keeping the result exactly as I wanted it.
Since it might encourage other people to make better quality encodes, I decided to share it and explain enough of it so it can be modified if others needs are different than mine.
Installing all of the necessary software might be a little intimidating since there are many and some of them can be a bit hard to setup properly.
Once it's done though, it can be used by pretty much anyone with very little learning needed(which I'll explain here).
A word of warning before you start to use it, it demands a pretty good computer at the default settings so if you planned on using it as is, make sure your computer is up to the task.
I have an i7-2600k @ 4.7ghz(hyperthreading on) and it takes me around 18-19 hours to encode the 10-bit mkv and 8-9 for the avi.
I'll list all the software used first and explain how to find and properly install some of them after for those that need it.
For those of you with a 64bit OS, you can use a 64bit version of the software that have "(64bit)" after them(and only those, unless you know exactly what you're doing).
For those that only have a 32bit OS, just get the 32bit version and it should work without any problems(I haven't tested it though).
*Required Software*
-Avisynth(with a bunch of extra filters)
-x264(64bit)
-Winrar(64bit)
-MediaInfo(64bit)
-avs2pipemod
-neroAACcodec
-mkvtoolnix
-VirtualDub
-DVDDecrypter
-MPEG4ModifierCL
-DGmpgDec
**Optional(but recommended) software**
-par2cmdline(64bit)
-timer(by Greg Wittmeyer)
-Gimp
-md5deep(64bit)
-PSTools
-movie thumbnailer
-pure-sfv
-putty
-FlashFXP(not free) or WinSCP(free)
-Daemon Tools lite
-cURL
-yEncBin Poster
**Installing the software**
The most important(and hardest) software to install is avisynth and its filters. It's the heart of the encoding process and there isn't a 1 click solution to install everything that is needed.
-The first thing to do is install the official version 2.5.8 which can be found here(get the .exe): http://sourceforge.net/projects/avisynth2/files/AviSynth 2.5/AviSynth 2.5.8/
-Next, you need to install the unofficial version 2.6 MT(Multithreaded) by SEt which can be found here(as well as the instructions on how to install it): http://forum.doom9.org/showthread.php?t=148782
-For the filters, everything goes into the plugins folder where you installed avisynth 2.5.8(unless stated otherwise) which is most likely C:\Program Files (x86)\AviSynth 2.5\plugins (remove the (x86) on 32bit OS) and they all need to be the 32bit(x86) versions or they won't work.
The source for the plugins is often included in the downloads, but you don't actually need it so there's no need to extract it.
-First, install QTGMC(an HQ deinterlacer since most JAV is interlaced) and its modded plugins package which can both be found here: http://forum.doom9.org/showthread.php?t=156028
Put QTGMC .avsi in the avisynth plugins folder and for the plugins pack, read the "Where_to_put_these.txt" file inside the first 2 folders to know where to put the files.
-Next you need the SmoothAdjust plugin which can be found here: http://forum.doom9.org/showthread.php?t=154971
Read the INSTALLATION part of the readme to know which version of the dll is best suited for your computer and put it in the avisynth folder.
-You also need the autocrop plugin which can be found here: http://forum.doom9.org/showthread.php?t=87602
-Next comes the NicAudio plugin which can be found here: http://nicaudio.codeplex.com/
-And finally you need DGDecode dll included in DGmpgDec which can be found at the bottom of that page: http://hank315.nl/
Once you've put the dll in the avisynth plugins folder, you also need to extract everything in the archive(including the dll you just extracted) somewhere to install DGIndex which is also needed.
If you've managed to do all this, the hard part is over and the rest of the installation will be either extracting archives or running installers.
-x264: http://x264.nl/
I recommend(and am using) the 10bit-depth version since it create a smaller and slightly better looking encode, but it takes longer to do it and QTGMC already slow things down quite a bit.
-Winrar: http://www.rarlab.com/download.htm
-MediaInfo(CLI Interface): http://mediainfo.sourceforge.net/en/Download/Windows
-avs2pipemod(There might be a newer version later in the thread): http://forum.doom9.org/showthread.php?p=1565165&postcount=116
-Nero AAC Codec: http://www.videohelp.com/tools/Nero-AAC-Codec
-mkvtoolnix: http://www.bunkus.org/videotools/mkvtoolnix/downloads.html#windows
-VirtualDub: http://virtualdub.sourceforge.net/
-DVDDecrypter: http://www.videohelp.com/tools/DVD-Decrypter
-MPEG4ModifierCL: http://forum.doom9.org/showthread.php?t=117553
The following software are ones I use but aren't essential(it will require modifying the .bat files if you choose to not install them).
-par2cmdline(creates recovery files): http://chuchusoft.com/par2_tbb/download.html
-Timer(Calculate duration of an interval): http://www.gammadyne.com/cmdline.htm#timer
-Gimp(Image editing software): http://www.gimp.org/downloads/
-md5deep(calculate hashes): http://md5deep.sourceforge.net/#download
-movie thumbnailer(create thumbnails image): http://moviethumbnail.sourceforge.net/
-pure-sfv(create .sfv files): http://sourceforge.net/projects/pure-sfv/files/
-FlashFXP(best ftp software): http://www.flashfxp.com/download/
or WinSCP(free ftp software): http://winscp.net/eng/download.php
-Daemon Tools lite(mount .iso files in virtual cd-roms): http://www.disc-tools.com/download/daemon
-cURL(Mimics a browser behavior): http://curl.haxx.se/download.html
-yEncBin Poster 1.0.343(usenet uploader): If you use the latest beta(1.0.457 Beta2), you'll need to press an ok button 5 times for every upload. I don't have a download website to recommend to get it so just google it.
You most likely won't need the next two software and they are extremely easy to remove from the bat files(and I'll explain how).
-PSTools(execute software on remote computers): http://technet.microsoft.com/en-us/sysinternals/bb896649.aspx
-putty(connect to remote computers using ssh): http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
And finally, if you're using windows XP, you will probably need to install the "Windows Server 2003 Resource Kit Tools" which can be found here: http://www.microsoft.com/en-us/download/details.aspx?id=17657
You don't need it if you have windows vista or 7.
*Preparations*
First, download the archive containing all the required files at the end of this post.
Create a folder on your hard drive where you'll be working and extract the content there.
There is 1 config file and some small files which you need to fill(only once) before starting in the _Templates folder you extracted the files to.
You need to enter the comment in "comment_enc.txt" and "comment_up.txt"(for uploaded files that weren't encoded) you want to put in the rar files containing the videos you will be creating or simply replace Your_Name_Here with your name.
Edit the "hosts.txt" file to only include the ddl hosts you're going to upload to and you can add a message before or after that will be included in every post.
**Config file explained (_Templates\Bat\_0_config.txt)**
The format of the file is always the name of the bat file variable, a ; that act as a separator and the value of the variable each on their own line.
It is very important that it stays like this or weird things might happen.
The first line(the variable "ttl") is probably the only one that you will need to enter a value for every movie.
It's the title that will show up in the mkv informations when you play the movie.
I usually enter the english title if I have it followed by the DVD code in brackets. For example: ttl;English JAV title [ABC-123]
Next("lang") is the mkv language code information for the audio which will most likely always be japanese(jpn).
For the next 22 lines or so, you need to set the path to all the software you installed.
I left mine there since they may be the same for you and to make it easy to know which variable is for which software.
Pay close attention to the .exe name since it might not always be the one you expect to use. For example, winrar uses rar.exe instead of winrar.exe .
The only case where your .exe name might be different is when I added the version number to it. For example I used x264_r2208.exe instead of x264.exe.
"vset1"(1st pass) and "vset2"(2nd pass) are the saved processing settings I use to encode to avi.
If you don't like my default settings, you can create you own in virtualdub(google it) and put the name of your files there instead.
"tmpltdir" is the path to the _Templates folder that you extracted.
"ftpuppath" is the network path to copy the final files when they are ready to be uploaded.
You can omit it unless you plan to use a different computer to upload than the one you use for encoding like I do.
"ftpuploc" is the local path on the remote computer where the files were copied with "ftpuppath".
Only useful if you also set "ftpuppath".
"psupip" is the ip of the remote computer previously specified.
"psupuser" is the username of the remote computer previously specified.
"psuppass" is the password of the remote computer previously specified.
"isodir" is the path where the DVD images will be extracted.
You need to create that folder manually if it doesn't already exist(like all folders in this config file).
"dtdrv" is the device letter where the DVD is mounted(if using Daemon tools) or inserted(if you have the physical DVD).
"srvpath" is the http address where the files you uploaded are located.
This is only useful if you have access to a web server you can use to remote upload your files to other filehosts.
"ftpadr" is the ftp address to upload your files to(and is also the one used by putty). By default, there is a template on how to enter the ftp infos in the file.
This can either be to your web server if you have one or directly to a filehost that support ftp upload.
It isn't actually used if you use FlashFXP as your ftp software.
"sitename" is the name you assigned to your ftp infos in FlashFXP site manager.
You need to add your ftp infos directly in flashFXP instead of in "ftpadr" if you're using it. If not, you can omit it.
"spoof" is the browser infos used to automatically upload to ddl site.
You don't need to touch this and it isn't actually used right now since I'm having trouble with that part of my script these days and isn't included yet.
"HFuser" and "HFpass" are your hotfile username and password(assuming you're uploading to it).
"ttrange" are the default frames(at 60fps) used to create the test encodes which equals about 14:40-15, 29:40-30 and 44:40-45 for a total of 1 min.
No need to change this unless you're source is too short which is unlikely if it's a DVD.
"qtgmc" are the default deinterlacer settings.
Since I use pretty extreme settings which can make the encode take a lot of time, those can be modified for faster encodes(consult the documentation that came with qtgmc before changing them).
"x264param" are the default encoding settings for the mkv.
Again, I use settings that might slow the encoding quite a bit(but not as much as qtgmc which is usually so slow that these doesn't matter much for speed) so these can be changed to your liking(google "x264 documentation" before).
"x264threads" is the number of threads used for the mkv encode.
Set this to the highest number that doesn't make the encode crash. 0 is for letting the computer decide, but it will very likely crash if you use my other default settings.
For me, this is: My CPU number of logical cores(4 physical + 4 logical when hyperthreading is enabled) - 1
"xvidthreads" is the number of threads used for the avi encode.
Set this to the highest number that doesn't make the encode crash. 0 for auto(same warning as above).
I set this to 1 less than for the mkv since the avi encode doesn't go through avs2pipemod which helps prevent crashes due to memory buffer overflow.
*How to use the bat files*
The first thing to do is to create a folder in you work folder named after the DVD code and copy all the files from _Templates\Bat\ in it.
For example, my work folder is D:\_1enc_\ and if I wanted to encode the DVD IESP-515, I would create the folder D:\_1enc_\IESP-515\ and copy the config and all the bat files in it.
All the bat files are numerated in the order they need to be executed to make things less confusing.
"_0a_Create_infos_files.bat" will copy a template of the .nfo file(which is used to store information about the movie. Open it with notepad or any text reader).
It will also add the work path and the DVD code(which is used for many things) at the end of the config file.
"_0b_MountISO.bat" will mount a .iso if you drag and drop one on it or simply open daemon tools if you simply double-click it.
It's not that useful if you associated the iso files to daemon tolls since you can simply double-click on the iso and it will mount itself. In that case it can be skipped.
"_1_Create_EZ_avs.bat" does many things to prepare the required files:
-Extract the DVD to the ISO folder.
-Index it with DGindex so it can be used in avisynth.
-Create a .avs script to help configure the required settings for the encode.
-Copy the chapter file.
Now there's real work to be done.
You need to open the newly created file that ends with "_EZ.avs" with VirtualDub and it should load the video with an histogram on the right.
If it doesn't, there's most likely a problem with your avisynth install or you're missing a filter. Read the error message carefully and google the error to try and fix it if you have no idea how.
If it loads properly, open the ..._EZ.avs file with notepad this time and be ready to edit the script which goes as follow:
The first line, as well as all other line starting by # is a comment and is ignored.
Next you have SetMTMode which enables multithreading.
The next 3 lines load the video, audio and merge them together.
Then the multithreading setting is changed to 2.
The video is deinterlaced as fast as possible so that it's not extremely slow when viewing it.
And now to the important stuff you need to change:
Autocrop will try to remove the black borders on the side of the video by itself.
If you're not satisfied with it, you need to remove the line starting with autocrop, remove the # before Crop(0, 0, -0, -0) and replace the 0s with how many pixels you want to remove on each side manually(starting on the left and going clockwise).
You can also use the values from autocrop as a reference(see #3 on the picture).
[FULLATTACH]621587[/FULLATTACH]
If you're satisfied with what autocrop did, just leave it alone and go to the next setting.
Seek to a couple of places in the video and look at the white bars in the top histogram on the right(#4 on the picture).
If everything stays between the brown sides, go to the next setting.
If there's yellow lines in the brown sections, remove the # before SmoothCurve(Ycurve="0-2;255-235") and change the 2 and the 235 until there's no or very little yellow.
This will make adjustments to the brightness of the video, especially to fix the spot that are too bright.
The defaults are the most common values, but won't work 100% of the time.
Don't forget to save the .avs every time you edit it and press f2 in VirtualDub to see the changes you made.
Now you need to trim the beginning and the end of the video to remove any undesired section like the manufacturer logo or previews of other movies.
First, remove the # before "Trim(0,)" .
Seek to where you want to cut the video at the beginning(use the arrows, page up and page down for more precision) and write the frame number(#1 in the picture) instead of the 0 after Trim.
Do the same for the end(write it after the ",").
Now that everything is set(you can close the .avs opened with notepad), you need to create the chapters.
Open the file ending with "_Chapters.txt".
The first chapter always start at 00:00:00.000(HH:MM:SS.milliseconds) and you write the desired name after "CHAPTER01NAME=".
Seek to where the next chapter begins and write the timestamp(#2 in the picture) in the chapter file as well as the desired name.
Repeat until you're at the end of the video and delete all the unused chapters.
A completed chapter file will look something like this:
Once it's done, you need to enter some infos in the file ending with _.nfo.
The first 2 lines are the English title(If available or make sense if you translate the japanese one with google translate) and the japanese one
Then replace "http://" with the official address of the DVD if you can find it or delete it if you can't.
Set the "Runtime" to the official length on the cover or website if it differs from the default.
Add the "Studio"(company) name.
Replace the "-" with the "Label" of the DVD if there is one(there often isn't).
Choose a "Genre" between the 2(delete the other) and you can add more categories if you want(separate them with a comma followed by an empty space: ", ". This is very important for the tag creation).
Write the "Actresses" names if you know them or leave Unknown if you dont. Use the "Eng name(Jpn name)" format for example: Rui Saotome(早乙女ルイ) . Separated them the same way as the Genre if there's more than one.
And finally enter the "Release Date" in the YYYY/MM/DD format.
The rest will all be added automatically once the videos are encoded.
Now you only need to download the DVD cover and save it with the DVD code followed by .jpg to have all the required files.
"_2_Create_10b_avs.bat" will create the final .avs with the proper deinterlacing settings and adjust the aspect ratio of the movie to compensate for the cropping, calculate the resolution for the avi encode so that it's mod16 compliant and add both to the config file.
Now you need to set the deinterlacer settings.
Open the file named with the DVD code followed by .avs with notepad.
The most important setting to change is "EZKeepGrain" and you sometime need to change the "Sharpness".
To decide what number to use, run "__Test_Enc.bat", write something to identify the test(I like def for the first test) and press enter.
It will create a sample encode to show you what the result will be like.
You can try to play with both settings to see what the result looks like and choose the one you like best.
I usually set EZKeepGrain to 0.4(which is the value I end up using the most) for the second test and name it 4-3(after the 2 settings which help remembering which one looks best).
There is no magic settings since the source are all different, but those are a good place to start. You can read qtgmc manual if you want to play with the settings more.
"__Test_Enc_XviD.bat" will do the same as "__Test_Enc.bat" but will create an avi instead of an mkv.
Since the avi isn't as good looking as the mkv, I don't recommend it to choose the settings since it makes it harder to judge if they help or not.
It is only included since I needed it once in a while to test stuff and can be used to make sure encoding avis is set up right before the final encode.
Once you've chosen the best settings, it's time to run "_3_Final_Enc.bat.
It will encode the video, then the audio and merge both with the chapters, title and aspect ratio in the mkv.
Next it will call "_4_Prepare Info and Post files.bat" which will:
-Create a .nfo file using the one you half filled and complete it.
-Create a .txt file based on the .nfo to copy in your post(it will add a redirection for the website and a template of you ddl hosts after).
-Create a folder.jpg file by cropping the front of the DVD cover.
-Create a thumbnail file.
-Create a .md5 file to verify if the video becomes corrupt at some point.
-Create rar archives separated at 400MiB with your personal encoding comment from the _Template folder.
-Create a .sfv file to verify if the rar becomes corrupt at some point.
-Call "_4a_Tags.bat" which will create a "_tags.txt" file containing a list of tags to add to your post.
Next it will call "_3_Final_Enc_XviD.bat" which will encode the avi and then set the proper aspect ratio.
In case the encode would crash during the avi creation(it sometimes happen and I don't know why), you can simply run "_3_Final_Enc_XviD.bat" manually and it will encode the avi and prepare the files and infos.
Once the avi is done, it will also call "_4_Prepare Info and Post files.bat" which will do the same thing it did to the mkv, but for the avi(there will only be 1 tag file though).
If you have the option of uploading the files using ftp, run "_5_FTP_upload_Flashfxp.bat" and it will upload all the .rar files as well as the .sfv to it.
I configured this one for my very special needs so it might take a little editing before you can use it.
-If you want to use it to upload from another computer, you need to change the following with your remote computer info(in the line before last) before it will work: "\\IP_of_remote_computer -i -u "remote_computer_name\username" -p password"
-If you want to upload from the same computer you're running the bat file instead of another computer on your network like I do:
Replace
on line 7 with
And replace
on line 8 with
Then go to the end of the file and:
-You can remove the "ROBOCOPY" line since it only copies the files to the remote computer.
-Replace
with
And if you don't want to upload the .sfv file, removing all 3
should do it(or screw everything up since I made this bat file way too complex to easily modify)
"_5_FTP_upload_WinSCP.bat" does the same thing as the FlashFXP one except that it will use WinSCP as a ftp software instead. The possible changes are also the same as FlashFXP.
The "_5a_putty.bat" file will connect to the remote server you FTPed to in case you need to verify the integrity of the rar files with the .sfv before uploading them somewhere else(assuming you're using your own server).
The "_5b_HF.bat" file will read the prequeue.txt file(created during the ftp upload) and upload the archive files from the remote server to Hotfile using the remote upload feature and then add the links directly into the .txt file created earlier based on the nfo.
The "_5c_Usenet_upload.bat" file(you need to drag-and-drop a video file on it and choose if you want to queue it or post it immediately and also if you want to post it to the lesbian group or only the asian one.
Will:
-Create a Usenet folder where all the usenet related files will be moved for uploading.
-Create a new set of rar files optimized for usenet.
-Create a .sfv file for those rar files.
-Create a set of par2 files with 5% redundancy so it become possible to repair the rars if they become corrupt.
-Copy the thumbnail file and the nfo files for posting(you can also add a line to copy the cover if you also wish to upload it).
-Create a nzb file(used by usenet clients for downloading which you should post to the forum).
-Copy everything to the remote computer and start uploading the Usenet folder to usenet.
As with the ftp uploading, I do it on a remote computer so if you don't wish to do the same, remove near the end:
twice and replace
after it by
and remove these 3 lines:
For the required configuration instructions or if you wish to modify some of the posting options, please refer to the configuration section in my "auto usenet posting script" tutorial which is based on this script. You can find it here: http://www.akiba-online.com/forum/showthread.php?t=1199077
Finally, "_6_Cleanup.bat" will remove all files other than the ones that were added inside the rars and the bat files.
Only use it after you're done uploading and posting and only if you're too lazy to delete them manually.
It won't remove the extracted iso though so you'll have to do that manually either way or modify the script to make it delete it.
*Known bugs*
-The avi encode sometimes crash(weird memory problem apparently) when lauched from the mkv encode batch file.
-Timer doesn't handle multiple encodes at the same time properly since it follow the last in first out format instead of remembering who told it to start to calculate the elapsed time.
-Movie thumbnailer creates color smudges with 10-bit videos, but it's hard to notice most of the time unless you look for it.
*Download*
v1.2: View attachment Auto_Enc-Post_v1.2.rar
*Troubleshooting*
-If you get a missing msvcr71.dll error when opening virtualdub, you need to install the .NET framework v1.1
If you have windows 7 64bit, it won't install so you need to get it manually from inside the .NET framework 1.1 SDK which you can find here:
http://www.microsoft.com/en-us/download/details.aspx?id=16217
You need to open it with winrar(or your favorite archiver).
Then open the netfxsd1.cab file also with winrar
Extract the file named FL_msvcr71_dll_____X86.3643236F_FC70_11D3_A536_0090278A1BB8
Rename it to msvcr71.dll
And finally, move it to the syswow64 folder(located in the windows folders on the partition windows is installed on)
-If you get a green image when the video is paused in virtualdub, do the following:
In virtualdub, go to Options->Preferences...->Display->Uncheck "Use DirectX for display panes" and click save
*Final word*
If you discover mistakes or something unclear in the post(it's so long that I don't feel like proof reading after 5 hours of writing) or in the process, have question about how to make it work(at least make a minimum of effort on your own first) or on how to configure something, just let me know and I'll be happy to help/fix.
*Version History*
v1.2:
-Chapters for the mkv test file to separate the 3 sections
-A lot of verification has been implemented to prevent mistakes
-Can now queue usenet uploads
-Can Choose if movie should be uploaded to a.b.m.e.a or a.b.m.e.a and a.b.m.e.l with usenet
-Can now choose to upload with FlashFXP or WinSCP
-Added bat file with informations about resolutions and aspect ratios in case a manual change is needed in the config file
-Separated the nfo creation to permit information guathering before ripping the DVD
-Added scripts for posting/reposting a movie from scratch
-Added proper * alignment for all resolutions
-Added support for company V&R in the tags creation
-Cleanup will now also remove the temporary usenet folder as well as all the bat files
-The remote computer connection settings are now in the config file
-Many small fix/tweaks/cleanup I forgot about
v1.1:
-Added uploading to Hotfile(using cURL)
-Added uploading to usenet(using yEncBin Poster)
-Fixed drag-and-drop for some scripts
-A few other fixes, tweaks and cleanup I can't quite remember or not worth mentioning.
v1:
-Initial Release.
To remediate this problem, I wrote a bunch of .bat files to automate as much of my posting process as possible while keeping the result exactly as I wanted it.
Since it might encourage other people to make better quality encodes, I decided to share it and explain enough of it so it can be modified if others needs are different than mine.
Installing all of the necessary software might be a little intimidating since there are many and some of them can be a bit hard to setup properly.
Once it's done though, it can be used by pretty much anyone with very little learning needed(which I'll explain here).
A word of warning before you start to use it, it demands a pretty good computer at the default settings so if you planned on using it as is, make sure your computer is up to the task.
I have an i7-2600k @ 4.7ghz(hyperthreading on) and it takes me around 18-19 hours to encode the 10-bit mkv and 8-9 for the avi.
I'll list all the software used first and explain how to find and properly install some of them after for those that need it.
For those of you with a 64bit OS, you can use a 64bit version of the software that have "(64bit)" after them(and only those, unless you know exactly what you're doing).
For those that only have a 32bit OS, just get the 32bit version and it should work without any problems(I haven't tested it though).
*Required Software*
-Avisynth(with a bunch of extra filters)
-x264(64bit)
-Winrar(64bit)
-MediaInfo(64bit)
-avs2pipemod
-neroAACcodec
-mkvtoolnix
-VirtualDub
-DVDDecrypter
-MPEG4ModifierCL
-DGmpgDec
**Optional(but recommended) software**
-par2cmdline(64bit)
-timer(by Greg Wittmeyer)
-Gimp
-md5deep(64bit)
-PSTools
-movie thumbnailer
-pure-sfv
-putty
-FlashFXP(not free) or WinSCP(free)
-Daemon Tools lite
-cURL
-yEncBin Poster
**Installing the software**
The most important(and hardest) software to install is avisynth and its filters. It's the heart of the encoding process and there isn't a 1 click solution to install everything that is needed.
-The first thing to do is install the official version 2.5.8 which can be found here(get the .exe): http://sourceforge.net/projects/avisynth2/files/AviSynth 2.5/AviSynth 2.5.8/
-Next, you need to install the unofficial version 2.6 MT(Multithreaded) by SEt which can be found here(as well as the instructions on how to install it): http://forum.doom9.org/showthread.php?t=148782
-For the filters, everything goes into the plugins folder where you installed avisynth 2.5.8(unless stated otherwise) which is most likely C:\Program Files (x86)\AviSynth 2.5\plugins (remove the (x86) on 32bit OS) and they all need to be the 32bit(x86) versions or they won't work.
The source for the plugins is often included in the downloads, but you don't actually need it so there's no need to extract it.
-First, install QTGMC(an HQ deinterlacer since most JAV is interlaced) and its modded plugins package which can both be found here: http://forum.doom9.org/showthread.php?t=156028
Put QTGMC .avsi in the avisynth plugins folder and for the plugins pack, read the "Where_to_put_these.txt" file inside the first 2 folders to know where to put the files.
-Next you need the SmoothAdjust plugin which can be found here: http://forum.doom9.org/showthread.php?t=154971
Read the INSTALLATION part of the readme to know which version of the dll is best suited for your computer and put it in the avisynth folder.
-You also need the autocrop plugin which can be found here: http://forum.doom9.org/showthread.php?t=87602
-Next comes the NicAudio plugin which can be found here: http://nicaudio.codeplex.com/
-And finally you need DGDecode dll included in DGmpgDec which can be found at the bottom of that page: http://hank315.nl/
Once you've put the dll in the avisynth plugins folder, you also need to extract everything in the archive(including the dll you just extracted) somewhere to install DGIndex which is also needed.
If you've managed to do all this, the hard part is over and the rest of the installation will be either extracting archives or running installers.
-x264: http://x264.nl/
I recommend(and am using) the 10bit-depth version since it create a smaller and slightly better looking encode, but it takes longer to do it and QTGMC already slow things down quite a bit.
-Winrar: http://www.rarlab.com/download.htm
-MediaInfo(CLI Interface): http://mediainfo.sourceforge.net/en/Download/Windows
-avs2pipemod(There might be a newer version later in the thread): http://forum.doom9.org/showthread.php?p=1565165&postcount=116
-Nero AAC Codec: http://www.videohelp.com/tools/Nero-AAC-Codec
-mkvtoolnix: http://www.bunkus.org/videotools/mkvtoolnix/downloads.html#windows
-VirtualDub: http://virtualdub.sourceforge.net/
-DVDDecrypter: http://www.videohelp.com/tools/DVD-Decrypter
-MPEG4ModifierCL: http://forum.doom9.org/showthread.php?t=117553
The following software are ones I use but aren't essential(it will require modifying the .bat files if you choose to not install them).
-par2cmdline(creates recovery files): http://chuchusoft.com/par2_tbb/download.html
-Timer(Calculate duration of an interval): http://www.gammadyne.com/cmdline.htm#timer
-Gimp(Image editing software): http://www.gimp.org/downloads/
-md5deep(calculate hashes): http://md5deep.sourceforge.net/#download
-movie thumbnailer(create thumbnails image): http://moviethumbnail.sourceforge.net/
-pure-sfv(create .sfv files): http://sourceforge.net/projects/pure-sfv/files/
-FlashFXP(best ftp software): http://www.flashfxp.com/download/
or WinSCP(free ftp software): http://winscp.net/eng/download.php
-Daemon Tools lite(mount .iso files in virtual cd-roms): http://www.disc-tools.com/download/daemon
-cURL(Mimics a browser behavior): http://curl.haxx.se/download.html
-yEncBin Poster 1.0.343(usenet uploader): If you use the latest beta(1.0.457 Beta2), you'll need to press an ok button 5 times for every upload. I don't have a download website to recommend to get it so just google it.
You most likely won't need the next two software and they are extremely easy to remove from the bat files(and I'll explain how).
-PSTools(execute software on remote computers): http://technet.microsoft.com/en-us/sysinternals/bb896649.aspx
-putty(connect to remote computers using ssh): http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
And finally, if you're using windows XP, you will probably need to install the "Windows Server 2003 Resource Kit Tools" which can be found here: http://www.microsoft.com/en-us/download/details.aspx?id=17657
You don't need it if you have windows vista or 7.
*Preparations*
First, download the archive containing all the required files at the end of this post.
Create a folder on your hard drive where you'll be working and extract the content there.
There is 1 config file and some small files which you need to fill(only once) before starting in the _Templates folder you extracted the files to.
You need to enter the comment in "comment_enc.txt" and "comment_up.txt"(for uploaded files that weren't encoded) you want to put in the rar files containing the videos you will be creating or simply replace Your_Name_Here with your name.
Edit the "hosts.txt" file to only include the ddl hosts you're going to upload to and you can add a message before or after that will be included in every post.
**Config file explained (_Templates\Bat\_0_config.txt)**
The format of the file is always the name of the bat file variable, a ; that act as a separator and the value of the variable each on their own line.
It is very important that it stays like this or weird things might happen.
The first line(the variable "ttl") is probably the only one that you will need to enter a value for every movie.
It's the title that will show up in the mkv informations when you play the movie.
I usually enter the english title if I have it followed by the DVD code in brackets. For example: ttl;English JAV title [ABC-123]
Next("lang") is the mkv language code information for the audio which will most likely always be japanese(jpn).
For the next 22 lines or so, you need to set the path to all the software you installed.
I left mine there since they may be the same for you and to make it easy to know which variable is for which software.
Pay close attention to the .exe name since it might not always be the one you expect to use. For example, winrar uses rar.exe instead of winrar.exe .
The only case where your .exe name might be different is when I added the version number to it. For example I used x264_r2208.exe instead of x264.exe.
"vset1"(1st pass) and "vset2"(2nd pass) are the saved processing settings I use to encode to avi.
If you don't like my default settings, you can create you own in virtualdub(google it) and put the name of your files there instead.
"tmpltdir" is the path to the _Templates folder that you extracted.
"ftpuppath" is the network path to copy the final files when they are ready to be uploaded.
You can omit it unless you plan to use a different computer to upload than the one you use for encoding like I do.
"ftpuploc" is the local path on the remote computer where the files were copied with "ftpuppath".
Only useful if you also set "ftpuppath".
"psupip" is the ip of the remote computer previously specified.
"psupuser" is the username of the remote computer previously specified.
"psuppass" is the password of the remote computer previously specified.
"isodir" is the path where the DVD images will be extracted.
You need to create that folder manually if it doesn't already exist(like all folders in this config file).
"dtdrv" is the device letter where the DVD is mounted(if using Daemon tools) or inserted(if you have the physical DVD).
"srvpath" is the http address where the files you uploaded are located.
This is only useful if you have access to a web server you can use to remote upload your files to other filehosts.
"ftpadr" is the ftp address to upload your files to(and is also the one used by putty). By default, there is a template on how to enter the ftp infos in the file.
This can either be to your web server if you have one or directly to a filehost that support ftp upload.
It isn't actually used if you use FlashFXP as your ftp software.
"sitename" is the name you assigned to your ftp infos in FlashFXP site manager.
You need to add your ftp infos directly in flashFXP instead of in "ftpadr" if you're using it. If not, you can omit it.
"spoof" is the browser infos used to automatically upload to ddl site.
You don't need to touch this and it isn't actually used right now since I'm having trouble with that part of my script these days and isn't included yet.
"HFuser" and "HFpass" are your hotfile username and password(assuming you're uploading to it).
"ttrange" are the default frames(at 60fps) used to create the test encodes which equals about 14:40-15, 29:40-30 and 44:40-45 for a total of 1 min.
No need to change this unless you're source is too short which is unlikely if it's a DVD.
"qtgmc" are the default deinterlacer settings.
Since I use pretty extreme settings which can make the encode take a lot of time, those can be modified for faster encodes(consult the documentation that came with qtgmc before changing them).
"x264param" are the default encoding settings for the mkv.
Again, I use settings that might slow the encoding quite a bit(but not as much as qtgmc which is usually so slow that these doesn't matter much for speed) so these can be changed to your liking(google "x264 documentation" before).
"x264threads" is the number of threads used for the mkv encode.
Set this to the highest number that doesn't make the encode crash. 0 is for letting the computer decide, but it will very likely crash if you use my other default settings.
For me, this is: My CPU number of logical cores(4 physical + 4 logical when hyperthreading is enabled) - 1
"xvidthreads" is the number of threads used for the avi encode.
Set this to the highest number that doesn't make the encode crash. 0 for auto(same warning as above).
I set this to 1 less than for the mkv since the avi encode doesn't go through avs2pipemod which helps prevent crashes due to memory buffer overflow.
*How to use the bat files*
The first thing to do is to create a folder in you work folder named after the DVD code and copy all the files from _Templates\Bat\ in it.
For example, my work folder is D:\_1enc_\ and if I wanted to encode the DVD IESP-515, I would create the folder D:\_1enc_\IESP-515\ and copy the config and all the bat files in it.
All the bat files are numerated in the order they need to be executed to make things less confusing.
"_0a_Create_infos_files.bat" will copy a template of the .nfo file(which is used to store information about the movie. Open it with notepad or any text reader).
It will also add the work path and the DVD code(which is used for many things) at the end of the config file.
"_0b_MountISO.bat" will mount a .iso if you drag and drop one on it or simply open daemon tools if you simply double-click it.
It's not that useful if you associated the iso files to daemon tolls since you can simply double-click on the iso and it will mount itself. In that case it can be skipped.
"_1_Create_EZ_avs.bat" does many things to prepare the required files:
-Extract the DVD to the ISO folder.
-Index it with DGindex so it can be used in avisynth.
-Create a .avs script to help configure the required settings for the encode.
-Copy the chapter file.
Now there's real work to be done.
You need to open the newly created file that ends with "_EZ.avs" with VirtualDub and it should load the video with an histogram on the right.
If it doesn't, there's most likely a problem with your avisynth install or you're missing a filter. Read the error message carefully and google the error to try and fix it if you have no idea how.
If it loads properly, open the ..._EZ.avs file with notepad this time and be ready to edit the script which goes as follow:
The first line, as well as all other line starting by # is a comment and is ignored.
Next you have SetMTMode which enables multithreading.
The next 3 lines load the video, audio and merge them together.
Then the multithreading setting is changed to 2.
The video is deinterlaced as fast as possible so that it's not extremely slow when viewing it.
And now to the important stuff you need to change:
Autocrop will try to remove the black borders on the side of the video by itself.
If you're not satisfied with it, you need to remove the line starting with autocrop, remove the # before Crop(0, 0, -0, -0) and replace the 0s with how many pixels you want to remove on each side manually(starting on the left and going clockwise).
You can also use the values from autocrop as a reference(see #3 on the picture).
[FULLATTACH]621587[/FULLATTACH]
If you're satisfied with what autocrop did, just leave it alone and go to the next setting.
Seek to a couple of places in the video and look at the white bars in the top histogram on the right(#4 on the picture).
If everything stays between the brown sides, go to the next setting.
If there's yellow lines in the brown sections, remove the # before SmoothCurve(Ycurve="0-2;255-235") and change the 2 and the 235 until there's no or very little yellow.
This will make adjustments to the brightness of the video, especially to fix the spot that are too bright.
The defaults are the most common values, but won't work 100% of the time.
Don't forget to save the .avs every time you edit it and press f2 in VirtualDub to see the changes you made.
Now you need to trim the beginning and the end of the video to remove any undesired section like the manufacturer logo or previews of other movies.
First, remove the # before "Trim(0,)" .
Seek to where you want to cut the video at the beginning(use the arrows, page up and page down for more precision) and write the frame number(#1 in the picture) instead of the 0 after Trim.
Do the same for the end(write it after the ",").
Now that everything is set(you can close the .avs opened with notepad), you need to create the chapters.
Open the file ending with "_Chapters.txt".
The first chapter always start at 00:00:00.000(HH:MM:SS.milliseconds) and you write the desired name after "CHAPTER01NAME=".
Seek to where the next chapter begins and write the timestamp(#2 in the picture) in the chapter file as well as the desired name.
Repeat until you're at the end of the video and delete all the unused chapters.
A completed chapter file will look something like this:
Code:
CHAPTER01=00:00:00.000
CHAPTER01NAME=Chapter 01
CHAPTER02=00:05:47.581
CHAPTER02NAME=Chapter 02
CHAPTER03=00:11:40.600
CHAPTER03NAME=Chapter 03
CHAPTER04=00:21:31.390
CHAPTER04NAME=Chapter 04
CHAPTER05=01:04:27.864
CHAPTER05NAME=Chapter 05
CHAPTER06=01:13:40.883
CHAPTER06NAME=Chapter 06
Once it's done, you need to enter some infos in the file ending with _.nfo.
The first 2 lines are the English title(If available or make sense if you translate the japanese one with google translate) and the japanese one
Then replace "http://" with the official address of the DVD if you can find it or delete it if you can't.
Set the "Runtime" to the official length on the cover or website if it differs from the default.
Add the "Studio"(company) name.
Replace the "-" with the "Label" of the DVD if there is one(there often isn't).
Choose a "Genre" between the 2(delete the other) and you can add more categories if you want(separate them with a comma followed by an empty space: ", ". This is very important for the tag creation).
Write the "Actresses" names if you know them or leave Unknown if you dont. Use the "Eng name(Jpn name)" format for example: Rui Saotome(早乙女ルイ) . Separated them the same way as the Genre if there's more than one.
And finally enter the "Release Date" in the YYYY/MM/DD format.
The rest will all be added automatically once the videos are encoded.
Now you only need to download the DVD cover and save it with the DVD code followed by .jpg to have all the required files.
"_2_Create_10b_avs.bat" will create the final .avs with the proper deinterlacing settings and adjust the aspect ratio of the movie to compensate for the cropping, calculate the resolution for the avi encode so that it's mod16 compliant and add both to the config file.
Now you need to set the deinterlacer settings.
Open the file named with the DVD code followed by .avs with notepad.
The most important setting to change is "EZKeepGrain" and you sometime need to change the "Sharpness".
To decide what number to use, run "__Test_Enc.bat", write something to identify the test(I like def for the first test) and press enter.
It will create a sample encode to show you what the result will be like.
You can try to play with both settings to see what the result looks like and choose the one you like best.
I usually set EZKeepGrain to 0.4(which is the value I end up using the most) for the second test and name it 4-3(after the 2 settings which help remembering which one looks best).
There is no magic settings since the source are all different, but those are a good place to start. You can read qtgmc manual if you want to play with the settings more.
"__Test_Enc_XviD.bat" will do the same as "__Test_Enc.bat" but will create an avi instead of an mkv.
Since the avi isn't as good looking as the mkv, I don't recommend it to choose the settings since it makes it harder to judge if they help or not.
It is only included since I needed it once in a while to test stuff and can be used to make sure encoding avis is set up right before the final encode.
Once you've chosen the best settings, it's time to run "_3_Final_Enc.bat.
It will encode the video, then the audio and merge both with the chapters, title and aspect ratio in the mkv.
Next it will call "_4_Prepare Info and Post files.bat" which will:
-Create a .nfo file using the one you half filled and complete it.
-Create a .txt file based on the .nfo to copy in your post(it will add a redirection for the website and a template of you ddl hosts after).
-Create a folder.jpg file by cropping the front of the DVD cover.
-Create a thumbnail file.
-Create a .md5 file to verify if the video becomes corrupt at some point.
-Create rar archives separated at 400MiB with your personal encoding comment from the _Template folder.
-Create a .sfv file to verify if the rar becomes corrupt at some point.
-Call "_4a_Tags.bat" which will create a "_tags.txt" file containing a list of tags to add to your post.
Next it will call "_3_Final_Enc_XviD.bat" which will encode the avi and then set the proper aspect ratio.
In case the encode would crash during the avi creation(it sometimes happen and I don't know why), you can simply run "_3_Final_Enc_XviD.bat" manually and it will encode the avi and prepare the files and infos.
Once the avi is done, it will also call "_4_Prepare Info and Post files.bat" which will do the same thing it did to the mkv, but for the avi(there will only be 1 tag file though).
If you have the option of uploading the files using ftp, run "_5_FTP_upload_Flashfxp.bat" and it will upload all the .rar files as well as the .sfv to it.
I configured this one for my very special needs so it might take a little editing before you can use it.
-If you want to use it to upload from another computer, you need to change the following with your remote computer info(in the line before last) before it will work: "\\IP_of_remote_computer -i -u "remote_computer_name\username" -p password"
-If you want to upload from the same computer you're running the bat file instead of another computer on your network like I do:
Replace
Code:
FOR /F "tokens=2 delims=;" %%G IN ('findstr ftpuppath; "%wrkdir%_0_config.txt"') DO SET ftpuppath=%%G
Code:
SET ftpuppath=%wrkdir%
Code:
FOR /F "tokens=2 delims=;" %%G IN ('findstr ftpuploc; "%wrkdir%_0_config.txt"') DO SET ftpuploc=%%G
Code:
SET ftpuploc=%wrkdir%
Then go to the end of the file and:
-You can remove the "ROBOCOPY" line since it only copies the files to the remote computer.
-Replace
Code:
START "FlashFXP upload" "%psexec%" \\%psupip% -id -u "%psupuser%" -p %psuppass% "%flashfxp%" -c2 -logfile="%ftpuploc%%basefile%.log" -get "%ftpuploc%%ftp_queue%"
Code:
START "%flashfxp%" -c2 -logfile="%basefile%.log" -get "%ftp_queue%"
And if you don't want to upload the .sfv file, removing all 3
Code:
FOR /F "delims=" %%H IN ('dir /b !basefile!.sfv') DO ECHO 04-%sitename%%ftpuploc%%%H%%H%%~zH>>"%ftpuppath%%ftp_queue%"
"_5_FTP_upload_WinSCP.bat" does the same thing as the FlashFXP one except that it will use WinSCP as a ftp software instead. The possible changes are also the same as FlashFXP.
The "_5a_putty.bat" file will connect to the remote server you FTPed to in case you need to verify the integrity of the rar files with the .sfv before uploading them somewhere else(assuming you're using your own server).
The "_5b_HF.bat" file will read the prequeue.txt file(created during the ftp upload) and upload the archive files from the remote server to Hotfile using the remote upload feature and then add the links directly into the .txt file created earlier based on the nfo.
The "_5c_Usenet_upload.bat" file(you need to drag-and-drop a video file on it and choose if you want to queue it or post it immediately and also if you want to post it to the lesbian group or only the asian one.
Will:
-Create a Usenet folder where all the usenet related files will be moved for uploading.
-Create a new set of rar files optimized for usenet.
-Create a .sfv file for those rar files.
-Create a set of par2 files with 5% redundancy so it become possible to repair the rars if they become corrupt.
-Copy the thumbnail file and the nfo files for posting(you can also add a line to copy the cover if you also wish to upload it).
-Create a nzb file(used by usenet clients for downloading which you should post to the forum).
-Copy everything to the remote computer and start uploading the Usenet folder to usenet.
As with the ftp uploading, I do it on a remote computer so if you don't wish to do the same, remove near the end:
Code:
START "Usenet upload" "%psexec%" \\%psupip% -id -u "%psupuser%" -p %psuppass%
Code:
"%ftpuploc%%avs%"
Code:
"%avs%"
Code:
ROBOCOPY %wrkdir%%newsd% %ftpuppath%%avs% /R:0 /W:0
REM Check if a .nzb was created at an earlier time for this movie
IF EXIST "%ftpuppath%%avs%\%~n1.nzb" (DEL "%ftpuppath%%avs%\%~n1.nzb")
For the required configuration instructions or if you wish to modify some of the posting options, please refer to the configuration section in my "auto usenet posting script" tutorial which is based on this script. You can find it here: http://www.akiba-online.com/forum/showthread.php?t=1199077
Finally, "_6_Cleanup.bat" will remove all files other than the ones that were added inside the rars and the bat files.
Only use it after you're done uploading and posting and only if you're too lazy to delete them manually.
It won't remove the extracted iso though so you'll have to do that manually either way or modify the script to make it delete it.
*Known bugs*
-The avi encode sometimes crash(weird memory problem apparently) when lauched from the mkv encode batch file.
-Timer doesn't handle multiple encodes at the same time properly since it follow the last in first out format instead of remembering who told it to start to calculate the elapsed time.
-Movie thumbnailer creates color smudges with 10-bit videos, but it's hard to notice most of the time unless you look for it.
*Download*
v1.2: View attachment Auto_Enc-Post_v1.2.rar
*Troubleshooting*
-If you get a missing msvcr71.dll error when opening virtualdub, you need to install the .NET framework v1.1
If you have windows 7 64bit, it won't install so you need to get it manually from inside the .NET framework 1.1 SDK which you can find here:
http://www.microsoft.com/en-us/download/details.aspx?id=16217
You need to open it with winrar(or your favorite archiver).
Then open the netfxsd1.cab file also with winrar
Extract the file named FL_msvcr71_dll_____X86.3643236F_FC70_11D3_A536_0090278A1BB8
Rename it to msvcr71.dll
And finally, move it to the syswow64 folder(located in the windows folders on the partition windows is installed on)
-If you get a green image when the video is paused in virtualdub, do the following:
In virtualdub, go to Options->Preferences...->Display->Uncheck "Use DirectX for display panes" and click save
*Final word*
If you discover mistakes or something unclear in the post(it's so long that I don't feel like proof reading after 5 hours of writing) or in the process, have question about how to make it work(at least make a minimum of effort on your own first) or on how to configure something, just let me know and I'll be happy to help/fix.
*Version History*
v1.2:
-Chapters for the mkv test file to separate the 3 sections
-A lot of verification has been implemented to prevent mistakes
-Can now queue usenet uploads
-Can Choose if movie should be uploaded to a.b.m.e.a or a.b.m.e.a and a.b.m.e.l with usenet
-Can now choose to upload with FlashFXP or WinSCP
-Added bat file with informations about resolutions and aspect ratios in case a manual change is needed in the config file
-Separated the nfo creation to permit information guathering before ripping the DVD
-Added scripts for posting/reposting a movie from scratch
-Added proper * alignment for all resolutions
-Added support for company V&R in the tags creation
-Cleanup will now also remove the temporary usenet folder as well as all the bat files
-The remote computer connection settings are now in the config file
-Many small fix/tweaks/cleanup I forgot about
v1.1:
-Added uploading to Hotfile(using cURL)
-Added uploading to usenet(using yEncBin Poster)
-Fixed drag-and-drop for some scripts
-A few other fixes, tweaks and cleanup I can't quite remember or not worth mentioning.
v1:
-Initial Release.
Last edited: