Improved Vegas script
Setting video dimensions from images
This commit is contained in:
parent
667edf9485
commit
372774e024
|
@ -44,12 +44,21 @@ public class EntryPoint {
|
||||||
bool showDialog = false;
|
bool showDialog = false;
|
||||||
Project project = new Project(promptSave, showDialog);
|
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
|
// Set frame rate
|
||||||
if (config.FrameRate < 0.1 || config.FrameRate > 100) {
|
if (config.FrameRate < 0.1 || config.FrameRate > 100) {
|
||||||
throw new Exception("Invalid frame rate.");
|
throw new Exception("Invalid frame rate.");
|
||||||
}
|
}
|
||||||
project.Video.FrameRate = config.FrameRate;
|
project.Video.FrameRate = config.FrameRate;
|
||||||
|
|
||||||
|
// Set other video settings
|
||||||
|
project.Video.FieldOrder = VideoFieldOrder.ProgressiveScan;
|
||||||
|
project.Video.PixelAspectRatio = 1;
|
||||||
|
|
||||||
// Add markers for phones
|
// Add markers for phones
|
||||||
XmlNodeList phoneElements = xmlDocument.SelectNodes("//phone");
|
XmlNodeList phoneElements = xmlDocument.SelectNodes("//phone");
|
||||||
foreach (XmlElement phoneElement in phoneElements) {
|
foreach (XmlElement phoneElement in phoneElements) {
|
||||||
|
|
Loading…
Reference in New Issue