e_d_
Engaged
e_d_
Engaged
Activity
May 25, 2017
04:52 AM
Hey Meet, if you do it like so: var res = window.cep.fs.stat('AbsolutePathForMyItemtoCheck'); if (res.err == 0) { alert ("Found file: "+res.data.isFile()+" :: Found folder: "+res.data.isDirectory()); } else { alert ("Error: "+res.err); } you'll get (unambiguous) data when there is a file or folder, and and error when nothing has been found, the error being either 1: ERR_UNKNOWN 2: ERR_INVALID_PARAMS 3: ERR_NOT_FOUND
... View more
May 23, 2017
10:49 PM
sberic schrieb ProjectItem.createBin/deleteBin probably don't work on ProjectItems with type CLIP or FILE. ProjectItem.createSubClip probably only works on ProjectItems with type CLIP. ProjectItem.setOverridePixelAspectRatio probably only works on ProjectItems with type CLIP. Also, this is probably restricted to video clips. ProjectItem.children is, according to the documentation, "only valid for bins". That said, it is also valid for the ROOT ProjectItem. Well this doesn't counter what I have said, does it? 😉 My (incomplete) test run makes me think all projectItems are created equal but depending on their type some methods and properties will not be available, or return false or null (undefined).
... View more
May 23, 2017
08:10 AM
Yes. (If I was trying to be cheeky I'd stop right here.) I do it like so: Win: window.cep.process.createProcess('C:\\Windows\\explorer.exe','yourAbsoluteFolderPathAsString') Mac: window.cep.process.createProcess('/usr/bin/open','yourAbsoluteFolderPathAsString')
... View more
May 23, 2017
06:47 AM
Hi, check this out: CC Extension SDK manual Quote: IsDirectory() Reports whether an item in the file system is a file or folder. IsDirectory(path) [window.cep.fs.IsDirectory(yourFileOrDirectory)] RETURNS: An object with these properties: data: An object with these properties: — isFile: (Boolean) True if the item is a file. — isDirectory: (Boolean) True if the item is a folder. — mtime: (DateTime) The modification timestamp of the item. err: The status of the operation, one of: NO_ERROR ERR_UNKNOWN ERR_INVALID_PARAMS ERR_NOT_FOUND Does this work for you?
... View more
May 22, 2017
11:00 PM
I'm only assuming that my "projectItem is a rootItem" because I'm accessing it through the standard app.project.rootItem approach. I'm trying to get a better understanding of the project hierarchy - What are each of the node types? What ProjectItem APIs work with which types? How is the ROOT type different/related to the other types? Now I get it. rootItem is a special projectItemObject, the difference being it only exists once (and I would think it must only exist once) in a project's hierarchchy. But basically any projectItem has the same set of methods and properties, only with different results (for instance, for a bin canChangeMediaPath = false, for a clip it's true). The only difference between a clip and a bin is a bin can have child items, whereas a clip doesn't. So in terms of development, I can only give you the unasked-for advice of double checking (programmatically) the object you're currently accessing is really what you think it should be before performing further actions.
... View more
May 22, 2017
10:42 PM
sberic schrieb Thanks for the pointer, andymees@aje . Unfortunately, that code only partially solves the problem. The function would be more aptly named "searchForBinWithNameInProjectRoot". It does not help if you have a path that goes beyond the root bin. Oh you're referring to Line#188, I was thinking in terms of Line#835, and to modify/combine this with the former. Should be doable. The drill-down search I understand. It was our original approach until findItemsMatchingMediaPath() got our hopes up. I don't follow what you mean with the "bubble up", though. I guess you mean that you could iteratively search the children of each bin in the path, enabling a directed search, rather than a standard depth or breadth-first search? I meant to say should you already have a (reference to a) projectItem as a result of a previous query/process/whatever, this would also give you a reference to its bin "position", right?
... View more
May 20, 2017
08:30 AM
Same here, seems to be a bug.
... View more
May 20, 2017
08:09 AM
2 Upvotes
There is... app.project.rootItem[index].getProjectMetadata(); This should give you an XML object with all of the metadata being presented in the metadata panel of Premiere. Inside there is a child "<premierePrivateProjectMetaData:Column.Intrinsic.VideoUsage>". It seems it is a string though, but this you can split as well by above string to give you the number. You can also wrap it into an XML object var theXML = new XML(app.project.rootItem.children[2].getProjectMetadata()); and eventually you will find the correct child. var usageCount = theXML.child(0).child(0).child('premierePrivateProjectMetaData:Column.Intrinsic.VideoUsage'); Depends on what you're trying to achieve.
... View more
May 20, 2017
07:44 AM
Every project has a tree hierarchy, with projectItems being an array-like structure as its children. The index is being incremented with every item being added to the project itself. In Bruce's example, the script assumes the first (0) item to be a clip (projectItemType = 1) (maybe a file (4) would work as well...). What leads you top the assumption that your projectItem is a rootItem (read: what was the first item you have added to the project)? If there are no items in the project, there is no return result.
... View more
May 20, 2017
07:25 AM
1 Upvote
You can either do it as andymees@aje has suggested for an iterative "drill down" seach, or if you have a projectItem, use its treePath property for "bubble up" search (split by slashes, array length will help you figure out the "level"...) Bins don't have a media path, they're just hierarchy objects (with projectItemType = 2).
... View more
May 17, 2017
12:11 AM
Also see this thread, your question seems very similar to me. Guess you'll have to do some trial-and-error.
... View more
May 17, 2017
12:09 AM
This sounds rather complicated and prone to error. Why not split the ffmpeg output so you can get the job done in one instance? See here. Keep in mind that a capture window is yet another process on top of another process, and what you see is not necessarily what you get.
... View more
May 16, 2017
09:53 AM
Hi, while there are some ways to GET effect data (not all have yet been implemented), I have doubts you can (easily) SET them... If that were the case, I believe Bruce Bullis would have updated the Sample Panel.
... View more
May 16, 2017
09:47 AM
Hi Ivan, ffmpeg-related questions are best asked on their mailing list. (Please provide command line and full uncut console output, and test with the most recent build or git head, otherwise they'll tell you what I've just written...) There are different reasons for which these frame errors can occur, if it is really bad with a special one of your OB trucks only, chances are something's wrong with its infrastructure. First thing is to make sure the physical layer is okay, then move on to configuration and so forth... I don't think a capture window inside of Premiere will give you more resources. It just blocks user input for the rest of the machine. Different story. Also I am not exactly sure if you can do edit while capture this way. From a logical point of view this should be possible when writing transport streams (because that's exactly the reason why), but I have no indication of how Premiere will go about this. Even several years later, handling network based streams is a different story from handling baseband streams for many applications...
... View more
May 16, 2017
12:38 AM
Hi, how is that? If you use ffmpeg with copy parameters only, recording to a .ts file, this shouldn't be a problem at all IMHO. Way more straightforward than making a multi-source capture utility for Premiere.
... View more
May 13, 2017
04:52 AM
The pragmatic solution is not not rely on online font loading but use local fonts instead via @font-face . Just keep in mind though that the license permits you to distribute the font with your panel. Waiting for this answer to be superseded by something answering the original question...
... View more
May 12, 2017
11:20 AM
Hi everyone, when trying to use asychronous font loading via google fontloader like so... WebFontConfig = { google: { families: [ 'Open Sans:400' ] }, /* Called when all the specified web-font provider modules (google, typekit, and/or custom) have reported that they have started loading fonts. */ loading: function() { // do something alert ("ready"); // TRIGGERED IN CHROME AND PREMIERE }, /* Called when each requested web font has started loading. The fontFamily parameter is the name of the font family, and fontDescription represents the style and weight of the font. */ fontloading: function(fontFamily, fontDescription) { // do something alert ("loading...") // TRIGGERED IN CHROME AND PREMIERE }, /* Called when each requested web font has finished loading. The fontFamily parameter is the name of the font family, and fontDescription represents the style and weight of the font. */ fontactive: function(fontFamily, fontDescription) { // do something alert ("loaded!") // TRIGGERED IN CHROME, BUT NOT IN PREMIERE }, /* Called if a requested web font failed to load. The fontFamily parameter is the name of the font family, and fontDescription represents the style and weight of the font. */ fontinactive: function(fontFamily, fontDescription) { // do something alert ("bummer."); // TRIGGERED IN PREMIERE }, /* Called when all of the web fonts have either finished loading or failed to load, as long as at least one loaded successfully. */ active: function() { // do something alert ("all good!"); // TRIGGERED IN CHROME, BUT NOT IN PREMIERE }, /* Called if the browser does not support web fonts or if none of the fonts could be loaded. */ inactive: function() { // do something alert ("broken!"); // TRIGGERED IN PREMIERE } }; /* async! */ (function() { var wf = document.createElement('script'); wf.src = 'https://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js'; wf.type = 'text/javascript'; wf.async = 'true'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(wf, s); })(); this will work in Chrome (fontactive is being called), but not properly in Premiere (tested with CC2015.4). See above. The font will load (!!), but the wrong callback will be triggered (fontinactive). Why does this happen (exactly), and how to fix it?
... View more
May 12, 2017
10:16 AM
Okay, it's just that it's not obvious what might be considered legacy and there not be a favourable approach. If developers can continue using both ways without fearing they need to re-write everything because the APIs has been deprecated or dropped, that's fine. It's already enough work to support multiple generations of the host application, but some times you just can't make stuff work everywhere, can you?
... View more
May 12, 2017
07:19 AM
1 Upvote
Well Bruce, we don't know how the OP is going about it, right? If we read carefully, the post suggests the OP is doing the path retrieval in the jsx -- if this is the case and they decide to stick with it, your approach as shown in the PProPanel won't get them where they want the way they want. This will only work if they c&p your code as a lazy man's solution. If the OP had done proper debugging (which I did to reproduce the issue) the solution would have been quite straightforward... This lends itself to a good question: In your (read: Adobe's) perspective, should (somweone writing) a script try to perform as many transactions as possible in JS (outside the extendscript's JSX), if so, for what reasons? Or doesn't it even matter?
... View more
May 12, 2017
03:27 AM
2 Upvotes
Hi, I assume your path for the preset is wrong, have you checked these? If you run from a ./jsx/YourScript.jsx sub-folder when using the panel, you'd have to go with $.fileName.parent.parent.fsName, this will also save you the next 2 lines. I also recommend using the getSep() function from the PProPanel sample to get the correct separators for each OS. [I would also really compact the code, save branches where not necessary a define variables only in the scope they're needed. But this might just be an excerpt from your entire script and you need the vars further down the script too.]
... View more
May 10, 2017
10:26 AM
It has just been implemented with v2017.1, it's not available in previous versions. Something to keep in mind when writing the manifest file.
... View more
May 09, 2017
09:35 AM
For now I've solved this using the not-an-option option: wmic with only two parameters, parsing the result down to a map. About 25 lines of code, so it's not as bad as expected.
... View more
May 09, 2017
09:30 AM
I have no clue if this applies in general, but in this case, the last keyframe of the speed graph is equal to the source clip's duration. Maybe the <when> values refer to the source clip frame numbers, that'd permit you to calculate the relative source In/Out duration. Hope I've understood correctly what you're after...
... View more
May 09, 2017
09:20 AM
Hi, as andymees has already stated as reply to your original post, mimicking in-timeline editing is not possible through ExtendScript as of today, but you can try to mimic classical 3-point editing through a script if your marker information is of such quality that you can calculate the time values for the source clips, referring to the latest PPro Panel version. Your mileage will vary here. The other way round would be to perform this even outside of Premiere with (shell) scripts, again depending on what source data you have, and create FCP XML sequences that you can import to Premiere afterwards. This might also help with your batch encoding requirements. Erik
... View more
Apr 22, 2017
01:21 PM
Hi Adam, the issue with this kind of "sharing" is Thunderbolt, as a direct attachment method, is not designed to be connected to multiple machines because the protocol doesn't which one is the master (r/w access), and which one is a slave (read-only). This can cause all sorts of trouble. Simple test: Do you encounter the same problem when only one machine is accessing the external RAID? If not, it will be more feasible to mount it directly to one machine only, share the folder on this machine, and have the others access the share via Thunderbolt network, but not directly. Erik
... View more
Apr 22, 2017
10:59 AM
Hi Adam, I don't remember if this is something that used to work, but my impression is currently system or environment paths are not or not correctly expanded by the CEP/ExtendScript engine. In conclusion this means the only safe way (afaik) is to use absolute file paths. But what about files on removable volumes? You were saying these were prone to problems too? Erik
... View more
Apr 22, 2017
05:41 AM
Thank you Bruce. Can you already tell when updated Documentation, Cookbook and Samples will be available on github? I'm mostly interested in a proper (concise) API doc for both JS (CEFInterface) and JSX functions for Premiere...
... View more
Apr 22, 2017
05:30 AM
Hi everyone, currently I'm a bit stuck trying to find a clean and efficient way to determine and re-map a Windows drive letter to a Mac OS path, e.g. "file://localhost/D:/Media/Card01/Clip01.mov" should end up as "file://localhost/Volumes/VideoDrive/Media/Card01/Clip01.mov" (if VideoDrive is the D: volume name). I tried wmic which fails because it seems that I can only pass 2 arguments to window.cep.createProcess() where in this case I would need 4 (cmd line is "wmic logicalvolume get caption,volumename") --- which is a bit strange b/c the createProcess header does not suggest the argument count was limited to 2, but maybe the implementation is (?). (Of course I could use less parameters for wmic, but then I'd have to do a lot of filtering to get what I need. Not an option.) The other approach was to use create.process.stdin(pID,'vol\ D:') after creating a cmd.exe process, but there I wasn't able to catch the respective stdout (only returns the initial cmd stdout). Any ideas? Hint: I need to solve this without using node.js or other "3rd party" framworks. Cheers.
... View more
Apr 22, 2017
05:14 AM
Hi Adam, I'd almost have written "command line and full, uncut console output missing", but that's in a different forum. 😉 What method are you using to select the files prior to your import command? How do you verify the path names? Erik
... View more
Apr 20, 2017
10:11 AM
My apologies, after cross-checking with the Native Functions HTML Test Panel ( Samples/CEP_HTML_Test_Extension at master · Adobe-CEP/Samples · GitHub ), which worked flawlessly, I revisited my code and now it's working. Advice to anyone facing similar issues: The call should work with no arguments ( var result = window.cep.fs.showSaveDialogEx(); ). If you accidentally pass a string instead of an array as the third parameter (file extensions), the dialog won't be displayed. Also, on Mac you should provide absolute paths for the initial directory (/Users/[currentUser]/Desktop instead of ~/Desktop)!
... View more
- « Previous
- Next »