jbilcke-hf HF staff commited on
Commit
059a558
·
1 Parent(s): ca5b51d
src/bug-in-bun/aitube_ffmpeg/overlay/imageToVideoBase64.ts CHANGED
@@ -70,12 +70,12 @@ export async function imageToVideoBase64({
70
 
71
  if (originalAspect > targetAspect) {
72
  // Crop width to match target aspect
73
- console.log("imageToVideoBase64 case 1")
74
  cropHeight = originalHeight;
75
  cropWidth = Math.floor(cropHeight * targetAspect);
76
  } else {
77
  // Crop height to match target aspect
78
- console.log("imageToVideoBase64 case 2")
79
  cropWidth = originalWidth;
80
  cropHeight = Math.floor(cropWidth / targetAspect);
81
  }
@@ -100,6 +100,7 @@ export async function imageToVideoBase64({
100
  `zoompan=z='min(zoom+${(endZoom - startZoom) / framesTotal}, ${endZoom})':x='${xCenter}':y='${yCenter}':d=${zoomDurationFrames}`
101
  ].join(',');
102
 
 
103
  console.log(`imagetoVideoBase64 called with: ${JSON.stringify({
104
  inputImageInBase64: inputImageInBase64?.slice(0, 50),
105
  outputFilePath,
@@ -124,7 +125,8 @@ export async function imageToVideoBase64({
124
  zoomDurationFrames,
125
  videoFilters,
126
  }, null, 2)}`)
127
-
 
128
  // Process the image to video conversion using ffmpeg.
129
  await new Promise<void>((resolve, reject) => {
130
  ffmpeg(inputImagePath)
 
70
 
71
  if (originalAspect > targetAspect) {
72
  // Crop width to match target aspect
73
+ // console.log("imageToVideoBase64 case 1")
74
  cropHeight = originalHeight;
75
  cropWidth = Math.floor(cropHeight * targetAspect);
76
  } else {
77
  // Crop height to match target aspect
78
+ // console.log("imageToVideoBase64 case 2")
79
  cropWidth = originalWidth;
80
  cropHeight = Math.floor(cropWidth / targetAspect);
81
  }
 
100
  `zoompan=z='min(zoom+${(endZoom - startZoom) / framesTotal}, ${endZoom})':x='${xCenter}':y='${yCenter}':d=${zoomDurationFrames}`
101
  ].join(',');
102
 
103
+ /*
104
  console.log(`imagetoVideoBase64 called with: ${JSON.stringify({
105
  inputImageInBase64: inputImageInBase64?.slice(0, 50),
106
  outputFilePath,
 
125
  zoomDurationFrames,
126
  videoFilters,
127
  }, null, 2)}`)
128
+ */
129
+
130
  // Process the image to video conversion using ffmpeg.
131
  await new Promise<void>((resolve, reject) => {
132
  ffmpeg(inputImagePath)