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"
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays!
+ Reply to Thread
Results 1 to 10 of 10
Thread
-
-
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
[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.
-
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.
-
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 -
-
-
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 -
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.
-
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
Similar Threads
-
VidCoder Beta - Applying Subtitle Selection to Batch Que
By Hello_ in forum Video ConversionReplies: 0Last Post: 19th Dec 2023, 07:48 -
Getting subtitles from Youtube and applying them to a video
By snafoo in forum SubtitleReplies: 2Last Post: 23rd Dec 2021, 00:39 -
ffmpeg not applying all commands
By tors10 in forum Video ConversionReplies: 3Last Post: 2nd Mar 2021, 02:26 -
Magix batch conversion applying letterbox to video
By stantheman1976 in forum Video ConversionReplies: 4Last Post: 13th Jan 2021, 16:20 -
applying a filter to a batch in tmpg mastering works 5
By devdev in forum Newbie / General discussionsReplies: 1Last Post: 19th Dec 2019, 10:49