VideoHelp Forum
+ Reply to Thread
Results 1 to 10 of 10
Thread
  1. How do I apply scripts like this into Avidemux and VirtualDub2? What should the file format be?

    Code:
    @set SAVESTAMP=%DATE:/=-%_%TIME::=-%
    @set SAVESTAMP=%SAVESTAMP:.=-%
    
    *example of usage in file name*
    
    "%~n1_%SAVESTAMP%_.mkv"
    Quote Quote  
  2. That is a partial batch file, not a script. You put that text in a text file (use, for example, Notepad) and change the extension from .TXT to .BAT. Here's a full script that you can play with. All it does is display the generated filename.

    Code:
    @echo off
    set SAVESTAMP=%DATE:/=-%_%TIME::=-%
    set SAVESTAMP=%SAVESTAMP:.=-%
    
    REM *example of usage in file name*
    
    echo "%~n1_%SAVESTAMP%_.mkv"
    pause
    Image
    [Attachment 78135 - Click to enlarge]


    Beyond that, your question is way to vague. You need to explain exactly what you want to accomplish.
    Quote Quote  
  3. Originally Posted by jagabo View Post
    That is a partial batch file, not a script. You put that text in a text file (use, for example, Notepad) and change the extension from .TXT to .BAT. Here's a full script that you can play with. All it does is display the generated filename.

    Code:
    @echo off
    set SAVESTAMP=%DATE:/=-%_%TIME::=-%
    set SAVESTAMP=%SAVESTAMP:.=-%
    
    REM *example of usage in file name*
    
    echo "%~n1_%SAVESTAMP%_.mkv"
    pause
    Image
    [Attachment 78135 - Click to enlarge]


    Beyond that, your question is way to vague. You need to explain exactly what you want to accomplish.
    I want to automatically rename my output files in Avidemux and VirtualDub2 to prevent overwriting previous ones by automatically adding timestamps to the names.
    Quote Quote  
  4. There is windows batch scripts and there is gui's like VD2 or Avidemux. You cannot mix them together. You use GUI OR windows batch scripts.

    Because you select in and out points in GUI's, you cannot use out of scope windows batch scripts.

    Avidemux uses scripting, meaning you can run a pseudo python script and save selected trim selection (A to B) from withing a GUI. That actually works, but you cannot modify saved filename because those "python" scripts cannot load modules (like random or datetime). Those scripts are just parsed, so there is no python actually running (guessing).

    Not sure about VD2 if it can run something from within.

    EDIT: If you do not use in and out points, you might use windows batch running VirtualDub using vdf, and saving files in windows batch, because you are not using gui. Did not use it myself for a long time though. Also in Avidemux, using those pseudo python scripts, running those from within windows batch is possible, loading files from a directory.

    You always have to exactly specify what you do exactly. Your descriptions what you want are vague.
    Last edited by _Al_; 3rd Apr 2024 at 23:27.
    Quote Quote  
  5. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    The answer was already pointed out in a previous thread - save each output in its own subfolder, then use a batch script to move & rename so as not to overwrite (not "override") existing files in the target folder. Fairly easy for the rename to include the name of the former subfolder.


    Scott
    Quote Quote  
  6. Originally Posted by _Al_ View Post
    There is windows batch scripts and there is gui's like VD2 or Avidemux. You cannot mix them together. You use GUI OR windows batch scripts.

    Because you select in and out points in GUI's, you cannot use out of scope windows batch scripts.

    Avidemux uses scripting, meaning you can run a pseudo python script and save selected trim selection (A to B) from withing a GUI. That actually works, but you cannot modify saved filename because those "python" scripts cannot load modules (like random or datetime). Those scripts are just parsed, so there is no python actually running (guessing).

    Not sure about VD2 if it can run something from within.

    EDIT: If you do not use in and out points, you might use windows batch running VirtualDub using vdf, and saving files in windows batch, because you are not using gui. Did not use it myself for a long time though. Also in Avidemux, using those pseudo python scripts, running those from within windows batch is possible, loading files from a directory.

    You always have to exactly specify what you do exactly. Your descriptions what you want are vague.
    so it's impossible to automatically rename files while cutting?
    Quote Quote  
  7. Originally Posted by Cornucopia View Post
    The answer was already pointed out in a previous thread - save each output in its own subfolder, then use a batch script to move & rename so as not to overwrite (not "override") existing files in the target folder. Fairly easy for the rename to include the name of the former subfolder.


    Scott
    Well, how do I automatically save each output file in its own subfolder, and/or automatically make one for each one? Is there a setting or filter for it?
    Quote Quote  
  8. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    As mentioned, those are GUI apps without APIs to automate, so, barring using a macro recorder, you can't do it automatically. You do it manually.


    Scott
    Quote Quote  
  9. I believe both AviDemux and VirtualDub have full scripting ability. So you would use a batch file to build a script then call the program to execute the script. The script would open the video, make the cuts, then save the video wherever the script tells it to.
    Quote Quote  
  10. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    To be clear: they both have a form of scripting ability, but both apps' implementations are far from what any programmer would call full. Yes, you can set some series of presets for regular conversion, but neither have conditionals or branching, from what I can read. That sort of thing would be necessary to avoiding naming conflicts such as might be encountered by what the OP seems to want to do.


    Scott
    Quote Quote  



Similar Threads

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