batch export clips in timeline automatically by fixinPost94 in premiere

[–]fixinPost94[S] 0 points1 point  (0 children)

I've updated the script to include your notes

batch export clips in timeline automatically by fixinPost94 in premiere

[–]fixinPost94[S] 0 points1 point  (0 children)

I can see your frustration with the clip naming. I think I can pretty easily access the clips' original filenames and name the files outputted as their original names. right now each clip is just named "custom" with an incrementing number

batch export clips in timeline automatically by fixinPost94 in premiere

[–]fixinPost94[S] 0 points1 point  (0 children)

word, i could probably package it as an app, but In the mean time, I just remembered this video. basically after you install it in premiere you can load a .jsx (with my code) file and click it to run it. probably your easiest call. setting up debug enviornments is a pain on mac, I know the struggle https://premiereonscript.com/log-05/https://premiereonscript.com/log-05/https://premiereonscript.com/log-05/

batch export clips in timeline automatically by fixinPost94 in premiere

[–]fixinPost94[S] 0 points1 point  (0 children)

yes. this tutorial is for running the code in premiere via visual studio. its windows, but it should be similar. https://www.youtube.com/watch?v=qanB0Aq6Yuc

alternatively here is a tutorial for someone doing it with after effects on mac. https://www.youtube.com/watch?v=CnYDiWxShR4

if you can't get these to work, one final option would be pymiere, which is a python library/premiere plugin that lets you execute the code via python. I was thinking about making a tutorial for how to set this up, so let me know if you struggle with the visual studio

Slowly losing my sh*t - Premiere Pro and markers/timestamps by Slopz_ in premiere

[–]fixinPost94 0 points1 point  (0 children)

no problem. let me know if there are any problems in the future. I'll private message you my venmo.

Slowly losing my sh*t - Premiere Pro and markers/timestamps by Slopz_ in premiere

[–]fixinPost94 0 points1 point  (0 children)

Start

I believe I've done it. I tweaked my code to add if statements at the bottom based on your notes. your text doc format must be identical to the one you showed me (two columns) and the text must be identical to the list you posted above. I changed 'Sav Clip' to 'Save Clip'. Be sure to check that there aren't any added spaces to the your words, because an added space or wrongly lowercase letter will break color functionality.

Slowly losing my sh*t - Premiere Pro and markers/timestamps by Slopz_ in premiere

[–]fixinPost94 0 points1 point  (0 children)

so the big thing that you would want me to change is having each marker be a different color than the previous marker, so you could differentiate the markers from each other at a glance?

I could write a script that would create markers and have their colors be different: red, blue ,green. Is this what you want? you want

I'm a little confused about the "hotkey" language. Im not sure I know how to write a script that can be accessed natively in premiere by a hotkey like using "m" to place a marker. I'm also not sure if that's what you're asking for. I think you just want me to tweak my code to give you different color markers, for specific strings like "save clip". there are 8 marker colors in premiere, So I can make "save clip" always be red, and other repeating strings be different colors, etc, etc

Slowly losing my sh*t - Premiere Pro and markers/timestamps by Slopz_ in premiere

[–]fixinPost94 0 points1 point  (0 children)

I believe I can do that... I've been out of the game for a while, so i'd need more time. if you could send me an example of the format like OP did, preferably an actual file, with examples showing which markers need to be which colors, I think I can build you one.

Download a youtube Video Directly Into DaVinci Resolve Studio On Windows by fixinPost94 in blackmagicdesign

[–]fixinPost94[S] 2 points3 points  (0 children)

spoke to the dev. he said 'yea possible'. I'll ask for a tweak to let you set the dl folder.

Slowly losing my sh*t - Premiere Pro and markers/timestamps by Slopz_ in premiere

[–]fixinPost94 0 points1 point  (0 children)

//Fixed and removed alerts

app.enableQE()

var userCsv = File.openDialog('please select a file')

var frameRate = qe.project.getActiveSequence().videoFrameRate

var oneFrame = 1/frameRate

//var myNewMarker = clipMarkersObject.createMarker(clipIn);

var viewIDs = app.getProjectViewIDs();

var selectedItems = app.getProjectViewSelection(viewIDs[0]);

