How to Split a Video to Multiple Video files??

didigo182 wrote on 12/1/2023, 11:44 PM

I basically want to divide (split) a video of (Ex: 30:00 minutes) into 30 videos of 1:00 minute??

I know there is an ADD ON that does this but I don't remember the name. Is there a way or command for this to be done?

Thanks anyway.

Comments

Former user wrote on 12/2/2023, 7:33 AM

@didigo182 There's a script that will let you split a video on the timeline, the second comment by @jetdv. you'll have to change the setting to 1min,

https://www.vegascreativesoftware.info/us/forum/cutting-a-clip-in-equal-parts--137502/#ca860044

didigo182 wrote on 12/2/2023, 6:31 PM

@didigo182 There's a script that will let you split a video on the timeline, the second comment by @jetdv. you'll have to change the setting to 1min,

https://www.vegascreativesoftware.info/us/forum/cutting-a-clip-in-equal-parts--137502/#ca860044

 

Thanks!

How i can install this script?

Former user wrote on 12/2/2023, 6:44 PM

@didigo182 Hi, have a look at this comment by nickhope https://www.vegascreativesoftware.info/us/forum/batch-render-regions-to-filenames--94424/?page=2#ca898326 it mentions putting the script in the Documents folder, I'm fairly new to scripts so I don't want to give you the wrong information, @jetdv is the man to ask or @NickHope.

didigo182 wrote on 12/2/2023, 7:12 PM

@didigo182 Hi, have a look at this comment by nickhope https://www.vegascreativesoftware.info/us/forum/batch-render-regions-to-filenames--94424/?page=2#ca898326 it mentions putting the script in the Documents folder, I'm fairly new to scripts so I don't want to give you the wrong information, @jetdv is the man to ask or @NickHope.

 

Thanks!

I Remembered the Plugin who do this too. Is called "Vengasaur". But cost 100U$$!! Very expensive.

Former user wrote on 12/2/2023, 7:46 PM

@didigo182 Ok, I just tried to change the script I put the link to, changed the settings to 01.00.00 (1min), it did cut the clip into 1min sections but only the video, not the audio, sorry I have no idea how to make it cut the audio also 🤷‍♂️🤔

This that script.

/**
* Program: SplitEvents - 1min.js
* Description: This script will split selected event into pieces for specified seconds
* Author: Philip
*
* Date: August 24, 2003
**/

import ScriptPortal.Vegas;
import System.Windows.Forms;
import Microsoft.Win32;

//time intervals for split events.
var Interval = "01:00:00";
try
{
    var IncTime : Timecode = new Timecode(Interval);// step through all selected video events:
    for (var track in Vegas.Project.Tracks) {
        for (var evnt in track.Events) {
            if (!evnt.Selected || evnt.MediaType != MediaType.Video)
                continue;
            evnt.Split(IncTime);
        }
    }
}
catch (errorMsg)
{
    MessageBox.Show(errorMsg, "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}

didigo182 wrote on 12/2/2023, 7:54 PM

@didigo182 Ok, I just tried to change the script I put the link to, changed the settings to 01.00.00 (1min), it did cut the clip into 1min sections but only the video, not the audio, sorry I have no idea how to make it cut the audio also 🤷‍♂️🤔

This that script.

/**
* Program: SplitEvents - 1min.js
* Description: This script will split selected event into pieces for specified seconds
* Author: Philip
*
* Date: August 24, 2003
**/

import ScriptPortal.Vegas;
import System.Windows.Forms;
import Microsoft.Win32;

//time intervals for split events.
var Interval = "01:00:00";
try
{
    var IncTime : Timecode = new Timecode(Interval);// step through all selected video events:
    for (var track in Vegas.Project.Tracks) {
        for (var evnt in track.Events) {
            if (!evnt.Selected || evnt.MediaType != MediaType.Video)
                continue;
            evnt.Split(IncTime);
        }
    }
}
catch (errorMsg)
{
    MessageBox.Show(errorMsg, "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}

 

It worked here! Thanks!

 

Have the same function of Vengasaur, but it's FREE!

didigo182 wrote on 12/2/2023, 7:55 PM

About the audio don't worry i will not use.

Former user wrote on 12/2/2023, 8:06 PM

@didigo182 Good, glad that will work for you 👍 It's customary to mark the comment who gave you the solution not your own comment 😉

Former user wrote on 12/2/2023, 8:08 PM

@didigo182 Thanks 😁👍

jetdv wrote on 12/2/2023, 8:39 PM

@Former user, look at this line:

  if (!evnt.Selected || evnt.MediaType != MediaType.Video)
                continue;

That says "skip this event IF it is not selected or it is not video. If you want it to process the audio too, just change it to:

  if (!evnt.Selected)
                continue;

 

Former user wrote on 12/2/2023, 8:59 PM

@jetdv Thanks but I changed that & the script works as it did before, only the video is cut, have i got it wrong?

Ah! Sorry my mistake, I only had the video selected (highlighted yellow), I thought that if one was selected because they're grouped they both were selected, with the cursor I lassoed both video & audio highlighting them both yellow & it cut both 🤸‍♂️🤸‍♂️🤸‍♂️😁

Thankyou very much 👍

jetdv wrote on 12/2/2023, 9:14 PM

@Former user It worked for me. Make sure the audio is also SELECTED. Or totally get rid of:

if (!evnt.Selected || evnt.MediaType != MediaType.Video) 
    continue;

and then it will work on everything whether or not it's selected.

Former user wrote on 12/2/2023, 9:17 PM

@jetdv Updated my comment, looking at the time it was as you were typing, thankyou again 👍👍