Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Commit
·
8aa24de
1
Parent(s):
a6123d1
fix maybe
Browse files
src/bug-in-bun/aitube_ffmpeg/overlay/imageToVideoBase64.ts
CHANGED
@@ -114,9 +114,9 @@ export async function imageToVideoBase64({
|
|
114 |
].join(',');
|
115 |
*/
|
116 |
|
117 |
-
// hopefully this
|
118 |
const videoFilters = [
|
119 |
-
`crop=${cropWidth}:${cropHeight}:${(originalWidth-cropWidth)/2}:${(originalHeight-cropHeight)/2}`,
|
120 |
`zoompan=z='min(zoom+${(endZoom - startZoom) / framesTotal}, ${endZoom})':x='${xCenter}':y='${yCenter}':d=${fps}`,
|
121 |
].join(',');
|
122 |
|
@@ -139,7 +139,8 @@ export async function imageToVideoBase64({
|
|
139 |
// Process the image to video conversion using ffmpeg.
|
140 |
await new Promise<void>((resolve, reject) => {
|
141 |
ffmpeg(inputImagePath)
|
142 |
-
|
|
|
143 |
.outputOptions([
|
144 |
`-t ${durationInSeconds}`,
|
145 |
`-r ${fps}`,
|
|
|
114 |
].join(',');
|
115 |
*/
|
116 |
|
117 |
+
// hopefully this version works betetr
|
118 |
const videoFilters = [
|
119 |
+
`crop=${cropWidth}:${cropHeight}:${(originalWidth - cropWidth) / 2}:${(originalHeight - cropHeight) / 2}`,
|
120 |
`zoompan=z='min(zoom+${(endZoom - startZoom) / framesTotal}, ${endZoom})':x='${xCenter}':y='${yCenter}':d=${fps}`,
|
121 |
].join(',');
|
122 |
|
|
|
139 |
// Process the image to video conversion using ffmpeg.
|
140 |
await new Promise<void>((resolve, reject) => {
|
141 |
ffmpeg(inputImagePath)
|
142 |
+
// this is disabled to avoid repeating the zoom-in multiple times
|
143 |
+
// .inputOptions(['-loop 1'])
|
144 |
.outputOptions([
|
145 |
`-t ${durationInSeconds}`,
|
146 |
`-r ${fps}`,
|