How to get information about project media?

WHE wrote on 11/3/2022, 8:20 PM

I know a little about scripting for Sound Forge but nothing at all about scripting for Vegas. How would I go about creating a script to send the file names of all mp4 files used in project media either to the clipboard or to a text file? I searched through the scripting forum and found a script from 2003 but it was way too old to work. Are there any modern examples of scripts focusing on project media? Thanks in advance.

Comments

john_dennis wrote on 11/3/2022, 8:42 PM

@WHE

Quite a lot of information is available in the Edit Details window.

 

My main system:
Motherboard: Asus X99-AII
CPU: Intel i7-6850K
GPU: Sapphire Radeon RX480-8GB
RAM: Corsair Dominator (4 x 4 GB) DDR4 2400
Disk O/S & Programs: Intel SSD 750 (400 GB)
Disk Active Projects: 1TB & 2TB WD BLACK SN750 NVMe Internal PCI Express 3.0 x4 Solid State Drives
Disk Other: WD Ultrastar/Hitachi Hard Drives: WDBBUR0080BNC-WRSN, HGST HUH728080ALE600, 724040ALE640, HDS3020BLA642
Case: LIAN LI PC-90 Black Aluminum ATX Full Tower Case
CPU cooling: Corsair Hydro series H115i
Power supply: SeaSonic SS-750KM3 750W 80 PLUS GOLD Certified Full Modular Active PFC Power Supply
Drive Bay: Kingwin KF-256-BK 2.5" and 3.5" Trayless Hot Swap Rack with USB 3
Sound card: Crystal Sound 3 on motherboard. Recording done on another system.
Primary Monitor: Asus ProArt PA248q (24" 1920 x 1200)
O/S: Windows 10 Pro 22H2, Build 19045.2130

Camera: Sony RX10 Model IV

https://www.youtube.com/user/thedennischannel

WHE wrote on 11/3/2022, 9:58 PM

Thanks for the reply, John. Edit details doesn't seem to show the project media. I want to create a list of all media programmatically regardless of whether it is being used or not.

john_dennis wrote on 11/3/2022, 11:03 PM

@WHE

Fixing the old script might be as simple as changing the name space for Magix instead of Sonic Foundry or Sony.

Worth a try.

Look at this: https://www.vegascreativesoftware.info/us/forum/zoom-tools-do-not-work-4me-on-vp19--137814/#ca862082

Also, look here for more help. http://www.jetdv.com/

My main system:
Motherboard: Asus X99-AII
CPU: Intel i7-6850K
GPU: Sapphire Radeon RX480-8GB
RAM: Corsair Dominator (4 x 4 GB) DDR4 2400
Disk O/S & Programs: Intel SSD 750 (400 GB)
Disk Active Projects: 1TB & 2TB WD BLACK SN750 NVMe Internal PCI Express 3.0 x4 Solid State Drives
Disk Other: WD Ultrastar/Hitachi Hard Drives: WDBBUR0080BNC-WRSN, HGST HUH728080ALE600, 724040ALE640, HDS3020BLA642
Case: LIAN LI PC-90 Black Aluminum ATX Full Tower Case
CPU cooling: Corsair Hydro series H115i
Power supply: SeaSonic SS-750KM3 750W 80 PLUS GOLD Certified Full Modular Active PFC Power Supply
Drive Bay: Kingwin KF-256-BK 2.5" and 3.5" Trayless Hot Swap Rack with USB 3
Sound card: Crystal Sound 3 on motherboard. Recording done on another system.
Primary Monitor: Asus ProArt PA248q (24" 1920 x 1200)
O/S: Windows 10 Pro 22H2, Build 19045.2130

Camera: Sony RX10 Model IV

https://www.youtube.com/user/thedennischannel

jetdv wrote on 11/4/2022, 8:57 AM

jetdv wrote on 11/4/2022, 8:58 AM

WHE wrote on 11/4/2022, 9:40 PM

Thanks very much, jetdv. The videos you linked to are interesting but beyond my current needs. I found this video on your website:

And from this came up with the following code:

using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using ScriptPortal.Vegas;namespace ListWavFiles
{
    public class EntryPoint
    {
        public Vegas myVegas;
        public string files = "";
       public void FromVegas(Vegas vegas)
        {
           myVegas = vegas;
         foreach (Media media in myVegas.Project.MediaPool)
         {
            if (media.FilePath.Contains(".wav"))
            files += media.FilePath + Environment.NewLine;
         }
         MessageBox.Show(files);
         System.Windows.Forms.Clipboard.SetText(files);
        }      
    }
}

 

jetdv wrote on 11/5/2022, 8:14 AM

The files I linked to were examples I thought was close to what you were requesting. I would recommend that you start at the beginning on my site as everything builds from the very beginning videos.