inlife / nexrender

📹 Data-driven render automation for After Effects
https://www.nexrender.com
MIT License
1.59k stars 322 forks source link

Error on windows with FFMpeg AVOption -b #360

Closed djpmedia closed 3 years ago

djpmedia commented 4 years ago

I've got an issue with the encoding part. I have an Windows 2019 Server running with the AErender part. Everything will be rendered in the temp folders. So the rendering is fine. But when I use the post Encode with these settings, I got an error with FFMpeg. On MacOs everything is working fine with the same AE projectfile.

    "actions":{
        "postrender": [
            {
                "module": "@nexrender/action-encode",
                "output": "file:///encoded.mp4",
                "preset": "mp4",
                "params": {"-vcodec": "libx264", "-r": 25}
            }
        ]
    }
administrator@WIN-H8CSGGN7RPM C:\Users\Administrator\Desktop\Exchange>nexrender-cli --file RenderJob.json --workpath "/Users/Administrator/Desktop" --debug
> starting nexrender-cli
using automatically determined directory of After Effects installation:
 - C:\Program Files\Adobe\Adobe After Effects 2020\Support Files\aerender.exe
checking After Effects command line renderer patch...
command line patch already is in place
[RYVwdJyBoyzY-VvK8ADwv] setting up job...
[RYVwdJyBoyzY-VvK8ADwv] working directory is: \Users\Administrator\Desktop\RYVwdJyBoyzY-VvK8ADwv
[RYVwdJyBoyzY-VvK8ADwv] downloading assets...
[RYVwdJyBoyzY-VvK8ADwv] applying prerender actions...
[RYVwdJyBoyzY-VvK8ADwv] running script assemble...
[RYVwdJyBoyzY-VvK8ADwv] rendering job...
[RYVwdJyBoyzY-VvK8ADwv] spawning aerender process: C:\Program Files\Adobe\Adobe After Effects 2020\Support Files\aerender.exe -project \Users\Administrator\Desktop\RYVwdJyBoyzY-VvK8ADwv\RenderTest.aep -comp Main -output \Users\Admi
nistrator\Desktop\RYVwdJyBoyzY-VvK8ADwv\result.avi -r \Users\Administrator\Desktop\RYVwdJyBoyzY-VvK8ADwv\nexrender-RYVwdJyBoyzY-VvK8ADwv-script.jsx
[RYVwdJyBoyzY-VvK8ADwv] rendering progress 0%...
[RYVwdJyBoyzY-VvK8ADwv] rendering progress 1%...
[RYVwdJyBoyzY-VvK8ADwv] rendering progress 26%...
[RYVwdJyBoyzY-VvK8ADwv] rendering progress 50%...
[RYVwdJyBoyzY-VvK8ADwv] rendering progress 51%...
[RYVwdJyBoyzY-VvK8ADwv] rendering progress 75%...
[RYVwdJyBoyzY-VvK8ADwv] rendering progress 76%...
[RYVwdJyBoyzY-VvK8ADwv] rendering took ~155.109 sec.
[RYVwdJyBoyzY-VvK8ADwv] writing aerender job log to: C:\Users\Administrator\Desktop\aerender-RYVwdJyBoyzY-VvK8ADwv.log
[RYVwdJyBoyzY-VvK8ADwv] applying postrender actions...
[RYVwdJyBoyzY-VvK8ADwv] starting action-encode action (ffmpeg)
[RYVwdJyBoyzY-VvK8ADwv] action-encode: input file \Users\Administrator\Desktop\RYVwdJyBoyzY-VvK8ADwv\result.avi
[RYVwdJyBoyzY-VvK8ADwv] action-encode: output file \Users\Administrator\Desktop\RYVwdJyBoyzY-VvK8ADwv\file:\encoded.mp4
[RYVwdJyBoyzY-VvK8ADwv] ffmpeg version git-2019-10-06-66d45a
[RYVwdJyBoyzY-VvK8ADwv] f 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-amr
nb --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 --enab
le-libmfx --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf

[RYVwdJyBoyzY-VvK8ADwv]   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

[RYVwdJyBoyzY-VvK8ADwv] Input #0, avi, from '\Users\Administrator\Desktop\RYVwdJyBoyzY-VvK8ADwv\result.avi':
  Metadata:
    date            : 2020-04-14T10:22:03.796119
  Duration: 00:00:04.04, start: 0.000000, bitrate: 1244179 kb/s

