Nexrender: Nexrender does not wait for finished rendering when reusing a running After Effects instance

Created on 21 Dec 2019  路  7Comments  路  Source: inlife/nexrender

Describe the bug
I have a running GUI instance of After Effects and would like the nexrender worker to use that (via --reuse flag) as the rendering instance. This appears to work since when nexrender starts to process the job, is gets opened and rendered by that GUI instance. After some time the result.avi is complete and is available in the job directory.
Unfortunately the nexrender workflow does not wait for the rendering to finish before proceeding with the post render actions. This results in the rendered result.avi file not being found (as it is not there, yet). Acutal rendering took about 10 seconds, but nexrender says it took only ~0.361 seconds.

Has someone already successfully tried to reuse an opened instance of After Effects for their render job in a worker?

Here's the console output:
D:\mvm-workspace\nexrender>.\nexrender-worker-win64.exe --binary="D:\Adobe CC\Adobe After Effects 2020\Support Files\aerender.exe" --workpath=".\job-workdir" --host=http://localhost:3001 --debug --multi-frames --reuse --skip-cleanup

starting nexrender-worker endpoint http://localhost:3001; using secret: no
adding default render-only-node licenses for After Effects at:

  • C:\Users\Frank Bruns\Documents\ae_render_only_node.txt
  • C:\Users\Frank Bruns\Documents\Adobe\ae_render_only_node.txt
    checking After Effects command line renderer patch...
    command line patch already is in place
    [hSaoNfGyonqupYhl30OdJ] setting up job...
    [hSaoNfGyonqupYhl30OdJ] working directory is: D:\mvm-workspace\nexrender\job-workdir\hSaoNfGyonqupYhl30OdJ
    [hSaoNfGyonqupYhl30OdJ] downloading assets...
    [hSaoNfGyonqupYhl30OdJ] applying prerender actions...
    [hSaoNfGyonqupYhl30OdJ] running script assemble...
    [hSaoNfGyonqupYhl30OdJ] rendering job...
    [hSaoNfGyonqupYhl30OdJ] spawning aerender process: D:\Adobe CC\Adobe After Effects 2020\Support Files\aerender.exe -project D:\mvm-workspace\nexrender\job-workdir\hSaoNfGyonqupYhl30OdJ\test-template-480x270.aep -comp main -output D:\mvm-workspace\nexrender\job-workdir\hSaoNfGyonqupYhl30OdJ\result.avi -s 0 -e 250 -r D:\mvm-workspace\nexrender\job-workdir\hSaoNfGyonqupYhl30OdJ\nexrender-hSaoNfGyonqupYhl30OdJ-script.jsx -mp -reuse
    [hSaoNfGyonqupYhl30OdJ] rendering took ~0.361 sec.
    [hSaoNfGyonqupYhl30OdJ] writing aerender job log to: D:\mvm-workspace\nexrender\job-workdir\aerender-hSaoNfGyonqupYhl30OdJ.log
    [hSaoNfGyonqupYhl30OdJ] applying postrender actions...
    [hSaoNfGyonqupYhl30OdJ] starting action-encode action (ffmpeg)
    [hSaoNfGyonqupYhl30OdJ] action-encode: input file D:\mvm-workspace\nexrender\job-workdir\hSaoNfGyonqupYhl30OdJ\result.avi
    [hSaoNfGyonqupYhl30OdJ] action-encode: output file D:\mvm-workspace\nexrender\job-workdir\hSaoNfGyonqupYhl30OdJ\encoded.mp4
    [hSaoNfGyonqupYhl30OdJ] ffmpeg version git-2019-10-06-66d45af Copyright (c) 2000-2019 the FFmpeg developers
    built with gcc 9.2.1 (GCC) 20191005
    configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf

[hSaoNfGyonqupYhl30OdJ] libavutil 56. 35.100 / 56. 35.100
libavcodec 58. 59.101 / 58. 59.101
libavformat 58. 33.100 / 58. 33.100
libavdevice 58. 9.100 / 58. 9.100
libavfilter 7. 62.100 / 7. 62.100
libswscale 5. 6.100 / 5. 6.100
libswresample 3. 6.100 / 3. 6.100
libpostproc 55. 6.100 / 55. 6.100
D:\mvm-workspace\nexrender\job-workdir\hSaoNfGyonqupYhl30OdJ\result.avi: No such file or directory

[hSaoNfGyonqupYhl30OdJ] error occurred: Error: Error loading postrender module @nexrender/action-encode: Error: Error in action-encode module (ffmpeg)
at C:\snapshot\nexrender\packages\nexrender-worker\node_modules\@nexrender\core\src\tasks\actions.js
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async start (C:\snapshot\nexrender\packages\nexrender-worker\src\index.js)

bug

Most helpful comment

I also seem to be experiencing this issue with AE2020 (aerender version 17.1x72). I get jobs that 'render' in ~0.2 seconds, report as failed due to missing output files, but do eventually render their output.

It may be a regression in AE2020 / AE17

In my case, downgrading to AE 16.1.3 worked correctly with -reuse. @FRANK-AND-FREE maybe check if you were still using the aerender from 17.x?

All 7 comments

Seems like aerender binary exists successfully much earlier than expected. Looking at the render time, I feel like it only "submits" the job to the After Effects and immediately closes itself.

It seems to me that wasn't a case before, but I might be wrong. Which version of After Effects are you using?

Hi, sorry, I should have stated the version in the first place. It is after effects v17. 0.0 from CC2020. I'm aware that there is a 17.0.1 available, but AE doesn't open up correctly for me when updating to that.

The Problem exists with After Effects CC 2019 (v16.x.x) as well.

I also seem to be experiencing this issue with AE2020 (aerender version 17.1x72). I get jobs that 'render' in ~0.2 seconds, report as failed due to missing output files, but do eventually render their output.

It may be a regression in AE2020 / AE17

In my case, downgrading to AE 16.1.3 worked correctly with -reuse. @FRANK-AND-FREE maybe check if you were still using the aerender from 17.x?

It may be a regression in AE2020 / AE17

If that is the case, I'm not even sure what we can do about it. If that continues, probably the only reliable way of telling if something has finished rendering would be to do it from our side. I'm not sure yet, however, how we could achieve something like that.

Any news on this topic? We would be very interested in using the "--reuse" flag with AE 2020 as well.

Sadly, no. Options like listening for file changes or watching the process list all sound quite unreliable and nothing else came to my mind yet. :(

Was this page helpful?
0 / 5 - 0 ratings

Related issues

byumark picture byumark  路  3Comments

dsrts picture dsrts  路  3Comments

danielgwilson picture danielgwilson  路  3Comments

amarCosmospace picture amarCosmospace  路  3Comments

JamesBotterill picture JamesBotterill  路  4Comments