PDA

View Full Version : SaveJoinerAs in COM script doesn't appear to work right



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?

pwantzel
December 16th, 2007, 11:13 AM
A little more information. Here is the data entered in the log file when the script is run. The only thing I notice is the bit rate in the last line. "Actual Video Bitrate: 1.#J Mbps"


2007-12-16 09:04:43 Decoder support lib: 5.2, ippvcw7l.lib
2007-12-16 09:04:44 Image support lib: 5.2, ippvcw7l.lib
2007-12-16 09:04:44 VideoReDo started. Licensed to: ***REDACTED***
2007-12-16 09:04:44 Starting up with silent and batch: 0 1f39980
2007-12-16 09:04:44

***** Loading: E:\Incoming\Kate & Allie-101-Allie's First Date-12-04-07.ty_QSF.mpg


2007-12-16 09:04:44 Opening file: E:\Incoming\Kate & Allie-101-Allie's First Date-12-04-07.ty_QSF.mpg, filetype is: MPEG2 PIDs: x00 / x00
2007-12-16 09:04:44 Startup - Number of PTS checks: 8
2007-12-16 09:04:44 Using display driver: DX-RGB
2007-12-16 09:04:46

***** Loading: E:\Incoming\title_test.mpg


2007-12-16 09:04:46 Using display driver: DX-RGB
2007-12-16 09:04:48 Bumping mux rate to: 15.000 Mbps to accomodate video bit rate of: 15.000
2007-12-16 09:04:48 Graph monitoring thread started.
2007-12-16 09:04:48 Graph, monitoring thread received terminate signal.
2007-12-16 09:04:48 Graph monitoring thread finished.
2007-12-16 09:04:48 Program Information
File Name: E:\Incoming\Kate & Allie-101-Allie's First Date-12-04-07.ty_QSF.mpg
File Size: 751386624 ( 0.70 GB )
Program Duration: 00:31:49.20
File Type: PS - MPEG2
Encoding: MPEG 2
Video stream Id: xE0
Encoding Dimensions: 480 x 480
Display Size: 480 x 480
Aspect Ratio: 4/3
Frame Rate: 29.97 FPS
Bit Rate: 15.000 Mbps
VBV_Buffer: 224 KB
Profile: Main/Main
Progressive: Prog or Int
Chroma: 4:2:0
Audio Format: Layer 2
Audio Stream Id: xC0
Audio Bit Rate: 192 Kbps
Audio Sampling Rate: 48000 Hz

2007-12-16 09:04:48 Starting new Frame Accurate Output Segment: start:119419.311 (00:01:59.11), end:611113.878 (00:10:11.03)
2007-12-16 09:05:04 Starting new Frame Accurate Output Segment: start:821620.811 (00:13:41.18), end:1345681.044 (00:22:25.20)
2007-12-16 09:05:19 Starting new Frame Accurate Output Segment: start:1586117.878 (00:26:26.04), end:1867101.944 (00:31:07.03)
2007-12-16 09:05:33 Starting new Frame Accurate Output Segment: start:0.000 (00:00:00.00), end:470.511 (00:00:00.14)
2007-12-16 09:05:33 Output complete. Input file: *Joiner*
Output file: d:\0_TV\Test_black.mpg
Mode: Frame Accurate
-Video output packets: 245882
-Audio output packets: 30828
-Padding output packets: 0
Video output frames: 38881
Audio output frames: 54056
Processing time (secs): 45
Processed frames/sec: 855.09
Actual Video Bitrate: 1.#J Mbps
Here is the output from processing the same files manually in VRD:

2007-12-16 07:48:15 Decoder support lib: 5.2, ippvcw7l.lib
2007-12-16 07:48:15 Image support lib: 5.2, ippvcw7l.lib
2007-12-16 07:48:16 VideoReDo started. Licensed to: ***REDACTED***
2007-12-16 07:48:16 Checking TVSuite registration: 120
2007-12-16 07:48:20

***** Loading: E:\Incoming\Kate & Allie-101-Allie's First Date-12-04-07.ty_QSF.mpg


2007-12-16 07:48:20 Opening file: E:\Incoming\Kate & Allie-101-Allie's First Date-12-04-07.ty_QSF.mpg, filetype is: MPEG2 PIDs: x00 / x00
2007-12-16 07:48:20 Startup - Number of PTS checks: 8
2007-12-16 07:48:20 Using display driver: DX-RGB
2007-12-16 07:48:27

***** Loading: E:\Incoming\title_test.mpg


2007-12-16 07:48:27 Using display driver: DX-RGB
2007-12-16 07:48:58 Opening: E:\Incoming\Kate & Allie-101-Allie's First Date-12-04-07.ty_QSF.mpg in QuickStream Fix Mode.
2007-12-16 07:48:59 Bumping mux rate to: 15.000 Mbps to accomodate video bit rate of: 15.000
2007-12-16 07:48:59 Graph monitoring thread started.
2007-12-16 07:48:59 Graph, monitoring thread received terminate signal.
2007-12-16 07:48:59 Graph monitoring thread finished.
2007-12-16 07:48:59 Program Information
File Name: E:\Incoming\Kate & Allie-101-Allie's First Date-12-04-07.ty_QSF.mpg
File Size: 751386624 ( 0.70 GB )
Program Duration: 00:31:49.20
File Type: PS - MPEG2
Encoding: MPEG 2
Video stream Id: xE0
Encoding Dimensions: 480 x 480
Display Size: 480 x 480
Aspect Ratio: 4/3
Frame Rate: 29.97 FPS
Bit Rate: 15.000 Mbps
VBV_Buffer: 224 KB
Profile: Main/Main
Progressive: Prog or Int
Chroma: 4:2:0
Audio Format: Layer 2
Audio Stream Id: xC0
Audio Bit Rate: 192 Kbps
Audio Sampling Rate: 48000 Hz

2007-12-16 07:48:59 Starting new Frame Accurate Output Segment: start:119419.311 (00:01:59.11), end:611113.878 (00:10:11.03)
2007-12-16 07:49:16 Starting new Frame Accurate Output Segment: start:821620.811 (00:13:41.18), end:1345681.044 (00:22:25.20)
2007-12-16 07:49:32 Starting new Frame Accurate Output Segment: start:1586117.878 (00:26:26.04), end:1867101.944 (00:31:07.03)
2007-12-16 07:49:45 Starting new Frame Accurate Output Segment: start:0.000 (00:00:00.00), end:470.511 (00:00:00.14)
2007-12-16 07:49:49 Output complete. Input file: *Joiner*
Output file: D:\0_TV\Test_black.mpg
Mode: Frame Accurate
-Video output packets: 245882
-Audio output packets: 30828
-Padding output packets: 0
Video output frames: 38881
Audio output frames: 54056
Processing time (secs): 46
Processed frames/sec: 837.56
Actual Video Bitrate: 3.06 Mbps

DanR
December 16th, 2007, 11:57 AM
Oops, its a COM problem. Will be fixed in our next beta build.

pwantzel
January 5th, 2008, 06:20 PM
Oops, its a COM problem. Will be fixed in our next beta build.Tried this with build 551, and now it works OK. Thanks.