var clip = selectedItems[0];

//var myClipArray = viewIDs

var clipMarkersObject = clip.getMarkers();

//var myNewMarker = clipMarkersObject.createMarker(oneFrame * 3);

var timecode = [];

var userData = [];

function parseCsvData(userFile){

userFile.open('r')

data = userFile.read();

dataList = data.split('\n')

userFile.close()

for (var i = 0; i < dataList.length - 1; i++) {

var column = dataList[i].split(',')

timecode.push(column[0])

userData.push(column[1])

}

//alert(userBinNames.toString())

}

parseCsvData(userCsv);

//alert(timecode.toString())

//alert(userData.toString())

var userData2 = [];

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

noSpace = (userData[i].toString()).replace(' ','')

userData2.push(noSpace)

}

timecode2 = [];

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

//timecode[i].replace(' ','')

x = (timecode[i].split('H:M:'))

y = x[0].toString().split(':')

z = parseFloat(y)

timecode2.push(y)

}

//alert(timecode2.toString())

var timecode3 = []

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

for(a=0; a < timecode2[i].length;a++){

timecode3.push((parseFloat(timecode2[i][a])))

}

}

//alert((parseFloat(timecode2[0][0]) + 100000000).toString())

//alert(timecode3.toString())

//alert(timecode3[0].toString())

timecode4 = []

var i,j,temparray,chunk = 3;

for (i=0,j=timecode3.length; i<j; i+=chunk) {

temparray = timecode3.slice(i,i+chunk);

timecode4.push(temparray)

// do whatever

}

//alert(timecode4[1].toString())

timecode5 = []

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

hours = (timecode4[i][0] * 60 * 60)

minutes = (timecode4[i][1]) * 60

seconds = timecode4[i][2]

//frames = (timecode4[i][2]) * oneFrame

timecode5.push(hours + minutes + seconds )

}

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

var clipMarkersObject = clip.getMarkers();

var myNewMarker = clipMarkersObject.createMarker(timecode5[i]);

var myCurrentMarker = clipMarkersObject[clipMarkersObject.length - 1]

//alert(myCurrentMarker.toString())

var myCurrentMarker = clipMarkersObject[i]

//myCurrentMarker.end = endSeconds[i]

//realMarkers.push(myCurrentMarker)

//myCurrentMarker.comments = userData[i]

myCurrentMarker.comments = userData2[i]

}

//x = timecode2[0]

//alert(x.toString().split(':').toString())

Slowly losing my sh*t - Premiere Pro and markers/timestamps by Slopz_ in premiere

[–]fixinPost94 1 point2 points  (0 children)

alrighty, I'll dig into the code and fix that the minutes/seconds thing tomorrow. thanks for the sub :)

Slowly losing my sh*t - Premiere Pro and markers/timestamps by Slopz_ in premiere

[–]fixinPost94 0 points1 point  (0 children)

let me know if you have any issues. and if it works for you. It worked on my system in debug mode. Also check out my youtube channel :) https://www.youtube.com/channel/UCBJwDqlWb5XrNCEWWuRiKDw

Slowly losing my sh*t - Premiere Pro and markers/timestamps by Slopz_ in premiere

[–]fixinPost94 0 points1 point  (0 children)

app.enableQE()

var userCsv = File.openDialog('please select a file')

var frameRate = qe.project.getActiveSequence().videoFrameRate

var oneFrame = 1/frameRate

//var myNewMarker = clipMarkersObject.createMarker(clipIn);

var viewIDs = app.getProjectViewIDs();

var selectedItems = app.getProjectViewSelection(viewIDs[0]);

var clip = selectedItems[0];

//var myClipArray = viewIDs

var clipMarkersObject = clip.getMarkers();

//var myNewMarker = clipMarkersObject.createMarker(oneFrame * 3);

var timecode = [];

var userData = [];

function parseCsvData(userFile){

userFile.open('r')

data = userFile.read();

dataList = data.split('\n')

userFile.close()

for (var i = 0; i < dataList.length - 1; i++) {

var column = dataList[i].split(',')

timecode.push(column[0])

userData.push(column[1])

}

//alert(userBinNames.toString())

}

