"I need a script that can freely adjust the fps and resolution.

YOUNHEE-LEE wrote on 11/29/2024, 7:19 AM

And I also... really want to write a script that renders with my own unique fps and resolution. How should I modify the script below to do this? Which API should I look at? Many people have recommended Voukoder, but currently, I need a script Honestly, I'm not very familiar with looking through APIs, so I'm currently getting help from chatGPT. Sometimes it seems to hallucinate.

 

// Finding MP4 Renderer with FPS=12 and Resolution 720x300 Template
foreach (Renderer renderer in myVegas.Renderers)
{
    if (renderer.FileTypeName.Contains("MP4") || renderer.FileTypeName.Contains("AVC"))
    {
        foreach (RenderTemplate template in renderer.Templates)
        {
            // Check if the template is valid
            if (!template.IsValid())
            {
                continue;
            }

            // Finding a template with FPS of 12 and resolution of 720x300
            if (template.VideoFrameRate == 12 && template.VideoWidth == 720&& template.VideoHeight == 300)
            {
                mp4Renderer = renderer;
                mp4Template = template;
                break;
            }
        }
    }
    if (mp4Renderer != null && mp4Template != null)
    {
        break;
    }
}

// "Add to SelectedTemplates after setting the renderer and template
if (mp4Renderer != null && mp4Template != null)
{
    SelectedTemplates.Add(new RenderItem(mp4Renderer, mp4Template, mp4Template.FileExtensions[0]));
    DoMySpRender(SelectedTemplates, outputFilePath, renderMode);
}
else
{
    // Handle cases where the desired renderer and template are not found
    MessageBox.Show("MP4 renderer or template with FPS=12 and resolution 720x300 not found.");
}

Comments

jetdv wrote on 11/29/2024, 9:22 AM

As you were previously told, you need to manually create a render template with your specifications. Once you have that created, then the script should be able to find it. But you have to manually create it.

In your other link (I now see three on this same topic) you were also recommended:

https://www.vegascreativesoftware.info/us/forum/will-this-be-ok--147889/#ca930049

 

You need to put all other questions and responses related to this topic in your original thread:

https://www.vegascreativesoftware.info/us/forum/will-this-be-ok--147889/