Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

ExtendScript createSubsequence does not preserve audio tracks

New Here ,
Mar 18, 2025 Mar 18, 2025

Hi - I'm trying to use createSubsequence on an existing sequence to get a sub sequence with specific in and out points. It seems to work fine except that it takes the video track but not all the audio tracks. It takes just one of the audio tracks associated with the original sequence. 

 

Here is my code:

 

// given an actualSequence that exists

actualSequence.setInPoint(sourceIn);
actualSequence.setOutPoint(sourceOut);
 
app.project.createNewSequenceFromClips("actualsequence", actualSequence.projectItem) // just making sure this has all the audio tracks, and it does
 
newSequence = actualSequence.createSubsequence();
app.project.createNewSequenceFromClips("newsequence", newSequence.projectItem) // this has just one audio track along the video track
 
 

 

Am I doing something wrong or is this is a bug? If latter, is there another way to do what I'm trying to achieve - get a subclip with specific in and out points from a given sequence with all video/audio tracks from the original sequence?

 

Thanks!

Nirmal

 
TOPICS
Editing , Error or problem , SDK
132
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , Mar 25, 2025 Mar 25, 2025

Hi Nirmal,
I don’t have a clear understanding of what you’re trying to do. Can you state it again for us - from a user’s perspective?
For example: I want to make a new sequence from media (clips) which are already in a sequence, from in to out points that I set, and which has multiple audio tracks. 

Your effort may be getting confused if one of the sequences is multicam. If you make a subsequence from multicam, it will only use the active camera - and there is no support in extendscript for this.

...
Translate
Adobe Employee ,
Mar 19, 2025 Mar 19, 2025

Hi Nirmal,

Have a look at the sample code here: https://github.com/Adobe-CEP/Samples/blob/9efca02ea88ad32a8c22571f5ffe2407ae732cd8/PProPanel/jsx/PPR...

 

I ran a test where I set in to out points on a clip (ahem, trackItem) with multiple audio tracks. The result did have both audio tracks. Maybe double check that track targeting is on for all audio tracks?

Thanks for posting your question on forums, and developing for Premiere Pro.

 

-Dan

 

Screenshot 2025-03-19 at 10.03.45 AM.pngexpand image

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 19, 2025 Mar 19, 2025

Hi Dan,

 

Thank you for the reply!

 

I tried the code you linked to and I see that the subsequence created (newSequence) does preserve the audio tracks, which is great! I have two follow-up questions:

 

1. I'm trying to create a new sequence from a few such clips/subsequences using the

createNewSequenceFromClips method. When I try the below (with just one subsequence, newSequence), I only get 1 audio track in "newsequence 0" even though newSequence does have all 3 audio tracks:
 
var subsequenceProjectItem = newSequence.projectItem;
app.project.createNewSequenceFromClips("newsequence 0", subsequenceProjectItem)
 
Here's a screenshot of newSequence (which was created using createSubsequence), and the "newsequence 0" sequence that was created from newSequence's projectItem. My hope is to have many projectItems (each corresponding to a sequence created using createSubsequence) to be combined via app.project.createNewSequenceFromClips. Maybe this isn't the best way to do this?
 
ng25550016_0-1742416157530.pngexpand image

 

2. Another issue I'm seeing is that the actualSequence from which newSequence was created behaves a bit differently. When I play actualSequence, I hear audio track A3. But when I play newSequence, even though A3 is present, I do not hear it. Here's a screenshot of the two of them. None of the tracks are muted. The actualSequence clip is multicam so I'm not sure if that's the reason they look/behave different. 

ng25550016_1-1742416436694.pngexpand image

 

Thanks for your help!

Nirmal

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Mar 25, 2025 Mar 25, 2025
LATEST

Hi Nirmal,
I don’t have a clear understanding of what you’re trying to do. Can you state it again for us - from a user’s perspective?
For example: I want to make a new sequence from media (clips) which are already in a sequence, from in to out points that I set, and which has multiple audio tracks. 

Your effort may be getting confused if one of the sequences is multicam. If you make a subsequence from multicam, it will only use the active camera - and there is no support in extendscript for this.

-Dan

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines