Selaa lähdekoodia

Quoting paths in case of special chars, close #31

Noah 7 vuotta sitten
vanhempi
commit
d2f987b50f
2 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 1 1
      audiogram/combine-frames.js
  2. 1 1
      audiogram/trim.js

+ 1 - 1
audiogram/combine-frames.js Näytä tiedosto

4
 
4
 
5
   // Raw ffmpeg command with standard mp4 setup
5
   // Raw ffmpeg command with standard mp4 setup
6
   // Some old versions of ffmpeg require -strict for the aac codec
6
   // Some old versions of ffmpeg require -strict for the aac codec
7
-  var cmd = "ffmpeg -r " + options.framesPerSecond + " -i " + options.framePath + " -i " + options.audioPath + " -c:v libx264 -c:a aac -strict experimental -shortest -pix_fmt yuv420p " + options.videoPath;
7
+  var cmd = "ffmpeg -r " + options.framesPerSecond + " -i \"" + options.framePath + "\" -i \"" + options.audioPath + "\" -c:v libx264 -c:a aac -strict experimental -shortest -pix_fmt yuv420p \"" + options.videoPath + "\"";
8
 
8
 
9
   exec(cmd, cb);
9
   exec(cmd, cb);
10
 
10
 

+ 1 - 1
audiogram/trim.js Näytä tiedosto

17
 
17
 
18
   }
18
   }
19
 
19
 
20
-  var cmd = "ffmpeg -i " + options.origin + " -ss " + (options.startTime || 0) + " -t " + (options.endTime - options.startTime) + " -acodec libmp3lame -b:a 128k " + options.destination;
20
+  var cmd = "ffmpeg -i \"" + options.origin + "\" -ss " + (options.startTime || 0) + " -t " + (options.endTime - options.startTime) + " -acodec libmp3lame -b:a 128k \"" + options.destination + "\"";
21
 
21
 
22
   exec(cmd, cb);
22
   exec(cmd, cb);
23
 
23