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

Auto Reframe in PPro Panel and message "Analyzing for Auto Reframe"

New Here ,
Aug 28, 2023 Aug 28, 2023

Copy link to clipboard

Copied

Hi - I am a bit confused by the following function in PProPanel:

 

autoReframeActiveSequence : function () {
        var seq = app.project.activeSequence;
        if (seq) {
            if (seq.isDoneAnalyzingForVideoEffects()) {
                var numerator       = 1;
                var denominator     = 1;
                var motionPreset    = "default"; // valid values = "default", "faster", and "slower"
                var newName         = seq.name + ", auto-reframed by PProPanel.";
                var useNestedSeqs   = false;

                var newSequence = seq.autoReframeSequence(  numerator,
                                                            denominator,
                                                            motionPreset,
                                                            newName,
                                                            useNestedSeqs);

                if (newSequence) {
                    $._PPP_.updateEventPanel("Created reframed sequence: " + newName + ".");
                } else {
                    $._PPP_.updateEventPanel("Failed to create re-framed sequence: " + newName + ".");
                }
            } else {
                $._PPP_.updateEventPanel("Analysis incomplete; try again later.");
            }
        } else {
            $._PPP_.updateEventPanel("No active sequence.");
        }
    }
 
I am trying to time the "seq.autoReframeSequence" function call. It seems to be returning after creating a reframed sequence. The reframed sequence is created and then I also see a blue progress bar on right bottom saying "Anyalyzing for Auto Reframe". 
 
The "autoReframeSequence" is used without checking isDoneAnalyzingForVideoEffects(). In either case the  blue progress bar on right bottom saying "Anyalyzing for Auto Reframe" appears.
 
How can I include the time of the analysis for Auto Reframe?
 
 
TOPICS
Editing , How to , SDK

Views

678
Translate

Report

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 , Aug 28, 2023 Aug 28, 2023

You could wait to reframe, until isDoneAnalyzingForVideoEffects() is complete, on the original sequence.

Votes

Translate
Adobe Employee ,
Aug 28, 2023 Aug 28, 2023

Copy link to clipboard

Copied

You could wait to reframe, until isDoneAnalyzingForVideoEffects() is complete, on the original sequence.

Votes

Translate

Report

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 ,
Aug 28, 2023 Aug 28, 2023

Copy link to clipboard

Copied

this function 

autoReframeActiveSequence : function () in PPropanel seems to be waiting until isDoneAnalyzingForVideoEffects() is complete.

seq.autoReframeSequence is being called if isDoneAnalyzingForVideoEffects() is true.
 
Am I missing something?

Votes

Translate

Report

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 ,
Aug 28, 2023 Aug 28, 2023

Copy link to clipboard

Copied

Yes, that is correct; you don't seem to be missing anything. 

>How can I include the time of the analysis for Auto Reframe?

I'm not sure I understand that question...?

Votes

Translate

Report

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 ,
Aug 28, 2023 Aug 28, 2023

Copy link to clipboard

Copied

If I put a timer as below:

 

autoReframeActiveSequence : function () {
        var seq = app.project.activeSequence;
        if (seq) {
            var startTime = new Date();
            if (seq.isDoneAnalyzingForVideoEffects()) {
                var numerator       = 1;
                var denominator     = 1;
                var motionPreset    = "default"// valid values = "default", "faster", and "slower"
                var newName         = seq.name + ", auto-reframed by PProPanel.";
                var useNestedSeqs   = false;

 

                var newSequence = seq.autoReframeSequence(  numerator,
                                                            denominator,
                                                            motionPreset,
                                                            newName,
                                                            useNestedSeqs);

 

                if (newSequence) {
                   var endTime = new Date();
                    $._PPP_.updateEventPanel("Created reframed sequence: " + newName + ".");
                } else {
                    $._PPP_.updateEventPanel("Failed to create re-framed sequence: " + newName + ".");
                }
            } else {
                $._PPP_.updateEventPanel("Analysis incomplete; try again later.");
            }
            var totalTimeTaken = endTime - startTime;
        } else {
            $._PPP_.updateEventPanel("No active sequence.");
        }
    }
 
The total time taken doesnt seem right. I can see the blue progress bar on  the right bottom - still going for definitely more than the reported total time taken. The reported time is aroud 90 ms for a 12 min video. And on the left the "folder" like reframed sequence is created earlier, while the progress bar is still going. 

Votes

Translate

Report

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 ,
Aug 28, 2023 Aug 28, 2023

Copy link to clipboard

Copied

Ahhh,  I better understand what you're trying to do now. 

PPro offers no better mechanism for timing that functionality, than the 'time math' you're already performing.

Votes

Translate

Report

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 ,
Aug 30, 2023 Aug 30, 2023

Copy link to clipboard

Copied

Maybe I could get the time taken from the trace logs from the Console that appeasr with Ctrl F12 - What is the location of the logs. Hopefully I could parse the file and get the time taken.

Votes

Translate

Report

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 ,
Aug 30, 2023 Aug 30, 2023

Copy link to clipboard

Copied

Do you see the information you're looking for, in PPro's Console window, now?

Here's PProPanel, saving Console output: https://github.com/Adobe-CEP/Samples/blob/e60d6a22ef44d8eb4cca3904c35a0c050576b697/PProPanel/jsx/PPR...

Votes

Translate

Report

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 ,
Aug 30, 2023 Aug 30, 2023

Copy link to clipboard

Copied

LATEST

Thanks for this pointer. The log is currently not showing the end time. Shows the begining logs. Hopefully I can figure out why I dont see the end time stanp in the log

Votes

Translate

Report

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