Copy link to clipboard
Copied
I've been trying to prevent my panel from importing files that are currently being rendered to avoid Premiere Pro throwing an "Cannot Import" error.
I've tried:
Does anyone have a method to use that can distinguish a file that is currently being rendered/written to from a completed file? All thoughts are appreciated.
Thanks,
Justin
If your panel is in charge of those renders, then you will know when the render is complete.
Copy link to clipboard
Copied
Hey Justin,
We also develop a panel extension which provides functionality similar to what you described. In our case, we allow users to import from our MAM (via our panel) files which are still being rendered / are growing.
What we found is that AME will (depending on the output format you choose) encode the audio and video streams separately, then combine them together into the final output file. To fix this we resorted to creating our own codecs for AME which will encode files in a growing manner so that growing file workflows, work.
I don't have specific details of how our custom codecs were created - but I'm sure Bruce Bullis​ can help you with that.
Other than changing the way AME works, you could set a flag somewhere (in code, in a database, or in a text file next to the rendered video) to indicate that the video file is still being rendered, and unset the flag when your panel knows that the render has finished (not great, obviously). We also do this for users who don't want a growing workflow to prevent our MAM system from trying to work with the file while it is still being rendered.
JT
Copy link to clipboard
Copied
jingtaotan I appreciate you explaining your workaround! I also found the split streaming with certain codecs and was able to filter those out of my auto importing, however I couldn't rely on that as an indicator since my studio and I often render ProRes files which render as one file, yet can't be imported by Premiere until they're fully saved. I'm thinking that a sidecar file would be the only reliable way between Adobe apps, but it would be nice to recognize if any file is still rendering from other programs such as Da Vinci Resolve and Cinema 4D as well.
Bruce Bullis​, this is why I'm in search of an external method, I want to filter all rendering files from all Adobe and non-Adobe applications. For now I'm just letting Premiere catch the items that slip through my catch statments, but would like to find a solid solution for this in the future.
It seems like if Premiere can realize the file structure is incomplete (aka still rendering) and thus stops you from importing it, there must be a universal way to tell if a file is completely rendered or still rendering...
Copy link to clipboard
Copied
Sounds like a neat workflow you got there justin2taylor​
One thing just crossed my mind... what about using NodeJS to watch for file changes? Granted, you'll be "staring" at the file for some time before you can determine if it's actually growing or not, which means delaying your user's import operation.
File System io.js v1.2.0 Manual & Documentation
Here's a link to the API docs for the version of "Node" / io.js which is used in the current version of Premiere. Seems like there's some caveats mentioned there for the fs.watch and fs.watchFile functions
Copy link to clipboard
Copied
jingtaotan​ Thanks for the recommendation! I have heard a lot about NodeJS, I'll definitely take a look at that API and see if it's something that could work.
Copy link to clipboard
Copied
If your panel is in charge of those renders, then you will know when the render is complete.