[RYVwdJyBoyzY-VvK8ADwv]     Stream #0:0: Video: rawvideo, bgr24, 1920x1080, 1256601 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc

**[RYVwdJyBoyzY-VvK8ADwv] Codec AVOption b (set bitrate (in bits/s)) specified for output file #0 (\Users\Administrator\Desktop\RYVwdJyBoyzY-VvK8ADwv\file:\encoded.mp4) has not been used for any stream. The most likely reason is eith
er wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.**

[RYVwdJyBoyzY-VvK8ADwv] \Users\Administrator\Desktop\RYVwdJyBoyzY-VvK8ADwv\file:\encoded.mp4: Invalid argument

> job rendering failed
Error: Error loading postrender module @nexrender/action-encode: Error: Error in action-encode module (ffmpeg)
    at C:\Users\Administrator\AppData\Roaming\npm\node_modules\@nexrender\cli\node_modules\@nexrender\core\src\tasks\actions.js:25:35
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
inlife commented 4 years ago

Try to change the output format from file:///encoded.mp4 to something like: C:/Users/Administrator/Desktop/output.mp4

djpmedia commented 4 years ago

Try to change the output format from file:///encoded.mp4 to something like: C:/Users/Administrator/Desktop/output.mp4

I've tried but receive the same error message. It looks like had has something to do with FFMpeg. Maybe some codes are missing on the windows server?

inlife commented 4 years ago

Also might be the case. You can try an alternative encoder: https://github.com/HarryLafranc/nexrender-action-handbrake

djpmedia commented 4 years ago

Tried handbrake but I also receiving an error with handbrake:

administrator@WIN-H8CSGGN7RPM C:\Users\Administrator>nexrender-cli --file Desktop/Exchange/RenderJob.json --workpath "/Users/Administrator/Desktop" --debug
> starting nexrender-cli 
using automatically determined directory of After Effects installation: 
 - C:\Program Files\Adobe\Adobe After Effects 2020\Support Files\aerender.exe
