Spaces:
Sleeping
Sleeping
Commit
·
bdfc7ce
1
Parent(s):
3dcaad7
Add options
Browse files- routes.js +4 -1
- utils/CaptionRender.js +1 -1
routes.js
CHANGED
|
@@ -199,7 +199,10 @@ RenderRouter.post('/api/render-sync', async (req, res) => {
|
|
| 199 |
(log) => {
|
| 200 |
logs.push(log);
|
| 201 |
},
|
| 202 |
-
getNpmScript(req.query.media_type),
|
|
|
|
|
|
|
|
|
|
| 203 |
}
|
| 204 |
else if (renderMethod == 'cli' || req.query.media_type == 'image') {
|
| 205 |
await doRender(
|
|
|
|
| 199 |
(log) => {
|
| 200 |
logs.push(log);
|
| 201 |
},
|
| 202 |
+
getNpmScript(req.query.media_type),
|
| 203 |
+
req.body.caption_only,
|
| 204 |
+
req.body.caption_only,
|
| 205 |
+
controller);
|
| 206 |
}
|
| 207 |
else if (renderMethod == 'cli' || req.query.media_type == 'image') {
|
| 208 |
await doRender(
|
utils/CaptionRender.js
CHANGED
|
@@ -128,7 +128,7 @@ export class CaptionRenderer {
|
|
| 128 |
const videoDuration = getDuration(concatFile);
|
| 129 |
const atrimArg = (videoDuration && !isNaN(videoDuration)) ? `,atrim=end=${videoDuration}` : '';
|
| 130 |
|
| 131 |
-
const voiceVolume = options
|
| 132 |
const musicArgs = [
|
| 133 |
'-i', concatFile,
|
| 134 |
'-i', bgMusic,
|
|
|
|
| 128 |
const videoDuration = getDuration(concatFile);
|
| 129 |
const atrimArg = (videoDuration && !isNaN(videoDuration)) ? `,atrim=end=${videoDuration}` : '';
|
| 130 |
|
| 131 |
+
const voiceVolume = options?.voiceVolume || 1.5;
|
| 132 |
const musicArgs = [
|
| 133 |
'-i', concatFile,
|
| 134 |
'-i', bgMusic,
|