From 372774e02490d56d13c9f48732eda3aa8e4da007 Mon Sep 17 00:00:00 2001 From: Daniel Wolf Date: Thu, 18 Feb 2016 21:31:43 +0100 Subject: [PATCH] Improved Vegas script Setting video dimensions from images --- extras/VegasImport/Import Rhubarb.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/extras/VegasImport/Import Rhubarb.cs b/extras/VegasImport/Import Rhubarb.cs index 7461760..15b2699 100644 --- a/extras/VegasImport/Import Rhubarb.cs +++ b/extras/VegasImport/Import Rhubarb.cs @@ -44,12 +44,21 @@ public class EntryPoint { bool showDialog = false; Project project = new Project(promptSave, showDialog); + // Set frame size + Bitmap testImage = new Bitmap(config.OneImageFile); + project.Video.Width = testImage.Width; + project.Video.Height = testImage.Height; + // Set frame rate if (config.FrameRate < 0.1 || config.FrameRate > 100) { throw new Exception("Invalid frame rate."); } project.Video.FrameRate = config.FrameRate; + // Set other video settings + project.Video.FieldOrder = VideoFieldOrder.ProgressiveScan; + project.Video.PixelAspectRatio = 1; + // Add markers for phones XmlNodeList phoneElements = xmlDocument.SelectNodes("//phone"); foreach (XmlElement phoneElement in phoneElements) {