VideoHelp Forum
+ Reply to Thread
Results 1 to 11 of 11
Thread
  1. I made a batch to right cick some files>join and what this does is it makes an avisynth script that adds all the videos to one another.
    The problem is explorer is stupid and won't add then in alphabetal order, so 1.avi,2.avi,3.avi don't get joined in order.

    Any idea how to geneate avisynth scrips and have them join together in alphabetical order?
    If you want to see what I've done with my videos,
    check out my video work on youtube, http://www.youtube.com/user/duhmez/
    Quote Quote  
  2. Member AlanHK's Avatar
    Join Date: Apr 2006
    Location: Hong Kong
    Search Comp PM
    Quote your batch script.
    Quote Quote  
  3. So this batch works but they are not the right order.

    echo v1=directshowsource(%1).converttomono().resampleau dio(44100).lanczosresize(848,480).convertfps(29.97 0) >>10Ooutput.avs
    echo v2=directshowsource(%2).converttomono().resampleau dio(44100).lanczosresize(848,480).convertfps(29.97 0) >>10Ooutput.avs
    echo v3=directshowsource(%3).converttomono().resampleau dio(44100).lanczosresize(848,480).convertfps(29.97 0) >>10Ooutput.avs
    echo v4=directshowsource(%4).converttomono().resampleau dio(44100).lanczosresize(848,480).convertfps(29.97 0) >>10Ooutput.avs
    echo v5=directshowsource(%5).converttomono().resampleau dio(44100).lanczosresize(848,480).convertfps(29.97 0) >>10Ooutput.avs
    echo v6=directshowsource(%6).converttomono().resampleau dio(44100).lanczosresize(848,480).convertfps(29.97 0) >>10Ooutput.avs
    echo v7=directshowsource(%7).converttomono().resampleau dio(44100).lanczosresize(848,480).convertfps(29.97 0) >>10Ooutput.avs
    echo v8=directshowsource(%8).converttomono().resampleau dio(44100).lanczosresize(848,480).convertfps(29.97 0) >>10Ooutput.avs
    echo v9=directshowsource(%9).converttomono().resampleau dio(44100).lanczosresize(848,480).convertfps(29.97 0) >>10Ooutput.avs


    echo end=(v1)+(v2)+(v3)+(v4)+(v5)+(v6)+(v7)+(v8)+(v9) >>10Ooutput.avs
    echo return(end) >>10Ooutput.avs
    If you want to see what I've done with my videos,
    check out my video work on youtube, http://www.youtube.com/user/duhmez/
    Quote Quote  
  4. Oh yeah also th ebatch is named with .cmd extension , don't thnk that maters but for ful discolsure.
    If you want to see what I've done with my videos,
    check out my video work on youtube, http://www.youtube.com/user/duhmez/
    Quote Quote  
  5. Challenge accepted : here is the script :
    There is no more limitation in the number of files like in your script.
    the script first places all filenames in params in a text file, then sort this file. then it writes the v1= lines.
    It terminates by the 'end=' and 'return' lines.

    Adapt the variables in the beginning of the script to your directories.

    Code:
    @echo off
    rem some variables you have to change
    set concatfile=c:\script\concat.lst
    set avsfile=C:\script\test.avs
    rem others
    set scriptfile=%0
    set i=0
    rem phase 1 : copy all params in a text file
    rem delete the file containing all filenames if exists, because always appending
    del %concatfile%
    rem delete the old avs script if exists , because always appending
    del %avsfile%
    rem add the first one
    :loop1
    set file=%1
    if $%file%$ == $$ goto step2
    rem remove quotes, if any
    set file=%file:"=%
    echo %file%; >>%concatfile%
    rem moving %1 -> %0  ,  %2 -> %1 , etc..
    shift
    goto loop1
    :step2
    rem all params are in the file, now sort the file (case insensitive)
    sort %concatfile% /o %concatfile%
    rem step 3 : put all file as Vx in the avs script
    for /f "eol=; delims=;" %%j in (%concatfile%) do call:write1 %%j
    rem get comm, minus the first +
    echo end=%comm:~1,9999% >>%avsfile%
    echo return (end) >>%avsfile%
    goto endscript
    :write1
    rem increment i V1 V2 ... Vx
    set /a i=i+1
    rem write the avs line
    echo v%i%=directshowsource("%*") >>%avsfile%
    rem generate the line  end=(v1)+(v2)+...
    set comm=%comm%+(V%i%)
    goto return
    :endscript
    pause
    :return
    Hope you'll can adapt to meet your needs.

    Olivier.
    Quote Quote  
  6. convertfps(30000.0/1001.0)

    perhaps this one can suit your expectations http://forum.doom9.org/showthread.php?t=165771
    Quote Quote  
  7. Wow amazing thanks so much! I wil give this a go. Ounds great that the # of videos need not be preplanned.
    If you want to see what I've done with my videos,
    check out my video work on youtube, http://www.youtube.com/user/duhmez/
    Quote Quote  
  8. So far this is working great, one more question though is there a way I can then copy the generated script into my current working directory? I am sure this last bit will be easy. I tried copy %avsfile after it genrates but it says cannot find the file specified.
    If you want to see what I've done with my videos,
    check out my video work on youtube, http://www.youtube.com/user/duhmez/
    Quote Quote  
  9. Member AlanHK's Avatar
    Join Date: Apr 2006
    Location: Hong Kong
    Search Comp PM
    Originally Posted by duhmez View Post
    So far this is working great, one more question though is there a way I can then copy the generated script into my current working directory? I am sure this last bit will be easy. I tried copy %avsfile after it genrates but it says cannot find the file specified.
    Just build the avs file in the current directory, set at the beginning. I think this will work:

    Code:
    set concatfile=concat.lst
    set avsfile=test.avs
    Quote Quote  
  10. AlanHK is right. I just changed to 4th line from

    Code:
    set avsfile=C:\script\test.avs
    to

    Code:
    set avsfile=.\test.avs
    and it worked.
    Quote Quote  
  11. Great job, Hurp durp i should have thught of this! Thanks so much.
    If you want to see what I've done with my videos,
    check out my video work on youtube, http://www.youtube.com/user/duhmez/
    Quote Quote  



Similar Threads