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

Replacing myfootage.mov with myfootage.r3d with Extendscript

Explorer ,
Oct 13, 2014 Oct 13, 2014

Copy link to clipboard

Copied

I am testing out a workflow that includes editing RED footage using mov proxies. I need to be able to easily replace mov footage that has an R3D counterpart.  I would need to do this with extendscript, but I don't know if that is even possible.

Thanks,

Miles

TOPICS
SDK

Views

1.3K

Translate

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 , Oct 13, 2014 Oct 13, 2014
// Warning:  assumes the zero-th item in the project is footage.

var item = app.project.rootItem.children[0];
if (item.canChangeMediaPath())
{
var replacement_media = File.openDialog("Choose new media file, for project item " +
item.name,
0,
false);
if (replacement_media != null)
{
item.name = replacement_media.name + ", formerly known as " + item.name;

item.changeMediaPath(replacement_media.fsName);

replacement_media.close();
}
}
else
{
alert("Couldn't change path. replaceMedia() can't act on merged clips,
...

Votes

Translate

Translate
Adobe Employee ,
Oct 13, 2014 Oct 13, 2014

Copy link to clipboard

Copied

// Warning:  assumes the zero-th item in the project is footage.

var item = app.project.rootItem.children[0];
if (item.canChangeMediaPath())
{
var replacement_media = File.openDialog("Choose new media file, for project item " +
item.name,
0,
false);
if (replacement_media != null)
{
item.name = replacement_media.name + ", formerly known as " + item.name;

item.changeMediaPath(replacement_media.fsName);

replacement_media.close();
}
}
else
{
alert("Couldn't change path. replaceMedia() can't act on merged clips, or maybe the zero-th item isn't footage.");
}

Votes

Translate

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
Explorer ,
Oct 24, 2014 Oct 24, 2014

Copy link to clipboard

Copied

Great stuff! You answered so quick, and I'm sorry for not getting back sooner. I wanted to try out the code before replying, but different tasks kept popping up. I still plan on implementing this script, and I just wanted to thank you for it.

Thanks,

Miles

Votes

Translate

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 ,
Oct 24, 2014 Oct 24, 2014

Copy link to clipboard

Copied

No problem—let me know how it goes.

Votes

Translate

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
Explorer ,
Oct 28, 2014 Oct 28, 2014

Copy link to clipboard

Copied

I did notice that replacing 0 in the second parameter to File.openDialog with ["*.mov", "*.r3d"] will show the MOVs and R3Ds.

I have put together a script that finds R3D footage and automatically replaces the footage with MOV footage if it is found in our proxies.

The next step is UI... I'll start another thread for that.

Thanks,

Miles

Votes

Translate

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
Participant ,
Jun 06, 2017 Jun 06, 2017

Copy link to clipboard

Copied

Hi Bruce,

Can we do the relinking or somehow change the linked media path for a merged files with the latest Premiere pro APIs.

Thanks and regards,

Anoop NR

Votes

Translate

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
Enthusiast ,
Jun 06, 2017 Jun 06, 2017

Copy link to clipboard

Copied

For those trying to read over the unfortunately-formatted code in the currently accepted response, perhaps this may be of use:

// Warning:  assumes the zero-th item in the project is footage.

var item = app.project.rootItem.children[0];

if (item.canChangeMediaPath())

{

    var replacement_media = File.openDialog("Choose new media file, for project item " +

                                            item.name,

                                            0,

                                            false);

    if (replacement_media != null)

    {

        item.name = replacement_media.name + ", formerly known as " + item.name;

        item.changeMediaPath(replacement_media.fsName);

        replacement_media.close();

    }

}

else

{

    alert("Couldn't change path. replaceMedia() can't act on merged clips, or maybe the zero-th item isn't footage.");

}

Votes

Translate

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
Participant ,
Jun 06, 2017 Jun 06, 2017

Copy link to clipboard

Copied

Hi,

Would like to know if there is any possible way we can change the media for the merged clips, in the latest Premiere API

Bruce reply came back in 2014, hope there is some work around for this by now.

Thanks and Regards,

Anoop NR

Votes

Translate

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 ,
Jun 06, 2017 Jun 06, 2017

Copy link to clipboard

Copied

LATEST

Still not possible, but API feature request B-124601 ("Allow for footage replacement within merged clips") is climbing up the backlog.

Votes

Translate

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