checking After Effects command line renderer patch...
command line patch already is in place
[UoAxRvW3Z_g-Yh7muXigS] setting up job...
[UoAxRvW3Z_g-Yh7muXigS] working directory is: \Users\Administrator\Desktop\UoAxRvW3Z_g-Yh7muXigS 
[UoAxRvW3Z_g-Yh7muXigS] downloading assets...
[UoAxRvW3Z_g-Yh7muXigS] applying prerender actions... 
[UoAxRvW3Z_g-Yh7muXigS] running script assemble...
[UoAxRvW3Z_g-Yh7muXigS] rendering job...
[UoAxRvW3Z_g-Yh7muXigS] spawning aerender process: C:\Program Files\Adobe\Adobe After Effects 2020\Support Files\aerender.exe -project \Users\Administrator\Desktop\UoAxRvW3Z_g-Yh7muXigS\RenderTest.aep -comp Main -output \Users\Admi
nistrator\Desktop\UoAxRvW3Z_g-Yh7muXigS\result.avi -r \Users\Administrator\Desktop\UoAxRvW3Z_g-Yh7muXigS\nexrender-UoAxRvW3Z_g-Yh7muXigS-script.jsx
[UoAxRvW3Z_g-Yh7muXigS] rendering progress 0%... 
[UoAxRvW3Z_g-Yh7muXigS] rendering progress 1%... 
[UoAxRvW3Z_g-Yh7muXigS] rendering progress 26%... 
[UoAxRvW3Z_g-Yh7muXigS] rendering progress 51%... 
[UoAxRvW3Z_g-Yh7muXigS] rendering progress 75%... 
[UoAxRvW3Z_g-Yh7muXigS] rendering progress 76%... 
[UoAxRvW3Z_g-Yh7muXigS] rendering took ~156.578 sec. 
[UoAxRvW3Z_g-Yh7muXigS] writing aerender job log to: C:\Users\Administrator\Desktop\aerender-UoAxRvW3Z_g-Yh7muXigS.log 
[UoAxRvW3Z_g-Yh7muXigS] applying postrender actions...
[UoAxRvW3Z_g-Yh7muXigS] starting action-handbrake action 
[UoAxRvW3Z_g-Yh7muXigS] [action-handbrake] output is set to \Users\Administrator\Desktop\UoAxRvW3Z_g-Yh7muXigS\file:\C:\Users\Administrator\Desktop\output.mp4
[UoAxRvW3Z_g-Yh7muXigS] [action-handbrake] percent complete : 0, ETA:  
Error with action-handbrake 
Other: Handbrake InitialisationError [error code: 3] 
    at ChildProcess.<anonymous> (C:\Users\Administrator\AppData\Roaming\npm\node_modules\nexrender-action-handbrake\node_modules\handbrake-js\lib\Handbrake.js:131:15)
    at ChildProcess.emit (events.js:310:20)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12) {
  name: 'Other',
  message: 'Handbrake InitialisationError [error code: 3]',
  output: '[10:07:11] hb_init: starting libhb thread\r\n' +
    '[10:07:11] thread 412f230 started ("libhb")\r\n' +
    'HandBrake 1.1.2 (2018090500) - MinGW x86_64 - https://handbrake.fr\r\n' +
    '2 CPUs detected\r\n' +
    'Opening \\Users\\Administrator\\Desktop\\UoAxRvW3Z_g-Yh7muXigS\\result.avi...\r\n' +
    '[10:07:11] CPU: Westmere E56xx/L56xx/X56xx (Nehalem-C)\r\n' +
    '[10:07:11]  - logical processor count: 2\r\n' +
    '[10:07:11] Intel Quick Sync Video support: no\r\n' +
    '[10:07:11] hb_scan: path=\\Users\\Administrator\\Desktop\\UoAxRvW3Z_g-Yh7muXigS\\result.avi, title_index=1\r\n' +
    'udfread ERROR: ECMA 167 Volume Recognition failed\r\n' +
    'src/libbluray/disc/disc.c:323: failed opening UDF image \\Users\\Administrator\\Desktop\\UoAxRvW3Z_g-Yh7muXigS\\result.avi\r\n' +
    'src/libbluray/disc/disc.c:424: error opening file BDMV\\index.bdmv\r\n' +
    'src/libbluray/disc/disc.c:424: error opening file BDMV\\BACKUP\\index.bdmv\r\n' +
    '[10:07:11] bd: not a bd - trying as a stream/file instead\r\n' +
    'libdvdnav: Using dvdnav version 6.0.0\r\n' +
    'libdvdread: Encrypted DVD support unavailable.\r\n' +
    'libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed\r\n' +
    'libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed\r\n' +
    "libdvdread: Can't open file VIDEO_TS.IFO.\r\n" +
    'libdvdnav: vm: failed to read VIDEO_TS.IFO\r\n' +
    '[10:07:11] dvd: not a dvd - trying as a stream/file instead\r\n' +
    "Input #0, avi, from '\\Users\\Administrator\\Desktop\\UoAxRvW3Z_g-Yh7muXigS\\result.avi':\r\n" +
    '  Metadata:\r\n' +
    '    date            : 2020-04-15T08:04:40.613961\r\n' +
    '  Duration: 00:00:04.04, start: 0.000000, bitrate: 1244179 kb/s\r\n' +
    '    Stream #0:0: Video: rawvideo\r\n' +
    '      bgr24, 1920x1080\r\n' +
    '      25 tbn\r\n' +
    '[10:07:11] scan: decoding previews for title 1\r\n' +
    '\rScanning title 1 of 1, preview 1, 10.00 %\rScanning title 1 of 1, preview 1, 10.00 %\rScanning title 1 of 1, preview 4, 40.00 %\rScanning title 1 of 1, preview 7, 70.00 %\rScanning title 1 of 1, preview 10, 100.00 %[10:07:12
] scan: 10 previews, 1920x1080, 25.000 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1\r\n' +
    '[10:07:12] libhb: scan thread found 1 valid title(s)\r\n' +
    '+ Using preset: CLI Default\r\n' +
    '+ title 1:\r\n' +
    '  + stream: \\Users\\Administrator\\Desktop\\UoAxRvW3Z_g-Yh7muXigS\\result.avi\r\n' +
    '  + duration: 00:00:04\r\n' +
    '  + size: 1920x1080, pixel aspect: 1/1, display aspect: 1.78, 25.000 fps\r\n' +
    '  + autocrop: 0/0/0/0\r\n' +
    '  + chapters:\r\n' +
    '    + 1: cells 0->0, 0 blocks, duration 00:00:04\r\n' +
    '  + audio tracks:\r\n' +
    '  + subtitle tracks:\r\n' +
    '[10:07:12] 1 job(s) to process\r\n' +
    '[10:07:12] json job:\r\n' +
    '{\r\n' +
    '    "Audio": {\r\n' +
    '        "AudioList": [],\r\n' +
    '        "CopyMask": [],\r\n' +
    '        "FallbackEncoder": 0\r\n' +
    '    },\r\n' +
    '    "Destination": {\r\n' +
    '        "AlignAVStart": false,\r\n' +
    '        "ChapterList": [\r\n' +
    '            {\r\n' +
    '                "Name": ""\r\n' +
    '            }\r\n' +
    '        ],\r\n' +
    '        "ChapterMarkers": false,\r\n' +
    '        "File": "\\\\Users\\\\Administrator\\\\Desktop\\\\UoAxRvW3Z_g-Yh7muXigS\\\\file:\\\\C:\\\\Users\\\\Administrator\\\\Desktop\\\\output.mp4",\r\n' +
    '        "InlineParameterSets": false,\r\n' +
    '        "Mp4Options": {\r\n' +
    '            "IpodAtom": false,\r\n' +
    '            "Mp4Optimize": false\r\n' +
    '        },\r\n' +
    '        "Mux": "m4v"\r\n' +
    '    },\r\n' +
    '    "Filters": {\r\n' +
    '        "FilterList": [\r\n' +
    '            {\r\n' +
    '                "ID": 6,\r\n' +
    '                "Settings": {\r\n' +
    '                    "mode": 0\r\n' +
    '                }\r\n' +
    '            },\r\n' +
    '            {\r\n' +
    '                "ID": 11,\r\n' +
    '                "Settings": {\r\n' +
    '                    "crop-bottom": 0,\r\n' +
    '                    "crop-left": 0,\r\n' +
    '                    "crop-right": 0,\r\n' +
    '                    "crop-top": 0,\r\n' +
    '                    "height": 1080,\r\n' +
    '                    "width": 1920\r\n' +
    '                }\r\n' +
    '            }\r\n' +
    '        ]\r\n' +
    '    },\r\n' +
    '    "Metadata": {\r\n' +
    '        "ReleaseDate": "2020-04-15T08:04:40.613961"\r\n' +
    '    },\r\n' +
    '    "PAR": {\r\n' +
    '        "Den": 1,\r\n' +
    '        "Num": 1\r\n' +
    '    },\r\n' +
    '    "SequenceID": 0,\r\n' +
    '    "Source": {\r\n' +
    '        "Angle": 0,\r\n' +
    '        "Path": "\\\\Users\\\\Administrator\\\\Desktop\\\\UoAxRvW3Z_g-Yh7muXigS\\\\result.avi",\r\n' +
    '        "Range": {\r\n' +
    '            "End": 1,\r\n' +
    '            "Start": 1,\r\n' +
    '            "Type": "chapter"\r\n' +
    '        },\r\n' +
    '        "Title": 1\r\n' +
    '    },\r\n' +
    '    "Subtitle": {\r\n' +
    '        "Search": {\r\n' +
    '            "Burn": true,\r\n' +
    '            "Default": false,\r\n' +
    '            "Enable": false,\r\n' +
    '            "Forced": false\r\n' +
    '        },\r\n' +
    '        "SubtitleList": []\r\n' +
    '    },\r\n' +
    '    "Video": {\r\n' +
    '        "ColorMatrixCode": 0,\r\n' +
    '        "Encoder": "x264",\r\n' +
    '        "Level": "auto",\r\n' +
    '        "Options": "",\r\n' +
    '        "Preset": "medium",\r\n' +
    '        "Profile": "auto",\r\n' +
    '        "QSV": {\r\n' +
    '            "AsyncDepth": 4,\r\n' +
    '            "Decode": false\r\n' +
    '        },\r\n' +
    '        "Quality": 22.0,\r\n' +
    '        "Tune": "",\r\n' +
    '        "Turbo": false,\r\n' +
    '        "TwoPass": false\r\n' +
    '    }\r\n' +
    '}\r\n' +
    '[10:07:12] starting job\r\n' +
    '[10:07:12] job configuration:\r\n' +
    '[10:07:12]  * source\r\n' +
    '[10:07:12]    + \\Users\\Administrator\\Desktop\\UoAxRvW3Z_g-Yh7muXigS\\result.avi\r\n' +
    '[10:07:12]    + title 1, chapter(s) 1 to 1\r\n' +
    '[10:07:12]    + container: avi\r\n' +
    '[10:07:12]    + data rate: 1244179 kbps\r\n' +
    '[10:07:12]  * destination\r\n' +
    '[10:07:12]    + \\Users\\Administrator\\Desktop\\UoAxRvW3Z_g-Yh7muXigS\\file:\\C:\\Users\\Administrator\\Desktop\\output.mp4\r\n' +
    '[10:07:12]    + container: MPEG-4 (libavformat)\r\n' +
    '[10:07:12]  * video track\r\n' +
    '[10:07:12]    + decoder: rawvideo\r\n' +
    '[10:07:12]    + filters\r\n' +
    '[10:07:12]      + Framerate Shaper (mode=0)\r\n' +
    '[10:07:12]        + frame rate: same as source (around 25.000 fps)\r\n' +
    '[10:07:12]      + Crop and Scale (width=1920:height=1080:crop-top=0:crop-bottom=0:crop-left=0:crop-right=0)\r\n' +
    '[10:07:12]        + source: 1920 * 1080, crop (0/0/0/0): 1920 * 1080, scale: 1920 * 1080\r\n' +
    '[10:07:12]    + Output geometry\r\n' +
    '[10:07:12]      + storage dimensions: 1920 x 1080\r\n' +
    '[10:07:12]      + pixel aspect ratio: 1 : 1\r\n' +
    '[10:07:12]      + display dimensions: 1920 x 1080\r\n' +
    '[10:07:12]    + encoder: H.264 (libx264)\r\n' +
    '[10:07:12]      + preset:  medium\r\n' +
    '[10:07:12]      + profile: auto\r\n' +
    '[10:07:12]      + level:   auto\r\n' +
    '[10:07:12]      + quality: 22.00 (RF)\r\n' +
    '[10:07:12] sync: expecting 101 video frames\r\n' +
    '[10:07:12] encx264: encoding at constant RF 22.000000\r\n' +
    'x264 [info]: using SAR=1/1\r\n' +
    'x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2\r\n' +
    'x264 [info]: profile High, level 4.0\r\n' +
    'ERROR: avio_open2 failed, errno -22\r\n' +
    '[10:07:12] work: average encoding speed for job is 0.000000 fps\r\n' +
    '\rEncoding: task 1 of 1, 0.00 %[10:07:13] vfr: lost time: 0 (0 frames)\r\n' +
    '[10:07:13] vfr: gained time: 0 (0 frames) (0 not accounted for)\r\n' +
    '[10:07:13] rawvideo-decoder done: 0 frames, 0 decoder errors\r\n' +
    '[10:07:13] sync: got 0 frames, 101 expected\r\n' +
    '[10:07:13] libhb: work result = 3\r\n' +
    '\r\n' +
    'Encode failed (error 3).\r\n' +
    '\r\n' +
    'HandBrake has exited.\r\n',
  options: {
    input: '\\Users\\Administrator\\Desktop\\UoAxRvW3Z_g-Yh7muXigS\\result.avi',
    output: '\\Users\\Administrator\\Desktop\\UoAxRvW3Z_g-Yh7muXigS\\file:\\C:\\Users\\Administrator\\Desktop\\output.mp4'
  }
}
[UoAxRvW3Z_g-Yh7muXigS] [action-handbrake] erasing input \Users\Administrator\Desktop\UoAxRvW3Z_g-Yh7muXigS\result.avi
[UoAxRvW3Z_g-Yh7muXigS] [action-handbrake] encoding complete
> job rendering failed
Error: Error loading postrender module nexrender-action-handbrake: Error: Error in action-handbrake module
    at C:\Users\Administrator\AppData\Roaming\npm\node_modules\@nexrender\cli\node_modules\@nexrender\core\src\tasks\actions.js:25:35
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
inlife commented 4 years ago

Could you try the newer versions of nexrender action encode? 1.13.2+ or 1.14.0+

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.