0

I have researched for a long time for AViSynth batch create using CMD AVISynth example :

> DirectShowSource("C:\Users\...\conan848.mkv", fps=23.976, audio=false,
> convertfps=true).AssumeFPS(24000,1001)
> #deinterlace
> #crop LanczosResize(1280,720) # Lanczos (Sharp)
> #denoise

With this Avisynth template, only the file path, "fps" and "AssumeFPS" change each file, so i use mediainfo to get those info (Folder "NHU" has 13 mkv files: Vandread 1st Stage 01, Vandread 1st Stage 02,...) - Use mediainfo in CMD

mediaInfo "C:\Users...\NHU*.mkv" --Inform=file://mau.txt > framerate.txt

With mau.txt:

General;%FileName%
Video;%BFrameRate_Modeg%:%FrameRate/String% \r\n

Result in file framerate.txt

Vandread 1st Stage 01 :23.976 (24000/1001) FPS
Vandread 1st Stage 02 :23.976 (24000/1001) FPS
.....
Vandread 1st Stage 12 :23.976 (23976/1000) FPS
Vandread 1st Stage 13 :23.976 FPS

After that, i don't know how to create batch Avisynth scripts like: Vandread 1st Stage 01.avs , Vandread 1st Stage 02.avs,...

wOxxOm
  • 65,848
  • 11
  • 132
  • 136
MinhLee
  • 21
  • 2
  • 9
  • Use [GetSystemEnv](http://www.avisynth.nl/users/stickboy/GetSystemEnv.zip) plugin: parse the mediainfo log in the batch file and set a variable that will be read using the plugin in avisynth script. – wOxxOm Feb 12 '17 at 09:51
  • Could you please help me in detail :( i'm not that good with those code =.= – MinhLee Feb 12 '17 at 09:53
  • 1
    Do you really need to have that FPS data in your script? I recall, DirectShowSource should be able to read it from the files on its own, might depend on system codecs though. – Seedmanc Feb 12 '17 at 13:30
  • I am not understanding what this has to do with batch-files? – Squashman Feb 12 '17 at 17:26
  • I know DirectShowSource able to read it on it own, but i have 100 video i want it to be auto read all of those, no need me to do each by each. – MinhLee Feb 12 '17 at 17:28
  • I can write an answer but first I need to know why you use DirectShowSource, which is a very bad approach generally (see explanations on doom9 forum), instead of the proper ones like FFMS2 or L-SMASH Works. – wOxxOm Feb 12 '17 at 19:49
  • I really didn't know that DirectShowSoure was a bad choice. Sometimes i use FFMS2 or L-SMASH as well, but just in case DirectShowSoure got a problem. I really don't have any specific reasons. Cuz i don't understand aobut them that much. – MinhLee Feb 14 '17 at 17:17

0 Answers0