Nexrender
This page is incomplete
Last updated
This page is incomplete
Last updated
This guide outlines the steps required to set up a nexrender rendering cluster, utilizing one EC2 instance as the nexrender server, your local machine as the worker node, and Google Sheets and Google Apps Script to send a curl request for a render job to the server.
By following this configuration, users can easily establish a distributed rendering system for their projects, which can significantly reduce the time required for rendering complex tasks. The setup process is explained in detail, providing users with a clear understanding of the necessary components and how to connect them to create a functional rendering cluster.
Overall, the client initiates requests to the server, the server manages the rendering process by assigning tasks to workers, and the API provides a programmatic interface for interacting with the server.
Launch the cloud instances for the worker and server nodes
Ensure that the necessary files are accessible in Google Drive
Launch the worker node to initiate the rendering process
Set up the server node to receive and process rendering requests
Use a curl request to send a rendering job from the Google Sheets interface to the server node
Monitor the progress of the rendering job and retrieve the output files once completed
Prior to setup your rendering cluster, you should familiarize yourself with sending a render job using your workstation to replace text and media (image, video, sound)
To set up a server and install Nexrender on it, you can follow these general steps:
Web Server Concepts and Examples
How to Create an EC2 Instance in AWS in 2023
By default, most EC2 instances have their security group rules configured to block ICMP traffic. If this is the case, you will not be able to ping the IP address. You can try modifying the inbound rules of your instance's security group to allow ICMP traffic.
Security Group: Edit Inbound rules - Custom TCP, Port Range: XXXX
if you just want to use Nexrender as a standalone tool to render After Effects projects, you can use the pre-built binary version. If you want to use Nexrender as a library in your own code or run the Nexrender Server on your own server, you should install the programmatic module via npm.
The nexrender API can be installed and run on your EC2 instance as a Node.js application. The API can then be configured to listen for requests from your Google Form and trigger the rendering process on the nexrender server.
This code sets up a Nexrender server that will listen for incoming requests on port 3000
and require clients to provide a secret password in order to connect. Once the server is running, clients can connect to it and submit rendering jobs to be processed.
Here's how it works:
The first line of code imports the @nexrender/server
package and assigns it to the server
variable. This package provides the functionality to start a Nexrender server.
The second line of code sets the port
variable to the value 3000
. This specifies the port on which the Nexrender server will listen for incoming connections.
The third line of code sets the secret
variable to the value 'myapisecret'
. This is the API secret that clients will use to authenticate with the Nexrender server.
The fourth line of code starts the Nexrender server on the specified port
and with the given secret
. The server.listen()
method is called with two arguments: the port
and the secret
. This method listens for incoming connections on the specified port and requires clients to provide the specified API secret when making requests to the server.
By using the nexrender API, you can automate the process of submitting jobs to nexrender, which can save you time and reduce the risk of errors. You can also use the API to retrieve job status and output files, which can be helpful for tracking job progress and managing rendered output.
This code creates a client connection to a Nexrender API server, using the createClient
method provided by the @nexrender/api
package.
It then sets the host and secret credentials required to access the server, and sets the polling interval to check for job updates every 3000 milliseconds.
The main
function uses the client to add a new job to the server, specifying the template source and composition to use. The result
object is returned by the addJob
method and is used to track the job's progress.
The result
object also sets up event listeners to handle job events such as creation, starting, progress updates, completion, and errors. When an event is triggered, the corresponding callback function is called to handle it.
If you are running the Nexrender server on the same EC2 instance as the client script, you can use the internal IP address of the instance, which can be obtained by running the curl <http://169.254.169.254/latest/meta-data/local-ipv4
> command from within the instance.
If you want to access the Nexrender server from outside the instance (for example, from your local computer), you would use the public IP address or DNS name of the EC2 instance, which you can find in the EC2 console or by running the curl <http://169.254.169.254/latest/meta-data/public-ipv4
> command from within the instance. However, you would need to make sure that the necessary security group rules are in place to allow inbound traffic to the instance on the Nexrender server port.
How to copy a file over
Online API Testing Tool | Test Your API Online
Requirements: Windows/Mac
Pre-requisite: After Effects
If you have the binary file for the Nexrender Worker, you can still use it on your Mac laptop. To run the Nexrender Worker binary, you will need to open a terminal window and navigate to the directory where the binary file is located. Then, you can run the binary using the following command:
This will start the Nexrender Worker on your Mac laptop. By default, the worker will look for a Nexrender server running at http://localhost:3000
and will not use a worker secret key.
If you need to connect the worker to a different server or use a worker secret key, you can pass command-line options to the binary. For example, to connect the worker to a server running at http://example.com:8080
and use a worker secret key of abc123
, you can run the following command:
Deploy NodeJS APP on AWS EC2 Instance | NodeJS on EC2 | Running NodeJS APP on AWS EC2 | AWS Projects
Curl and JavaScript API client are both used for interacting with APIs, but they have different use cases and advantages.
Curl is a command-line tool used to transfer data to and from servers using various protocols, including HTTP, HTTPS, and FTP. It is useful for testing APIs or automating tasks that require interacting with servers through the command line. Curl is particularly useful for quick one-off requests or for scripting repetitive tasks.
On the other hand, a JavaScript API client, such as the @nexrender/api library shown in your example, is a software module that can be integrated into a web application to interact with an API. It is useful for more complex API interactions or when you need to handle API responses in a specific way.
The JavaScript API client provides a more user-friendly interface for interacting with the API, making it easier to handle responses and errors, and can be integrated into more complex applications. It also provides additional functionality, such as event listeners that can notify you of job progress or errors.
In summary, if you need to quickly test an API or automate tasks, curl is a good choice. If you are building a web application that interacts with an API, a JavaScript API client may be a better choice.
Sending curl to server
Set up a Google Form to collect render job details: You can create a Google Form to collect details about the After Effects project to be rendered, such as the composition name, output format, and render settings.
Create a script: You can use a programming language such as JavaScript, Python, or Ruby to create a script that reads the data from your Google Form and sends a request to the nexrender API.