VideoHelp Forum
+ Reply to Thread
Results 1 to 8 of 8
Thread
  1. Member
    Join Date
    May 2014
    Location
    United States
    Search Comp PM
    I've been wanting this ever since I found out about AviSynth. I've found most of the answer in the form of a batch file:

    Code:
    for %%n in (*.mkv*) do (
    echo setmtmode(5,4^) > "%%n.avs"
    echo ffmpegsource2("F:\New folder\%%n"^) >> "%%n.avs"
    echo setmtmode(2^) >> "%%n.avs"
    echo qtgmc(edithreads=2^) >> "%%n.avs"
    echo selecteven(^)  >> "%%n.avs"
    )
    This batch file automatically creates an AviSynth script for every file ending in .mkv in the same folder as the batch file. The only problem is, the name of the resulting AviSynth script file will be, for example, The Golden Girls s03e25.mkv.avs. This, of course, means once processing the script in VirtualDub, the resulting filename would then be The Golden Girls s03e25.mkv.avi. I'd like to drop the .mkv from the name of the AVS script, if at all possible.
    Quote Quote  
  2. try:
    Code:
    "%%~nn.avs"
    Quote Quote  
  3. Code:
    for %%a in (*.mkv*) do (
    echo setmtmode(5,4^) > "%%~na.avs"
    echo ffmpegsource2("F:\New folder\%%n"^) >> "%%~na.avs"
    echo setmtmode(2^) >> "%%~na.avs"
    echo qtgmc(edithreads=2^) >> "%%~na.avs"
    echo selecteven(^)  >> "%%~na.avs"
    )
    Quote Quote  
  4. Member
    Join Date
    May 2014
    Location
    United States
    Search Comp PM
    I tried videobruger's first. You almost got it... there was no .mkv extension in the script. However, I mucked around a bit, and got it! Now this process is almost entirely automated. This is the working code:

    Code:
    for %%a in (*.mkv) do (
    echo setmtmode(5,4^) > "%%~na.avs"
    echo ffmpegsource2("F:\New folder\%%a"^) >> "%%~na.avs"
    echo setmtmode(2^) >> "%%~na.avs"
    echo qtgmc(edithreads=2^) >> "%%~na.avs"
    echo selecteven(^)  >> "%%~na.avs"
    )
    This will be very useful to me, thanks!
    Last edited by Downgraded286; 26th Feb 2016 at 11:23.
    Quote Quote  
  5. Originally Posted by videobruger View Post
    Code:
    for %%a in (*.mkv*) do (
    echo setmtmode(5,4^) > "%%~na.avs"
    echo ffmpegsource2("F:\New folder\%%n"^) >> "%%~na.avs"
    echo setmtmode(2^) >> "%%~na.avs"
    echo qtgmc(edithreads=2^) >> "%%~na.avs"
    echo selecteven(^)  >> "%%~na.avs"
    )
    Code:
    echo ffmpegsource2("F:\New folder\%%a"^) >> "%%~na.avs"
    Quote Quote  
  6. Originally Posted by Downgraded286 View Post
    This will be very useful to me, thanks!

    Your script will be very useful to me - i've learned something new - thanks!
    Quote Quote  
  7. Member
    Join Date
    May 2014
    Location
    United States
    Search Comp PM
    Originally Posted by videobruger View Post
    I actually looked at that before posting. I didn't see anything obvious to me, so I thought I'd ask here.
    Quote Quote  



Similar Threads

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