VideoHelp Forum




+ Reply to Thread
Results 1 to 7 of 7
  1. I have several videos I need to process using avisynth then encode to hevc/aac mkv format. I can use avsproxy and open in avidemux but I can't batch it. I have a lot of videos that use basically the same script. I can easily create a script for each file if needed but I don't have anything that takes it as an input. Can someone please recommend some software that takes avisynth files as an input or where I can use avs within the software to batch?
    Quote Quote  
  2. You can use ffmpeg in a batch file to step through each AVS script in a folder and encode it. Something along the lines of:

    Code:
    for %%F in (*.avs) do ffmpeg.exe -i "%%F" -c:v libx264 -preset slow -tune film -c:a libmp3lame "%%~F.mkv"
    pause
    Quote Quote  
  3. I've been using the "AAC (lav)" option in avidemux. Using the ffmpeg command line, what would I specify for AAC?
    Quote Quote  
  4. replace "libmp3lame" with "aac" or "libfdk_aac". The latter is better quality but not included in some ffmpeg builds.
    Quote Quote  
  5. Also, if all the Avisynth scripts should contain identical commands, here's a nice tip I read here, from “jagabo” above, posted two years ago :
    https://forum.videohelp.com/threads/381322-ConvertToYV12-in-Avisynth-Rec601-Rec709-PC-...ge#post2468325

    Here's a convenient batch file that uses DgIndex to build an index file and create an AviSynth script to open that file:
    Code:
    "G:\Program Files\DgIndex\DGIndex.exe" -i "%~d1%~p1%~n1%~x1" -o "%~d1%~p1%~n1" -fo 0 -om 2 -exit
    echo Mpeg2Source("%~d1%~p1%~n1.d2v", CPU2="ooooxx", Info=3) > "%~1.avs"
    echo TFM(d2v="%~d1%~p1%~n1.d2v") >> "%~1.avs"
    echo TDecimate() >> "%~1.avs"
    Just adapt to your case... Apparently this works directly by dragging-and-dropping a file on the .bat script (I haven't tried that), but it can be modified by adding FOR loops, to process a whole directory by just double-clicking on the .bat script. Each “echo ... >> ...” line adds the specified command to each .avs file (with only one “>” it overwrites the file's current contents, that's why only the first “echo” line has “>”).
    If you're not familiar with Windows command line arguments (assuming you're using Windows), look here.

    replace "libmp3lame" with "aac" or "libfdk_aac". The latter is better quality but not included in some ffmpeg builds.
    Also specify a -crf value if you want a better quality than the default – but I just looked at ffmpeg's included help, it says that default is “-1”, what is that supposed to mean ? (Many other parameters have “-1” as default.)
    Last edited by abolibibelot; 21st Dec 2018 at 20:22.
    Quote Quote  
  6. Originally Posted by abolibibelot View Post
    Also specify a -crf value if you want a better quality than the default – but I just looked at ffmpeg's included help, it says that default is “-1”, what is that supposed to mean ?
    It means use x264's default CRF, 23.0.
    Quote Quote  
  7. Thanks. I'll have to review ffmpeg's arguments. I typically go with default settings in handbrake or avidemux with CRF 26.0 and setting audio to AAC
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!