pwantzel
December 16th, 2007, 10:11 AM
I created a script to add a short section of black frames to the end of a file. I first created a 15-frame section of black frames as a .VPrj file. When I use VRD manually, first adding my test file to the joiner, then the black frames, it produces a .mpg file that plays fine. When I use the script, however, it displays the same VRD output window and produces a .mpg file of exactly the same size, but when I play it i get no video (only audio).
The script is as follows:
set args = Wscript.Arguments
Set VideoReDo = WScript.CreateObject( "VideoReDo.Application" )
Wscript.echo( VideoReDo.VersionNumber)
openFlag = VideoReDo.AddFileToJoiner( args(0) )
Wscript.echo( "Adding file to Joiner: " + args(0) )
if openFlag = false then
Wscript.echo( "? Unable to open file/project: " + args(0) )
Wscript.Quit 3
end if
openFlag = VideoReDo.AddFileToJoiner( "e:\incoming\black_half_second.VPrj" )
Wscript.echo( "Adding file to Joiner: black_half_second.VPrj" )
if openFlag = false then
Wscript.echo( "? Unable to open file/project: black_half_second.VPrj" )
Wscript.Quit 3
end if
openFlag = VideoReDo.SaveJoinerAs( args(1) )
Wscript.echo( "Outputting from Joiner: " + args(1) )
if openFlag = false then
Wscript.echo( "? Unable to open file for output: " + args(1) )
Wscript.Quit 3
end if
While( VideoReDo.IsOutputInProgress() )
Wscript.Sleep 1000
Wend
VideoReDo.Close()
Wscript.quit 0
I run this from a batch file (to process a group of input files), which is as follows:
for %%i in (*.VPrj) do if not exist "d:\0_TV\%%~ni_black.mpg" cscript //nologo "e:\incoming\Joiner_add_blank_to_end_3.vbs" "%%~dpi%%i" "d:\0_TV\%%~ni_black.mpg"
The script produces the following output:
E:\Incoming>if not exist "d:\0_TV\Test_black.mpg" cscript //nologo "e:\incoming\Joiner_add_blank_to_end_3.vbs" "E:\Incoming\Test.VPrj" "d:\0_TV\Test_black.mpg"
3. 1. 4. 549 - Dec 12 2007
Adding file to Joiner: E:\Incoming\Test.VPrj
Adding file to Joiner: black_half_second.VPrj
Outputting from Joiner: d:\0_TV\Test_black.mpg
When I replace the SaveJoinerAs with SaveJoinerAsEx ( args(1), 1 ) I get the same result. When I use SaveJoinerAsEx ( args(1), 2 ) to produce elementary files, this time it works (i.e., the .mpv file does contain video)!
This is with VRD TVS 549 (and 547) and WinXP Pro. I have tried this with several different files, with the same result. And remember the exact same files work OK when run manually in VRD.
Am I doing something wrong in my script, or is there a problem in your COM routine?
The script is as follows:
set args = Wscript.Arguments
Set VideoReDo = WScript.CreateObject( "VideoReDo.Application" )
Wscript.echo( VideoReDo.VersionNumber)
openFlag = VideoReDo.AddFileToJoiner( args(0) )
Wscript.echo( "Adding file to Joiner: " + args(0) )
if openFlag = false then
Wscript.echo( "? Unable to open file/project: " + args(0) )
Wscript.Quit 3
end if
openFlag = VideoReDo.AddFileToJoiner( "e:\incoming\black_half_second.VPrj" )
Wscript.echo( "Adding file to Joiner: black_half_second.VPrj" )
if openFlag = false then
Wscript.echo( "? Unable to open file/project: black_half_second.VPrj" )
Wscript.Quit 3
end if
openFlag = VideoReDo.SaveJoinerAs( args(1) )
Wscript.echo( "Outputting from Joiner: " + args(1) )
if openFlag = false then
Wscript.echo( "? Unable to open file for output: " + args(1) )
Wscript.Quit 3
end if
While( VideoReDo.IsOutputInProgress() )
Wscript.Sleep 1000
Wend
VideoReDo.Close()
Wscript.quit 0
I run this from a batch file (to process a group of input files), which is as follows:
for %%i in (*.VPrj) do if not exist "d:\0_TV\%%~ni_black.mpg" cscript //nologo "e:\incoming\Joiner_add_blank_to_end_3.vbs" "%%~dpi%%i" "d:\0_TV\%%~ni_black.mpg"
The script produces the following output:
E:\Incoming>if not exist "d:\0_TV\Test_black.mpg" cscript //nologo "e:\incoming\Joiner_add_blank_to_end_3.vbs" "E:\Incoming\Test.VPrj" "d:\0_TV\Test_black.mpg"
3. 1. 4. 549 - Dec 12 2007
Adding file to Joiner: E:\Incoming\Test.VPrj
Adding file to Joiner: black_half_second.VPrj
Outputting from Joiner: d:\0_TV\Test_black.mpg
When I replace the SaveJoinerAs with SaveJoinerAsEx ( args(1), 1 ) I get the same result. When I use SaveJoinerAsEx ( args(1), 2 ) to produce elementary files, this time it works (i.e., the .mpv file does contain video)!
This is with VRD TVS 549 (and 547) and WinXP Pro. I have tried this with several different files, with the same result. And remember the exact same files work OK when run manually in VRD.
Am I doing something wrong in my script, or is there a problem in your COM routine?