@echo off echo avisource(%1) > %1.avs echo (float(width())/height() == (16./9) ^&^& ((width() ^> 1280) ^&^& (height() ^> 720))) ? spline36resize(1280,720) : last >> %1.avs echo spline36resize(int((width()/2))*2, int((height()/2))*2) : last >> %1.avs echo ConvertToYV12() >> %1.avs echo (AudioChannels()>2) ? audiodub(killaudio(),MergeChannels(ConvertToMono().getchannel(1),ConvertToMono().getchannel(1))) : (AudioChannels()==1) ? audiodub(killaudio(),MergeChannels(getchannel(1),getchannel(1)) : last >> %1.avs echo AVS file written, now encoding audio echo -- avs2wav -n %1.avs - | neroaacenc -q 0.4 -if - -of %1.aud.mp4 echo -- echo Audio encoded, now encoding video x264 --profile high --crf 20 --keyint 400 --min-keyint 24 --no-fast-pskip --b-adapt 2 --b-pyramid --direct auto --subme 6 --quiet --partitions p8x8,b8x8,i4x4,i8x8 --me umh --thread-input --output %1.vid.mp4 %1.avs echo -- echo Video encoded, now muxing to mp4 echo -- mp4box -add %1.vid.mp4 -add %1.aud.mp4 %1.final.mp4 echo -- del %1.vid.mp4 del %1.aud.mp4 del %1.avs echo Requirements: Avisynth installed, in your PATH (system32/syswow64): x264.exe, neroaacenc.exe, mp4box.exe pause