0

I'm running a Nexrender job using a Node.js SQS consumer setup. The render completes successfully, but the postrender step fails when attempting to generate a poster JPG with FFmpeg from the output.mp4 (the output.mp4 uploads successfully).

LoUjWD987PpZbJakXLcXr] frame= 1 fps=0.0 q=2.2 size=N/A time=00:00:00.04 bitrate=N/A speed=1.96x [LoUjWD987PpZbJakXLcXr] [image2 @ ...] Could not get frame filename number 2 from pattern 'C:\nexrender\work\LoUjWD987PpZbJakXLcXr\poster.jpg'. Use '-frames:v 1' for a single image, or '-update' option, or use a pattern such as %03d within the filename. av_interleaved_write_frame(): Invalid argument ... ❌ Render failed: Error loading postrender module @nexrender/action-encode: Error: Error in action-encode module (ffmpeg) code : 1

Here’s a simplified version of the Node.js consumer for context:

const { Consumer } = require("sqs-consumer");
const { render } = require("@nexrender/core");
const { SQSClient } = require("@aws-sdk/client-sqs");
const sqsClient = new SQSClient({ region: process.env.AWS_REGION });
async function renderToMp4(jobData) {
 const result = await render(jobData, {
 workpath: "C:/nexrender/work",
 binary: "C:/Program Files/Adobe/Adobe After Effects 2024/Support Files/aerender.exe",
 logger: console
 });
 return result;
}

Here is an example of the json

{
 "projectId": "example-id",
 "template": {
 "src": "file:///D:/Nexrender/TestTextColorImageSet.aep",
 "composition": "1920x1080"
 },
 "assets": [
 { "type": "data", "layerName": "Color1", "property": "Effects.Fill.Color", "value": [1, 0, 0] },
 { "type": "data", "layerName": "Color2", "property": "Effects.Fill.Color", "value": [0.07, 0.65, 0.26] },
 { "type": "image", "layerName": "Image1", "src": "https://example-bucket.s3.amazonaws.com/projects/example/image1.jpg" },
 { "type": "image", "layerName": "Image2", "src": "https://example-bucket.s3.amazonaws.com/projects/example/image2.jpg" },
 { "type": "data", "layerName": "Text1", "property": "Source Text", "value": "test" },
 { "type": "data", "layerName": "Text2", "property": "Source Text", "value": "test 2" }
 ],
 "actions": {
 "postrender": [
 {
 "module": "@nexrender/action-encode",
 "preset": "mp4",
 "output": "output.mp4"
 },
 {
 "module": "@nexrender/action-upload",
 "input": "output.mp4",
 "provider": "s3",
 "params": {
 "bucket": "example-bucket",
 "region": "us-east-1",
 "key": "projects/example/output.mp4",
 "contentType": "video/mp4"
 }
 },
 {
 "module": "@nexrender/action-encode",
 "input": "output.mp4",
 "output": "poster.jpg",
 "preset": {
 "ffmpeg": "-i {input} -ss 4 -frames:v 1 -q:v 2 -update 1 {output}"
 }
 },
 {
 "module": "@nexrender/action-upload",
 "input": "poster.jpg",
 "provider": "s3",
 "params": {
 "bucket": "example-bucket",
 "region": "us-east-1",
 "key": "projects/example/poster.jpg",
 "contentType": "image/jpeg"
 }
 }
 ]
 }
}

Any help would be fantastic

asked Dec 10 at 21:41

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.