Quantcast
Channel: Adobe Community : Popular Discussions - Premiere Pro SDK
Viewing all articles
Browse latest Browse all 53010

Script to enable/disable audio/videotracks

$
0
0

Hi,

 

Trying this:

 

function SwitchOffVideoOutput (vtracks,activeSeq)

    {

       var active_seq = activeSeq;

       var videotracks = active_seq.videoTracks;

  

       alert("numTracks: "+ videotracks.numTracks);

       

       track = vtracks.split("|");

  

       for (i=0; i <= track.length; i++) {

 

      alert("Switching off: "+ track[i]);

 

      // Would like to do something like this:

      // videotracks[track].enabled=false;

      // videotracks[track].output=false;

 

      }

 

      // Renaming sequence from A to B

      tmp = active_seq.name;

      tmp = tmp.replace("_A","_B");

      alert(tmp);

      //active_seq.name = tmp;

           

}

 

SwitchOffVideoOutput ("2|3|4",app.project.activeSequence);

 

// But also would like to do this:

 

var myColl = app.project.selection;

for (i=0; i <= myColl.length; i++) {//loop through the project

     alert(myColl.name)

     SwitchOffVideoOutput ("2|3|4",myColl.name);

}

 

// SwitchOffVideoOutput and rename selection in Premiere Pro


Viewing all articles
Browse latest Browse all 53010

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>