As you may have noticed, it is possible to scan video streams for errors with the GUI version of VirtualDub ("virtualdub.exe"). This can be accomplished by clicking on "Video" and "Scan video stream for errors" (and making sure that "Error mode" is set to "Report all errors"). However, as far as the command-line version of the program (vdub.exe) is concerned, I was not able to find any command-line options for scanning video streams for errors with VirtualDub... In other words, I have not found out how to use a batch to invoke the VDub function that scans video streams for errors. Does any of you know how to do this?
I skimmed through the HTML Help file for VirtualDub ("VirtualDub.chm") to no avail. I also checked the oft-referenced VirtualDub scripting language reference v0.7 at http://www.virtualdub.org/docs/vdscript.txt and a list of defined functions at http://virtualdubmod.sourceforge.net/Scripts.html without any success.
The script I would like to put together should give me a batch with roughly the following simple syntax:
Something resembling the code above should work provided that there are VDub script arguments for scanning video streams for errors.
Just to let you know, the usage of vdub.exe is:
vdub.exe /i Yourscript.script foo.avi
...and to quote the VirtualDub Help, the /i "invokes a script with arguments. All arguments following the script filename until the next switch are passed to the script in the VirtualDub.params[] array."
Actually, I wrote a simple batch that could be used for this purpose (see the attachment), but only in the future it does not contain the needed parts for VDub scripts ATM. With slight modifications it could be used for other programs that have the same error scanning feature as VDub. However, I am afraid the batch is poorly written, and I suspect that many people will find that it also has some annoying attributes. With some editing, it should do the job though (provided that the programs that are to be used support scanning video streams for errors via CLI)... Right now it just uses vdub.exe to open the video files that can be found in the current directory and its subfolders but it does not scan them for errors. Unfortunately, the batch requires that you have both tee.exe (input redirector/printer) and unix2dos.exe (UNIX EOL to DOS/Windows EOL converter) located in the PATH environment variable. So if you want to run the batch, you need the executables...
Tee.exe is a part of UnxUtils for Windows: http://unxutils.sourceforge.net/
Unix2dos has many different implementations, one of which can be found here: http://waterlan.home.xs4all.nl/dos2unix.html
As I warned, the code of the batch is not particularly good IMHO. I'm not a coder/developer by any means! :)
I used the following sources for some parts of the batch:
Getting current directory and full path: http://stackoverflow.com/questions/280969/windows-batch-loop-over-folder-string-and-pa...st-folder-name
Creating files with unique filenames: http://blogs.msdn.com/b/myocom/archive/2005/06/03/so-what-the-heck-just-happened-there.aspx
Escaping sequences for special characters: http://www.robvanderwoude.com/escapechars.php
List of different video file types: http://www.fileinfo.com/filetypes/video
I skimmed through the HTML Help file for VirtualDub ("VirtualDub.chm") to no avail. I also checked the oft-referenced VirtualDub scripting language reference v0.7 at http://www.virtualdub.org/docs/vdscript.txt and a list of defined functions at http://virtualdubmod.sourceforge.net/Scripts.html without any success.
The script I would like to put together should give me a batch with roughly the following simple syntax:
Code:
@echo off
"C:\Path\To\vdub.exe" /i SCRIPTNAME POSSIBLESCRIPTARGUMENTS "C:\Path\To\AVI01.avi" >>"VDubLogFile.txt"
"C:\Path\To\vdub.exe" /i SCRIPTNAME POSSIBLESCRIPTARGUMENTS "C:\Path\To\AVI02.avi" >>"VDubLogFile.txt"
"C:\Path\To\vdub.exe" /i SCRIPTNAME POSSIBLESCRIPTARGUMENTS "C:\Path\To\FLV01.avi" >>"VDubLogFile.txt"
"C:\Path\To\vdub.exe" /i SCRIPTNAME POSSIBLESCRIPTARGUMENTS "C:\Path\To\FLV02.avi" >>"VDubLogFile.txt"
## et cetera
Just to let you know, the usage of vdub.exe is:
vdub.exe /i Yourscript.script foo.avi
...and to quote the VirtualDub Help, the /i "invokes a script with arguments. All arguments following the script filename until the next switch are passed to the script in the VirtualDub.params[] array."
Actually, I wrote a simple batch that could be used for this purpose (see the attachment), but only in the future it does not contain the needed parts for VDub scripts ATM. With slight modifications it could be used for other programs that have the same error scanning feature as VDub. However, I am afraid the batch is poorly written, and I suspect that many people will find that it also has some annoying attributes. With some editing, it should do the job though (provided that the programs that are to be used support scanning video streams for errors via CLI)... Right now it just uses vdub.exe to open the video files that can be found in the current directory and its subfolders but it does not scan them for errors. Unfortunately, the batch requires that you have both tee.exe (input redirector/printer) and unix2dos.exe (UNIX EOL to DOS/Windows EOL converter) located in the PATH environment variable. So if you want to run the batch, you need the executables...
Tee.exe is a part of UnxUtils for Windows: http://unxutils.sourceforge.net/
Unix2dos has many different implementations, one of which can be found here: http://waterlan.home.xs4all.nl/dos2unix.html
As I warned, the code of the batch is not particularly good IMHO. I'm not a coder/developer by any means! :)
I used the following sources for some parts of the batch:
Getting current directory and full path: http://stackoverflow.com/questions/280969/windows-batch-loop-over-folder-string-and-pa...st-folder-name
Creating files with unique filenames: http://blogs.msdn.com/b/myocom/archive/2005/06/03/so-what-the-heck-just-happened-there.aspx
Escaping sequences for special characters: http://www.robvanderwoude.com/escapechars.php
List of different video file types: http://www.fileinfo.com/filetypes/video