jbilcke-hf HF staff commited on
Commit
4e2728b
·
1 Parent(s): 20db9f1

format change

Browse files
Files changed (1) hide show
  1. src/index.mts +4 -3
src/index.mts CHANGED
@@ -36,8 +36,8 @@ app.post("/", async (req: Request, res: Response, _next: NextFunction) => {
36
 
37
  const defaultOptions: ColmapOptions = {
38
  command: 'automatic_reconstructor',
39
- workspacePath: projectTempDir + '/images',
40
- imagePath: projectTempDir + '/images',
41
  };
42
 
43
  const requestBody = typeof req.body === "object" ? req.body : undefined;
@@ -135,10 +135,11 @@ async function handleFileStorage(dataFile: fileUpload.UploadedFile | Buffer, pro
135
  function generateImagesFromData(imageFolder: string, filePath: string) {
136
  console.log(`generateImagesFromData("${imageFolder}", "${filePath}")`);
137
  return new Promise<void>((resolve, reject) => {
 
138
  ffmpeg(filePath)
139
  // .outputOptions('-vf', 'fps=1')
140
  .outputOptions('-i')
141
- .output(path.join(imageFolder, 'image-%03d.jpg'))
142
  .on('end', () => {
143
  console.log('Image generation finished successfully.');
144
  resolve();
 
36
 
37
  const defaultOptions: ColmapOptions = {
38
  command: 'automatic_reconstructor',
39
+ workspacePath: projectTempDir,
40
+ imagePath: imageFolder,
41
  };
42
 
43
  const requestBody = typeof req.body === "object" ? req.body : undefined;
 
135
  function generateImagesFromData(imageFolder: string, filePath: string) {
136
  console.log(`generateImagesFromData("${imageFolder}", "${filePath}")`);
137
  return new Promise<void>((resolve, reject) => {
138
+ console.log(`going to write to ${path.join(imageFolder, 'image%d.jpg')}`);
139
  ffmpeg(filePath)
140
  // .outputOptions('-vf', 'fps=1')
141
  .outputOptions('-i')
142
+ .output(path.join(imageFolder, 'image%d.jpg'))
143
  .on('end', () => {
144
  console.log('Image generation finished successfully.');
145
  resolve();