Best way to create/export subtitles for YouTube?

Heidi-Hansen wrote on 4/8/2025, 9:28 PM

Hi,

I've spent many hours creating subtitles for my video, assuming I could go to Tools > Scripting and then export the subtitles in a format suitable for YouTube, etc.

However, nothing happens when I try to export, and I now realize that I might need a third-party plugin to do this?

Is there a way to add a different kind of text box and copy each subtitle manually – one by one – or is there a better workaround?

And for future projects, what is the recommended way to create and export subtitles properly?

Thanks in advance!

Comments

RogerS wrote on 4/9/2025, 12:20 AM

Personally I use Vegasaur for this. I assume it is using a script so if you can write your own that would work. Using Vegasaur it can also import subtitles, edit the look of subtitles in batch, etc.

If the subtitles are based on voice using speech to text (VEGAS comes with this these days though there are character limits) or a third-party program can save a lot of time! I use this program and recommend it. It does the processing locally (using a NVIDIA GPU if you have one) so there are no usage limits.

Another option is to do subtitling outside VEGAS using a tool like SubtitleEdit and then import the finished titles into VEGAS.

Heidi-Hansen wrote on 4/10/2025, 9:02 PM

Thanks @RogerS I do have SubtitleEdit - but this time I just went for the subtitles directly in Vegas. Naive of me! 😄

RogerS wrote on 4/10/2025, 11:14 PM

A few of us have made such a feature request so maybe it will be added to VEGAS natively some day.

Fu-Ji wrote on 4/13/2025, 10:32 PM

As far as I can remember, this is a request that has been made for more than five years.

m3lquixd wrote on 4/14/2025, 10:42 AM

@Heidi-Hansen here is a script to export subtitles to SRT file made by @jetdv

using System;
using System.Collections.Generic;
using System.Collections;
using System.IO;
using System.Text;
using System.Windows.Forms;
using System.Globalization;
using System.Drawing;
using System.Runtime;
using System.Xml;
using ScriptPortal.Vegas;

namespace Test_Script
{
    public class Class1
    {
        public Vegas myVegas;
        public static FileStream OutStream;
        public static StreamWriter OutWriter;

        public void Main(Vegas vegas)
        {
            myVegas = vegas;

            int Counter = 1;

            SaveFileDialog ofd = new SaveFileDialog();
            ofd.Filter = "SRT File (*.srt)|*.srt|All Files (*.*)|*.*";
            ofd.Title = "SRT File Location & Name";
            DialogResult dr = ofd.ShowDialog();
            if (dr == System.Windows.Forms.DialogResult.OK)
            {
                string filename = ofd.FileName;

                OutStream = new FileStream(filename, FileMode.OpenOrCreate);
                OutWriter = new StreamWriter(OutStream);

                RulerFormat saveFormat = myVegas.Project.Ruler.Format;
                myVegas.Project.Ruler.Format = RulerFormat.Time;

                foreach (Track myTrack in myVegas.Project.Tracks)
                {
                    if (myTrack.IsVideo())
                    {
                        foreach (TrackEvent evnt in myTrack.Events)
                        {
                            if (evnt.Selected && evnt.ActiveTake.Media.IsGenerated())
                            {
                                VideoEvent vevnt = (VideoEvent)evnt;
                                Effect gEffect = vevnt.ActiveTake.Media.Generator;

                                if (gEffect.PlugIn.UniqueID == "{Svfx:com.vegascreativesoftware:titlesandtext}")
                                {
                                    OFXEffect ofx = gEffect.OFXEffect;
                                    OFXStringParameter tparm = (OFXStringParameter)ofx.FindParameterByName("Text");

                                    RichTextBox rtfText = new RichTextBox();
                                    rtfText.Rtf = tparm.Value;
                                    string SubTitle = rtfText.Text;

                                    string startTime = evnt.Start.ToString().Replace('.', ',');
                                    string endTime = evnt.End.ToString().Replace('.', ',');
                                    string times = startTime.Trim() + " --> " + endTime.Trim();

                                    OutWriter.WriteLine(Counter.ToString().Trim());
                                    OutWriter.WriteLine(times);
                                    OutWriter.WriteLine(SubTitle);
                                    OutWriter.WriteLine(""); //blank line

                                    Counter++;
                                }
                            }
                        }
                    }
                }
                myVegas.Project.Ruler.Format = saveFormat;

                OutWriter.Close();
                OutStream.Close();
            }
        }
    }
}

public class EntryPoint
{
    public void FromVegas(Vegas vegas, string scriptFile, XmlDocument scriptSettings, ScriptArgs args)
    {
        Test_Script.Class1 test = new Test_Script.Class1();
        test.Main(vegas);
    }
}

Just select all text events and run the script, then it will save to an srt file.

Last changed by m3lquixd on 4/14/2025, 10:46 AM, changed a total of 1 times.

About me:
Hi! Melqui Calheiros Here. I've been using Vegas as my only video editor for over 10 years. I edit professionally for various influencers, public bodies and small businesses. My goal is to squeeze Vegas to the fullest! And end the prejudice that software has here in Brazil.

⬇️ Some of my jobs. ⬇️
https://www.vegascreativesoftware.info/us/forum/post-your-vegas-creations--109464/?page=37#ca872169

PC Specs:
Operating System:
    Windows 11 Pro 64-bit
CPU:
    AMD Ryzen 7 5700G 3.80 GHz
RAM:
    32,0GB Dual-Channel DDR4 3200MHz
Motherboard:
    ASRock B450M Steel Legend (AM4)
Graphics:
    MSI RTX 4060 Ventus 2X Black OC 8GB
Storage:
    476GB ADATA SU650 (SATA (SSD))
    931GB KINGSTON SNV2S1000G (SATA-2 (SSD))

jetdv wrote on 4/14/2025, 10:45 AM

The tutorial for the script above comes out next week - April 21, 2025.

RogerS wrote on 4/14/2025, 11:12 PM

Great work jetdv!

Heidi-Hansen wrote on 4/17/2025, 7:00 AM

The tutorial for the script above comes out next week - April 21, 2025.

I look forward to that :-) Thanks a lot!