VideoHelp Forum




+ Reply to Thread
Results 1 to 7 of 7
  1. Hi there,

    Is there a method to batch convert avi files to burn in the filename of the avi - just like you would add a permanent subtitle?

    Any method would be cool, even a hint if it is possible at all. Thanks in advance!

    Greets,
    Frank
    Quote Quote  
  2. Member olyteddy's Avatar
    Join Date
    Dec 2005
    Location
    United States
    Search Comp PM
    To do it for the whole vid, you'll have to re encode the whole video. Could you do it as an introductory clip, or an end credit?
    Quote Quote  
  3. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    A batch file like this:

    Code:
    :LOOP
    for %%A in (*.avi) do (
    IF NOT EXIST "%%~dpnA.avs" (
    
    echo.AVISource^("%%A"^)
    echo.Subtitle^("%%A"^)
    ) > "%%~dpnA.avs")
    )
    SHIFT
    @if %1X==X goto END
    @goto LOOP
    :END
    exit
    will create an AVS file for each AVI in a folder, with the filename as subtitle.


    See http://avisynth.org/mediawiki/Subtitle for options.
    Last edited by AlanHK; 19th Oct 2010 at 21:48.
    Quote Quote  
  4. You're awesome! Thanks a million

    Btw, is there a possibility to have all the avi files (with subtitle) concatenated in one AVS script? So that the result is one AVI file with the subtitles burnt in for each segment?
    Quote Quote  
  5. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by Taapo View Post
    Btw, is there a possibility to have all the avi files (with subtitle) concatenated in one AVS script?
    Code:
    AVISource("vid1.avi").Subtitle("vid1.avi") ++\
    AVISource("vid2.avi").Subtitle("vid2.avi") ++\
    AVISource("vid3.avi").Subtitle("vid3.avi") ++\
    AVISource("vid4.avi").Subtitle("vid4.avi") ++\
    AVISource("vid5.avi").Subtitle("vid5.avi") ++\
    AVISource("vid6.avi").Subtitle("vid6.avi") ++\
    AVISource("vid7.avi").Subtitle("vid7.avi") ++\
    AVISource("vid8.avi").Subtitle("vid8.avi") ++\
    AVISource("vid9.avi").Subtitle("vid9.avi")
    Of course, they all have to be the same frame size, fps, audio rate, etc.
    Quote Quote  
  6. Amazing, didn't know that. Thanks a lot!

    I think I can manage to adapt the BAT script you posted earlier to have it done automatically for a whole directory full of AVI files, but I'm not sure how I can write "if this is the last file, don't echo "+++\" ... would you be able to help me out with that?
    Quote Quote  
  7. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by Taapo View Post
    I think I can manage to adapt the BAT script you posted earlier to have it done automatically for a whole directory full of AVI files, but I'm not sure how I can write "if this is the last file, don't echo "+++\" ... would you be able to help me out with that?
    To do that is stretching batch files a bit. Though I'm sure it could be done.
    (have a look at the whacky things people do in alt.msdos.batch.nt)

    I'd just do this:

    Code:
    for %%A in (*.avi) do (
    (
    echo.AVISource^("%%A"^).Subtitle^("%%A"^) ++\
    ) >> "combo.avs")
    )
    And just delete the last 3 characters manually.

    If you want to do the whole thing programmatically you should look into more powerful scripting languages, like perl.

    (I really should use perl more, but a few batch tricks and word processor macros do most of what I need to make scripts.)
    Last edited by AlanHK; 20th Oct 2010 at 11:58.
    Quote Quote  



Similar Threads

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