Re-encoding script v2.16
I've made yet again a few modifications to bring it to my own standard of use so here's a new version with some new stuff.
Overview:
This script can re-encode many video files to either a mkv or mp4 file with h264 video and aac audio.
For it to work, you need to install the following:
- avisynth(v2.6 recommended) which you can get here:
http://forum.doom9.org/showthread.php?t=172213
If you want the MT version, first install the official 2.6(link above) and then replace the avisynth.dll in you windows\syswow64(or system32 if you have a 32bit OS) with this one:
http://forum.doom9.org/showthread.php?t=148782
- The ffmpegsource2(v2.18-rc1 or better recommended since it won't crash with video that contain glitches) plugin for avisynth which you can get here:
https://github.com/FFMS/ffms2/releases
You need to extract FFMS2.avsi and the x86 ffms2.dll in the plugins folder of the avisynth installation.
- x264 32bit(x86) which you can get here(get it from the "clear" column):
http://komisar.gin.by/
- avs2pipemod which you can get here(There might be a newer version later in the thread. v0.4.2 is experimental so it might be safer to stick with v0.4.1):
http://forum.doom9.org/showthread.php?p=1565165&postcount=116
- neroAACcodec:
http://www.videohelp.com/tools/Nero-AAC-Codec
- mediainfo(the CLI version):
https://mediaarea.net/en/MediaInfo/Download/Windows
- mkvtoolnix(which is only required if you want to output to mkv):
http://www.bunkus.org/videotools/mkvtoolnix/downloads.html#windows
- mp4box(which is only required if you want to output to mp4):
http://www.videohelp.com/software/My-MP4Box-GUI
- timer(which is only required if you want to log the time it takes to encode):
http://www.gammadyne.com/cmdline.htm#timer
The full list of features/changelog is:
v2.16
- It will now double check the FPS using mediainfo since some formats were very unreliable(mostly wmv and mpg files).
v2.15
- Added the option to pre-answer most of the questions asked by the script.
v2.14
- Added support for as many input files as the command line can take(which is a lot).
- Added the option to re-encode only the audio using a different source filter in case it's not done properly the first time(it happens sometimes with some wmv) by simply drag and dropping the source video again(but it will only be possible if nocleaning is set to y since it needs the temporary files to work).
- The current dimension of the video is now shown when asking to resize.
- Fixed a bug where 25 and 30 FPS video were detected as weird framerate when they shouldn't be.
v2.07
- Added support for uncompressed audio track over 4GB to prevent the audio encoding from crashing when the audio is long or 5.1 audio is used.
- Changed the amount of possible input video from 5 to 9 because why not, but more than that would be problematic for a batch file.
v2.05
- You can log the time it takes to encode the videos.
- You can choose to get asked to resize a video if its width is bigger than a predefined number(900 by default to only ask for HD movies).
v2.02
- You can enable multithreading when loading the source video(mostly useful if you have a slow pc) and choose the number of threads.
v2.0
- Can take from 1 to 5 input video from either drag and drop or via command line as parameters to the .bat file.
- Can split the encode in as many parts as you want if you don't want to encode it in one go.
The last part need to be the last one encoded or it will not get merged properly in the end.
- Can encode to either a mkv or mp4 file with the option to be asked or not.
You will only be asked when encoding the last part in the case of a split encode.
- If the framerate isn't a common one or if it can't be automatically detected, you'll be prompted to change it or keep it as is.
- If there's more than one input file, you'll be asked to confirm that they're in the right order.
When drag and dropping and all desired files are selected, you need to click and drag the first file for them to be in alphabetical order.
- You'll be prompted to enter a title for mkv files which will be omitted if you enter nothing.
- You can change the default x264 settings which are set in a variable to make things easy.
- The script can be paused at the right time if you want to manually edit the .avs file(if you know what you're doing) by setting a variable.
- The temporary files used during the encode can be deleted or kept by setting a variable or not.
- You can use the name of the current folder or the first file for the final encode name by setting a variable or not.
- The language of the video and audio track can be set(Japanese for both by default) to anything you want by changing a few variables.
- You'll only get prompted for things that applies to your choices. If that isn't the case, please let me know.
How to use it:
- Modify the paths and set the desired options in the "User config" section at the beginning of the .bat file using a plain text editor like notepad2 for example.
The lines starting with REM are commentaries that explain the options.
- Copy the .bat file in the same directory as the movie you want to re-encode.
- Drag and drop the movie on the .bat file and follow the directives. The final file name will end with "_final".
Known bugs:
-FFMS2 v2.18 RC1 and v2.19 sometimes(always?) hang when trying to load an HD video. The solution is to use v2.17(or a newer release when it comes out) for them.
update:It seems to be fixed in v2.20 and I haven't tried 2.21 yet but I assume it would work even better.
-FFMS2 v2.20(and possibly other versions) has trouble re-encoding the audio for some videos. The solution is to disable the cleaning of the temporary files in the script(set nocleaning to y if it's not already since it's the default) and drag and drop the source again. Then press d followed by enter when asked to use directshow instead for the audio(it will only re-encode the audio which is pretty quick and not the whole video).
Download:
View attachment _re-enc_v2.16.rar
v2.16 mirror:
http://www.mediafire.com/?ur31jubhacrjpld
Old versions:
View attachment _re-enc_v2.15.rar
v2.15 mirror:
http://www.mediafire.com/?vrpp28zz5a1dy52
View attachment _re-enc_v2.14.rar
v2.14 mirror:
https://www.mediafire.com/?i3nifkuxzraf2uw
View attachment _re-enc_v2.07.rar
v2.07 mirror:
http://www.mediafire.com/?40t1l06ao4q0gkw
View attachment _re-enc_v2.05.rar
v2.05 mirror:
http://www.mediafire.com/?k4bzc0v334024ag
View attachment _re-enc_v2.02.rar
v2.02 mirror:
http://www.mediafire.com/?c1h28ywnyn57h7f
View attachment _re-enc_v2.rar
v2 mirror:
http://www.mediafire.com/?hmml5z6md6qv2xv