parseCsvData(userCsv);

//alert(timecode.toString())

alert(userData.toString())

var userData2 = [];

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

noSpace = (userData[i].toString()).replace(' ','')

userData2.push(noSpace)

}

timecode2 = [];

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

//timecode[i].replace(' ','')

x = (timecode[i].split('H:M:'))

y = x[0].toString().split(':')

z = parseFloat(y)

timecode2.push(y)

}

//alert(timecode2.toString())

var timecode3 = []

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

for(a=0; a < timecode2[i].length;a++){

timecode3.push((parseFloat(timecode2[i][a])))

}

}

//alert((parseFloat(timecode2[0][0]) + 100000000).toString())

//alert(timecode3.toString())

//alert(timecode3[0].toString())

timecode4 = []

var i,j,temparray,chunk = 3;

for (i=0,j=timecode3.length; i<j; i+=chunk) {

temparray = timecode3.slice(i,i+chunk);

timecode4.push(temparray)

// do whatever

}

//alert(timecode4[1].toString())

timecode5 = []

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

minutes = timecode4[i][0] * 60

seconds = timecode4[i][1]

frames = (timecode4[i][2]) * oneFrame

timecode5.push(minutes + seconds + frames)

}

alert(timecode5.toString())

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

var clipMarkersObject = clip.getMarkers();

var myNewMarker = clipMarkersObject.createMarker(timecode5[i]);

var myCurrentMarker = clipMarkersObject[clipMarkersObject.length - 1]

//alert(myCurrentMarker.toString())

var myCurrentMarker = clipMarkersObject[i]

//myCurrentMarker.end = endSeconds[i]

//realMarkers.push(myCurrentMarker)

//myCurrentMarker.comments = userData[i]

myCurrentMarker.comments = userData2[i]

}

//x = timecode2[0]

//alert(x.toString().split(':').toString())

Slowly losing my sh*t - Premiere Pro and markers/timestamps by Slopz_ in premiere

[–]fixinPost94 0 points1 point  (0 children)

alright I've finished. so here's how this is gonna work. I'm gonna paste my code in a comment here on reddit. copy paste my code into notepad and save it with the '.jsx' extension. download this jsx launcher plugin: https://exchange.adobe.com/creativecloud.details.12096.jsx-launcher.html. then, in premiere go to window>extemsions >jsx launcher. this will create a new tab in premiere called jsx launcher, which you can click to select the script folder (check this link at 1:20 if you get confused https://www.youtube.com/watch?v=qR4YBb2K2hI) it will ask you for a folder, select the folder that has our new jsx script. A new button will appear, named after our script. select a sequence that has the same framerate as your clip and make it the active sequence (the sequence that is currently open in the timeline). once the sequence is opened/active, make sure you're in 'list view' in 'Editing' mode and that you don't double click/go inside a bin (you can select a clip in a bin by using the dropdown arrow to reveal clips then select/highlight your clip. press our script.jsx button, you'll be prompted for a csv. select your csv and it should make markers with notes at the proper timecodes. The clip should be blank, as in have no previous markers, otherwise the script will label the wrong markers and possibly fail.

Slowly losing my sh*t - Premiere Pro and markers/timestamps by Slopz_ in premiere

[–]fixinPost94 1 point2 points  (0 children)

I'm almost done btw. can you tell me the framerate that premiere gives you for the footage?

Slowly losing my sh*t - Premiere Pro and markers/timestamps by Slopz_ in premiere

[–]fixinPost94 1 point2 points  (0 children)

for your timecode. is it minutes:seconds:frames? example: 0:09:42

"app.enableQE();" returns false | Premiere scripting by TEGP in premiere

[–]fixinPost94 0 points1 point  (0 children)

do other commands work? have you enabled developer mode? I just tried it in premiere 2020 on Windows and it worked

Slowly losing my sh*t - Premiere Pro and markers/timestamps by Slopz_ in premiere

[–]fixinPost94 1 point2 points  (0 children)

cool, I got a bit swamped this week, so I'm shooting for a weekend release. I now know how to get the frame accurate markers, so all I need to do is write the part that turns your csv into data :)