Comments (21)
Yep, I think I understood what you meant. Thank you so much!!
from nexrender.
I will create a demo app with a simple front-end like uploading an image. If you are interested, I will let you know when that is done. Thank you again!
from nexrender.
Maybe add to the project
model new attribute webhooks
, so when render will be done just send project
to the webhook link:
{
"failed": "https://example.com/api/v1/render-callback",
"finished": "https://example.com/api/v1/render-callback"
}
from nexrender.
Hello,
Thank you! Im very pleased to hear that. :)
post rendering tasks
This option was planned. And was even kind-of made, until i striped it from the project. Because i did not find a way to do this properly. And now its kinda frozen :p
Anyways, i see a few different ways or doing that:
- Launch rendernode from some kind of host, which will listen to changes in console, and as soon as it'll see "project finished" or smth. like this, it will trigger new actions.
- Launch a 3rd app, which will be running on the same server as rendernode, and listening using nexrender api to talk to api server. And as soon as it'll see api finished rendering - it will take actions.
- Launch rendernode in serverless mode (like in inlife/nexrender-boilerplate), and listen to finished callback.
from nexrender.
Hello,
I guess I will either go with the option 2 or 3. It looks like the option 3 is the easiest. If I go with the option 3, what will be the disadvantages? Can you have multiple instances using 3?
I am planning to do something like this below.
'use strict';
var Project = require('nexrender').Project;
var renderer = require('nexrender').renderer;
var project = new Project({
'template': 'MyTemplate.aepx',
'composition': 'MainComp',
'settings': {
'outputModule': 'JPEG', // check your AE for existing output module
'outputExt': 'jpg'
},
'assets': [
{
'type': 'project',
'src': 'http://127.0.0.1:31999/MyTemplate.aepx',
'name': 'MyTemplate.aepx'
}, {
'type': 'image',
'src': 'http://127.0.0.1:31999/HotAirBalloon.png',
'name': 'HotAirBalloon.png'
}, {
'type': 'script',
'src': 'http://127.0.0.1:31999/test.js',
'name': 'test.js'
}
]
});
// start rendering
// NOTE: i inserted path to my aerender binary
// if you are on windows, your path might look like:
// 'C:\\Program Files\Adobe\After Effects CC 2015\aerender.exe'
var rendered = renderer.render('/Applications/Adobe After Effects CC 2015.3/aerender', project);
rendered.then(function() {
// successfully rendered
console.log('yay!');
});
from nexrender.
Yea, you can have multiple instances with 3rd option. Whatever quantity of aerender processes will your system support. (same like multiple After Effects rendering rendering at the same time)
what will be the disadvantages
you'll dont have ability to monitor current projects via api, and mostly thats it :p
from nexrender.
Thank you, I will go with the 3rd option to test things out.
Just one more question.
If I wanted to scale it up, it should be structured as below, right?
from nexrender.
Hm, if all this network will be set up on different machines (like real network), then it'll be hard for you to make web/api server responsive for uploading vids to youtube. Considering fact that rendered file will be stored on the particular rendernode.
Its either you move file after the render succeeded to a web/api server via some rsync/p2p file transfer. Or, upload right from the rendernode (which in most cases will be easier and faster).
P.S. Also, you can modify 3rd option, to work with an api server, like it does with rendernode itself.
So it will be like a override customization for rendernode defaullt behaviour, where youll be able to add your custom steps.
This can be achieved by combining these 2 code examples:
API-Wrapper
Custom Node
from nexrender.
I am sorry, can you explain this part in more detail?
P.S. Also, you can modify 3rd option, to work with an api server, like it does with rendernode itself.
So it will be like a override customization for rendernode defaullt behaviour, where youll be able to add your custom steps.
from nexrender.
somewhere, maybe from your desktop event, you create the project via api (like it shown in the example)
var api = require('nexrender').api;
// Configure api connection
api.config({
host: "localhost",
port: 3000
});
// Define project properties
var assets = [{
type: 'image',
src: 'https://dl.dropboxusercontent.com/u/28013196/avatar/mario.jpeg',
name: 'image.jpg'
}];
// Create project
api.create({
template: 'template1.aepx',
composition: 'base',
assets: assets
}).then((project) => {
console.log('project saved');
project.on('rendering', function(err, project) {
console.log('project rendering started');
});
project.on('finished', function(err, project) {
console.log('project rendering finished')
});
project.on('failure', function(err, project) {
console.log('project rendering error')
});
});
and custom rendernode code exmaple:
var api = require('nexrender').api;
var renderer = require('nexrender').renderer;
// Configure api connection
api.config({
host: "localhost",
port: 3000
});
// connect to api, fetch queued projects, and start rendering
api.get().then(function(results) {
// iterate, find queued
for (let project of results) {
if (project.state === 'queued') {
return startRendering(project);
}
}
});
function startRendering(project) {
var rendered = renderer.render('/Applications/Adobe After Effects CC 2015.3/aerender', project);
rendered.then(function(project) {
// apply some custom steps, upload to youtube from there, for example
// and mark project as finished (updates api state, and triggers remote callbacks)
project.finish();
});
}
from nexrender.
also, you always can create projects via POST requests to the api from any convenient tool with json
even via curl :D
from nexrender.
Wow, you are awesome!! Thank you!!
from nexrender.
Yea, that would be great !)
Kinda interesting too see what people can do with this thingy :D
You are very welcome! )
from nexrender.
@syson16 Did you manage to get this running? Would love to see your results. I am currently trying to create something similar from a front-end that then returns the video created to the user.
from nexrender.
I started building but couldn't actually finish it yet because of work..
from nexrender.
@syson16 @wst-shorty : do you have any new plan for your features?
from nexrender.
Hi,
I'm not quite sure how this can work:
// Create project
api.create({
template: 'template1.aepx',
composition: 'base',
assets: assets
}).then((project) => {
console.log('project saved');
project.on('rendering', function(err, project) {
console.log('project rendering started');
});
project.on('finished', function(err, project) {
console.log('project rendering finished')
});
project.on('failure', function(err, project) {
console.log('project rendering error')
});
});
If my admin app creates new projects (and send it to the nexrender server via this api client), how is subscribing to this .on events can even work? where does the nexrender server informs my app that rendering is started/finished? how can this console.log('project rendering started'); be even printed?
from nexrender.
@matanregev render node send update/put requests to the API server and update project status when status updated on API server it executes subscribed functions. If I remember correctly API server check status every minute within 20 minutes.
from nexrender.
yes, basically if you api client knows that you've started listening to some projects which are rendering, it will be fetching and HTTP update for particular project every one minute.
That time frame can be configured though.
from nexrender.
I'm not sure how useful this is for all use cases, but perhaps it will be helpful to someone.
In my recent project I took a slightly different approach to accomplishing post rendering tasks. Basically, I added a new task upload
after cleanup
which uploads the result video to a specified S3 bucket. From there, we trigger post rendering tasks (e.g., emailing the video, uploading it to youtube) via another app which checks the S3 bucket for new videos every few minutes.
This approach worked well for my project because it allowed us to handle our post render tasks outside of node which provided some extra flexibility (in our case we used PHP for reasons related to project requirements, but any language with an AWS package would work). You could also potentially handle post render tasks via AWS Lambda this way, but I haven't been quite that ambitious yet.
If there is interest for this post-render upload feature, I could spend some time making it configurable (and perhaps supporting more upload targets than just S3) and try to get it merged into the next release.
from nexrender.
issue is resolved, for more info follow #68
from nexrender.
Related Issues (20)
- Typo in the job init() Method. HOT 4
- Version Mismatch issue HOT 2
- How to target the Source Text HOT 6
- Error: Couldn't find module @nexrender/provider-e, Unknown protocol provided. HOT 2
- Name chain does not work in case last composition name matches HOT 11
- Does Necklander support After Effects 2023? Is 2024 not supported? HOT 6
- in react Is there a way to check the rendering process in percentage? HOT 11
- How do I configure multiple nexrender-workers on one nexrender-server? HOT 2
- Why after script execution AE project not changed? HOT 1
- Post render action (action-encode) seems to be failing. HOT 11
- AEP Files Parser? HOT 5
- Not able to find the text layer
- onError and onRenderError HOT 1
- Rendering progress will only be returned when the ’outputModule‘ is set to ’H.264'. HOT 3
- nexrender-cli-macos failing to render for "an unknown reason" HOT 16
- After Effects Version Error HOT 7
- PNG sequence support HOT 2
- 0kb Image Sequence HOT 1
- AERender Options When Using --file Argument HOT 1
- Error in action-encode module (ffmpeg) Error: spawn UNKNOWN HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nexrender.