5 Replies Latest reply on Jan 10, 2018 1:14 PM by sberic

    Add Track audio/video to sequence

    jportell25

      It there a way to add a new audio or video track into a sequence?

       

      The way it would be used it to import footage into an existing sequence, but create a new track and import the clip onto that so that nothing would be overwritten?

       

      Is this possible or offered yet?

        • 1. Re: Add Track audio/video to sequence
          andymees@aje Level 3

          You should be able to add tracks using the unsupported and undocumented QE (Quality Engineering) sequence method "addTracks' ... it would be something along the lines of:

           

          app.enableQE();

          var activeSequence = app.project.activeSequence;

          activeSequence.addTracks();

           

          ... though I'm afraid it's not something I've used and I don't know the appropriate arguments needed.

           

          Are you familiar with using reflection to discover properties and methods? The QE DOM is an internal / private API used by Adobe's Quality Engineering team for automated testing purposes. As noted, it's not publicly supported, documented nor recommended ... but theres quite a lot of functionality in there for those willing to dig around.

           

          Good luck.

          Andy

          1 person found this helpful
          • 2. Re: Add Track audio/video to sequence
            Bruce Bullis Adobe Employee

            As Andy points out, the only way to do such track insertion today requires the unsupported QE DOM API.

             

            That will change, with our next major release...

            • 3. Re: Add Track audio/video to sequence
              sberic Level 3

              Bruce Bullis wrote

               

              That will change, with our next major release...

              By my calculations, this "next major release" refers to Premiere Pro CC v12.0, which was released a few months ago. Any word on this? I've added a feature request but would love to close/delete it if the APIs were already available!

               

              [EDIT]

              As andymees@aje points out, this is somewhat manageable through the very unsupported QE [Quality Engineering] DOM. The specific commands to run are:

               

              // Tell Premiere Pro to inject the QE DOM object "qe" into the ExtendScript global environment.
              app.enableQE();
              
              // Grab a reference to the Active Sequence. This is not the standard ActiveSequence type you
              //  typically access in Premiere Pro APIs. It is a QE-specific version with a long list of
              //  custom APIs.
              var seq = qe.project.getActiveSequence();
              
              // Add Track(s) to the Active Sequence. Testing has shown that the integer value passed in
              //  specifies the Number of Video Tracks to add. The API will ALWAYS add one Audio track. You
              //  can add just an audio track by passing in 0. From what I can tell there is no way to add
              //  a video track without also adding the audio track.
              seq.addTracks(0);  // Adds 1 Audio Track and 0 Video Tracks
              seq.addTracks(2);  // Adds 1 Audio Track and 2 Video Tracks
              seq.addTracks(8);  // Adds 1 Audio Track and 8 Video Tracks
              

               

              There may be a way to add a video track without also adding the audio track (or even a way to add a specified number of audio tracks with no video tracks), but I've not divined it. Please note that the above appears to work on Premiere Pro CC v12.0.0. No guarantee that this works in any other version.

              2 people found this helpful
              • 4. Re: Add Track audio/video to sequence
                Bruce Bullis Adobe Employee

                You're right, that next major version has come and gone, and track additions haven't made it into the light of day.

                 

                I was wrong; it remains in the backlog. You now better understand why I usually write "We PLAN to change that in the next version".

                • 5. Re: Add Track audio/video to sequence
                  sberic Level 3

                  https://forums.adobe.com/people/Bruce+Bullis  wrote

                   

                  You now better understand why I usually write "We PLAN to change that in the next version".

                   

                  Hah! I literally thought that I might have missed something because you didn't mention that!

                   

                  I says to myself, I says "That Bruce fellow is usually so careful! So particular! Guess this means that it's already added to internal builds of their 'Next Release' branch..."