inlife / nexrender

📹 Data-driven render automation for After Effects

Home Page:https://www.nexrender.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error in action-encode module (ffmpeg) Error: spawn UNKNOWN

luciddream-tsin opened this issue · comments

I encounter an error when postrender, encode :

...
[AXZ-oKLN61-m2QndR5kd5] rendering took ~280.691 sec.
[AXZ-oKLN61-m2QndR5kd5] writing aerender job log to: C:\Users\chunf\AppData\Local\Temp\nexrender\aerender-AXZ-oKLN61-m2QndR5kd5.log[AXZ-oKLN61-m2QndR5kd5] applying postrender actions...
[AXZ-oKLN61-m2QndR5kd5] starting action-encode action (ffmpeg)
[AXZ-oKLN61-m2QndR5kd5] action-encode: input file C:\Users\chunf\AppData\Local\Temp\nexrender\AXZ-oKLN61-m2QndR5kd5\result.mp4
[AXZ-oKLN61-m2QndR5kd5] action-encode: output file C:\Users\chunf\AppData\Local\Temp\nexrender\AXZ-oKLN61-m2QndR5kd5\encoded.mp4
> using an existing ffmpeg binary b5.0.1 at: C:\Users\chunf\AppData\Local\Temp\nexrender\ffmpeg-b5.0.1.exe
catching the error internally
[AXZ-oKLN61-m2QndR5kd5] cleaning up...
> job rendering failed
Error: Error loading postrender module @nexrender/action-encode: Error: Error in action-encode module (ffmpeg) Error: spawn UNKNOWN    at C:\snapshot\nexrender\packages\nexrender-core\src\tasks\actions.js
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
PS C:\Users\chunf\Desktop\Nexrenderer>

This is my json config:

{
    "template": {
        "src": "file:///C:/Users/chunf/Desktop/Nexrenderer/AETestProject.aep",
        "composition": "Render Comp"
    },
    "assets": [
        {
            "src": "file:///C:/Users/chunf/Desktop/Nexrenderer/Assets/fd.png",
            "type": "image",
            "layerName": "Texture.png"
        }
    ],
        
    "actions":{
        "postrender": [
            {
                "module": "@nexrender/action-encode",
                "preset": "mp4",
                "output": "encoded.mp4",
                "params": {"-vcodec": "libx264", "-r": 25}

            },
            {
                "module": "@nexrender/action-copy",
                "input": "encoded.mp4",
                "output": "C:/Users/chunf/Desktop/Nexrenderer/myresult.mp4"
            }
        ]
    }
}

The ffmpeg is install by myself, ffmpeg-git-full.7z

Hey @luciddream-tsin

Seems like there is some error related to ffmpeg binary on your system. Try manually installing ffmpeg from official website. Make sure to test it in the console to verify everything works. And then please refer the documentation on how to set up a custom ENV variable to override the ffmpeg binary for the action-encode: https://github.com/inlife/nexrender/tree/master/packages/nexrender-action-encode

Hey @luciddream-tsin

Seems like there is some error related to ffmpeg binary on your system. Try manually installing ffmpeg from official website. Make sure to test it in the console to verify everything works. And then please refer the documentation on how to set up a custom ENV variable to override the ffmpeg binary for the action-encode: https://github.com/inlife/nexrender/tree/master/packages/nexrender-action-encode

Actually, My ffmpeg is work well, and I had test it on my console,
And then, I used the nexrender to auto download the ffmpeg, the same error occur again.

And the output video file result.mp4 can found in temp working directory, and it is correctly to play.

I sorry for my carelessness.
The solution was to use the default downloaded FFmpeg, ensuring it was fully functional and everything worked properly. Previously, the FFmpeg I installed manually had issues, and the one automatically downloaded by nexrender was incomplete, and I got them mixed up.