Browse Source

Quoting paths in case of special chars, close #31

Noah 7 years ago
parent
commit
d2f987b50f
2 changed files with 2 additions and 2 deletions
  1. 1 1
      audiogram/combine-frames.js
  2. 1 1
      audiogram/trim.js

+ 1 - 1
audiogram/combine-frames.js View File

@@ -4,7 +4,7 @@ function combineFrames(options, cb) {
4 4
 
5 5
   // Raw ffmpeg command with standard mp4 setup
6 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 9
   exec(cmd, cb);
10 10
 

+ 1 - 1
audiogram/trim.js View File

@@ -17,7 +17,7 @@ function trimAudio(options, cb) {
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 22
   exec(cmd, cb);
23 23