Update server.js
Browse files
server.js
CHANGED
|
@@ -210,18 +210,16 @@ app.post('/render', async (req, res) => {
|
|
| 210 |
inputProps: { scenes: batchScenes, settings },
|
| 211 |
chromiumOptions: {
|
| 212 |
executablePath: process.env.CHROME_BIN || '/usr/bin/google-chrome-stable',
|
| 213 |
-
enableMultiProcessRendering:
|
| 214 |
args: [
|
| 215 |
'--no-sandbox',
|
| 216 |
'--disable-dev-shm-usage',
|
| 217 |
-
'--
|
| 218 |
-
'--
|
| 219 |
-
'--enable-zero-copy',
|
| 220 |
-
'--ignore-gpu-blocklist',
|
| 221 |
]
|
| 222 |
},
|
| 223 |
-
concurrency:
|
| 224 |
-
disallowParallelEncoding:
|
| 225 |
onProgress: ({ progress }) => {
|
| 226 |
const percent = Math.round(progress * 100);
|
| 227 |
if (percent !== lastLoggedPercent && percent % 10 === 0) {
|
|
|
|
| 210 |
inputProps: { scenes: batchScenes, settings },
|
| 211 |
chromiumOptions: {
|
| 212 |
executablePath: process.env.CHROME_BIN || '/usr/bin/google-chrome-stable',
|
| 213 |
+
enableMultiProcessRendering: true, // SPEED: Enable since we have 32GB RAM
|
| 214 |
args: [
|
| 215 |
'--no-sandbox',
|
| 216 |
'--disable-dev-shm-usage',
|
| 217 |
+
'--disable-gpu', // CPU Mode
|
| 218 |
+
'--mute-audio',
|
|
|
|
|
|
|
| 219 |
]
|
| 220 |
},
|
| 221 |
+
concurrency: 2, // SPEED: 2x Parallel Frames
|
| 222 |
+
disallowParallelEncoding: false, // SPEED: Allow parallel encoding
|
| 223 |
onProgress: ({ progress }) => {
|
| 224 |
const percent = Math.round(progress * 100);
|
| 225 |
if (percent !== lastLoggedPercent && percent % 10 === 0) {
|