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 ProArt Z790-CREATOR WIFI
CPU: Intel Core i9-13900K - Core i9 13th Gen Raptor Lake 24-Core (8P+16E) P-core Base Frequency: 3.0 GHz E-core Base Frequency: 2.2 GHz LGA 1700 125W Intel UHD Graphics 770 Desktop Processor - BX8071513900K
GPU: Currently intel on-die video adapter
RAM: CORSAIR Vengeance 64GB (2 x 32GB) 288-Pin PC RAM DDR5 5600 (PC5 44800) Desktop Memory Model CMK64GX5M2B5600C40
Disk O/S & Programs: WD Black SN850 NVMe SSD WDS100T1X0E - SSD - 1 TB - PCIe 4.0 x4 (NVMe)
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 - iCUE H115i RGB PRO XT 280mm Radiator CPU Liquid Cooling System
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: Realtek S1220A on motherboard. Recording done on another system.
Primary Monitor: ASUS ProArt 31.5" 1440p HDR10 Monitor PA328QV
O/S: Windows 10 Pro 10.0.19045 Build 19045
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 ProArt Z790-CREATOR WIFI
CPU: Intel Core i9-13900K - Core i9 13th Gen Raptor Lake 24-Core (8P+16E) P-core Base Frequency: 3.0 GHz E-core Base Frequency: 2.2 GHz LGA 1700 125W Intel UHD Graphics 770 Desktop Processor - BX8071513900K
GPU: Currently intel on-die video adapter
RAM: CORSAIR Vengeance 64GB (2 x 32GB) 288-Pin PC RAM DDR5 5600 (PC5 44800) Desktop Memory Model CMK64GX5M2B5600C40
Disk O/S & Programs: WD Black SN850 NVMe SSD WDS100T1X0E - SSD - 1 TB - PCIe 4.0 x4 (NVMe)
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 - iCUE H115i RGB PRO XT 280mm Radiator CPU Liquid Cooling System
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: Realtek S1220A on motherboard. Recording done on another system.
Primary Monitor: ASUS ProArt 31.5" 1440p HDR10 Monitor PA328QV
O/S: Windows 10 Pro 10.0.19045 Build 19045
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.